:root {
  --bg: #07111f;
  --bg-alt: #0d1b2c;
  --panel: rgba(11, 24, 42, 0.88);
  --header-frame-height: 88px;
  --footer-frame-height: 92px;
  --panel-2: rgba(16, 31, 52, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --text: #edf4ff;
  --muted: #9fb0c8;
  --accent: #7ec7ff;
  --accent-2: #89fff1;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgba(126, 199, 255, 0.55) rgba(8, 20, 36, 0.92);
}

*::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(6, 16, 28, 0.96), rgba(9, 24, 42, 0.92));
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(126, 199, 255, 0.62), rgba(86, 146, 214, 0.72));
  border: 2px solid rgba(8, 20, 36, 0.95);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(144, 214, 255, 0.8), rgba(98, 168, 240, 0.9));
}

*::-webkit-scrollbar-corner {
  background: rgba(8, 20, 36, 0.96);
}

body {
  margin: 0;
  position: relative;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: #07111f;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 520px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(126, 199, 255, 0.17), transparent 24%),
    radial-gradient(circle at top right, rgba(137, 255, 241, 0.09), transparent 20%),
    linear-gradient(180deg, #06101c 0%, #081523 36%, #07111f 100%);
  background-repeat: no-repeat;
}


body.page-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
}


main {
  min-width: 0;
  min-height: 0;
}


a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(16px);
  background: rgba(6, 16, 28, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.logo {
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
}

.logo-image {
  display: block;
  height: clamp(34px, 4vw, 52px);
  width: auto;
  max-width: min(300px, 24vw);
  object-fit: contain;
}

.menu {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.menu a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  min-height: 50px;
  padding: 10px 12px 6px;
  border-radius: 12px;
  display: grid;
  grid-template-rows: auto 2px;
  align-items: end;
  gap: 7px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu-label {
  line-height: 1.1;
}

.menu-slider {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.menu a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.menu a.active {
  color: var(--text);
}

.menu a.active .menu-slider {
  background: rgba(126, 199, 255, 0.58);
  box-shadow: 0 1px 4px rgba(126, 199, 255, 0.1);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 190px;
  min-width: 190px;
}

.auth-button,
.hero-button,
.card-link,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: 0.22s ease;
}

.auth-button {
  min-width: 120px;
  min-height: 44px;
  height: 44px;
  padding: 0 18px 2px;
  border-radius: 14px;
}

.auth-button-label {
  display: block;
  line-height: 1;
  transform: translateY(-2px);
}

.auth-button,
.hero-button.primary,
.search-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04111f;
  box-shadow: var(--shadow);
}

.hero-button.secondary,
.card-link,
.profile-trigger {
  min-width: 190px;
  min-height: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 6px 0 0;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  box-shadow: none;
}

.profile-trigger:hover,
.profile-trigger:focus-visible {
  background: transparent;
}

.profile-trigger:focus-visible {
  outline: 1px solid rgba(126, 199, 255, 0.28);
  outline-offset: 3px;
  border-radius: 12px;
}

.profile-trigger:hover .profile-name,
.profile-trigger:focus-visible .profile-name,
.profile-trigger.is-open .profile-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.profile-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.header-messages-unread-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: #ff4d5d;
  box-shadow: 0 0 0 3px rgba(255, 77, 93, 0.12);
}

.header-messages-unread-dot[hidden],
.dropdown-messages-unread-dot[hidden] {
  display: none !important;
}

.profile-name {
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1;
  text-decoration: none;
}

.profile-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
  margin-top: 1px;
}

.profile-trigger.is-open .profile-caret {
  transform: rotate(180deg);
}

.profile-dropdown-menu {
  position: fixed;
  top: 72px;
  right: max(16px, calc((100vw - 1180px) / 2 + 16px));
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(8, 18, 31, 0.98);
  box-shadow: var(--shadow);
  display: none;
  z-index: 220;
}

.profile-dropdown-menu.open {
  display: block;
}

.dropdown-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
}

.dropdown-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(126, 199, 255, 0.38), rgba(137, 255, 241, 0.28));
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.dropdown-header-text {
  min-width: 0;
}

.dropdown-header strong,
.dropdown-header span {
  display: block;
}

.dropdown-header strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-header span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.92rem;
}

.dropdown-list {
  display: grid;
}

.dropdown-list a,
.dropdown-list button {
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 14px 18px;
  text-decoration: none;
  cursor: pointer;
}

.dropdown-list a:hover,
.dropdown-list button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.hero {
  padding: 84px 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 4.35vw, 4.25rem);
  line-height: 0.98;
}

h1 span,
.accent {
  color: var(--accent-2);
}

.lead,
.section-intro,
.info-card p,
.feature-card p,
.help-list li,
.search-note,
.site-footer p,
.footer-list a,
.footer-list li,
.meta-line,
.hero-panel p,
.kb-list li,
.forum-list li,
.about-grid li {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0;
  list-style: none;
  margin: 0;
}

.hero-stats li,
.hero-panel,
.info-card,
.feature-card,
.inner-page-box,
.search-box,
.wide-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-stats li {
  padding: 18px;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats span {
  margin-top: 6px;
  color: var(--accent-2);
  font-weight: 700;
}

.hero-panel {
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -60px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(126, 199, 255, 0.25), transparent 65%);
  pointer-events: none;
}

.hero-panel h2 {
  margin-bottom: 12px;
  font-size: 1.9rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.section {
  padding: 38px 0 72px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 26px;
}

.cards-3,
.cards-2,
.about-grid {
  display: grid;
  gap: 18px;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cards-2,
.about-grid {
  grid-template-columns: repeat(2, 1fr);
}

.info-card,
.feature-card,
.inner-page-box,
.search-box,
.wide-panel {
  padding: 24px;
}

.info-card h3,
.feature-card h3,
.inner-page-box h2,
.search-box h2,
.wide-panel h2 {
  margin-bottom: 10px;
}

.card-link {
  margin-top: 16px;
}

.page-hero {
  padding: 72px 0 24px;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-grid {
  display: grid;
  gap: 18px;
}

.help-list,
.kb-list,
.forum-list,
.about-grid ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.search-input::placeholder {
  color: #7f93af;
}

.mock-results {
  display: grid;
  gap: 12px;
}

.result-item {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.result-item strong,
.result-item span {
  display: block;
}

.result-item span {
  margin-top: 5px;
  color: var(--muted);
}

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  background: rgba(6, 16, 28, 0.55);
}

.footer-grid {
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 22px;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li + li {
  margin-top: 8px;
}

.footer-list a {
  text-decoration: none;
}

.footer-list a:hover {
  color: var(--text);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.hidden {
  display: none !important;
}



.hero-home {
  padding-bottom: 28px;
}

.hero-grid-home {
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-stats-home li {
  min-height: 118px;
}

.status-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-list {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.status-row span {
  color: var(--muted);
}

.status-row strong {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
}

.panel-note {
  margin-bottom: 0;
}

.compact-heading {
  margin-bottom: 22px;
}

.feature-highlight h3,
.step-card h3,
.preview-panel h2,
.cta-banner h2 {
  margin-bottom: 10px;
}

.section-steps {
  padding-top: 8px;
}

.steps-grid,
.mini-preview-grid {
  display: grid;
  gap: 18px;
}

.steps-grid {
  grid-template-columns: repeat(3, 1fr);
}

.step-card,
.mini-preview-card,
.cta-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.step-card {
  padding: 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(126, 199, 255, 0.12);
  border: 1px solid rgba(126, 199, 255, 0.2);
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.media-preview-grid {
  align-items: stretch;
}

.preview-panel {
  height: 100%;
}

.mini-preview-grid {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.mini-preview-card {
  display: block;
  padding: 18px 20px;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.mini-preview-card strong,
.mini-preview-card span {
  display: block;
}

.mini-preview-card span,
.plan-list li,
.step-card p {
  color: var(--muted);
  line-height: 1.7;
}

.mini-preview-card span {
  margin-top: 6px;
}

.mini-preview-card:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 199, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.accent-panel {
  position: relative;
  overflow: hidden;
}

.accent-panel::after {
  content: "";
  position: absolute;
  inset: auto -100px -120px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(137, 255, 241, 0.17), transparent 67%);
  pointer-events: none;
}

.plan-list {
  margin: 0;
  padding-left: 20px;
}

.cta-section {
  padding-top: 0;
}

.cta-banner {
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#site-header,
#site-footer {
  width: 100%;
  display: block;
}

#site-header {
  min-height: var(--header-frame-height);
}

#site-footer {
  min-height: var(--footer-frame-height);
}



/* Forum tree index */
.forum-layout--index,
.forum-layout--section {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.forum-main--index {
  gap: 18px;
}

.forum-section-panels {
  display: grid;
  gap: 18px;
}

.forum-section-panel {
  border: 1px solid rgba(126, 199, 255, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(126, 199, 255, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(11, 28, 49, 0.72), rgba(7, 19, 34, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 16px 34px rgba(0,0,0,0.14);
  padding: 20px;
}

.forum-section-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.forum-section-panel-head h3 {
  margin: 8px 0 8px;
  font-size: clamp(1.28rem, 2vw, 1.65rem);
}

.forum-section-panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.forum-section-open {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(126, 199, 255, 0.16);
  border-radius: 999px;
  background: rgba(126, 199, 255, 0.055);
}

.forum-section-panel-meta {
  margin-bottom: 6px;
}

.forum-tree {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding-left: 10px;
}

.forum-tree-branch {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 88px;
}

.forum-tree-branch::before {
  content: '';
  position: absolute;
  left: 22px;
  top: -4px;
  bottom: -4px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126,199,255,0.38), rgba(126,199,255,0.08));
}

.forum-tree-branch:first-child::before {
  top: 24px;
}

.forum-tree-branch:last-child::before {
  bottom: calc(100% - 24px);
}

.forum-tree-line {
  position: relative;
  z-index: 1;
}

.forum-tree-line::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 24px;
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: rgba(126,199,255,0.38);
}

.forum-tree-content {
  min-width: 0;
  padding: 13px 14px 15px;
  border: 1px solid rgba(126, 199, 255, 0.1);
  border-radius: 18px;
  background: rgba(255,255,255,0.026);
}

.forum-tree-branch.is-closed .forum-tree-content {
  border-color: rgba(239, 83, 80, 0.15);
  background: rgba(239, 83, 80, 0.035);
}

.forum-tree-subsection-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.forum-tree-subsection-title {
  color: var(--text);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 900;
}

.forum-tree-subsection-title:hover,
.forum-tree-subsection-title:focus-visible {
  color: var(--accent-2);
  outline: none;
}

.forum-tree-description {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.forum-tree-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}

.forum-tree-topic,
.forum-tree-more,
.forum-tree-topic-empty {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.035);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.25;
}

.forum-tree-topic span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-tree-topic small {
  flex: 0 0 auto;
  color: rgba(196,210,231,0.58);
  font-size: 0.78rem;
}

.forum-tree-topic:hover,
.forum-tree-topic:focus-visible,
.forum-tree-more:hover,
.forum-tree-more:focus-visible {
  color: var(--text);
  border-color: rgba(126, 199, 255, 0.22);
  background: rgba(126, 199, 255, 0.07);
  outline: none;
}

.forum-tree-more {
  color: var(--accent-2);
  font-weight: 800;
}

.forum-tree-meta,
.forum-tree-actions {
  margin-top: 10px;
}

.forum-subsection-summary,
.forum-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.forum-subsection-summary span,
.forum-page-link,
.forum-page-dots {
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.035);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.forum-page-link:hover,
.forum-page-link:focus-visible,
.forum-page-link.is-active {
  color: var(--text);
  border-color: rgba(126, 199, 255, 0.24);
  background: rgba(126, 199, 255, 0.08);
  outline: none;
}

.forum-page-link.is-active {
  pointer-events: none;
}

@media (max-width: 980px) {
  .nav {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .menu-toggle {
    display: inline-flex;
    order: 2;
    justify-self: end;
  }

  .header-actions {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
  }

  #auth-widget,
  .profile-menu,
  .auth-button,
  .profile-trigger,
  .profile-dropdown-menu {
    width: 100%;
  }

  .menu {
    display: none;
    order: 4;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 14px;
  }

  .menu.is-open {
    display: flex;
  }

  .hero-grid,
  .cards-3,
  .cards-2,
  .about-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding-top: 48px;
  }

  .hero-actions,
  .search-form {
    grid-template-columns: 1fr;
    display: grid;
  }
}


.site-frame {
  display: block;
  width: 100%;
  border: 0;
  overflow: hidden;
}

.site-frame-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-frame-height);
}

.site-frame-footer {
  height: var(--footer-frame-height);
}

.frame-doc,
.frame-page {
  overflow: hidden !important;
  background: transparent;
}

.frame-page {
  min-height: auto;
}

.frame-page .container {
  width: min(1180px, calc(100% - 32px));
}

.frame-embedded-header {
  position: relative;
  top: 0;
}

.frame-header-page,
.frame-footer-page {
  overflow: hidden;
}

.frame-header-page .site-header {
  min-height: var(--header-frame-height);
}


.frame-header-page::before,
.frame-footer-page::before {
  display: none;
}

.frame-footer-page {
  background: rgba(6, 16, 28, 0.72);
}

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: rgba(6, 16, 28, 0.72);
  backdrop-filter: blur(16px);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.06) 18%, rgba(255, 255, 255, 0.06) 82%, rgba(255, 255, 255, 0));
}

.footer-row {
  min-height: var(--footer-frame-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-copy {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 720px;
}

.footer-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  color: var(--muted);
  text-align: right;
}

@media (max-width: 960px) {
  :root {
    --header-frame-height: 154px;
    --footer-frame-height: 116px;
  }

  .site-frame-header {
    height: var(--header-frame-height);
  }

  .site-frame-footer {
    height: var(--footer-frame-height);
  }

  .footer-row {
    min-height: var(--footer-frame-height);
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
    flex-direction: column;
  }

  .footer-meta {
    justify-items: start;
    text-align: left;
  }
}


.auth-submit {
  border-color: rgba(126, 199, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(14, 34, 58, 0.96), rgba(10, 25, 45, 0.96));
}

.auth-submit:hover {
  border-color: rgba(126, 199, 255, 0.24);
}

.auth-secondary {
  color: rgba(237, 244, 255, 0.92);
}

@media (max-width: 720px) {
  :root {
    --header-frame-height: 228px;
  }

  .site-frame-header {
    height: var(--header-frame-height);
  }
}

@media (max-width: 980px) {
  .steps-grid,
  .media-preview-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .status-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.frame-doc body,
.frame-page {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

body.overlay-open {
  overflow: hidden;
}

#auth-widget {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-height: 44px;
}

.header-auth-placeholder {
  display: block;
  width: 190px;
  height: 44px;
  flex: 0 0 190px;
}



.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
}

.auth-overlay.hidden {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.auth-dropdown {
  position: fixed;
  top: calc(var(--header-frame-height) + 12px);
  left: auto;
  right: max(16px, calc((100vw - min(1180px, calc(100% - 32px))) / 2));
  width: min(320px, calc(100vw - 24px));
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(4,16,31,0.98), rgba(2,12,24,0.98));
  box-shadow: 0 18px 44px rgba(0,0,0,0.28);
  padding: 12px;
}

.auth-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.auth-tab {
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.98rem;
}

.auth-tab.active {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-color: rgba(126, 199, 255, 0.14);
}

.auth-pane {
  display: none;
}

.auth-pane.active {
  display: block;
}

.auth-kicker {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-field-compact {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid rgba(126, 199, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(6, 18, 34, 0.96), rgba(4, 14, 28, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.025),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

.auth-field-icon,
.auth-action-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(198, 216, 239, 0.72);
}

.auth-field-icon svg,
.auth-action-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.auth-field-compact input {
  width: 100%;
  min-height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.auth-field-compact input::placeholder {
  color: rgba(196, 210, 231, 0.46);
}

.auth-field-compact:hover {
  border-color: rgba(126, 199, 255, 0.14);
}

.auth-field-compact:focus-within {
  border-color: rgba(126, 199, 255, 0.24);
  box-shadow:
    0 0 0 3px rgba(126, 199, 255, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.auth-ghost-button {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(126, 199, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(12, 30, 52, 0.88), rgba(8, 22, 40, 0.88));
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 18px rgba(0,0,0,0.12);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.auth-ghost-button:hover {
  background:
    linear-gradient(180deg, rgba(15, 35, 60, 0.94), rgba(10, 26, 46, 0.94));
  border-color: rgba(126, 199, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 22px rgba(0,0,0,0.16);
}

.auth-ghost-button:active {
  transform: translateY(1px);
}

.auth-submit,
.auth-back,
.auth-secondary {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 18px rgba(0,0,0,0.12);
}

@media (max-width: 720px) {
  .auth-dropdown {
    width: min(360px, calc(100vw - 20px)) !important;
    left: 10px !important;
    right: 10px !important;
  }
}


.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown-item.has-unread-messages .dropdown-item-label {
  color: var(--text);
}

.dropdown-messages-unread-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-left: auto;
  border-radius: 999px;
  background: #ff4d5d;
  box-shadow: 0 0 0 3px rgba(255, 77, 93, 0.12);
}

.dropdown-item-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  opacity: 0.95;
}

.dropdown-item-label {
  min-width: 0;
}

.dropdown-item-icon svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,0.96);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}


.nav-search-button {
  width: 38px;
  height: 38px;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 12px;
  padding: 0;
  transition: opacity .18s ease;
}

.nav-search-button:hover {
  opacity: 0.88;
}

.nav-search-button svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,0.92);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.search-modal-overlay[hidden] {
  display: none;
}

.search-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 16, 0.58);
  backdrop-filter: blur(8px);
  padding: 24px;
}

.search-modal-panel {
  width: min(520px, calc(100vw - 32px));
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(4,16,31,0.98), rgba(2,12,24,0.98));
  box-shadow: 0 24px 60px rgba(0,0,0,0.38);
  padding: 22px;
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-modal-kicker {
  color: #7de8f0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}

.search-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.search-modal-title {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
}

.search-modal-label {
  display: block;
  margin-top: 16px;
  margin-bottom: 10px;
  color: #dce9f8;
  font-size: 15px;
  font-weight: 700;
}

.search-modal-input {
  width: 100%;
  height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 0 16px;
  font-size: 16px;
  outline: none;
}

.search-modal-input::placeholder {
  color: rgba(220,233,248,0.46);
}

.search-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.search-modal-submit,
.search-modal-back {
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.search-modal-submit {
  background: linear-gradient(90deg, #79c3ff, #84ebe9);
  color: #041523;
  border: 0;
}

.search-modal-back {
  background: rgba(255,255,255,0.04);
  color: #fff;
}


.header-search-button {
  width: 42px;
  min-width: 42px;
  height: 50px;
  padding: 10px 10px 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-rows: auto 2px;
  align-items: end;
  gap: 8px;
  cursor: pointer;
  border-radius: 12px;
}

.header-search-button::after {
  content: "";
  display: block;
  width: 100%;
  min-width: 24px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.header-search-button:hover {
  color: var(--text);
}

.header-search-button svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,0.9);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  justify-self: center;
}

.search-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 10, 18, 0.58);
  backdrop-filter: blur(8px);
}

.search-modal-overlay.hidden {
  display: none;
}

.search-modal-panel {
  width: min(520px, calc(100vw - 32px));
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 16, 29, 0.98), rgba(4, 12, 22, 0.98));
  box-shadow: 0 24px 60px rgba(0,0,0,0.38);
  padding: 22px;
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-modal-kicker {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.search-modal-title {
  margin-top: 14px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.search-modal-label {
  display: block;
  margin-top: 16px;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text);
}

.search-modal-input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.search-modal-input::placeholder {
  color: rgba(237,244,255,0.42);
}

.search-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.search-modal-submit,
.search-modal-back {
  height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
}

.search-modal-submit {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041320;
}

.search-modal-back {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}


.search-dropdown-overlay.hidden {
  display: none;
}

.search-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 215;
}



@media (max-width: 980px) {
  .search-dropdown-menu {
    top: calc(var(--header-frame-height) + 12px);
    left: max(16px, calc((100vw - min(1180px, calc(100% - 32px))) / 2));
  }
}

@media (max-width: 720px) {
  .search-dropdown-menu {
    right: 10px;
    left: 10px;
    width: auto;
  }
}


.dropdown-avatar {
  background-color: rgba(126, 199, 255, 0.12);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.search-dropdown-overlay,
.profile-dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
}

.search-dropdown-backdrop,
.profile-dropdown-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.search-dropdown-menu {
  position: fixed;
  top: 72px;
  left: max(16px, calc((100vw - 1180px) / 2 + 16px));
  width: 300px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(8, 18, 31, 0.98);
  box-shadow: var(--shadow);
  display: none;
  z-index: 220;
}

.search-dropdown-menu.open {
  display: block;
}

.search-dropdown-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.search-dropdown-label {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
}

.search-dropdown-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.search-dropdown-input:focus {
  border-color: rgba(126, 199, 255, 0.28);
  background: rgba(255,255,255,0.05);
}

.search-dropdown-filters {
  display: grid;
  gap: 10px;
}

.search-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.search-filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.search-filter-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 0 0 3px rgba(8, 18, 31, 0.98);
  transition: border-color 0.2s ease, background 0.2s ease;
  flex: 0 0 auto;
}

.search-filter-option.is-active {
  color: var(--text);
}

.search-filter-option.is-active .search-filter-mark {
  border-color: rgba(126, 199, 255, 0.4);
  background: var(--accent);
}

.search-filter-text {
  line-height: 1.2;
}

.search-dropdown-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.search-dropdown-submit,
.search-dropdown-back {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
  padding: 0;
  cursor: pointer;
}

.search-dropdown-submit:hover,
.search-dropdown-back:hover {
  color: var(--accent);
}

.search-dropdown-overlay.hidden {
  display: none;
}

.search-dropdown-panel {
  position: fixed;
  top: 72px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(8, 18, 31, 0.98);
  box-shadow: var(--shadow);
  z-index: 220;
  display: none;
}

.search-dropdown-menu,
.search-results-dropdown-menu {
  width: 320px;
}

.search-dropdown-menu.open,
.search-results-dropdown-menu.open {
  display: block;
}

.search-dropdown-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.search-dropdown-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.search-dropdown-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.search-dropdown-input:focus {
  border-color: rgba(126, 199, 255, 0.28);
  background: rgba(255,255,255,0.05);
}

.search-dropdown-filters {
  display: grid;
  gap: 10px;
}

.search-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.search-filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.search-filter-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 0 0 3px rgba(8, 18, 31, 0.98);
  transition: border-color 0.2s ease, background 0.2s ease;
  flex: 0 0 auto;
}

.search-filter-option.is-active {
  color: var(--text);
}

.search-filter-option.is-active .search-filter-mark {
  border-color: rgba(126, 199, 255, 0.4);
  background: var(--accent);
}

.search-results-box {
  display: grid;
  gap: 1px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
}

.search-result-item {
  display: grid;
  gap: 6px;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-result-item:hover {
  background: rgba(255,255,255,0.06);
  transform: translateX(2px);
}

.search-result-title {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

.search-result-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.search-results-empty {
  display: grid;
  gap: 8px;
  padding: 18px;
  color: var(--muted);
}

.search-results-empty strong {
  color: var(--text);
}

@media (max-width: 1120px) {
  .search-results-dropdown-menu {
    width: 320px;
  }
}

@media (max-width: 860px) {
  .search-dropdown-panel {
    left: 12px !important;
    right: 12px;
    width: auto !important;
  }

  .search-results-dropdown-menu {
    top: auto !important;
    margin-top: 12px;
  }
}


.frame-doc,
.frame-header-page {
  overflow-y: hidden !important;
  scrollbar-gutter: auto !important;
}

.frame-header-page body,
.frame-page.frame-header-page {
  width: 100%;
}


.home-hero-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-weight: 600;
}

.welcome-panel {
  min-height: 0;
  height: fit-content;
  align-self: start;
}

.hero-home .hero-copy {
  max-width: 760px;
}

.hero-home h1 {
  max-width: 11ch;
  letter-spacing: -0.03em;
}

.home-summary-section {
  padding-top: 6px;
}

.home-value-card {
  min-height: 100%;
}

.home-overview-grid {
  align-items: stretch;
}

.home-overview-panel {
  height: 100%;
}

.home-pillars {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.pillar-row {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.pillar-row strong {
  font-size: 1rem;
}

.pillar-row span {
  color: var(--muted);
  line-height: 1.65;
}

.home-audience-list {
  margin-top: 18px;
}

.home-link-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 980px) {
  .home-hero-grid,
  .home-link-grid {
    grid-template-columns: 1fr;
  }
}


.home-story-section {
  padding-top: 12px;
}

.home-story-section-tight {
  padding-top: 0;
}

.story-panel {
  padding: 30px 32px;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.story-grid-equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-panel h2 {
  margin-bottom: 0;
  max-width: 14ch;
}

.story-panel p:last-child {
  margin-bottom: 0;
}

.story-split,
.story-stack,
.story-links-list {
  display: grid;
  gap: 18px;
}

.story-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-split h3 {
  margin-bottom: 8px;
}

.story-split p,
.story-stack p,
.story-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.story-links-list a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.story-links-list a:first-child {
  padding-top: 0;
}

.story-links-list a:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.story-links-list a:hover {
  color: var(--accent-2);
  padding-left: 6px;
}

.home-story-links-section {
  padding-bottom: 40px;
}

@media (max-width: 980px) {
  .story-grid,
  .story-grid-equal,
  .story-split {
    grid-template-columns: 1fr;
  }

  .story-panel {
    padding: 24px;
  }

  .story-panel h2 {
    max-width: none;
  }
}


.start-panel {
  gap: 20px;
  padding: 28px 28px 30px;
}

  .start-panel-stats {
  display: grid;
  gap: 12px;
}

.start-panel-stat {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.start-panel-line,
.start-panel-heading {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}

.start-panel-value {
  margin: 0;
  color: var(--accent-2);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
}

.start-panel-heading {
  margin-top: 14px;
}

.start-panel .eyebrow {
  margin-bottom: 0;
}

.start-steps {
  display: grid;
  gap: 14px;
}

.start-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(126, 199, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(126, 199, 255, 0.05));
}

.start-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  color: var(--text);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 4px rgba(126, 199, 255, 0.06);
}

.start-step-text {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 700;
}



.races-showcase-section {
  padding-top: 20px;
  padding-bottom: 84px;
}

.races-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  gap: 44px;
  align-items: center;
}

.races-showcase-art {
  min-height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.races-showcase-image {
  display: block;
  width: min(100%, 620px);
  max-height: 640px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.45));
}

.races-showcase-copy {
  display: flex;
  align-items: center;
  min-height: 420px;
}

.races-showcase-title {
  max-width: 9ch;
}

@media (max-width: 980px) {
  .races-showcase-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .races-showcase-art,
  .races-showcase-copy {
    min-height: auto;
  }

  .races-showcase-image {
    width: min(100%, 520px);
    max-height: none;
  }

  .races-showcase-title {
    max-width: none;
  }
}


.races-showcase-copy-inner {
  max-width: 520px;
}

.races-showcase-lead {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.08rem;
}

.races-showcase-lead a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.18s ease;
}

.races-showcase-lead a:hover {
  opacity: 0.85;
  text-decoration: underline;
}


.showcase-section {
  padding-top: 12px;
  padding-bottom: 84px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.showcase-grid-reverse {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
}

.showcase-copy {
  display: flex;
  align-items: center;
  min-height: 420px;
}

.showcase-copy-inner {
  max-width: 540px;
}

.showcase-title {
  max-width: 9ch;
}

.showcase-lead {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.08rem;
}

.showcase-art {
  min-height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-image {
  display: block;
  width: min(100%, 720px);
  max-height: 640px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.42));
}

.showcase-image-engineer {
  width: min(100%, 760px);
  transform: translateY(-56px);
}

@media (max-width: 980px) {
  .showcase-grid,
  .showcase-grid-reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .showcase-copy,
  .showcase-art {
    min-height: auto;
  }

  .showcase-title {
    max-width: none;
  }

  .showcase-image,
  .showcase-image-engineer {
    width: min(100%, 560px);
    max-height: none;
  }

  .showcase-image-engineer {
    transform: translateY(-20px);
  }
}


.showcase-main-title,
.races-showcase-title,
.showcase-title {
  margin: 0;
  font-size: clamp(2.75rem, 4.5vw, 4.35rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-copy .showcase-main-title {
  margin-bottom: 18px;
  max-width: 12.5ch;
}

.races-showcase-title,
.showcase-title {
  max-width: 9ch;
}


.showcase-full-note {
  margin-top: 28px;
  width: min(100vw - 120px, 1120px);
}

.showcase-full-note p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.08rem;
}

.showcase-full-note p:last-child {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .showcase-full-note {
    width: 100%;
  }
}


/* Password eye visibility fix */
.auth-field-compact {
  position: relative;
}

.auth-field-compact input[type="password"],
.auth-field-compact input[type="text"] {
  padding-right: 38px;
}

.auth-password-toggle,
.password-toggle,
.auth-eye-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
  color: rgba(255,255,255,0.92) !important;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 3;
}

.auth-password-toggle svg,
.password-toggle svg,
.auth-eye-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor !important;
  fill: none !important;
  opacity: 1 !important;
}

.auth-field-compact:focus-within .auth-password-toggle,
.auth-field-compact:focus-within .password-toggle,
.auth-field-compact:focus-within .auth-eye-toggle,
.auth-field-compact:hover .auth-password-toggle,
.auth-field-compact:hover .password-toggle,
.auth-field-compact:hover .auth-eye-toggle {
  opacity: 1 !important;
  visibility: visible !important;
}


.site-footer-minimal {
  padding: 20px 0 34px;
}

.footer-minimal-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 76px;
}

.footer-minimal-spacer {
  flex: 1 1 auto;
}

.footer-minimal-meta {
  margin-left: auto;
  text-align: right;
}

.footer-minimal-meta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer-minimal-gap {
  height: 18px;
}


.footer-no-band {
  margin-top: 0;
  border-top: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.site-footer-minimal {
  padding: 10px 0 34px;
  border-top: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#site-footer,
.site-frame-footer,
.site-footer {
  background: transparent !important;
  border-top: 0 !important;
  box-shadow: none !important;
}


/* hide legacy password icons/toggles */
.auth-field-compact .password-visibility-toggle,
.auth-field-compact .password-toggle-icon,
.auth-field-compact .password-eye,
.auth-field-compact .toggle-password,
.auth-field-compact [data-password-toggle]:not(.auth-password-toggle),
.auth-field-compact button[aria-label*="парол"]:not(.auth-password-toggle),
.auth-field-compact button[aria-label*="арол"]:not(.auth-password-toggle) {
  display: none !important;
}


/* remove any old/embedded eye controls completely */
.auth-field-compact input::-ms-reveal,
.auth-field-compact input::-ms-clear,
.auth-field-compact input::-webkit-credentials-auto-fill-button,
.auth-field-compact input::-webkit-textfield-decoration-container {
  display: none !important;
}

.auth-field-compact .password-visibility-toggle,
.auth-field-compact .password-toggle-icon,
.auth-field-compact .password-eye,
.auth-field-compact .toggle-password,
.auth-field-compact [data-password-toggle]:not(.auth-password-toggle),
.auth-field-compact button[aria-label*="парол"]:not(.auth-password-toggle),
.auth-field-compact button[aria-label*="арол"]:not(.auth-password-toggle),
.auth-field-compact .auth-field-icon + button,
.auth-field-compact input + button:not(.auth-password-toggle) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.96) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  z-index: 20;
}

.auth-password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor !important;
  fill: none !important;
  pointer-events: none;
}

#auth-form-message.is-error {
  color: #ffb4b4;
  border: 1px solid rgba(255, 120, 120, 0.25);
}

#auth-form-message.is-success {
  color: #d6f5d6;
  border: 1px solid rgba(140, 255, 140, 0.2);
}

.profile-info-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.45;
}

.profile-characters-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.profile-character-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}


.auth-field-with-status input {
  padding-right: 72px;
}

.auth-status-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.auth-status-indicator svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.auth-status-indicator.is-valid,
.auth-status-indicator.is-invalid,
.auth-status-indicator.is-checking {
  opacity: 1;
}

.auth-status-indicator.is-valid {
  color: #77e18a;
}

.auth-status-indicator.is-invalid {
  color: #ff8d8d;
}

.auth-status-indicator.is-checking {
  color: rgba(224, 233, 249, 0.72);
}

.auth-form button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}


.auth-autofill-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-autofill-trap input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.auth-field-with-prefix {
  grid-template-columns: 16px auto 1fr;
  gap: 6px;
}

.auth-field-with-prefix .auth-field-prefix {
  position: static;
  transform: none;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  min-width: 0;
}

.auth-field-with-prefix input[type="text"] {
  padding-left: 0;
}

.auth-field-with-prefix input::selection {
  background: rgba(255,255,255,0.12);
}

.auth-password-toggle:focus {
  outline: none !important;
  box-shadow: none !important;
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active,
.auth-field-compact input:-webkit-autofill,
.auth-field-compact input:-webkit-autofill:hover,
.auth-field-compact input:-webkit-autofill:focus,
.auth-field-compact input:-webkit-autofill:active {
  -webkit-text-fill-color: rgba(224, 233, 249, 0.92) !important;
  caret-color: rgba(224, 233, 249, 0.92) !important;
  border-radius: inherit;
  -webkit-box-shadow: 0 0 0 1000px rgba(6, 16, 28, 0) inset !important;
  box-shadow: 0 0 0 1000px rgba(6, 16, 28, 0) inset !important;
  background-color: transparent !important;
  background-image: none !important;
  -webkit-background-clip: text !important;
  transition: background-color 99999s ease-in-out 0s, color 99999s ease-in-out 0s;
}

.auth-field-compact input {
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
}


.auth-field-with-prefix {
  grid-template-columns: 16px max-content 1fr;
  gap: 3px;
}

.auth-field-with-prefix .auth-field-prefix {
  margin-right: 0;
}

.auth-field-with-prefix input[type="text"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.auth-field-with-prefix[data-register-phone-field] {
  column-gap: 3px;
}

.auth-field-with-prefix[data-register-phone-field] .auth-field-prefix {
  letter-spacing: 0;
  min-width: auto;
}


.auth-field-with-prefix[data-register-phone-field] {
  grid-template-columns: 16px max-content 1fr;
  column-gap: 1px !important;
}

.auth-field-with-prefix[data-register-phone-field] .auth-field-prefix {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

.auth-field-with-prefix[data-register-phone-field] input[data-register-phone-input] {
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-indent: 0 !important;
}

/* v32 auth popup aligned to profile popup style */
.auth-dropdown {
  top: 72px;
  right: max(16px, calc((100vw - 1180px) / 2 + 16px));
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(8, 18, 31, 0.98);
  box-shadow: var(--shadow);
  padding: 0;
}

.auth-switcher {
  gap: 0;
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.01);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background .16s ease, color .16s ease;
}

.auth-tab:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.auth-tab.active {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 0;
}

.auth-pane {
  padding: 14px 18px 18px;
}

.auth-kicker {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
}

.auth-form {
  gap: 12px;
}

.auth-field-compact {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  box-shadow: none;
}

.auth-field-compact:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}

.auth-field-compact:focus-within {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  box-shadow: none;
}

.auth-field-compact input {
  min-height: 44px;
}

.auth-actions {
  gap: 0;
  margin-top: 4px;
}

.auth-actions .auth-ghost-button + .auth-ghost-button {
  margin-top: 8px;
}

.auth-ghost-button,
.auth-submit,
.auth-secondary,
.auth-back {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  color: var(--text);
  font-weight: 600;
  justify-content: flex-start;
  padding: 0 14px;
  box-shadow: none;
}

.auth-ghost-button:hover,
.auth-submit:hover,
.auth-secondary:hover,
.auth-back:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  box-shadow: none;
}

.auth-ghost-button:focus-visible,
.auth-submit:focus-visible,
.auth-secondary:focus-visible,
.auth-back:focus-visible,
.auth-tab:focus-visible {
  outline: 1px solid rgba(126, 199, 255, 0.28);
  outline-offset: 2px;
}

.profile-info-note#auth-form-message {
  margin: 12px 18px 0;
}

@media (max-width: 720px) {
  .auth-dropdown {
    width: min(320px, calc(100vw - 20px)) !important;
    left: 10px !important;
    right: 10px !important;
  }
}


/* v32 auth popup text-only action buttons */
.auth-actions {
  gap: 0;
  margin-top: 6px;
}

.auth-actions .auth-ghost-button + .auth-ghost-button {
  margin-top: 2px;
}

.auth-ghost-button,
.auth-submit,
.auth-secondary,
.auth-back {
  min-height: 34px;
  width: 100%;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  justify-content: flex-start;
  padding: 6px 0;
  box-shadow: none;
}

.auth-ghost-button:hover,
.auth-submit:hover,
.auth-secondary:hover,
.auth-back:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: rgba(255,255,255,0.88);
}

.auth-ghost-button:active,
.auth-submit:active,
.auth-secondary:active,
.auth-back:active {
  transform: none;
  opacity: 0.88;
}

.auth-ghost-button .auth-action-icon,
.auth-submit .auth-action-icon,
.auth-secondary .auth-action-icon,
.auth-back .auth-action-icon {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  opacity: 0.9;
}

.auth-form button[disabled] {
  opacity: 0.55;
  cursor: wait;
  pointer-events: none;
}


/* v32 auth popup row hover like profile popup */
.auth-actions {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.auth-ghost-button,
.auth-submit,
.auth-secondary,
.auth-back {
  position: relative;
  width: calc(100% + 28px);
  margin-left: -14px;
  margin-right: -14px;
  padding: 12px 14px;
  border-radius: 0;
  transition: background-color .16s ease, color .16s ease, opacity .16s ease;
}

.auth-ghost-button:hover,
.auth-submit:hover,
.auth-secondary:hover,
.auth-back:hover,
.auth-ghost-button:focus-visible,
.auth-submit:focus-visible,
.auth-secondary:focus-visible,
.auth-back:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  box-shadow: none;
  outline: none;
}

.auth-ghost-button + .auth-ghost-button,
.auth-secondary + .auth-submit,
.auth-back + .auth-submit,
.auth-back + .auth-secondary,
.auth-submit + .auth-secondary {
  margin-top: 0;
}

.auth-action-icon {
  flex: 0 0 18px;
}

/* profile page */
.profile-page-section {
  padding-top: 36px;
}

.profile-page-layout {
  display: grid;
  gap: 22px;
}

.profile-summary-card,
.profile-block,
.profile-character-entry,
.profile-character-entry-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-summary-card,
.profile-block {
  padding: 26px;
}

.profile-summary-card h2,
.profile-block h2 {
  margin: 0 0 18px;
}

.profile-not-found-card h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .profile-not-found-card h1 {
    font-size: clamp(1.45rem, 7vw, 2.15rem);
    line-height: 1.12;
  }
}

.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.profile-lines,
.profile-character-stats {
  display: grid;
  gap: 12px;
}

.profile-characters-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.profile-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.profile-line span {
  color: var(--muted);
}

.profile-line strong {
  text-align: right;
  font-weight: 700;
}

.profile-character-entry {
  width: 100%;
  min-width: 0;
  padding: 22px;
}

.profile-character-entry h3 {
  margin: 0;
  font-size: 1.2rem;
}

.profile-character-subtitle {
  margin: 0;
  color: var(--accent-2);
}

.profile-character-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-character-level {
  color: rgba(224, 233, 249, 0.86);
  font-weight: 800;
  white-space: nowrap;
}

.profile-character-clan {
  margin: 12px 0 0;
  color: rgba(224, 233, 249, 0.9);
}

.profile-character-clan strong {
  color: #ffffff;
}

.profile-character-inline-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.profile-character-entry-empty {
  padding: 20px 22px;
}

.profile-character-entry-empty p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .profile-columns {
    grid-template-columns: 1fr;
  }

  .profile-characters-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-summary-card,
  .profile-block,
  .profile-character-entry,
  .profile-character-entry-empty {
    padding: 20px;
  }

  .profile-characters-stack,
  .profile-character-inline-stats {
    grid-template-columns: 1fr;
  }

  .profile-character-header,
  .profile-line {
    flex-direction: column;
    gap: 6px;
  }

  .profile-line strong {
    text-align: left;
  }
}



/* profile page v2 */
.profile-tabs-card,
.profile-summary-card,
.profile-block,
.profile-character-entry,
.profile-character-entry-empty,
.profile-wall-entry,
.profile-placeholder-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-tabs-card,
.profile-summary-card,
.profile-block {
  padding: 26px;
}

.profile-tabs-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-tab-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.profile-tab-button:hover,
.profile-tab-button:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.profile-tab-button.active {
  color: #04111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.active {
  display: block;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.profile-wall,
.profile-placeholder-list {
  display: grid;
  gap: 14px;
}

.profile-wall-entry,
.profile-placeholder-card {
  padding: 20px 22px;
}

.profile-wall-entry-empty p,
.profile-placeholder-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.profile-wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.profile-wall-head span {
  color: var(--muted);
  white-space: nowrap;
}

.profile-wall-entry p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

@media (max-width: 980px) {
  .profile-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-tabs-card,
  .profile-summary-card,
  .profile-block,
  .profile-character-entry,
  .profile-character-entry-empty,
  .profile-wall-entry,
  .profile-placeholder-card {
    padding: 20px;
  }

  .profile-tab-button {
    width: 100%;
    justify-content: center;
  }

  .profile-wall-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}


/* compact profile summary */
.profile-summary-card {
  width: min(100%, 560px);
  justify-self: start;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(15, 34, 58, 0.96), rgba(8, 21, 37, 0.96)),
    var(--panel);
}

.profile-summary-compact {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.profile-summary-avatar {
  min-height: 132px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--text);
  background: linear-gradient(135deg, #2f7cff, #2562d9);
  box-shadow: 0 12px 30px rgba(37, 98, 217, 0.28);
}

.profile-summary-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-summary-name {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.05;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-summary-status {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.45;
}

.profile-summary-meta {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.profile-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 0.98rem;
  line-height: 1.4;
}

.profile-summary-row span {
  color: var(--accent);
}

.profile-summary-row strong {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 640px) {
  .profile-summary-card {
    width: 100%;
    padding: 18px;
  }

  .profile-summary-compact {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
  }

  .profile-summary-avatar {
    min-height: 116px;
    border-radius: 18px;
    font-size: 1.8rem;
  }

  .profile-summary-name {
    font-size: 1.5rem;
  }

  .profile-summary-status,
  .profile-summary-row {
    font-size: 0.92rem;
  }
}


/* profile compact summary v3 */
.profile-summary-shell {
  width: fit-content;
  max-width: min(100%, 760px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-summary-compact {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
}

.profile-summary-avatar {
  width: 132px;
  min-height: 132px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--text);
  background: linear-gradient(135deg, #2f7cff, #2562d9);
  box-shadow: 0 12px 30px rgba(37, 98, 217, 0.28);
}

.profile-summary-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0;
}

.profile-summary-name {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.05;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-summary-status {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.45;
}

.profile-summary-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.profile-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 0.98rem;
  line-height: 1.4;
}

.profile-summary-row span {
  color: var(--accent);
}

.profile-summary-row strong {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 640px) {
  .profile-summary-shell {
    width: 100%;
    max-width: 100%;
  }

  .profile-summary-compact {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    width: 100%;
  }

  .profile-summary-avatar {
    width: 88px;
    min-height: 88px;
    border-radius: 20px;
    font-size: 1.8rem;
  }

  .profile-summary-name {
    font-size: 1.5rem;
  }

  .profile-summary-status,
  .profile-summary-row {
    font-size: 0.92rem;
  }
}


/* profile tabs without outer box */
.profile-tabs-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.profile-tabs-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.profile-tab-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.profile-tab-button:hover,
.profile-tab-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.055);
}

.profile-tab-button.active {
  color: var(--text);
  background: rgba(17, 38, 63, 0.96);
  border-color: rgba(126, 199, 255, 0.32);
  box-shadow: 0 16px 34px rgba(0,0,0,0.22), inset 0 0 0 1px rgba(126, 199, 255, 0.08);
}

.profile-tab-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(47,124,255,0.95), rgba(37,98,217,0.92));
  box-shadow: 0 10px 24px rgba(37, 98, 217, 0.22);
}

.profile-tab-button.active .profile-tab-icon {
  background: linear-gradient(135deg, rgba(126, 199, 255, 1), rgba(137, 255, 241, 0.96));
  box-shadow: 0 12px 26px rgba(126, 199, 255, 0.22);
}

.profile-tab-icon svg {
  width: 22px;
  height: 22px;
  stroke: #f4f8ff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-tab-button.active .profile-tab-icon svg {
  stroke: #f4f8ff;
}

.profile-tab-text {
  display: block;
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
}

@media (max-width: 1100px) {
  .profile-tabs-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .profile-tabs-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .profile-tabs-nav {
    grid-template-columns: 1fr;
  }

  .profile-tab-button {
    min-height: 66px;
  }
}


/* profile tabs icon-only */
.profile-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
  align-items: center;
}

.profile-tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  min-height: 45px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.profile-tab-button:hover,
.profile-tab-button:focus-visible {
  transform: none;
  background: transparent;
  outline: none;
}

.profile-tab-button.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.profile-tab-icon {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(18, 42, 70, 0.98), rgba(9, 24, 41, 0.98));
  border: 1px solid rgba(126, 199, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.profile-tab-button:hover .profile-tab-icon,
.profile-tab-button:focus-visible .profile-tab-icon {
  transform: translateY(-1px);
  border-color: rgba(126, 199, 255, 0.3);
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
}

.profile-tab-button.active .profile-tab-icon {
  background: linear-gradient(180deg, rgba(112, 182, 236, 0.96), rgba(72, 143, 210, 0.96));
  border-color: rgba(145, 210, 255, 0.18);
  box-shadow: 0 14px 32px rgba(72, 143, 210, 0.22);
}

.profile-tab-icon svg {
  width: 26px;
  height: 26px;
  stroke: #e9f3ff;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-tab-button.active .profile-tab-icon svg {
  stroke: #04111f;
}

.profile-tab-text {
  display: none;
}

.profile-tab-tooltip {
  position: fixed;
  z-index: 350;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(7, 17, 31, 0.96);
  border: 1px solid rgba(126, 199, 255, 0.18);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 14px 30px rgba(0,0,0,0.24);
  white-space: nowrap;
}

.profile-tab-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .profile-tabs-nav {
    gap: 12px;
  }

  .profile-tab-button,
  .profile-tab-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .profile-tab-icon svg {
    width: 18px;
    height: 18px;
  }
}


/* profile summary avatar + text adjustments */
.profile-summary-avatar {
  width: 132px;
  min-height: 132px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(126, 199, 255, 0.38), rgba(137, 255, 241, 0.28));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--text);
}

.profile-summary-status {
  color: #b4c1d3;
}

.profile-summary-row span {
  color: #ffffff;
}

@media (max-width: 640px) {
  .profile-summary-avatar {
    width: 88px;
    min-height: 88px;
    border-radius: 20px;
    font-size: 1.8rem;
  }
}


/* profile summary avatar should use the same image logic as dropdown */
.profile-summary-avatar {
  background-color: rgba(8, 18, 31, 0.98);
  background-image: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
  overflow: hidden;
}

.profile-summary-status {
  font-style: italic;
}


/* working wall prototype */
.profile-wall {
  display: grid;
  gap: 18px;
}

.profile-wall-editor,
.profile-wall-post {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.profile-wall-editor {
  padding: 18px;
  gap: 14px;
  display: grid;
}

.profile-wall-mode strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
}

.profile-wall-mode p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-wall-compose textarea,
.profile-wall-comment-editor textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid rgba(126, 199, 255, 0.12);
  background: linear-gradient(180deg, rgba(6, 18, 34, 0.96), rgba(4, 14, 28, 0.96));
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}

.profile-wall-comment-editor textarea {
  min-height: 78px;
}

.profile-wall-compose textarea::placeholder,
.profile-wall-comment-editor textarea::placeholder {
  color: rgba(196, 210, 231, 0.46);
}

.profile-wall-compose.is-disabled textarea,
.profile-wall-comment-editor.is-disabled textarea {
  opacity: 0.72;
  cursor: not-allowed;
}

.profile-wall-editor-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.profile-wall-editor-hint {
  color: var(--muted);
  line-height: 1.5;
}

.profile-wall-publish-button,
.profile-wall-comment-submit {
  min-height: 46px;
}

.profile-wall-list {
  display: grid;
  gap: 16px;
}

.profile-wall-post {
  padding: 18px;
}

.profile-wall-post-head,
.profile-wall-comment {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.profile-wall-post-head {
  justify-content: space-between;
}

.profile-wall-author,
.profile-wall-comment {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.profile-wall-author {
  min-width: 0;
}

.profile-wall-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background-color: rgba(8, 18, 31, 0.98);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255,255,255,0.12);
}

.profile-wall-author-text,
.profile-wall-comment-body {
  min-width: 0;
}

.profile-wall-comment-body {
  width: 100%;
}

.profile-wall-author-text strong,
.profile-wall-comment-head strong {
  display: block;
  color: var(--text);
}

.profile-name-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.profile-name-link:hover,
.profile-name-link:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.profile-name-link:focus-visible {
  outline: none;
}


.profile-wall-comment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-wall-comment-meta {
  min-width: 0;
}

.profile-wall-author-text span,
.profile-wall-comment-head span,
.profile-wall-comments-empty,
.profile-wall-comments-title {
  color: var(--muted);
  font-size: 0.93rem;
}

.profile-wall-post-body {
  margin-top: 14px;
  margin-left: calc(42px + 12px);
}

.profile-wall-post-body p,
.profile-wall-comment-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-wall-comments {
  --wall-avatar-size: 42px;
  --wall-avatar-gap: 12px;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-wall-comments-empty {
  margin-left: calc(var(--wall-avatar-size) + var(--wall-avatar-gap));
}

.profile-wall-comment {
  margin-left: calc(var(--wall-avatar-size) + var(--wall-avatar-gap));
}

.profile-wall-comment-editor {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-top: 4px;
  margin-left: calc(var(--wall-avatar-size) + var(--wall-avatar-gap));
}

.profile-wall-comment-submit {
  align-self: flex-end;
  width: auto;
  min-width: 0;
  margin-left: auto;
  margin-right: 0;
  padding-inline: 0;
  text-align: right;
}

.profile-wall-entry-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-wall-comment-delete,
.profile-wall-post-delete,
.profile-wall-comment-edit,
.profile-wall-post-edit,
.profile-wall-post-pin,
.profile-wall-report-button {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.profile-wall-comment-edit,
.profile-wall-post-edit {
  background: rgba(123, 189, 255, 0.12);
  color: #9fd2ff;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18);
}

.profile-wall-post-pin {
  background: transparent;
  color: rgba(255, 214, 102, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.18);
}

.profile-wall-post-pin.is-active {
  background: rgba(255, 214, 102, 0.18);
  color: #ffd666;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.32);
}

.profile-wall-comment-delete,
.profile-wall-post-delete {
  background: rgba(255, 73, 73, 0.12);
  color: #ff7272;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.18);
}

.profile-wall-delete-pair {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-wall-delete-toggle,
.profile-wall-delete-direct {
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.profile-wall-delete-toggle {
  z-index: 2;
  background: rgba(255, 73, 73, 0.12);
  color: #ff5b5b;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18);
}

.profile-wall-delete-direct {
  z-index: 1;
  background: rgba(255, 73, 73, 0.12);
  color: #ff5b5b;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.profile-wall-delete-pair.is-confirming .profile-wall-delete-direct {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-wall-delete-toggle.is-hidden-by-test {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.profile-wall-delete-icon {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-wall-delete-icon img {
  width: 12px;
  height: 12px;
  display: block;
}

.profile-wall-report-button {
  background: rgba(255, 73, 73, 0.12);
  color: #ff5b5b;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.22);
}

.profile-wall-post-delete,
.profile-wall-post-edit,
.profile-wall-post-pin,
.profile-wall-report-button {
  margin-top: 2px;
}

.profile-wall-comment-edit:hover,
.profile-wall-post-edit:hover,
.profile-wall-comment-edit:focus-visible,
.profile-wall-post-edit:focus-visible {
  background: rgba(123, 189, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.3);
  transform: translateY(-1px);
}

.profile-wall-post-pin:hover,
.profile-wall-post-pin:focus-visible {
  background: rgba(255, 214, 102, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.28);
  transform: translateY(-1px);
}

.profile-wall-post-pin.is-active:hover,
.profile-wall-post-pin.is-active:focus-visible {
  background: rgba(255, 214, 102, 0.22);
}

.profile-wall-comment-delete:hover,
.profile-wall-post-delete:hover,
.profile-wall-comment-delete:focus-visible,
.profile-wall-post-delete:focus-visible,
.profile-wall-report-button:hover,
.profile-wall-report-button:focus-visible {
  background: rgba(255, 73, 73, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.28);
  transform: translateY(-1px);
}

.profile-wall-comment-delete.is-confirming,
.profile-wall-post-delete.is-confirming {
  background: rgba(255, 73, 73, 0.24);
  color: #ffd8d8;
  box-shadow: inset 0 0 0 1px rgba(255, 138, 138, 0.38), 0 0 0 1px rgba(255, 73, 73, 0.12);
}

.profile-wall-comment-delete svg,
.profile-wall-post-delete svg,
.profile-wall-delete-toggle svg,
.profile-wall-delete-direct svg,
.profile-wall-comment-edit svg,
.profile-wall-post-edit svg,
.profile-wall-post-pin svg,
.profile-wall-report-button svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}

.profile-wall-post-pin svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
}

.profile-wall-post-pin.is-active svg {
  fill: currentColor;
  stroke: currentColor;
}

@media (max-width: 640px) {
  .profile-wall-editor,
  .profile-wall-post {
    padding: 16px;
    border-radius: 18px;
  }

  .profile-wall-editor-actions {
    align-items: stretch;
  }

  .profile-wall-publish-button {
    width: 100%;
  }

  .profile-wall-comment,
  .profile-wall-comment-editor {
    margin-left: 0;
  }
}


/* overview layout: wall + right sidebar instead of separate social tab */
.profile-overview-grid-with-sidebar {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
  align-items: start;
}

.profile-wall-block {
  min-width: 0;
}

.profile-overview-sidecard {
  min-width: 0;
  align-self: stretch;
}

.profile-overview-sidecard .profile-lines {
  gap: 10px;
}

.profile-overview-sidecard .profile-line {
  min-height: 58px;
}

@media (max-width: 980px) {
  .profile-overview-grid-with-sidebar {
    grid-template-columns: 1fr;
  }
}


/* profile tabs reduced to 4 after moving social block into overview */
.profile-tabs-nav {
  gap: 7px;
}


/* overview layout tightened */
.profile-overview-grid-with-sidebar {
  grid-template-columns: minmax(0, 1.56fr) minmax(224px, 0.58fr);
  align-items: start;
}

.profile-overview-sidecard {
  align-self: start;
  height: auto;
}

.profile-overview-sidecard .profile-lines {
  gap: 10px;
}

.profile-overview-sidecard .profile-line {
  min-height: unset;
}

.profile-overview-sidecard .profile-line:last-child {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .profile-overview-grid-with-sidebar {
    grid-template-columns: 1fr;
  }
}


/* modern profile nav */
.profile-tabs-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: min(100%, calc(100% - clamp(246px, 30%, 320px) - 22px));
}

.profile-tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  min-height: 45px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.profile-tab-button:hover,
.profile-tab-button:focus-visible,
.profile-tab-button.active {
  background: transparent;
  box-shadow: none;
  transform: none;
  outline: none;
}

.profile-tab-button[data-profile-tab="settings"] {
  margin-left: auto;
}

.profile-tab-icon {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(14, 30, 49, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.profile-tab-button:hover .profile-tab-icon,
.profile-tab-button:focus-visible .profile-tab-icon {
  background: rgba(19, 38, 60, 0.98);
  border-color: rgba(126, 199, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: none;
}

.profile-tab-button.active .profile-tab-icon {
  background: rgba(72, 143, 210, 0.96);
  border-color: rgba(145, 210, 255, 0.22);
  box-shadow: none;
}

.profile-tab-icon svg {
  width: 26px;
  height: 26px;
  stroke: #f4f8ff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-tab-button.active .profile-tab-icon svg {
  stroke: #f4f8ff;
}

@media (max-width: 980px) {
  .profile-tabs-nav {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .profile-tabs-nav {
    flex-wrap: wrap;
  }

  .profile-tab-button[data-profile-tab="settings"] {
    margin-left: 0;
  }
}


/* layout adjustment: wider right card + settings aligned to wall outer edge */
.profile-overview-grid-with-sidebar {
  grid-template-columns: minmax(0, 1.48fr) minmax(246px, 0.64fr);
}


/* Align the settings button to the right edge of the wall block instead of the whole page row */
.profile-page-layout {
  position: relative;
}

.profile-tabs-nav {
  display: flex;
  align-items: center;
}

.profile-tab-button[data-profile-tab="settings"] {
  margin-left: auto;
}

@media (max-width: 980px) {
  .profile-overview-grid-with-sidebar {
    grid-template-columns: 1fr;
  }

  .profile-tabs-nav {
    width: 100%;
  }
}


/* precise settings alignment above wall box */
.profile-tabs-nav {
  display: grid;
  grid-template-columns: repeat(3, 45px) 1fr 45px;
  justify-content: start;
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
  width: calc(100% - clamp(246px, 30%, 320px) - 22px);
  max-width: calc(100% - clamp(246px, 30%, 320px) - 22px);
}

.profile-tab-button[data-profile-tab="settings"] {
  grid-column: 5;
  justify-self: end;
  margin-left: 0;
}

@media (max-width: 980px) {
  .profile-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }

  .profile-tab-button[data-profile-tab="settings"] {
    margin-left: auto;
  }
}


/* real fix: constrain nav to the same grid column as the wall */
.profile-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(246px, 0.64fr);
  gap: 22px;
  align-items: start;
}

.profile-summary-shell {
  grid-column: 1 / -1;
}

.profile-tabs-nav {
  grid-column: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.profile-tab-button[data-profile-tab="settings"] {
  margin-left: auto;
  justify-self: auto;
  grid-column: auto;
}

.profile-tab-panel {
  grid-column: 1 / -1;
}

.profile-overview-grid-with-sidebar {
  grid-template-columns: minmax(0, 1.48fr) minmax(246px, 0.64fr);
}

@media (max-width: 980px) {
  .profile-page-layout {
    grid-template-columns: 1fr;
  }

  .profile-tabs-nav,
  .profile-tab-panel,
  .profile-summary-shell {
    grid-column: 1;
  }

  .profile-tabs-nav {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .profile-tab-button[data-profile-tab="settings"] {
    margin-left: auto;
  }

  .profile-overview-grid-with-sidebar {
    grid-template-columns: 1fr;
  }
}

.profile-presence-value.is-online {
  color: #57d37b;
}

.profile-presence-value.is-offline {
  color: #ff6b6b;
}


.profile-nav-icon-button,
.profile-tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  min-height: 45px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.profile-nav-icon-button:hover,
.profile-nav-icon-button:focus-visible,
.profile-nav-icon-button.active {
  background: transparent;
  box-shadow: none;
  transform: none;
  outline: none;
}

.profile-nav-icon-button .profile-tab-icon svg {
  width: 24px;
  height: 24px;
}

.profile-tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 45px) 1fr 45px;
  justify-content: start;
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
  width: 100%;
  max-width: 100%;
}

.profile-new-post-button {
  grid-column: 4;
}

.profile-tab-button[data-profile-tab="settings"] {
  grid-column: 6;
  margin-left: 0;
  justify-self: end;
}

.profile-wall-editor-readonly {
  gap: 14px;
}

.profile-post-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 10, 18, 0.76);
  backdrop-filter: blur(10px);
  z-index: 1200;
}

.profile-post-overlay.hidden {
  display: none;
}

.profile-post-modal {
  width: min(100%, 1040px);
  border-radius: 24px;
  border: 1px solid rgba(144, 190, 255, 0.14);
  background: linear-gradient(180deg, rgba(8, 20, 36, 0.98), rgba(4, 13, 25, 0.98));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  padding: 24px;
}

.profile-post-modal-header {
  width: min(100%, 920px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 12px;
}

.profile-post-editor-shell {
  width: min(100%, 920px);
  margin: 0 auto;
}

.profile-post-editor-shell .wall-editor-toolbar-wrap,
.profile-post-editor-shell .profile-post-modal-textarea,
.profile-post-editor-shell .profile-post-modal-meta {
  width: 100%;
}

.profile-post-modal-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.profile-post-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(14, 30, 49, 0.92);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}


.profile-post-modal-textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid rgba(93, 137, 192, 0.2);
  background: rgba(2, 12, 25, 0.82);
  color: var(--text);
  padding: 16px 18px;
  font: inherit;
  line-height: 1.55;
  outline: none;
}

.profile-post-modal-textarea::placeholder {
  color: rgba(162, 181, 207, 0.5);
}

.profile-post-modal-textarea:focus {
  border-color: rgba(114, 173, 238, 0.42);
  box-shadow: 0 0 0 1px rgba(114, 173, 238, 0.22);
}

.profile-post-modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.profile-post-modal-hint {
  color: rgba(159, 176, 200, 0.72);
  font-size: 14px;
}

.profile-post-modal-counter {
  margin-left: auto;
  color: rgba(228, 238, 255, 0.86);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.profile-post-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: min(100%, 920px);
  margin: 18px auto 0;
}

.profile-post-modal-submit {
  min-height: 46px;
  min-width: 170px;
  margin-left: 0;
  padding: 0 18px;
  border-radius: 14px;
}

.profile-post-confirm-modal {
  width: min(100%, 560px);
}

.profile-post-confirm-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.profile-post-confirm-actions {
  margin-top: 22px;
}

.profile-post-confirm-cancel,
.profile-post-confirm-submit {
  min-width: 110px;
}

@media (max-width: 980px) {
  .profile-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }

  .profile-new-post-button,
  .profile-tab-button[data-profile-tab="settings"] {
    grid-column: auto;
  }

  .profile-tab-button[data-profile-tab="settings"] {
    margin-left: auto;
  }
}


/* final profile nav alignment + plus button hover */
.profile-tabs-nav {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.profile-new-post-button {
  margin-left: auto;
}

.profile-tab-button[data-profile-tab="settings"] {
  margin-left: 0 !important;
}

.profile-nav-icon-button:hover .profile-tab-icon,
.profile-nav-icon-button:focus-visible .profile-tab-icon {
  background: rgba(19, 38, 60, 0.98);
  border-color: rgba(126, 199, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: none;
}

@media (max-width: 980px) {
  .profile-tabs-nav {
    flex-wrap: wrap;
  }

  .profile-new-post-button {
    margin-left: 0;
  }

  .profile-tab-button[data-profile-tab="settings"] {
    margin-left: auto !important;
  }
}


.profile-wall-comments-header {
  margin-left: calc(var(--wall-avatar-size) + var(--wall-avatar-gap));
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-wall-comments-toggle {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.profile-wall-comments-toggle:hover,
.profile-wall-comments-toggle:focus-visible {
  color: var(--text);
  outline: none;
}

.profile-wall-comments-toggle-icon {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform 0.18s ease;
}

.profile-wall-comments-toggle[aria-expanded="true"] .profile-wall-comments-toggle-icon {
  transform: rotate(180deg);
}

.profile-wall-comments-list.is-collapsed .profile-wall-comment:not(:last-child) {
  display: none;
}

.profile-post-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-post-confirm-cancel,
.profile-post-confirm-submit {
  min-width: 110px;
  width: auto;
  margin: 0;
  justify-content: center;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}


.profile-wall-post-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.profile-wall-author {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
  width: 100%;
}

.profile-wall-author-text {
  grid-column: 2;
}

.profile-wall-post-body {
  grid-column: 2;
  margin-top: 0;
  margin-left: 0;
}

.profile-wall-post-body p,
.profile-wall-comment-body p,
.profile-wall-comments-empty,
.profile-wall-comments-title {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.profile-wall-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}

.profile-wall-list + .profile-wall-pagination {
  margin: 10px 0 0;
}

.profile-wall-pagination-button,
.profile-wall-pagination-ellipsis {
  min-width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
}

.profile-wall-pagination-button {
  border: 1px solid rgba(93, 137, 192, 0.22);
  background: rgba(8, 20, 36, 0.82);
  color: var(--text);
  cursor: pointer;
  padding: 0 10px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.profile-wall-pagination-button:hover,
.profile-wall-pagination-button:focus-visible {
  outline: none;
  border-color: rgba(114, 173, 238, 0.42);
  background: rgba(14, 30, 49, 0.92);
  transform: translateY(-1px);
}

.profile-wall-pagination-button.is-active {
  background: rgba(72, 143, 210, 0.2);
  border-color: rgba(114, 173, 238, 0.5);
}

.profile-wall-pagination-button[disabled] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  transform: none;
}

.profile-wall-pagination-nav {
  padding: 0 8px;
}

.profile-wall-pagination-nav span {
  display: inline-block;
  transform: translateY(-1px);
}


.profile-wall-pagination-ellipsis {
  color: var(--muted);
  min-width: auto;
  padding: 0 2px;
}


/* profile nav text-style refresh */
.profile-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  width: 100%;
}

.profile-tab-button {
  appearance: none;
  display: grid;
  grid-template-rows: auto 2px;
  align-items: end;
  gap: 7px;
  min-height: 50px;
  padding: 10px 12px 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.profile-tab-button:hover,
.profile-tab-button:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,0.03);
  outline: none;
  transform: none;
}

.profile-tab-button.active {
  color: var(--text);
  background: transparent;
}

.profile-tab-text {
  display: block;
}

.profile-tab-slider {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.profile-tab-button.active .profile-tab-slider {
  background: rgba(126, 199, 255, 0.58);
  box-shadow: 0 1px 4px rgba(126, 199, 255, 0.1);
}

.profile-tab-icon {
  display: none !important;
}

.profile-wall-block-top {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.profile-inline-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  line-height: 1.1;
  padding: 0 0 3px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.profile-inline-action::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  margin-top: 7px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.profile-inline-action:hover,
.profile-inline-action:focus-visible {
  color: var(--text);
  outline: none;
}

.profile-inline-action:hover::after,
.profile-inline-action:focus-visible::after {
  background: rgba(126, 199, 255, 0.38);
}

.profile-summary-avatar {
  position: relative;
}

.profile-avatar-presence-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(8, 18, 31, 0.96);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

.profile-avatar-presence-dot.is-online {
  background: #4ee073;
}

.profile-avatar-presence-dot.is-offline {
  background: #ef5350;
}

.profile-summary-meta {
  display: none;
}

.profile-overview-sidecard {
  align-self: start;
}

@media (max-width: 640px) {
  .profile-tabs-nav {
    gap: 10px;
  }

  .profile-tab-button {
    min-height: 44px;
    padding: 8px 10px 5px;
  }

  .profile-avatar-presence-dot {
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
  }
}


/* v15 profile layout polish */
.profile-tabs-nav {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
  width: 100%;
  max-width: 100%;
}

.profile-tab-button {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0 0 6px;
  border-radius: 0;
  background: transparent !important;
  color: var(--muted);
  white-space: nowrap;
}

.profile-tab-button:hover,
.profile-tab-button:focus-visible,
.profile-tab-button.active {
  background: transparent !important;
  box-shadow: none;
  transform: none;
}

.profile-tab-text {
  font-size: 1.12rem;
  line-height: 1.1;
}

.profile-summary-compact {
  align-items: center;
  gap: 18px;
}

.profile-summary-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 118px;
}

.profile-summary-name {
  margin: -10px 0 0;
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  line-height: 1;
}

.profile-summary-status {
  margin-top: 10px;
}

.profile-wall-block-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 -40px;
  pointer-events: none;
}

.profile-wall-block-top .profile-inline-action {
  pointer-events: auto;
}

.profile-inline-action {
  padding-bottom: 0;
  white-space: nowrap;
}

.profile-inline-action::after {
  margin-top: 6px;
}

.profile-wall > .profile-wall-pagination:first-child {
  margin-top: 0;
}

.profile-wall-pagination {
  min-height: 30px;
}

.profile-wall {
  position: relative;
}

@media (max-width: 980px) {
  .profile-wall-block-top {
    margin-bottom: 12px;
  }
}

@media (max-width: 640px) {
  .profile-tab-text {
    font-size: 1rem;
  }

  .profile-summary-main {
    min-height: 96px;
  }

  .profile-summary-name {
    margin-top: -4px;
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }
}


/* v16 empty wall + single-page fixes */
.profile-wall-block-top {
  margin: 0 0 14px;
  min-height: 30px;
}

.profile-wall-block-top.has-pagination {
  margin: 0 0 -40px;
}

.profile-wall-block-top.is-empty {
  margin-bottom: 10px;
}

.profile-wall:not(.has-pagination) > .profile-wall-pagination:first-child,
.profile-wall:not(.has-pagination) > .profile-wall-list + .profile-wall-pagination {
  display: none;
}

.profile-wall.is-empty {
  min-height: 244px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.profile-wall.is-empty .profile-wall-list {
  display: flex;
  flex: 1 1 auto;
}

.profile-wall.is-empty .profile-wall-entry-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 18px 0 0;
  min-height: 0;
}

.profile-wall-entry-empty strong {
  font-size: 1.06rem;
}

@media (max-width: 980px) {
  .profile-wall-block-top.has-pagination,
  .profile-wall-block-top.is-empty,
  .profile-wall-block-top {
    margin-bottom: 12px;
  }

  .profile-wall.is-empty {
    min-height: 220px;
  }
}


/* v17 empty wall exact height + contact chooser */
.profile-wall.is-empty {
  min-height: 152px;
}

.profile-wall-settings-card {
  display: grid;
  gap: 16px;
}

.profile-wall-settings-list {
  display: grid;
  gap: 14px;
}

.profile-wall-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-wall-setting-label {
  color: var(--text);
  font-weight: 600;
}

.profile-wall-setting-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-wall-setting-option {
  min-width: 50px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, color .18s ease;
}

.profile-wall-setting-option:hover,
.profile-wall-setting-option:focus-visible {
  border-color: rgba(123, 189, 255, 0.42);
  background: rgba(123, 189, 255, 0.08);
  transform: translateY(-1px);
}

.profile-wall-setting-option.is-active {
  border-color: rgba(123, 189, 255, 0.58);
  background: rgba(123, 189, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18);
}

.profile-notifications-settings-card {
  display: grid;
  gap: 14px;
}

.profile-notifications-settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.profile-sound-toggle {
  justify-self: start;
}

.profile-signature-settings-card {
  display: grid;
  gap: 14px;
}

.profile-signature-input-label,
.profile-signature-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-signature-input {
  width: 100%;
  min-height: 108px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.profile-signature-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-contacts-settings-card {
  display: grid;
  gap: 16px;
}

.profile-contacts-trigger {
  justify-self: start;
}

.profile-contacts-editor.hidden {
  display: none;
}

.profile-contacts-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.profile-contacts-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-contact-service-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.profile-contact-service-option:hover,
.profile-contact-service-option:focus-visible {
  border-color: rgba(123, 189, 255, 0.45);
  background: rgba(123, 189, 255, 0.08);
  transform: translateY(-1px);
}

.profile-contact-service-option.is-active {
  border-color: rgba(123, 189, 255, 0.6);
  background: rgba(123, 189, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.2);
}

.profile-contact-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.profile-contact-service-icon svg {
  width: 100%;
  height: 100%;
}

.profile-contact-service-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-contacts-input-label {
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-contacts-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}

.profile-contacts-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.profile-contacts-actions {
  display: flex;
  justify-content: flex-start;
}

.profile-contacts-list {
  display: grid;
  gap: 10px;
}

.profile-contacts-empty {
  margin: 0;
  color: var(--muted);
}

.profile-contact-chip {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.profile-contact-chip-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
}

.profile-contact-chip-icon svg {
  width: 100%;
  height: 100%;
}

.profile-contact-chip-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-contact-chip-text strong,
.profile-contact-chip-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-contact-chip-text span {
  color: var(--muted);
}

.profile-contact-chip-remove {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 112, 112, 0.22);
  background: rgba(255, 82, 82, 0.1);
  color: #ff8c8c;
  font-size: 1.25rem;
  line-height: 1;
}

.profile-contact-chip-remove:hover,
.profile-contact-chip-remove:focus-visible {
  background: rgba(255, 82, 82, 0.16);
  border-color: rgba(255, 112, 112, 0.35);
}

@media (max-width: 720px) {
  .profile-contacts-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* v18 profile contacts display */
.profile-info-card-value-contacts {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.profile-contacts-display-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.profile-contact-display-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: right;
  transition: opacity .2s ease, transform .2s ease, color .2s ease;
}

.profile-contact-display-item:hover,
.profile-contact-display-item:focus-visible {
  opacity: 0.92;
  transform: translateY(-1px);
}

.profile-contact-display-item.is-copied .profile-contact-display-value {
  color: var(--accent, #7bbdff);
}

.profile-contact-display-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.profile-contact-display-icon svg {
  width: 100%;
  height: 100%;
}

.profile-contact-display-value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.18);
  text-underline-offset: 3px;
}

.profile-contact-display-item:hover .profile-contact-display-icon,
.profile-contact-display-item:focus-visible .profile-contact-display-icon {
  color: var(--text);
}


/* v19 contacts alignment + copy tooltip */
.profile-line:has(.profile-info-card-value-contacts) {
  align-items: flex-start;
}

.profile-info-card-value-contacts {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-top: 6px;
}

.profile-contacts-display-list {
  align-items: flex-start;
  width: 100%;
}

.profile-contact-display-item {
  justify-content: flex-start;
  text-align: left;
}

.profile-copy-toast {
  position: fixed;
  z-index: 3000;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .16s ease, transform .16s ease;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(123, 189, 255, 0.25);
  background: rgba(10, 18, 34, 0.96);
  color: #eaf4ff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.profile-copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%);
}


/* v20 contacts inline icons only */
.profile-line:has(.profile-info-card-value-contacts) {
  align-items: center;
}

.profile-line:has(.profile-info-card-value-contacts) > span {
  align-self: center;
}

.profile-info-card-value-contacts {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: auto;
  margin-top: 0;
  margin-left: auto;
}

.profile-contacts-display-list {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  width: auto;
}

.profile-contact-display-item {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0;
  min-width: 24px;
  min-height: 24px;
}

.profile-contact-display-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.profile-contact-display-value {
  display: none;
}


/* v21 contact icon tooltip + white icons */
.profile-contact-display-item {
  position: relative;
}

.profile-contact-display-icon {
  color: #ffffff;
}

.profile-contact-display-item:hover .profile-contact-display-icon,
.profile-contact-display-item:focus-visible .profile-contact-display-icon,
.profile-contact-display-item.is-copied .profile-contact-display-icon {
  color: #ffffff;
}

/* duplicate contact pseudo-tooltip disabled: using shared .profile-tab-tooltip only */
.profile-contact-display-item::after {
  content: none !important;
  display: none !important;
}


/* v24 rich editors for posts/comments */
.profile-post-modal-textarea,
.profile-wall-comment-input,
.wall-rich-editor {
  min-height: 154px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-family: Tahoma, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  outline: none;
  overflow: auto;
}

.wall-rich-editor-shell-comment .wall-rich-editor {
  min-height: 132px;
  font-size: 1rem;
}

.wall-rich-editor[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,.42);
}

.wall-rich-editor.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,.42);
  float: left;
  height: 0;
  pointer-events: none;
}

.wall-rich-editor.ProseMirror {
  white-space: pre-wrap;
}

.wall-rich-editor.ProseMirror:focus {
  outline: none;
}

.wall-rich-editor-shell {
  position: relative;
  display: grid;
  gap: 10px;
}

.wall-rich-editor-comment-wrap {
  display: grid;
  gap: 8px;
}

.wall-editor-toolbar-wrap {
  display: flex;
  justify-content: flex-end;
}

.wall-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.wall-tool-button,
.wall-tool-select,
.wall-tool-color {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #fff;
}

.wall-tool-button {
  min-width: 34px;
  padding: 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.wall-tool-select {
  padding: 0 10px;
}

.wall-tool-color {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  overflow: hidden;
}

.wall-tool-color input {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  padding: 0;
}

.profile-wall-comment-editor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.profile-wall-comment-submit {
  align-self: end;
}

.profile-wall-rich-content {
  font-size: 1rem;
  line-height: 1.55;
  word-break: break-word;
}

.profile-wall-rich-content p,
.profile-wall-rich-content div {
  margin: 0;
}

.profile-wall-rich-content > * + * {
  margin-top: 10px;
}

.profile-wall-rich-content p:last-child,
.profile-wall-rich-content div:last-child {
  margin-bottom: 0;
}

.profile-wall-rich-content a {
  color: #9fcbff;
  text-decoration: underline;
}

.wall-inline-image,
.wall-inline-video {
  display: block;
  max-width: min(100%, 380px);
  border-radius: 12px;
  margin: 8px 0;
}

.wall-inline-emoji {
  width: 22px;
  height: 22px;
  vertical-align: text-bottom;
  object-fit: contain;
  margin: 0 2px;
}

.wall-spoiler {
  background: rgba(255,255,255,.08);
  color: transparent;
  border-radius: 8px;
  padding: 0 6px;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.wall-spoiler:hover,
.wall-spoiler:focus-visible {
  color: inherit;
  background: rgba(255,255,255,.16);
}

.wall-emoji-picker {
  position: fixed;
  z-index: 4000;
  width: 260px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(10,18,34,.98);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  transform: translateY(-100%);
}

.wall-emoji-picker.hidden {
  display: none;
}

.wall-emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.wall-emoji-button {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wall-emoji-button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .profile-wall-comment-editor {
    grid-template-columns: 1fr;
  }

  .wall-editor-toolbar,
  .wall-editor-toolbar-wrap {
    justify-content: flex-start;
  }
}


/* v26 comment composer via modal */
.profile-wall-comment-editor-trigger {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}

.profile-wall-comment-open {
  min-height: 38px;
  padding: 0 16px;
}

.profile-comment-modal .profile-post-modal-title {
  margin: 0;
}

.profile-comment-modal-textarea {
  min-height: 170px;
}

.profile-comment-modal .wall-editor-toolbar {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .profile-wall-comment-editor-trigger {
    margin-top: 12px;
  }
}


/* v27 header-like hover for post/comment actions */
#profile-new-post-button,
.profile-wall-comment-open {
  position: relative;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 0 0 6px;
  min-height: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.1;
  transition: color .18s ease, opacity .18s ease;
}

#profile-new-post-button::after,
.profile-wall-comment-open::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(123, 189, 255, 0.95), rgba(123, 189, 255, 0.55));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease, opacity .18s ease;
  opacity: .95;
}

#profile-new-post-button:hover,
#profile-new-post-button:focus-visible,
.profile-wall-comment-open:hover,
.profile-wall-comment-open:focus-visible {
  color: var(--text);
  transform: none;
}

#profile-new-post-button:hover::after,
#profile-new-post-button:focus-visible::after,
.profile-wall-comment-open:hover::after,
.profile-wall-comment-open:focus-visible::after {
  transform: scaleX(1);
}

#profile-new-post-button[disabled],
.profile-wall-comment-open[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

#profile-new-post-button[disabled]::after,
.profile-wall-comment-open[disabled]::after {
  transform: scaleX(0);
}


/* v29 make profile tabs match header menu text exactly */
.profile-tabs-nav {
  gap: 14px !important;
}

.profile-tab-button {
  font-size: 1rem;
  font-weight: 600;
  min-height: 50px;
  padding: 10px 12px 6px;
  display: grid;
  grid-template-rows: auto 2px;
  align-items: end;
  gap: 7px;
}

.profile-tab-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
}

/* v30 align new post/comment buttons with profile header tabs */
#profile-new-post-button,
.profile-wall-comment-open,
.profile-inline-action {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  min-height: 50px;
  padding: 10px 12px 6px;
  display: inline-grid;
  grid-template-rows: auto 2px;
  align-items: end;
  gap: 7px;
  white-space: nowrap;
  color: var(--muted);
}

#profile-new-post-button::after,
.profile-wall-comment-open::after,
.profile-inline-action::after {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  margin-top: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(123, 189, 255, 0.95), rgba(123, 189, 255, 0.55));
}

.profile-wall-block-top {
  min-height: 50px;
  margin: 0 0 -40px;
}

.profile-wall-comment-editor-trigger {
  margin-top: 6px;
}

/* v31 fix new post/comment action layout without overlap */
.profile-wall-block-top {
  min-height: 30px;
  margin: 0 0 14px;
  align-items: flex-start;
}

.profile-wall-block-top.has-pagination {
  margin: 0 0 -40px;
}

#profile-new-post-button,
.profile-wall-comment-open,
.profile-inline-action {
  min-height: 0;
}

/* v32 remove hover background/underline from header, profile tabs, and post/comment actions */
.menu a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--text);
  background: transparent;
}

.profile-tab-button {
  transition: color 0.2s ease, transform 0.2s ease;
}

.profile-tab-button:hover,
.profile-tab-button:focus-visible {
  color: var(--text);
  background: transparent;
}

#profile-new-post-button:hover::after,
#profile-new-post-button:focus-visible::after,
.profile-wall-comment-open:hover::after,
.profile-wall-comment-open:focus-visible::after,
.profile-inline-action:hover::after,
.profile-inline-action:focus-visible::after {
  background: transparent;
  transform: scaleX(0);
  box-shadow: none;
}

#profile-new-post-button:hover,
#profile-new-post-button:focus-visible,
.profile-wall-comment-open:hover,
.profile-wall-comment-open:focus-visible,
.profile-inline-action:hover,
.profile-inline-action:focus-visible {
  color: var(--text);
  background: transparent !important;
  box-shadow: none !important;
}

/* v33 align wall actions to box edges */
.profile-tabs-nav {
  justify-content: flex-start;
}

.profile-wall-block-top {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.profile-wall-block-top .profile-inline-action,
.profile-wall-block-top #profile-new-post-button {
  margin-left: 0;
  margin-right: auto;
}

.profile-wall-comment-editor-trigger {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.profile-wall-comment-open {
  margin-left: auto;
}

@media (max-width: 760px) {
  .profile-wall-block-top {
    justify-content: flex-start;
  }

  .profile-wall-comment-editor-trigger {
    justify-content: flex-end;
  }
}


/* v34 profile wall stream layout + inline registration info */
.profile-overview-grid.profile-overview-grid-single,
.profile-overview-grid-single {
  display: block;
}

.profile-overview-sidecard-hidden {
  display: none !important;
}

.profile-wall-block {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.profile-summary-main {
  justify-content: flex-start;
  min-height: 0;
  padding-top: 2px;
}

.profile-summary-name {
  margin: -30px 0 0;
}

.profile-summary-status {
  margin-top: 6px;
}

.profile-summary-registration {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.profile-wall-list {
  gap: 10px;
}

.profile-wall-post {
  cursor: default;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.profile-wall-post:hover {
  transform: translateY(-1px);
}

.profile-wall-comments {
  gap: 0;
}

.profile-wall-comments-summary {
  width: 100%;
  color: var(--muted);
  font-size: 0.93rem;
  display: flex;
  align-items: stretch;
}

.profile-wall-comments-toggle-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px 8px calc(var(--wall-avatar-size) + var(--wall-avatar-gap));
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.profile-wall-comments-toggle-button:hover .profile-wall-comments-title,
.profile-wall-comments-toggle-button:focus-visible .profile-wall-comments-title {
  color: var(--text);
}

.profile-wall-comments-toggle-button:focus-visible {
  outline: none;
}

.profile-wall-comments-title {
  pointer-events: none;
}

.profile-wall-comments-panel {
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  will-change: auto;
  transition: none;
  margin-top: 0;
}

.profile-wall-comments-panel > * {
  transform: translateY(-6px);
  transition: transform 0.36s ease, opacity 0.3s ease;
}

.profile-wall-comments-panel.is-expanded {
  opacity: 1;
  pointer-events: auto;
  margin-top: 12px;
}

.profile-wall-comments-panel.is-expanded > * {
  transform: translateY(0);
}

.profile-wall-comments-list {
  display: grid;
  gap: 12px;
}

.profile-wall-comments-panel .profile-wall-comment,
.profile-wall-comments-panel .profile-wall-comment-editor {
  margin-left: calc(var(--wall-avatar-size) + var(--wall-avatar-gap));
}

.profile-wall-comments-header,
.profile-wall-comments-toggle {
  display: none !important;
}

.profile-wall-comments-list.is-collapsed .profile-wall-comment:not(:last-child) {
  display: flex;
}

@media (max-width: 640px) {
  .profile-summary-name {
    margin-top: -18px;
  }

  .profile-summary-registration {
    margin-top: 14px;
  }
}


/* v35 summary contacts + inline comment composer */
.profile-summary-main {
  padding-top: 0;
}

.profile-summary-name {
  margin: -42px 0 0;
}

.profile-summary-status {
  margin-top: 6px;
}

.profile-summary-contacts {
  display: flex;
  align-items: center;
  min-height: 1.5em;
  margin-top: 10px;
}

.profile-summary-contacts .profile-contacts-display-list {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.profile-summary-contacts .profile-contact-display-item {
  min-width: 26px;
  min-height: 26px;
}

.profile-summary-contacts-empty {
  color: var(--muted);
}

.profile-summary-registration {
  margin-top: 8px;
}

.profile-wall-comment-editor-inline {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(8, 18, 31, 0.58);
}

.profile-wall-inline-comment-label {
  display: block;
  margin-bottom: 10px;
  color: rgba(228, 238, 255, 0.9);
  font-size: 0.96rem;
}

.profile-wall-inline-comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.profile-wall-inline-comment-hint {
  color: var(--muted);
  font-size: 0.86rem;
}

.profile-wall-comment-submit-inline {
  margin-left: auto;
}

.profile-wall-edit-editor {
  margin-top: 12px;
}

.profile-wall-edit-actions {
  justify-content: flex-end;
  gap: 18px;
}

.profile-wall-edit-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 14px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(8, 18, 31, 0.58);
  box-sizing: border-box;
  overflow: visible;
}

.profile-wall-edit-editor .wall-rich-editor-shell-comment-inline,
.profile-wall-edit-editor .wall-editor-toolbar-wrap,
.profile-wall-edit-editor .wall-editor-toolbar,
.profile-wall-edit-editor .profile-comment-modal-textarea,
.profile-wall-edit-editor .profile-wall-inline-comment-actions {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.profile-wall-edit-editor .wall-rich-editor-shell-comment-inline .wall-editor-toolbar-wrap {
  justify-content: flex-start;
}

.profile-wall-edit-editor .wall-rich-editor-shell-comment-inline .wall-editor-toolbar {
  justify-content: flex-start;
}

.profile-wall-edit-editor .profile-comment-modal-textarea {
  display: block;
  min-height: 132px;
}

.profile-wall-edit-editor-post {
  width: calc(100% - (42px + 12px));
  max-width: calc(100% - (42px + 12px));
  margin-left: calc(42px + 12px);
}

.profile-wall-edit-editor-comment {
  width: calc(100% + (var(--wall-avatar-size) + var(--wall-avatar-gap)));
  max-width: calc(100% + (var(--wall-avatar-size) + var(--wall-avatar-gap)));
  margin-left: calc(-1 * (var(--wall-avatar-size) + var(--wall-avatar-gap)));
}

@media (max-width: 640px) {
  .profile-wall-edit-editor-post {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .profile-summary-name {
    margin-top: -28px;
  }

  .profile-wall-inline-comment-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* v37 profile summary alignment + avatar links + smoother comments */
.profile-summary-compact {
  align-items: center;
  gap: 18px;
}

.profile-summary-main {
  justify-content: center;
  min-height: 128px;
  padding-top: 14px;
  padding-bottom: 6px;
}

.profile-summary-name {
  margin: 0;
}

.profile-summary-status {
  margin-top: 8px;
}

.profile-summary-contacts {
  min-height: 26px;
  margin-top: 8px;
}

.profile-summary-registration {
  margin-top: 4px;
}

.profile-wall-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.profile-wall-avatar-link:focus-visible {
  outline: 2px solid rgba(255,255,255,0.72);
  outline-offset: 3px;
}

.profile-wall-post {
  overflow: hidden;
}

.profile-wall-comments-panel {
  transform-origin: top center;
  transition: none;
}

.profile-wall-comments-panel > * {
  opacity: 0;
  transform: translateY(-10px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.38s ease;
}

.profile-wall-comments-panel.is-expanded > * {
  opacity: 1;
}

@media (max-width: 640px) {
  .profile-summary-main {
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 0;
  }

  .profile-summary-name {
    margin: 0;
  }
}


/* v38 post author avatar click + inline comment composer layout + summary vertical fit */
.profile-summary-compact {
  align-items: flex-start;
}

.profile-summary-main {
  justify-content: flex-start;
  min-height: 128px;
  padding-top: 18px;
  padding-bottom: 0;
}

.profile-summary-name {
  margin-top: 6px;
}

.profile-summary-status {
  margin-top: 10px;
}

.profile-summary-contacts {
  min-height: 22px;
  margin-top: 6px;
}

.profile-summary-registration {
  margin-top: 2px;
}

.profile-wall-comment-editor-inline {
  display: grid;
  gap: 12px;
  padding: 14px 14px 16px;
}

.wall-rich-editor-shell-comment-inline {
  display: grid;
  gap: 10px;
  width: 100%;
}

.wall-rich-editor-shell-comment-inline .wall-editor-toolbar-wrap {
  justify-content: flex-start;
}

.wall-rich-editor-shell-comment-inline .wall-editor-toolbar {
  width: 100%;
  justify-content: flex-start;
}

.wall-rich-editor-shell-comment-inline .profile-comment-modal-textarea {
  width: 100%;
  min-height: 132px;
}

.profile-wall-inline-comment-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.profile-wall-comment-submit-inline {
  width: auto;
  min-width: 0;
  padding: 0;
}

.profile-wall-post .profile-wall-avatar-link,
.profile-wall-comment .profile-wall-avatar-link {
  position: relative;
  z-index: 2;
}

@media (max-width: 640px) {
  .profile-summary-main {
    min-height: 0;
    padding-top: 12px;
  }

  .profile-summary-name {
    margin-top: 0;
  }
}

/* v39 inline comment submit under textarea + header-like visual */
.profile-wall-comment-editor-inline {
  gap: 10px;
}

.profile-wall-inline-comment-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin-top: 0;
}

.profile-wall-comment-submit-inline.auth-secondary,
.profile-wall-comment-submit-inline.auth-ghost-button,
.profile-wall-comment-submit-inline {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 10px 0 6px;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  border: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  display: inline-grid;
  grid-template-rows: auto 2px;
  align-items: end;
  gap: 7px;
  white-space: nowrap;
}

.profile-wall-comment-submit-inline.auth-secondary::after,
.profile-wall-comment-submit-inline.auth-ghost-button::after,
.profile-wall-comment-submit-inline::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: transparent;
  transform: scaleX(0);
}

.profile-wall-comment-submit-inline.auth-secondary:hover,
.profile-wall-comment-submit-inline.auth-secondary:focus-visible,
.profile-wall-comment-submit-inline.auth-ghost-button:hover,
.profile-wall-comment-submit-inline.auth-ghost-button:focus-visible,
.profile-wall-comment-submit-inline:hover,
.profile-wall-comment-submit-inline:focus-visible {
  width: auto;
  margin: 0;
  background: transparent !important;
  color: var(--text);
  box-shadow: none !important;
  outline: none;
}

@media (max-width: 640px) {
  .profile-wall-inline-comment-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }
}


/* v40 force inline comment submit below editor box */
.profile-wall-comment-editor-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

.wall-rich-editor-shell-comment-inline {
  width: 100%;
}

.profile-wall-inline-comment-actions {
  display: block;
  width: 100%;
  text-align: right;
  margin-top: 10px;
}

.profile-wall-comment-submit-inline.auth-secondary,
.profile-wall-comment-submit-inline.auth-ghost-button,
.profile-wall-comment-submit-inline {
  display: inline-grid;
  vertical-align: top;
}

@media (max-width: 640px) {
  .profile-wall-inline-comment-actions {
    display: block;
    text-align: right;
  }
}

/* v41 fix inline comment box clipping */
.profile-wall-post,
.profile-wall-comments-panel,
.profile-wall-comment-editor-inline {
  overflow: visible;
}

.profile-wall-comment-editor-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.wall-rich-editor-shell-comment-inline,
.wall-rich-editor-shell-comment-inline .wall-editor-toolbar-wrap,
.wall-rich-editor-shell-comment-inline .wall-editor-toolbar,
.wall-rich-editor-shell-comment-inline .profile-comment-modal-textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.wall-rich-editor-shell-comment-inline .profile-comment-modal-textarea {
  display: block;
}

.profile-wall-inline-comment-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin-top: 12px;
  text-align: right;
}

.profile-wall-comment-submit-inline.auth-secondary,
.profile-wall-comment-submit-inline.auth-ghost-button,
.profile-wall-comment-submit-inline {
  margin-left: 0;
  flex: 0 0 auto;
}


/* v42 fit inline comment editor inside indented comment panel */
.profile-wall-comments-panel .profile-wall-comment-editor-inline {
  width: calc(100% - (var(--wall-avatar-size) + var(--wall-avatar-gap)));
  max-width: calc(100% - (var(--wall-avatar-size) + var(--wall-avatar-gap)));
  margin-right: 0;
}

.profile-wall-comments-panel .profile-wall-comment-editor-inline .wall-rich-editor-shell-comment-inline,
.profile-wall-comments-panel .profile-wall-comment-editor-inline .wall-editor-toolbar-wrap,
.profile-wall-comments-panel .profile-wall-comment-editor-inline .wall-editor-toolbar,
.profile-wall-comments-panel .profile-wall-comment-editor-inline .profile-comment-modal-textarea,
.profile-wall-comments-panel .profile-wall-comment-editor-inline .profile-wall-inline-comment-actions {
  max-width: 100%;
}

@media (max-width: 640px) {
  .profile-wall-comments-panel .profile-wall-comment-editor-inline {
    width: 100%;
    max-width: 100%;
  }
}


/* v43 restore profile summary vertical placement near avatar */
.profile-summary-compact {
  align-items: center;
  gap: 18px;
}

.profile-summary-main {
  justify-content: center;
  min-height: 128px;
  padding-top: 4px;
  padding-bottom: 0;
}

.profile-summary-name {
  margin: 0;
}

.profile-summary-status {
  margin-top: 8px;
}

.profile-summary-contacts {
  min-height: 22px;
  margin-top: 6px;
}

.profile-summary-registration {
  margin-top: 6px;
}

@media (max-width: 640px) {
  .profile-summary-compact {
    align-items: center;
  }

  .profile-summary-main {
    min-height: 0;
    justify-content: center;
    padding-top: 6px;
    padding-bottom: 0;
  }

  .profile-summary-name {
    margin: 0;
  }
}


/* v44 full-width single-row rich editor toolbar */
.wall-editor-toolbar-wrap {
  display: block;
  width: 100%;
}

.wall-editor-toolbar {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  gap: 9px;
  justify-content: flex-start;
  align-items: center;
}

.wall-tool-button,
.wall-tool-select,
.wall-tool-color {
  height: 34px;
  min-width: 0;
  flex: 0 0 34px;
  box-sizing: border-box;
}

.wall-tool-button {
  padding: 0;
  font-size: 0.92rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wall-tool-button span {
  display: inline-block;
}

.wall-tool-button-italic span {
  font-style: italic;
}

.wall-tool-select {
  padding: 0 8px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.wall-tool-select-font {
  flex: 0 0 104px;
}

.wall-tool-select-size {
  flex: 0 0 84px;
}

.wall-tool-color {
  flex: 0 0 36px;
  width: 36px;
}

.wall-tool-color input {
  width: 28px;
  height: 28px;
}

.wall-widget-placeholder {
  display: inline-block;
  margin: 6px 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(126, 199, 255, 0.18);
  background: rgba(12, 28, 48, 0.85);
  color: var(--muted);
}

.wall-inline-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 8px 0;
  border: 1px solid rgba(126, 199, 255, 0.18);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(9, 22, 38, 0.72);
}

.wall-inline-table th,
.wall-inline-table td {
  border-right: 1px solid rgba(126, 199, 255, 0.16);
  border-bottom: 1px solid rgba(126, 199, 255, 0.16);
  padding: 10px 12px;
  text-align: left;
}

.wall-inline-table tr > *:last-child {
  border-right: 0;
}

.wall-inline-table tr:last-child > * {
  border-bottom: 0;
}

.wall-inline-table th:first-child {
  border-top-left-radius: 16px;
}

.wall-inline-table th:last-child {
  border-top-right-radius: 16px;
}

.wall-inline-table tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.wall-inline-table tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

.wall-inline-table th {
  color: var(--text);
  background: rgba(18, 38, 63, 0.78);
}

.wall-inline-table td {
  color: var(--muted);
  background: rgba(9, 22, 38, 0.76);
}

@media (max-width: 1200px) {
  .wall-editor-toolbar {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }
}


/* v47 fix rich editor typing direction */
.profile-post-modal-textarea,
.profile-wall-comment-input,
.wall-rich-editor,
.profile-comment-modal-textarea {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
  writing-mode: horizontal-tb;
  caret-color: var(--text);
}

.wall-rich-editor * {
  direction: inherit;
}

/* v55 add 2 blank lines between last comment and inline editor */
.profile-wall-comments-panel .profile-wall-comment-editor-inline {
  margin-top: 32px;
}

@media (max-width: 640px) {
  .profile-wall-comments-panel .profile-wall-comment-editor-inline {
    margin-top: 28px;
  }
}


/* Custom tooltips for wall editor */
.wall-editor-toolbar [data-tooltip] {
  position: relative;
}

.wall-editor-toolbar [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  min-width: max-content;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(96, 130, 170, 0.35);
  background: linear-gradient(180deg, rgba(11, 28, 48, 0.98), rgba(6, 18, 34, 0.98));
  color: #dce9ff;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity .14s ease, transform .14s ease;
}

.wall-editor-toolbar [data-tooltip]::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(8, 22, 39, 0.98);
  border-right: 1px solid rgba(96, 130, 170, 0.35);
  border-bottom: 1px solid rgba(96, 130, 170, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 39;
  transition: opacity .14s ease, transform .14s ease;
}

.wall-editor-toolbar [data-tooltip]:hover::after,
.wall-editor-toolbar [data-tooltip]:hover::before,
.wall-editor-toolbar [data-tooltip]:focus-visible::after,
.wall-editor-toolbar [data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* Wall editor selects dropdown in site style */
.wall-tool-select {
  background-color: rgba(12, 24, 40, 0.94);
  color: #e7f0ff;
}

.wall-tool-select option,
.wall-tool-select optgroup {
  background: #112236;
  color: #e7f0ff;
}

.wall-tool-select:focus,
.wall-tool-select:active {
  background-color: rgba(12, 24, 40, 0.98);
  color: #ffffff;
}

.wall-tool-select-font,
.wall-tool-select-size {
  appearance: none;
}


/* Improved wall editor selects */
.wall-tool-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 28px;
  background-color: rgba(12, 24, 40, 0.94);
  color: #e7f0ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23dce9ff' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
}

.wall-tool-select.is-open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23dce9ff' d='M6 0l6 8H0z'/%3E%3C/svg%3E");
}

.wall-tool-select option,
.wall-tool-select optgroup {
  background-color: #102338 !important;
  color: #e7f0ff !important;
}

.wall-tool-select::-ms-expand {
  display: none;
}


/* v78: keep editor selects usable and styled */
.wall-editor-toolbar .wall-tool-select {
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.wall-editor-toolbar .wall-tool-select option {
  background: #102338 !important;
  color: #e7f0ff !important;
}

.wall-editor-toolbar .wall-tool-select:focus {
  outline: 1px solid rgba(144, 193, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(78, 124, 181, 0.16);
}


/* v81 preserve underline/strike in rendered wall content */
.profile-wall-rich-content [style*="text-decoration:underline"] {
  text-decoration: underline !important;
}

.profile-wall-rich-content [style*="text-decoration:line-through"] {
  text-decoration: line-through !important;
}

.profile-wall-rich-content [style*="text-decoration:underline line-through"],
.profile-wall-rich-content [style*="text-decoration:line-through underline"] {
  text-decoration: underline line-through !important;
}


.wall-tool-color-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wall-tool-color-current {
  min-width: 40px;
  width: 40px;
  padding: 0;
  position: relative;
}

.wall-tool-color-current::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.28);
  background: var(--swatch-color, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}

.wall-tool-color-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(96, 130, 170, 0.35);
  background: linear-gradient(180deg, rgba(11, 28, 48, 0.98), rgba(6, 18, 34, 0.98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 45;
}

.wall-tool-color-menu.hidden {
  display: none;
}

.wall-tool-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: var(--swatch-color, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

.wall-tool-color-swatch:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.5);
}

.wall-tool-color-swatch:focus-visible,
.wall-tool-color-current:focus-visible {
  outline: 2px solid rgba(255,255,255,0.55);
  outline-offset: 2px;
}


/* v85 tiptap host cleanup */
.wall-rich-editor[data-tiptap-host="true"] {
  position: relative;
  display: block;
  overflow: hidden;
}

.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror {
  min-height: inherit;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  color: inherit;
  line-height: 1.35;
}

.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror > *:first-child {
  margin-top: 0;
}

.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror > *:last-child {
  margin-bottom: 0;
}

.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,.42);
  float: left;
  height: 0;
  pointer-events: none;
}

.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror p,
.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror div,
.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror ul,
.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror ol,
.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror li,
.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror blockquote {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: inherit;
}

.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror ul,
.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror ol {
  padding-left: 1.35rem;
}

.wall-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror img.wall-inline-emoji {
  display: inline-block;
  vertical-align: middle;
}

.wall-tool-button.is-active,
.wall-tool-color-swatch.is-active {
  border-color: rgba(126, 199, 255, 0.38);
  background: rgba(126, 199, 255, 0.12);
  color: var(--text);
}

.wall-tool-color-swatch.is-active {
  box-shadow: 0 0 0 2px rgba(126, 199, 255, 0.22);
}


.wall-tool-color-swatch.hidden {
  display: none;
}

.wall-poll {
  display: grid;
  gap: 0;
  border: 1px solid rgba(126, 199, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  margin: 8px 0;
  background: rgba(9, 22, 38, 0.72);
}

.wall-poll-question,
.wall-poll-option {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(126, 199, 255, 0.16);
  min-height: 22px;
  outline: none;
}

.wall-poll-question {
  font-weight: 800;
  color: var(--text);
  background: rgba(18, 38, 63, 0.72);
}

.wall-poll-option {
  color: var(--muted);
  background: rgba(9, 22, 38, 0.72);
}

.wall-poll-option:last-child {
  border-bottom: 0;
}

.wall-poll-question:empty::before,
.wall-poll-option:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,.42);
}

.wall-poll-rendered .wall-poll-vote-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.wall-poll-vote-button {
  border: 1px solid rgba(126, 199, 255, 0.16);
  background: rgba(9, 22, 38, 0.72);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  text-align: left;
  color: var(--text);
}

.wall-poll-vote-button:disabled {
  opacity: 1;
  cursor: default;
}

.wall-poll-vote-bar {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.wall-poll-vote-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(123,189,255,0.95), rgba(123,189,255,0.45));
}

.wall-poll-vote-stats,
.wall-poll-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.wall-poll-meta {
  padding: 0 12px 12px;
}

.wall-table-tools {
  position: absolute;
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(96, 130, 170, 0.35);
  background: linear-gradient(180deg, rgba(11, 28, 48, 0.98), rgba(6, 18, 34, 0.98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 25;
}

.wall-table-tools.hidden {
  display: none;
}

.wall-table-tool-button {
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-weight: 700;
}


/* v100 tinymce layout guards */
.profile-wall,
.profile-wall-main,
.profile-wall-feed,
.profile-wall-post,
.profile-wall-post-body,
.profile-wall-rich-content {
  min-width: 0;
}

.profile-wall-rich-content,
.profile-wall-rich-content > * {
  max-width: 100%;
  box-sizing: border-box;
}

.profile-wall-rich-content {
  overflow-x: hidden;
}

.profile-wall-rich-content a,
.profile-wall-rich-content p,
.profile-wall-rich-content div,
.profile-wall-rich-content li,
.profile-wall-rich-content span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-wall-rich-content .wall-inline-table,
.profile-wall-rich-content table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed;
}

.profile-wall-rich-content .wall-inline-table th,
.profile-wall-rich-content .wall-inline-table td,
.profile-wall-rich-content table th,
.profile-wall-rich-content table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-wall-rich-content .wall-poll {
  width: 100%;
  max-width: 100%;
}

.wall-editor-root--tinymce .tox.tox-tinymce,
.wall-editor-root--tinymce .improve-tiny-host {
  width: 100%;
  max-width: 100%;
}

.wall-editor-root--tinymce .tox .tox-editor-header {
  position: relative;
  z-index: 1;
}

.wall-editor-root--tinymce .tox .tox-toolbar__group {
  flex-wrap: wrap;
}

.wall-editor-root--tinymce .tox .tox-tbtn--select,
.wall-editor-root--tinymce .tox .tox-mbtn--select {
  max-width: 100%;
}


/* v106 compact toolbar layout matching mock */
.wall-editor-toolbar {
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.wall-tool-button,
.wall-tool-select,
.wall-tool-color-current {
  height: 32px;
  border-radius: 10px;
}

.wall-tool-button {
  min-width: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(92, 135, 189, 0.32);
  background: linear-gradient(180deg, rgba(16, 39, 68, 0.96), rgba(10, 25, 46, 0.96));
  color: #e7f0ff;
}

.wall-tool-button-link {
  background: linear-gradient(180deg, rgba(255, 59, 73, 0.94), rgba(214, 28, 43, 0.94));
  border-color: rgba(255, 130, 140, 0.55);
}

.wall-tool-button-media {
  background: linear-gradient(180deg, rgba(46, 205, 113, 0.96), rgba(22, 152, 74, 0.96));
  border-color: rgba(129, 255, 174, 0.46);
}

.wall-tool-button-more {
  min-width: 34px;
  flex-basis: 34px;
  letter-spacing: 1px;
}

.wall-tool-select {
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(92, 135, 189, 0.32);
  background-color: rgba(12, 24, 40, 0.94);
  color: #e7f0ff;
}

.wall-tool-select-font {
  flex: 0 0 118px;
}

.wall-tool-select-size {
  flex: 0 0 78px;
}

.wall-tool-color-dropdown {
  flex: 0 0 auto;
}

.wall-tool-color-current {
  width: auto;
  min-width: 100px;
  padding: 0 12px 0 10px;
  gap: 8px;
  justify-content: flex-start;
}

.wall-tool-color-current::before {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: 0 0 14px;
}

.wall-tool-color-current-label {
  display: inline-block;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.wall-tool-color-menu {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 8px;
}

.wall-tool-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.wall-tool-more-dropdown {
  position: relative;
  display: inline-flex;
}

.wall-tool-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(96, 130, 170, 0.35);
  background: linear-gradient(180deg, rgba(11, 28, 48, 0.98), rgba(6, 18, 34, 0.98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 50;
}

.wall-tool-more-menu.hidden {
  display: none;
}

.wall-tool-button.is-active,
.wall-tool-color-swatch.is-active {
  border-color: rgba(126, 199, 255, 0.52);
  background: rgba(126, 199, 255, 0.18);
}


/* CKEditor 5 local integration */

.ck.ck-editor {
  width: 100%;
}

.profile-post-editor-shell .ck.ck-editor,
.wall-rich-editor-shell .ck.ck-editor {
  width: 100%;
}

.ck.ck-toolbar,
.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ck.ck-editor__main > .ck-editor__editable {
  min-height: 120px;
  background: transparent !important;
  color: #dbe9ff !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ck.ck-editor__main > .ck-editor__editable.ck-focused {
  border: 0 !important;
  box-shadow: none !important;
}

.ck.ck-button,
.ck.ck-button.ck-on,
.ck.ck-dropdown__button,
.ck.ck-list__item .ck-button {
  border-radius: 10px !important;
}

.ck.ck-toolbar .ck.ck-toolbar__separator {
  background: rgba(128, 168, 255, 0.18) !important;
}

.ck.ck-button:not(.ck-disabled):hover,
.ck.ck-dropdown__button:not(.ck-disabled):hover,
.ck.ck-button.ck-on {
  background: rgba(58, 99, 170, 0.35) !important;
}

.ck.ck-button,
.ck.ck-dropdown__button,
.ck.ck-input,
.ck.ck-labeled-field-view__input-wrapper .ck.ck-input {
  color: #dbe9ff !important;
}

.ck.ck-dropdown__panel,
.ck.ck-list,
.ck.ck-input,
.ck.ck-balloon-panel,
.ck.ck-toolbar-container,
.ck.ck-reset_all,
.ck.ck-rounded-corners {
  background: #0a1b3c !important;
  color: #dbe9ff !important;
  border-color: rgba(96, 146, 255, 0.25) !important;
}

.ck.ck-editor__editable > :first-child {
  margin-top: 0;
}

.ck.ck-editor__editable > :last-child {
  margin-bottom: 0;
}

.ck-content .table table,
.ck-content table {
  background: transparent;
  color: #dbe9ff;
}


.profile-wall-delete-toggle:hover,
.profile-wall-delete-toggle:focus-visible,
.profile-wall-delete-direct:hover,
.profile-wall-delete-direct:focus-visible {
  background: rgba(255, 73, 73, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.24);
  transform: none;
}


/* footer hard fix */
body.page-shell > #site-footer {
  margin-top: auto;
  width: 100%;
}

#site-footer {
  min-height: 0 !important;
  height: auto !important;
  background: rgba(6, 16, 28, 0.72) !important;
  border-top: 1px solid var(--line) !important;
  box-shadow: none !important;
}

#site-footer .site-footer,
#site-footer .site-footer-minimal {
  background: transparent !important;
  border-top: 0 !important;
  box-shadow: none !important;
}

#site-footer .site-footer-minimal {
  padding: 14px 0 16px !important;
}

#site-footer .footer-minimal-row {
  min-height: 0 !important;
  align-items: center !important;
}

#site-footer .footer-minimal-meta {
  margin-left: auto;
  text-align: right;
}

#site-footer .footer-minimal-gap {
  display: none !important;
}

.page-shell[data-page="profile"] main {
  min-height: auto;
}

.page-shell[data-page="profile"] .profile-page-section {
  padding-bottom: 24px;
}






/* final profile layout fix: content-driven wall + sticky footer */
body.page-shell {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100dvh !important;
}

main {
  min-width: 0;
  min-height: 0 !important;
  flex: 1 0 auto !important;
  display: block !important;
}

#site-footer {
  width: 100%;
  display: block;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  margin-top: auto !important;
}

.section {
  padding: 38px 0 24px;
}

.profile-page-section,
.section.profile-page-section {
  padding-top: 36px;
  padding-bottom: 24px !important;
}

.profile-wall-block {
  padding: 0 !important;
  margin: 0 !important;
}

.profile-wall-block-top,
.profile-wall-block-top.has-pagination,
.profile-wall-block-top.is-empty {
  min-height: 30px !important;
  margin: 0 0 14px !important;
  align-items: flex-start !important;
}

.profile-wall {
  display: block;
  min-height: 0 !important;
}

.profile-wall-list {
  display: grid;
  gap: 14px;
}

.profile-wall > .profile-wall-pagination:first-child {
  margin: 0 0 14px !important;
}

.profile-wall-list + .profile-wall-pagination,
.profile-wall-pagination {
  margin-top: 14px !important;
  margin-bottom: 0 !important;
}

.footer-minimal-gap {
  display: none !important;
  height: 0 !important;
}

.site-footer-minimal {
  padding: 12px 0 !important;
  min-height: 0 !important;
}

.footer-minimal-row {
  min-height: 56px !important;
  align-items: center !important;
}



/* v43 profile footer spacing + top controls alignment */
.page-shell[data-page="profile"] #site-footer {
  margin-top: 250px !important;
}

.page-shell[data-page="profile"] .profile-page-section {
  padding-bottom: 0 !important;
}

.profile-wall-block-top,
.profile-wall-block-top.has-pagination,
.profile-wall-block-top.is-empty {
  width: 100%;
  min-height: 30px !important;
  margin: 0 0 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px;
  pointer-events: auto !important;
}

.profile-wall-block-top .profile-inline-action,
.profile-wall-block-top #profile-new-post-button {
  margin: 0 !important;
  flex: 0 0 auto;
}

.profile-wall-block-top .profile-wall-pagination,
.profile-wall-block-top .profile-wall-pagination.profile-wall-pagination-top {
  margin: 0 !important;
  flex: 0 0 auto;
}

.profile-wall > .profile-wall-pagination:first-child {
  display: none !important;
}

@media (max-width: 760px) {
  .profile-wall-block-top,
  .profile-wall-block-top.has-pagination,
  .profile-wall-block-top.is-empty {
    flex-wrap: wrap;
    align-items: flex-start !important;
  }

  .profile-wall-block-top .profile-wall-pagination,
  .profile-wall-block-top .profile-wall-pagination.profile-wall-pagination-top {
    margin-left: auto !important;
  }
}

/* v44 keep footer gap but preserve collapsed comments height fix */
.page-shell[data-page="profile"] #site-footer {
  margin-top: 250px !important;
}

.profile-wall-comments-panel {
  overflow: hidden !important;
}

.profile-wall-comments-panel:not(.is-expanded) {
  height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  pointer-events: none !important;
}

.profile-wall-comments-panel:not(.is-expanded) > * {
  visibility: hidden !important;
  opacity: 0 !important;
  transform: translateY(-6px) !important;
}

.profile-wall-comments-panel.is-expanded {
  overflow: hidden !important;
  opacity: 1 !important;
  margin-top: 12px !important;
  pointer-events: auto !important;
}

.profile-wall-comments-panel.is-expanded > * {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}


/* v45 global footer spacing + keep profile comments fix */
body > #site-footer {
  margin-top: 250px !important;
}

.page-shell[data-page="profile"] #site-footer {
  margin-top: 250px !important;
}


/* v49 profile side underlay: tile the provided side overlay from header to footer */
.page-shell[data-page="profile"] .profile-page-section {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.page-shell[data-page="profile"] .profile-page-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/img/profile-side-overlay.png");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.page-shell[data-page="profile"] .profile-page-layout {
  position: relative;
  z-index: 1;
}

@media (max-width: 1280px) {
  .page-shell[data-page="profile"] .profile-page-section::before {
    background-size: cover;
    background-repeat: no-repeat;
  }
}


/* v50 global side underlay across the whole site + footer gap coverage */
body.page-shell {
  isolation: isolate;
}

body.page-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-frame-height);
  bottom: 0;
  background-image: url("/assets/img/profile-side-overlay.png");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% 1080px;
  pointer-events: none;
  z-index: -1;
}

/* disable the old profile-only underlay so it does not stack with the global one */
.page-shell[data-page="profile"] .profile-page-section::before {
  content: none !important;
}

@media (max-width: 1280px) {
  body.page-shell::after {
    background-size: cover;
    background-repeat: no-repeat;
  }
}


/* v52 footer no glow: keep layout, remove footer lighting/backdrop */
#site-footer,
#site-footer .site-footer,
#site-footer .site-footer-minimal,
body.page-shell > #site-footer {
  background: #06101c !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

#site-footer::before,
#site-footer .site-footer::before,
#site-footer .site-footer-minimal::before {
  content: none !important;
  display: none !important;
}


/* v6 profile characters spacing + simplified stats */
.page-shell[data-page="profile"] #profile-tab-characters {
  margin-top: 56px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-entry {
  padding: 22px 22px 20px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-inline-stats,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-stats {
  gap: 10px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-inline-stats {
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-line {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-line + .profile-line {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-stats {
  margin-top: 14px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-subtitle {
  margin-top: 6px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-clan {
  margin: 12px 0 0;
}

@media (max-width: 980px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters {
    margin-top: 28px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack,
  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-inline-stats {
    grid-template-columns: 1fr !important;
  }
}


/* v7 profile characters owner bar + cleaner stats */
.page-shell[data-page="profile"] #profile-tab-characters {
  margin-top: 56px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-bar {
  display: block;
  margin: 0 0 22px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  min-height: 30px;
  color: rgba(232, 239, 255, 0.88);
  font-size: 0.98rem;
  line-height: 1.3;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line strong {
  color: #ffffff;
  font-weight: 700;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-entry {
  padding: 22px 22px 20px;
  min-width: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-inline-stats,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-inline-stats {
  margin-top: 16px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-line {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-line + .profile-line {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-stats {
  margin-top: 12px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-subtitle {
  margin-top: 6px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-clan {
  margin: 12px 0 0;
}

@media (max-width: 980px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters {
    margin-top: 28px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
    gap: 10px 18px;
    font-size: 0.92rem;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
    grid-template-columns: 1fr !important;
  }
}


/* v8 characters panel alignment with wall top */
.page-shell[data-page="profile"] #profile-tab-characters {
  margin-top: 0 !important;
  width: 100%;
  max-width: 100%;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-bar {
  display: block;
  width: 100%;
  min-height: 30px;
  margin: 0 0 14px !important;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-bar[data-empty="true"] {
  visibility: hidden;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  width: 100%;
  min-height: 30px;
  margin: 0;
  color: rgba(232, 239, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 500;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line span,
.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line strong {
  line-height: 30px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line strong {
  color: #ffffff;
  font-weight: 700;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
  width: 100%;
  max-width: 100%;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-entry,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-entry-empty {
  min-width: 0;
}

@media (max-width: 980px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-bar {
    min-height: 24px;
    margin: 0 0 12px !important;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
    min-height: 24px;
    gap: 6px 16px;
    font-size: 0.9rem;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line span,
  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line strong {
    line-height: 24px;
  }
}

/* v9 precise characters panel geometry from header */
.page-shell[data-page="profile"] #profile-tab-characters {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-bar {
  display: block;
  width: 100%;
  min-height: 38px;
  margin: 0 0 16px !important;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 0 0 3px;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  line-height: 1.1;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line span,
.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line strong {
  line-height: 1.1;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line strong {
  color: var(--text);
  font-weight: 700;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-stack {
  margin-top: 0 !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-bar {
    min-height: 34px;
    margin: 0 0 14px !important;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
    min-height: 34px;
    padding-bottom: 2px;
    gap: 6px 16px;
    font-size: 0.92rem;
  }
}

/* profile characters profession badge v10 */
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-entry {
  padding: 22px 22px 18px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-top {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-profession-badge {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-profession-badge img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: cover;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-main {
  min-width: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-header h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.15;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-level {
  flex: 0 0 auto;
  font-weight: 800;
  color: rgba(236, 243, 255, 0.96);
  line-height: 1.15;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-subtitle,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-clan {
  margin: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-subtitle {
  color: #8ef0ea;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-clan {
  margin-top: 10px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-inline-stats,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-stats {
  display: grid;
  gap: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-line {
  padding: 10px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-inline-stats .profile-line:first-child,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-stats .profile-line:first-child {
  border-top-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-top {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-profession-badge {
    width: 62px;
    height: 62px;
    border-radius: 12px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-profession-badge img {
    width: 100%;
    height: 100%;
  }
}


/* v11 characters owner line nudged left to align with "Лента" */
.page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
  margin-left: -10px;
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-characters-owner-line {
    margin-left: 0;
  }
}


.page-shell[data-page="profile"] #profile-tab-characters .profile-character-nickname-input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(142, 240, 234, 0.22);
  background: rgba(10, 23, 41, 0.9);
  color: rgba(244, 248, 255, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-nickname-input:focus {
  outline: none;
  border-color: rgba(142, 240, 234, 0.42);
  box-shadow: 0 0 0 2px rgba(142, 240, 234, 0.12);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-entry {
  position: relative;
  padding-bottom: 58px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-action-icon {
  margin: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-delete-pair.is-confirming .profile-wall-delete-direct {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-delete-pair.is-confirming .profile-wall-delete-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-action-message {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 60px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  color: rgba(236, 243, 255, 0.94);
  background: rgba(8, 18, 34, 0.88);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(142, 240, 234, 0.18);
  backdrop-filter: blur(6px);
  z-index: 4;
  pointer-events: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-action-message.is-error {
  color: #ffd3d3;
  background: rgba(58, 16, 16, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 114, 114, 0.24);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-action-message.is-success {
  color: #baf8f1;
  background: rgba(7, 29, 33, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(142, 240, 234, 0.24);
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-entry {
    padding-bottom: 64px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions {
    right: 16px;
    bottom: 14px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-action-message {
    left: 14px;
    right: 14px;
    top: 60px;
  }
}


.page-shell[data-page="profile"] #profile-tab-characters .profile-character-rename-pair {
  position: relative;
  display: inline-flex;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-rename-confirm {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-rename-pair.is-confirming .profile-character-rename-confirm {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-rename-pair.is-confirming .profile-character-rename-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-confirm-icon,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-confirm-icon img {
  width: 16px;
  height: 16px;
  display: block;
}


.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 61px;
  height: 26px;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-rename-pair,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-delete-pair {
  position: absolute;
  top: 0;
  width: 26px;
  height: 26px;
  display: block;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-rename-pair {
  left: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-delete-pair {
  left: 35px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-rename-pair > .profile-character-rename-toggle,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-rename-pair > .profile-character-rename-confirm,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-delete-pair > .profile-wall-delete-toggle,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions > .profile-character-delete-pair > .profile-wall-delete-direct {
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  margin: 0;
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-actions {
    right: 16px;
    bottom: 14px;
    width: 61px;
    height: 26px;
  }
}


/* character create/unlock slot cards */
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 410px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(180deg, rgba(12, 28, 48, 0.72), rgba(8, 20, 36, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 18%, rgba(152, 203, 255, 0.12), transparent 42%), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  pointer-events: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card:hover,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(126, 199, 255, 0.24);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.05);
  outline: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 28px 24px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-icon {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card-create .profile-character-slot-icon {
  color: rgba(255,255,255,0.94);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card-unlock .profile-character-slot-icon {
  color: rgba(197, 221, 255, 0.9);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-icon svg {
  width: 72px;
  height: 72px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  color: rgba(246, 250, 255, 0.98);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-subtitle,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-hint {
  margin: 0;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-subtitle {
  color: rgba(189, 219, 255, 0.96);
  font-weight: 600;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-hint {
  color: rgba(180, 193, 211, 0.78);
  line-height: 1.5;
  max-width: 250px;
}


.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card.is-expanded {
  cursor: default;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card.is-expanded:hover,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card.is-expanded:focus-visible {
  transform: none;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-form {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(126, 199, 255, 0.16);
  background: rgba(8, 20, 36, 0.9);
  color: var(--text);
  outline: none;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-input:focus {
  border-color: rgba(126, 199, 255, 0.32);
  box-shadow: 0 0 0 2px rgba(126, 199, 255, 0.12);
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(58, 16, 16, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.24);
  color: #ffd3d3;
  line-height: 1.45;
  text-align: left;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-actions {
  width: min(100%, 292px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-actions > button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-submit,
.page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-cancel {
  flex: 0 0 auto;
}

.profile-character-slot-modal {
  max-width: 560px;
}

.profile-character-slot-modal-text {
  margin: 0 0 16px;
  color: rgba(220, 230, 246, 0.92);
  line-height: 1.6;
}

.profile-character-slot-modal-label {
  display: block;
  margin-bottom: 10px;
}

.profile-character-slot-modal-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(126, 199, 255, 0.16);
  background: rgba(8, 20, 36, 0.9);
  color: var(--text);
  outline: none;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.profile-character-slot-modal-input:focus {
  border-color: rgba(126, 199, 255, 0.32);
  box-shadow: 0 0 0 2px rgba(126, 199, 255, 0.12);
}

.profile-character-slot-modal-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(58, 16, 16, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.24);
  color: #ffd3d3;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-card {
    min-height: 360px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-icon {
    width: 92px;
    height: 92px;
    border-radius: 22px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-icon svg {
    width: 58px;
    height: 58px;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-actions {
    flex-wrap: wrap;
  }

  .page-shell[data-page="profile"] #profile-tab-characters .profile-character-slot-inline-actions > button {
    width: 100%;
  }
}

/* === IMPROVE live Dynmap page === */
.map-page-hero {
  padding-bottom: 12px;
}

.map-section {
  padding-top: 0;
}

.dynmap-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(126, 199, 255, 0.2);
  border-radius: 0;
  background: rgba(3, 14, 25, 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.dynmap-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(97, 232, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 28%);
  z-index: 2;
}

.dynmap-frame-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: min(76vh, 780px);
  min-height: 620px;
  background: rgba(0, 0, 0, 0.22);
}

.dynmap-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #061523;
}

.dynmap-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(3, 14, 25, 0.95), rgba(4, 28, 45, 0.88));
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dynmap-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.dynmap-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 18px rgba(97, 232, 255, 0.8);
  animation: dynmapPulse 1s ease-in-out infinite;
}

@keyframes dynmapPulse {
  0%, 100% { transform: scale(0.75); opacity: 0.55; }
  50% { transform: scale(1.25); opacity: 1; }
}

@media (max-width: 760px) {
  .dynmap-frame-wrap {
    height: 70vh;
    min-height: 460px;
  }
}


/* v29 profile privates as character-like cards with icon buttons */
.page-shell[data-page="profile"] #profile-tab-privates {
  margin-top: 56px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-block {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.page-shell[data-page="profile"] #profile-tab-privates .section-label,
.page-shell[data-page="profile"] #profile-tab-privates h2 {
  display: none;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-placeholder-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry {
  position: relative;
  padding: 22px 22px 20px;
  min-height: 284px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-icon-button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  padding: 0;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-icon-button .profile-wall-delete-icon,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-icon-button .profile-wall-delete-icon img {
  width: 14px;
  height: 14px;
  display: block;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-delete-pending .profile-private-delete-button {
  background: rgba(255, 73, 73, 0.22);
  color: #ffd0d0;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.35), 0 0 12px rgba(255, 73, 73, 0.14);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-face-back {
  display: none;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view .profile-private-face-front {
  display: none;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view .profile-private-face-back {
  display: block;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view .profile-private-actions-icons {
  display: none;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-top {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
  padding-right: 82px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-illustration {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: rgba(223, 232, 247, 0.92);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-illustration.is-object {
  color: #f2d580;
  background: rgba(242, 213, 128, 0.07);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-illustration.is-home {
  color: #9fd2ff;
  background: rgba(122, 190, 255, 0.08);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-illustration svg {
  width: 100%;
  height: 100%;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-main {
  min-width: 0;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-character-header h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.15;
  word-break: break-word;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-type-chip {
  margin: 6px 0 0;
  color: rgba(224,233,249,0.78);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-stats {
  margin-top: 14px;
  gap: 10px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-stats .profile-line {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-stats .profile-line + .profile-line {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-head strong {
  display: block;
  font-size: 1.02rem;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body {
  display: grid;
  gap: 10px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-empty {
  color: var(--muted);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-list {
  display: grid;
  gap: 10px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-resident-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-resident-name {
  min-width: 0;
  word-break: break-word;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete {
  flex: 0 0 28px;
}

@media (max-width: 980px) {
  .page-shell[data-page="profile"] #profile-tab-privates .profile-placeholder-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell[data-page="profile"] #profile-tab-privates {
    margin-top: 28px;
  }
  .page-shell[data-page="profile"] #profile-tab-privates .profile-placeholder-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-shell[data-page="profile"] #profile-tab-privates .profile-private-top {
    padding-right: 72px;
  }
}


/* v30 private action buttons moved to bottom + residents custom icon */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry {
  padding-bottom: 64px;
  min-height: 320px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons {
  top: auto !important;
  right: 22px !important;
  bottom: 20px !important;
  gap: 8px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-top {
  padding-right: 0 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-icon-button {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-delete-pair {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-delete-pair .profile-private-icon-button {
  position: absolute;
  inset: 0;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-delete-pair .profile-wall-delete-direct {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-delete-pair.is-confirming .profile-wall-delete-toggle {
  opacity: 0;
  pointer-events: none;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-delete-pair.is-confirming .profile-wall-delete-direct {
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-icon-img {
  width: 16px;
  height: 16px;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-icon-button .profile-wall-delete-icon,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-icon-button .profile-wall-delete-icon img {
  width: 12px;
  height: 12px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view {
  padding-bottom: 20px;
}


/* v31 compact private card header */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry {
  min-height: 300px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-top {
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  margin-bottom: 18px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-illustration {
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-character-header {
  margin-bottom: 0 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-character-header h3 {
  font-size: 1.08rem !important;
  line-height: 1.18 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-type-chip {
  display: none !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-stats {
  margin-top: 8px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-icon-img {
  width: 17px !important;
  height: 17px !important;
}


/* v32 private delete safety + one-resident icon tune */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-icon-img {
  width: 15px;
  height: 15px;
  image-rendering: pixelated;
}


/* v35 residents icon final + stable private card height */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view {
  min-height: 300px !important;
  padding-bottom: 64px !important;
  box-sizing: border-box;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-face-front,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-face-back {
  min-height: 100%;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-icon-img {
  width: 9px !important;
  height: 13px !important;
  max-width: 9px !important;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}


/* v36 residents icon transparent + exact stable card height */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view {
  height: 304px !important;
  min-height: 304px !important;
  max-height: 304px !important;
  box-sizing: border-box;
  overflow: hidden;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-face-front,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-face-back {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body {
  max-height: calc(304px - 74px);
  overflow-y: auto;
  padding-right: 2px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-icon-img {
  width: 25px !important;
  height: 25px !important;
  max-width: 25px !important;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}


/* v37 double-confirm for removing private residents */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete.is-confirming {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ffb0b0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.35), 0 0 12px rgba(255, 73, 73, 0.14) !important;
}

/* v40 fixed resident list scroll inside private card */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view {
  height: 304px !important;
  min-height: 304px !important;
  max-height: 304px !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-face-back {
  height: 100% !important;
  min-height: 0 !important;
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-entry.is-residents-view .profile-private-face-back {
  display: grid !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-head {
  flex: 0 0 auto;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 8px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 189, 255, 0.42) rgba(255, 255, 255, 0.045);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body::-webkit-scrollbar {
  width: 8px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(123, 189, 255, 0.52), rgba(123, 189, 255, 0.28));
  border-radius: 999px;
  border: 2px solid rgba(7, 18, 32, 0.96);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(123, 189, 255, 0.68), rgba(123, 189, 255, 0.38));
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-list {
  padding-bottom: 2px;
}


/* v42 residents list simplified + neutral first-stage remove button */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-back-body {
  display: block !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-list {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 0 !important;
  padding: 0 0 2px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-resident-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 2px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-resident-row + .profile-private-resident-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-resident-name {
  min-width: 0;
  word-break: break-word;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-residents-empty {
  padding-top: 4px;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete {
  background: rgba(255,255,255,0.045) !important;
  color: var(--text) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10) !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete:hover,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete:focus-visible {
  background: rgba(255,255,255,0.075) !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete.is-confirming {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ffb0b0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.35), 0 0 12px rgba(255, 73, 73, 0.14) !important;
}


/* v43 member remove uses the same delete button style as private cards */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-private-member-delete {
  position: absolute !important;
  inset: 0 !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  border: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-toggle {
  background: rgba(255, 73, 73, 0.12) !important;
  color: #ff5b5b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-direct {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ffb0b0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.35), 0 0 12px rgba(255, 73, 73, 0.14) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair.is-confirming .profile-wall-delete-toggle {
  opacity: 0 !important;
  pointer-events: none !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair.is-confirming .profile-wall-delete-direct {
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 3 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-icon,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-icon img {
  width: 12px !important;
  height: 12px !important;
}


/* v44 member remove button exactly matches delete-pair visuals */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-toggle,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-direct {
  position: absolute !important;
  inset: 0 !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  border: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-toggle {
  background: rgba(255, 73, 73, 0.12) !important;
  color: #ff5b5b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-direct {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ffb0b0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.35), 0 0 12px rgba(255, 73, 73, 0.14) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair.is-confirming .profile-wall-delete-toggle {
  opacity: 0 !important;
  pointer-events: none !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair.is-confirming .profile-wall-delete-direct {
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 3 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-icon,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-member-delete-pair .profile-wall-delete-icon img {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
}


/* v45 private delete first-stage without rerender */
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons .profile-private-delete-pair:not(.profile-private-member-delete-pair) {
  position: relative !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons .profile-private-delete-pair:not(.profile-private-member-delete-pair) .profile-wall-delete-toggle,
.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons .profile-private-delete-pair:not(.profile-private-member-delete-pair) .profile-wall-delete-direct {
  position: absolute !important;
  inset: 0 !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons .profile-private-delete-pair:not(.profile-private-member-delete-pair) .profile-wall-delete-toggle {
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons .profile-private-delete-pair:not(.profile-private-member-delete-pair) .profile-wall-delete-direct {
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons .profile-private-delete-pair:not(.profile-private-member-delete-pair).is-confirming .profile-wall-delete-toggle {
  opacity: 0 !important;
  pointer-events: none !important;
}

.page-shell[data-page="profile"] #profile-tab-privates .profile-private-actions-icons .profile-private-delete-pair:not(.profile-private-member-delete-pair).is-confirming .profile-wall-delete-direct {
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 3 !important;
}

/* ===== Knowledge base page ===== */
.knowledge-page-section {
  padding-top: 28px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.knowledge-panel {
  border-radius: 28px;
  border: 1px solid rgba(91, 126, 166, 0.28);
  background:
    linear-gradient(180deg, rgba(20, 34, 51, 0.96) 0%, rgba(14, 27, 44, 0.94) 100%),
    radial-gradient(circle at top right, rgba(87, 216, 255, 0.08), transparent 42%);
  box-shadow:
    0 16px 44px rgba(3, 12, 24, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.knowledge-sidebar {
  padding: 22px 16px 16px;
  position: sticky;
  top: 92px;
}

.knowledge-sidebar-kicker,
.knowledge-content-topline {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8ef3ff;
}

.knowledge-sidebar-title {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.05;
}

.knowledge-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.knowledge-category-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(88, 126, 167, 0.24);
  background: rgba(15, 31, 49, 0.9);
  color: #e9eef8;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.knowledge-category-button:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 225, 255, 0.42);
  background: rgba(18, 38, 60, 0.96);
}

.knowledge-category-button.is-active {
  border-color: rgba(108, 227, 255, 0.54);
  background: linear-gradient(180deg, rgba(21, 53, 82, 0.96), rgba(16, 40, 64, 0.96));
  box-shadow: inset 0 0 0 1px rgba(143, 236, 255, 0.1);
}

.knowledge-category-text {
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.knowledge-category-count {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(7, 20, 34, 0.85);
  color: #93f6ff;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-content {
  padding: 18px 20px 22px;
}

.knowledge-content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.knowledge-content-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.98;
}

.knowledge-content-subtitle {
  margin: 10px 0 0;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(220, 229, 244, 0.82);
}

.knowledge-count-pill {
  flex: 0 0 auto;
  align-self: flex-start;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(234, 194, 80, 0.36);
  background: rgba(52, 63, 78, 0.56);
  color: #ffd763;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.knowledge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 278px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(86, 123, 163, 0.26);
  background:
    linear-gradient(180deg, rgba(26, 41, 61, 0.94) 0%, rgba(22, 36, 55, 0.94) 100%),
    radial-gradient(circle at top left, rgba(118, 233, 255, 0.09), transparent 40%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  text-align: left;
  color: #f6f8ff;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.knowledge-card:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 220, 255, 0.42);
  box-shadow:
    0 18px 36px rgba(7, 16, 28, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.knowledge-icon-box {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(90, 125, 161, 0.22);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(31, 48, 68, 0.94), rgba(20, 33, 51, 0.94));
  overflow: hidden;
}

.knowledge-icon-box.is-block {
  align-items: flex-start;
  justify-content: flex-start;
}

.knowledge-card-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.knowledge-card-icon-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.36);
}

.knowledge-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(45, 95, 123, 0.72);
  color: #8ff6ff;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-card-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.knowledge-card-description {
  margin: 0;
  color: rgba(220, 229, 244, 0.82);
  font-size: 14px;
  line-height: 1.55;
}

.knowledge-card-footnote {
  margin-top: auto;
  color: #ffd763;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .knowledge-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-sidebar {
    position: static;
  }

  .knowledge-sidebar-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .knowledge-content {
    padding: 16px;
  }

  .knowledge-sidebar-list {
    grid-template-columns: 1fr;
  }

  .knowledge-content-header {
    flex-direction: column;
  }

  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-card {
    min-height: 248px;
  }
}


/* Knowledge PNG renderer fixes */
.knowledge-card-icon[hidden],
.knowledge-card-icon-fallback[hidden] {
  display: none !important;
}

.knowledge-icon-box {
  width: 72px;
  height: 72px;
}

.knowledge-icon-box.is-block .knowledge-card-icon {
  width: 72px;
  height: 72px;
}


/* ===== Knowledge base compact icon mode ===== */
.knowledge-content-subtitle {
  max-width: 760px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 72px));
  gap: 10px;
  justify-content: start;
}

.knowledge-card {
  min-height: 0;
  width: 72px;
  height: 72px;
  padding: 4px;
  gap: 0;
  border-radius: 18px;
  align-items: center;
  justify-content: center;
}

.knowledge-card:hover {
  transform: translateY(-1px);
}

.knowledge-card-badge,
.knowledge-card-title,
.knowledge-card-description,
.knowledge-card-footnote,
.knowledge-card-icon-fallback {
  display: none !important;
}

.knowledge-icon-box,
.knowledge-icon-box.knowledge-icon-box--compact {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  border: 1px solid rgba(90, 125, 161, 0.22);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(31, 48, 68, 0.94), rgba(20, 33, 51, 0.94));
}

.knowledge-card-icon,
.knowledge-icon-box.is-block .knowledge-card-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.knowledge-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(86, 123, 163, 0.22);
  background: rgba(15, 31, 49, 0.9);
  color: #dce5f4;
}

.knowledge-modal-open {
  overflow: hidden;
}

.knowledge-modal[hidden] {
  display: none !important;
}

.knowledge-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.knowledge-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(4px);
}

.knowledge-modal-dialog {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  margin: 72px auto;
  padding: 22px;
}

.knowledge-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(88, 126, 167, 0.3);
  border-radius: 12px;
  background: rgba(15, 31, 49, 0.9);
  color: #f6f8ff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.knowledge-modal-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.knowledge-modal-preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border-radius: 22px;
  border: 1px solid rgba(90, 125, 161, 0.22);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(31, 48, 68, 0.94), rgba(20, 33, 51, 0.94));
}

.knowledge-modal-image {
  width: 160px;
  height: 160px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.knowledge-modal-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8ef3ff;
}

.knowledge-modal-title {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.05;
}

.knowledge-modal-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}

.knowledge-modal-meta-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 31, 49, 0.9);
  border: 1px solid rgba(88, 126, 167, 0.2);
}

.knowledge-modal-meta dt {
  color: rgba(220, 229, 244, 0.72);
  font-weight: 700;
}

.knowledge-modal-meta dd {
  margin: 0;
  word-break: break-word;
  color: #f6f8ff;
}

@media (max-width: 760px) {
  .knowledge-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 68px));
  }

  .knowledge-card {
    width: 68px;
    height: 68px;
  }

  .knowledge-icon-box,
  .knowledge-icon-box.knowledge-icon-box--compact {
    width: 58px;
    height: 58px;
  }

  .knowledge-card-icon,
  .knowledge-icon-box.is-block .knowledge-card-icon {
    width: 50px;
    height: 50px;
  }

  .knowledge-modal-dialog {
    margin: 24px auto;
    padding: 16px;
  }

  .knowledge-modal-body {
    grid-template-columns: 1fr;
  }

  .knowledge-modal-preview-box {
    min-height: 180px;
  }
}

/* Knowledge article pages */
.knowledge-article-grid {
  grid-template-columns: 1fr;
}

.knowledge-article-card {
  padding: 0;
  color: #f6f8ff;
}

.knowledge-article-card p {
  margin: 0 0 14px;
  color: rgba(220, 229, 244, 0.84);
  font-size: 15px;
  line-height: 1.7;
}

.knowledge-article-card p:last-child {
  margin-bottom: 0;
}

.knowledge-article-lead {
  max-width: 980px;
  color: #edf7ff !important;
  font-size: 16px !important;
}

.knowledge-article-section {
  margin-top: 24px;
}

.knowledge-article-section h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.15;
}

.knowledge-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.knowledge-command-row {
  border: 1px solid rgba(91, 126, 166, 0.28);
  background: rgba(13, 27, 44, 0.64);
  border-radius: 18px;
}

.knowledge-info-card {
  padding: 0;
}

.knowledge-info-card h4 {
  margin: 0 0 8px;
  color: #8ef3ff;
  font-size: 18px;
}

.knowledge-formula-card {
  display: inline-flex;
  max-width: 100%;
  margin: 2px 0 14px;
  padding: 0;
  color: #ffd763;
  font-size: 16px;
  font-weight: 900;
}

.knowledge-article-list {
  margin: 0;
  padding-left: 20px;
  color: rgba(220, 229, 244, 0.84);
  line-height: 1.7;
}

.knowledge-article-list li + li {
  margin-top: 8px;
}

.knowledge-command-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.knowledge-command-row {
  display: grid;
  grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
}

.knowledge-article-card code,
.knowledge-command-row code {
  color: #8ef3ff;
  font-weight: 900;
  word-break: break-word;
}

.knowledge-command-row span {
  color: rgba(220, 229, 244, 0.84);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .knowledge-info-grid,
  .knowledge-command-row {
    grid-template-columns: 1fr;
  }

  .knowledge-article-card {
    padding: 18px;
  }
}

/* Knowledge base: privates article */
.knowledge-article-card--plain {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.knowledge-article-lead {
  margin: 0 0 22px;
  font-size: 20px;
  line-height: 1.58;
  color: rgba(233, 241, 255, 0.96);
}

.knowledge-article-section + .knowledge-article-section {
  margin-top: 28px;
}

.knowledge-article-section h3 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.2;
}

.knowledge-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}

.knowledge-info-card--private-type {
  min-height: 192px;
  padding: 18px 20px 20px;
  border-radius: 22px;
  border: 1px solid rgba(90, 177, 255, 0.24);
  background: linear-gradient(180deg, rgba(8, 32, 62, 0.94), rgba(10, 29, 55, 0.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.knowledge-private-type-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.knowledge-private-type-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(90, 214, 255, 0.1);
  color: #89ebff;
}

.knowledge-private-type-icon.is-home {
  background: rgba(90, 214, 255, 0.1);
  color: #89ebff;
}

.knowledge-private-type-icon.is-object {
  background: rgba(255, 204, 85, 0.12);
  color: #ffd15c;
}

.knowledge-private-type-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.knowledge-info-card--private-type h4 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  color: #8eeaff;
}

.knowledge-info-card--private-type .knowledge-private-type-icon.is-object + h4 {
  color: #ffd15c;
}

.knowledge-info-card--private-type p {
  margin: 0;
}

.knowledge-formula-text {
  margin: 8px 0 16px;
  color: #ffd15c;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 400;
}

.knowledge-command-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.knowledge-command-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(84, 163, 255, 0.18);
  background: rgba(8, 28, 53, 0.72);
}

.knowledge-command-row code {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8eeaff;
  font-size: 17px;
  line-height: 1.4;
}

.knowledge-command-row span {
  display: block;
  padding-top: 0;
}

@media (max-width: 900px) {
  .knowledge-info-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .knowledge-info-card--private-type {
    min-height: 0;
  }

  .knowledge-command-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .knowledge-command-row span {
    padding-top: 0;
  }
}

/* Knowledge privates final hard overrides */
.page-shell[data-page="knowledge"] .knowledge-grid.knowledge-article-grid {
  gap: 0;
}

.page-shell[data-page="knowledge"] .knowledge-grid.knowledge-article-grid > .knowledge-article-card--plain,
.page-shell[data-page="knowledge"] .knowledge-article-card.knowledge-article-card--plain {
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.page-shell[data-page="knowledge"] .knowledge-article-card--plain::before,
.page-shell[data-page="knowledge"] .knowledge-article-card--plain::after {
  display: none !important;
  content: none !important;
}

.page-shell[data-page="knowledge"] .knowledge-article-card--plain .knowledge-article-lead {
  margin-top: 26px;
}

.page-shell[data-page="knowledge"] .knowledge-command-list {
  gap: 8px;
  margin: 10px 0 14px;
}

.page-shell[data-page="knowledge"] .knowledge-command-row {
  grid-template-columns: minmax(180px, 270px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 8px 12px;
  border-radius: 14px;
}

.page-shell[data-page="knowledge"] .knowledge-command-row code {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.page-shell[data-page="knowledge"] .knowledge-command-row span {
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .page-shell[data-page="knowledge"] .knowledge-command-row {
    grid-template-columns: 1fr;
  }
}

/* Knowledge privates v6: outline-only type cards */
.page-shell[data-page="knowledge"] .knowledge-info-card--private-type {
  background: transparent !important;
  box-shadow: none !important;
}

/* Knowledge privates v7: command boxes match private type boxes */
.page-shell[data-page="knowledge"] .knowledge-command-row {
  background: transparent !important;
  border: 1px solid rgba(90, 177, 255, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.page-shell[data-page="knowledge"] .knowledge-command-row code {
  background: transparent !important;
  border: 0 !important;
}

/* Knowledge races visual layout */
.knowledge-race-layout {
  display: grid;
  gap: 28px;
}

.knowledge-race-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 46px;
  align-items: stretch;
}

.knowledge-race-description,
.knowledge-race-visual,
.knowledge-race-box {
  border-radius: 4px;
  background: rgba(12, 28, 45, 0.74);
}

.knowledge-race-description {
  min-height: 250px;
  padding: 30px 34px;
  border: 3px solid rgba(251, 255, 0, 0.95);
  display: flex;
  align-items: flex-start;
}

.knowledge-race-description .knowledge-article-lead {
  margin: 0;
}

.knowledge-race-visual {
  min-height: 300px;
  padding: 0;
  border: 3px solid rgba(38, 201, 91, 0.95);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.knowledge-race-visual img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

.knowledge-race-boxes {
  display: grid;
  gap: 10px;
}

.knowledge-race-box {
  padding: 14px 22px 16px;
}

.knowledge-race-box h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.knowledge-race-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.55;
}

.knowledge-race-box li + li {
  margin-top: 6px;
}

.knowledge-race-box--buff {
  border: 3px solid rgba(188, 74, 197, 0.96);
}

.knowledge-race-box--buff h3 {
  color: #d956e7;
}

.knowledge-race-box--debuff {
  border: 3px solid rgba(255, 45, 55, 0.98);
}

.knowledge-race-box--debuff h3 {
  color: #ff303e;
}

@media (max-width: 860px) {
  .knowledge-race-main {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .knowledge-race-description,
  .knowledge-race-visual {
    min-height: auto;
  }

  .knowledge-race-visual img {
    min-height: 260px;
  }
}


/* Knowledge races: final clean layout without schematic colored boxes */
.knowledge-race-layout {
  display: grid;
  gap: 28px;
}

.knowledge-race-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 46px;
  align-items: stretch;
}

.knowledge-race-description,
.knowledge-race-visual,
.knowledge-race-box,
.knowledge-race-list {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.knowledge-race-description {
  min-height: 250px;
  padding: 8px 0 0 !important;
  display: flex;
  align-items: flex-start;
}

.knowledge-race-description .knowledge-article-lead {
  margin: 0;
}

.knowledge-race-visual {
  min-height: 300px;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  border-radius: 10px;
}

.knowledge-race-visual img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  border-radius: 10px;
}

.knowledge-race-lists {
  display: grid;
  gap: 22px;
}

.knowledge-race-list {
  padding: 0 !important;
}

.knowledge-race-list h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}

.knowledge-race-list ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.6;
}

.knowledge-race-list li + li {
  margin-top: 6px;
}

@media (max-width: 860px) {
  .knowledge-race-main {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .knowledge-race-description,
  .knowledge-race-visual {
    min-height: auto;
  }

  .knowledge-race-visual img {
    min-height: 260px;
  }
}

/* Knowledge races: lists under description, left of the image */
.knowledge-race-layout {
  gap: 0;
}

.knowledge-race-main {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 42px;
  align-items: start;
}

.knowledge-race-copy {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.knowledge-race-description {
  min-height: auto !important;
  padding-top: 0 !important;
}

.knowledge-race-lists {
  display: grid;
  gap: 24px;
}

.knowledge-race-list h3 {
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.015em;
}

.knowledge-race-list--strong h3 {
  color: #8fbf8f !important;
}

.knowledge-race-list--weak h3 {
  color: #c08a86 !important;
}

.knowledge-race-list ul {
  line-height: 1.62;
}

@media (max-width: 860px) {
  .knowledge-race-main {
    grid-template-columns: 1fr;
  }
}


/* Knowledge races: align image top with text start */
.knowledge-race-visual {
  margin-top: 24px;
}

@media (max-width: 860px) {
  .knowledge-race-visual {
    margin-top: 0;
  }
}

/* Knowledge races: full-width plain notes under the whole race block */
.knowledge-race-layout {
  gap: 24px;
}

.knowledge-race-notes {
  display: grid;
  gap: 18px;
  width: 100%;
  margin-top: 2px;
}

.knowledge-race-note {
  padding: 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.knowledge-race-note h4 {
  margin: 0 0 8px;
  color: #ffd763;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.32;
}

.knowledge-race-note p {
  margin: 0;
  color: rgba(220, 229, 244, 0.86);
  font-size: 0.96rem;
  line-height: 1.68;
}

.knowledge-race-note p + p {
  margin-top: 10px;
}


/* Knowledge base: gameplay mechanics articles */
.knowledge-mechanics-article .knowledge-article-section {
  margin-top: 30px;
}

.knowledge-mechanics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}

.knowledge-mechanics-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-mechanics-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(90, 177, 255, 0.22);
  background: linear-gradient(180deg, rgba(8, 32, 62, 0.9), rgba(10, 29, 55, 0.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.knowledge-mechanics-card h4 {
  margin: 0 0 8px;
  color: #8eeaff;
  font-size: 19px;
  line-height: 1.2;
}

.knowledge-mechanics-card p {
  margin: 0;
}

.knowledge-effects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.knowledge-effect-card {
  min-height: 130px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(89, 151, 218, 0.2);
  background: rgba(8, 28, 53, 0.7);
}

.knowledge-effect-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.knowledge-effect-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(6, 17, 30, 0.72);
  border: 1px solid rgba(130, 224, 255, 0.18);
}

.knowledge-effect-icon img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}

.knowledge-effect-card h4 {
  margin: 0;
  color: #f5f8ff;
  font-size: 16px;
  line-height: 1.25;
}

.knowledge-effect-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .knowledge-mechanics-grid,
  .knowledge-mechanics-grid--three {
    grid-template-columns: 1fr;
  }

  .knowledge-effects-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Knowledge base: make effect icons fill the whole box (v82) ===== */
.knowledge-effect-icon {
  padding: 0 !important;
  overflow: hidden !important;
  line-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.knowledge-effect-icon img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  image-rendering: pixelated !important;
  image-rendering: crisp-edges !important;
}

/* ===== Knowledge effects: compact 64px icon grid with site tooltip (v83) ===== */
.knowledge-effects-grid.knowledge-effects-grid--icons {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 64px) !important;
  gap: 12px !important;
  align-items: start !important;
  justify-content: start !important;
  margin-top: 12px !important;
}

.knowledge-effect-card.knowledge-effect-card--compact {
  width: 64px !important;
  height: 64px !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  border: 1px solid rgba(130, 224, 255, 0.2) !important;
  background: rgba(5, 16, 29, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 22px rgba(0, 0, 0, 0.18) !important;
  overflow: hidden !important;
  cursor: help !important;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease !important;
}

.knowledge-effect-card.knowledge-effect-card--compact:hover,
.knowledge-effect-card.knowledge-effect-card--compact:focus-visible {
  transform: translateY(-2px) !important;
  border-color: rgba(142, 234, 255, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(66, 204, 255, 0.14), 0 14px 30px rgba(0, 0, 0, 0.28) !important;
  filter: brightness(1.08) !important;
  outline: none !important;
}

.knowledge-effect-card.knowledge-effect-card--compact .knowledge-effect-icon {
  width: 100% !important;
  height: 100% !important;
  flex: 0 0 100% !important;
  padding: 0 !important;
  display: block !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 0 !important;
  overflow: hidden !important;
}

.knowledge-effect-card.knowledge-effect-card--compact .knowledge-effect-icon img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block !important;
  object-fit: cover !important;
  image-rendering: pixelated !important;
  image-rendering: crisp-edges !important;
}

.knowledge-effect-card.knowledge-effect-card--compact h4,
.knowledge-effect-card.knowledge-effect-card--compact p,
.knowledge-effect-card.knowledge-effect-card--compact .knowledge-effect-head {
  display: none !important;
}

.knowledge-tooltip .knowledge-tooltip-title {
  display: block;
  margin: 0 0 5px;
  color: #8eeaff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.knowledge-tooltip .knowledge-tooltip-text {
  display: block;
  color: #e7f0ff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}






/* ===== Knowledge mechanics: exchange article text-only (v95) ===== */
.knowledge-exchange-article--text-only {
  max-width: 100%;
}

.knowledge-exchange-text-section {
  margin-top: 0 !important;
}

.knowledge-exchange-status-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.knowledge-exchange-status-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.knowledge-exchange-status-list li:last-child {
  margin-bottom: 0;
}

.knowledge-exchange-status {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 5px;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.knowledge-exchange-status--green {
  background: linear-gradient(180deg, #4edb70, #1f9d44);
}

.knowledge-exchange-status--yellow {
  background: linear-gradient(180deg, #f3d65c, #c4a52b);
}

.knowledge-exchange-status--red {
  background: linear-gradient(180deg, #f06e6e, #c33a3a);
}

/* Native links styled as buttons keep middle-click/Ctrl-click browser behavior. */
a.profile-tab-button,
a.knowledge-category-button,
a.knowledge-subtab,
a.knowledge-tab,
a.dropdown-item {
  text-decoration: none;
  font: inherit;
}

/* messages page */
.messages-page-section {
  padding-top: 36px;
}

.messages-page-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  min-height: min(720px, calc(100vh - 190px));
}

.messages-sidebar,
.messages-chat,
.messages-auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.messages-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 620px;
  overflow: hidden;
}

.messages-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.messages-sidebar-head h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.messages-refresh-button {
  appearance: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.messages-refresh-button:hover,
.messages-refresh-button:focus-visible {
  color: var(--text);
  border-color: rgba(126, 199, 255, 0.28);
  background: rgba(126, 199, 255, 0.08);
  outline: none;
}

.messages-refresh-button svg,
.messages-empty-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.messages-recipient-form {
  display: grid;
  gap: 10px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.messages-recipient-label {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

.messages-recipient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.messages-recipient-input,
.messages-send-input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  transition: border-color .2s ease, background .2s ease;
}

.messages-recipient-input {
  min-height: 46px;
  padding: 0 14px;
}

.messages-send-input {
  min-height: 54px;
  max-height: 160px;
  resize: vertical;
  padding: 14px 16px;
}

.messages-recipient-input:focus,
.messages-send-input:focus {
  border-color: rgba(126, 199, 255, 0.32);
  background: rgba(255,255,255,0.06);
}

.messages-recipient-submit,
.messages-send-button {
  min-height: 46px;
  white-space: nowrap;
}

.messages-recipient-results {
  display: grid;
  gap: 8px;
}

.messages-recipient-result,
.messages-recipient-empty {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 13px;
  background: rgba(255,255,255,0.035);
  color: var(--text);
  padding: 10px 12px;
}

.messages-recipient-result {
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.messages-recipient-result:hover,
.messages-recipient-result:focus-visible {
  border-color: rgba(126, 199, 255, 0.28);
  background: rgba(126, 199, 255, 0.07);
  outline: none;
}

.messages-recipient-empty {
  color: var(--muted);
  font-size: .92rem;
}

.messages-conversations {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  overflow: auto;
}

.messages-conversations-empty {
  color: var(--muted);
  padding: 14px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 16px;
  line-height: 1.5;
}

.messages-dialog-item {
  appearance: none;
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.032);
  color: var(--text);
  padding: 12px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.messages-dialog-item:hover,
.messages-dialog-item:focus-visible,
.messages-dialog-item.is-active {
  border-color: rgba(126, 199, 255, 0.28);
  background: rgba(126, 199, 255, 0.075);
  outline: none;
}

.messages-dialog-avatar,
.messages-chat-avatar {
  display: block;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.13);
  background-color: rgba(126, 199, 255, 0.12);
}

.messages-dialog-avatar {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.messages-dialog-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.messages-dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.messages-dialog-top strong,
.messages-dialog-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-dialog-top time,
.messages-dialog-preview {
  color: var(--muted);
  font-size: .9rem;
}

.messages-dialog-badge {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04111f;
  font-size: .78rem;
  font-weight: 900;
}

.messages-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 620px;
  overflow: hidden;
}

.messages-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.messages-chat-user {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.messages-chat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  flex: 0 0 auto;
}

.messages-chat-user strong,
.messages-chat-user span {
  display: block;
}

.messages-chat-user strong {
  font-size: 1.08rem;
}

.messages-chat-user span,
.messages-profile-link {
  color: var(--muted);
  font-size: .92rem;
}

.messages-profile-link {
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 9px 13px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.messages-profile-link:hover,
.messages-profile-link:focus-visible {
  color: var(--text);
  border-color: rgba(126, 199, 255, 0.28);
  background: rgba(126, 199, 255, 0.07);
  outline: none;
}

.messages-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  overflow: auto;
}

.messages-thread-empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px;
}

.messages-bubble {
  max-width: min(620px, 78%);
  align-self: flex-start;
  display: grid;
  gap: 7px;
  padding: 13px 15px 10px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px 18px 18px 6px;
  background: rgba(255,255,255,0.045);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.messages-bubble.is-own {
  align-self: flex-end;
  border-radius: 18px 18px 6px 18px;
  border-color: rgba(126, 199, 255, 0.26);
  background: linear-gradient(135deg, rgba(126, 199, 255, 0.18), rgba(137, 255, 241, 0.11));
}

.messages-bubble time {
  justify-self: end;
  color: rgba(224, 233, 249, 0.62);
  font-size: .78rem;
}

.messages-send-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--line);
}

.messages-empty-state {
  align-self: center;
  justify-self: center;
  width: min(440px, calc(100% - 32px));
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
  padding: 34px;
}

.messages-empty-state strong {
  color: var(--text);
  font-size: 1.35rem;
}

.messages-empty-state p {
  margin: 0;
  line-height: 1.6;
}

.messages-empty-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(126, 199, 255, 0.2);
  background: rgba(126, 199, 255, 0.08);
  color: var(--accent);
}

.messages-auth-card {
  grid-column: 1 / -1;
  padding: 30px;
  max-width: 620px;
  margin: 0 auto;
}

.messages-auth-card h1 {
  margin: 6px 0 10px;
}

.messages-auth-card p:not(.section-label) {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}

.profile-contact-display-item-message {
  text-decoration: none;
  min-width: 23px;
}

.profile-contact-display-item-message .profile-contact-display-icon {
  width: 21px;
  height: 16px;
  flex: 0 0 21px;
  color: #ffffff;
}

.profile-contact-display-item-message .profile-contact-display-icon svg,
.profile-contact-display-item-message .profile-contact-display-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-contacts-privacy-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.profile-contacts-privacy-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.messages-thread-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .messages-page-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .messages-sidebar,
  .messages-chat {
    min-height: auto;
  }

  .messages-chat {
    min-height: 560px;
  }
}

@media (max-width: 640px) {
  .messages-sidebar-head,
  .messages-chat-head,
  .messages-recipient-form,
  .messages-thread,
  .messages-send-form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .messages-recipient-row,
  .messages-send-form {
    grid-template-columns: 1fr;
  }

  .messages-bubble {
    max-width: 92%;
  }
}

.messages-chat > .messages-auth-card {
  align-self: center;
  justify-self: center;
}

.messages-page-layout textarea {
  font: inherit;
}

/* messages page database-style layout */
.messages-page-hero-title {
  padding-bottom: 0;
}

.messages-page-hero-title .eyebrow {
  margin-bottom: 0;
}

.messages-page-section {
  padding-top: 22px;
}

.messages-page-layout {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.messages-sidebar,
.messages-chat {
  border-radius: 28px;
  border: 1px solid rgba(91, 126, 166, 0.28);
  background:
    linear-gradient(180deg, rgba(20, 34, 51, 0.96) 0%, rgba(14, 27, 44, 0.94) 100%),
    radial-gradient(circle at top right, rgba(87, 216, 255, 0.08), transparent 42%);
  box-shadow:
    0 16px 44px rgba(3, 12, 24, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.messages-sidebar {
  grid-template-rows: auto minmax(0, 1fr);
}

.messages-sidebar-head {
  display: block;
  padding: 22px 16px 12px;
  border-bottom: 0;
}

.messages-sidebar-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.messages-refresh-button {
  display: none !important;
}

.messages-recipient-form {
  display: none;
}

.messages-recipient-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(142, 243, 255, 0.86);
}

.messages-recipient-row {
  grid-template-columns: 1fr;
}

.messages-recipient-submit {
  width: 100%;
}

.messages-conversations {
  padding: 1px 16px 16px;
  gap: 10px;
}

.messages-dialog-item {
  position: relative;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 10px;
  min-height: 50px;
  padding: 6px 24px 6px 7px;
  border-radius: 18px;
  border-color: rgba(88, 126, 167, 0.24);
  background: rgba(15, 31, 49, 0.9);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.messages-dialog-item:hover,
.messages-dialog-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(120, 225, 255, 0.42);
  background: rgba(18, 38, 60, 0.96);
}

.messages-dialog-item.is-active,
.messages-dialog-item.is-active:hover,
.messages-dialog-item.is-active:focus-visible {
  border-color: rgba(108, 227, 255, 0.54);
  background: linear-gradient(180deg, rgba(21, 53, 82, 0.96), rgba(16, 40, 64, 0.96));
  box-shadow: inset 0 0 0 1px rgba(143, 236, 255, 0.1);
}

.messages-dialog-avatar {
  width: 35px;
  height: 35px;
  border-radius: 12px;
}

.messages-dialog-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.messages-dialog-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.messages-dialog-name strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.messages-dialog-unread-dot {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: #ff4d5d;
  box-shadow: 0 0 0 3px rgba(255, 77, 93, 0.12);
  transform: translateY(-50%);
}

.messages-dialog-top,
.messages-dialog-preview,
.messages-dialog-badge {
  display: none;
}

@media (max-width: 900px) {
  .messages-page-layout {
    grid-template-columns: 1fr;
  }

  .messages-recipient-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .messages-recipient-submit {
    width: auto;
  }
}

@media (max-width: 640px) {
  .messages-recipient-row {
    grid-template-columns: 1fr;
  }

  .messages-recipient-submit {
    width: 100%;
  }
}

/* messages page fixed-height chat layout */
.messages-page-layout {
  --messages-panel-height: 730px;
  min-height: var(--messages-panel-height);
}

.messages-sidebar,
.messages-chat {
  height: var(--messages-panel-height);
  min-height: var(--messages-panel-height);
  max-height: var(--messages-panel-height);
}

.messages-chat {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.messages-conversations,
.messages-thread {
  min-height: 0;
}

.messages-thread {
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.messages-thread::before {
  content: '';
  margin-top: auto;
}

.messages-chat-user {
  flex-wrap: nowrap;
}

.messages-chat-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.08rem;
}

.messages-send-editor {
  min-width: 0;
}

.messages-send-editor-shell {
  gap: 0;
}

.messages-send-rich-editor {
  width: 100%;
  min-height: 54px;
  max-height: 150px;
  padding: 13px 15px;
  resize: none;
}

.messages-send-rich-editor:focus {
  border-color: rgba(126, 199, 255, 0.32);
  background: rgba(255,255,255,0.06);
}

@media (max-width: 900px) {
  .messages-page-layout {
    --messages-panel-height: auto;
    min-height: 0;
  }

  .messages-sidebar,
  .messages-chat {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .messages-chat {
    height: 730px;
    min-height: 560px;
    max-height: 730px;
  }
}

/* messages page compact chat header and Enter-send composer */
.messages-chat-head {
  gap: 10px;
  padding: 12px 18px;
}

.messages-chat-user {
  gap: 10px;
}

.messages-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.messages-chat-title {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
  line-height: 1.2;
}

.messages-chat-title-prefix {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 400;
}

.messages-chat-title-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
}

.messages-profile-link {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.15;
}

.messages-send-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 12px 18px 14px;
}

.messages-send-editor {
  width: 100%;
}

.messages-send-editor-shell {
  width: 100%;
}

.messages-send-rich-editor {
  min-height: 38px;
  max-height: 105px;
  padding: 9px 12px;
  line-height: 1.35;
}

.messages-send-button {
  display: none !important;
}

@media (max-width: 640px) {
  .messages-chat-head,
  .messages-send-form {
    padding-left: 14px;
    padding-right: 14px;
  }

  .messages-profile-link {
    padding: 5px 8px;
    font-size: 0.74rem;
  }
}

/* messages page composer final size: fixed 97px height, 10px inner padding */
.messages-send-rich-editor {
  box-sizing: border-box;
  min-height: 97px;
  height: 97px;
  max-height: 97px;
  padding: 10px !important;
  line-height: 1.35;
  overflow-y: auto;
}

.messages-send-rich-editor[data-tiptap-host="true"] {
  overflow-y: auto;
}

.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror {
  min-height: 77px;
  box-sizing: border-box;
}

/* messages page composer exact visible height fix: override shared comment-editor min-height */
#messages-send-editor-input.messages-send-rich-editor,
.messages-send-editor-shell.wall-rich-editor-shell-comment-inline #messages-send-editor-input.messages-send-rich-editor,
.messages-send-editor-shell .messages-send-rich-editor.profile-comment-modal-textarea {
  box-sizing: border-box !important;
  min-height: 97px !important;
  height: 97px !important;
  max-height: 97px !important;
  padding: 10px !important;
  line-height: 1.35 !important;
  resize: none !important;
  overflow-y: auto !important;
}

#messages-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"] {
  min-height: 97px !important;
  height: 97px !important;
  max-height: 97px !important;
  overflow-y: auto !important;
}

#messages-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror {
  box-sizing: border-box !important;
  min-height: 77px !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* messages page composer: keep four text lines vertically balanced inside 97px */
#messages-send-editor-input.messages-send-rich-editor,
.messages-send-editor-shell.wall-rich-editor-shell-comment-inline #messages-send-editor-input.messages-send-rich-editor,
.messages-send-editor-shell .messages-send-rich-editor.profile-comment-modal-textarea {
  line-height: 19.25px !important;
}

#messages-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror {
  line-height: 19.25px !important;
}

#messages-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror p,
#messages-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror div,
#messages-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror li {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 19.25px !important;
}

/* messages page own-message edit/delete controls */
.messages-bubble {
  position: relative;
}

.messages-bubble.is-own {
  padding-right: 16px;
}

.messages-bubble.is-editing {
  border-color: rgba(123, 189, 255, 0.54);
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.26), 0 0 0 1px rgba(123, 189, 255, 0.08);
}

.messages-bubble-actions {
  position: absolute;
  top: -13px;
  right: 10px;
  z-index: 3;
  padding: 2px;
  border-radius: 12px;
  background: rgba(9, 20, 34, 0.82);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.messages-bubble-actions .profile-wall-post-edit,
.messages-bubble-actions .profile-wall-delete-pair {
  margin-top: 0;
}

.messages-bubble-meta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: rgba(224, 233, 249, 0.62);
  font-size: .78rem;
  line-height: 1.2;
}

.messages-bubble-meta time {
  justify-self: auto;
  font-size: inherit;
}

.messages-bubble-edited-time {
  color: rgba(224, 233, 249, 0.5);
  white-space: nowrap;
}

.messages-editing-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 0 2px 8px;
  color: rgba(169, 217, 255, 0.95);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
}

.messages-editing-note[hidden] {
  display: none !important;
}

.messages-editing-cancel {
  appearance: none;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 4px 9px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.messages-editing-cancel:hover,
.messages-editing-cancel:focus-visible {
  color: var(--text);
  background: rgba(126, 199, 255, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.messages-send-form:has(.messages-editing-note:not([hidden])) {
  gap: 0;
}

@media (max-width: 640px) {
  .messages-bubble-actions {
    top: -10px;
    right: 7px;
  }

  .messages-bubble-meta {
    flex-wrap: wrap;
    row-gap: 3px;
  }
}


/* messages page edit/delete controls v2: actions sit under the message box */
.messages-message-item {
  max-width: min(620px, 78%);
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.messages-message-item.is-own {
  align-self: flex-end;
  align-items: flex-end;
}

.messages-message-item .messages-bubble {
  max-width: 100%;
  align-self: auto;
}

.messages-message-item .messages-bubble-actions {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 4px 0 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 0.72;
  transform: translateY(-1px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.messages-message-item:hover .messages-bubble-actions,
.messages-message-item:focus-within .messages-bubble-actions {
  opacity: 1;
  transform: translateY(0);
}

.messages-message-item .messages-bubble-actions .profile-wall-post-edit,
.messages-message-item .messages-bubble-actions .profile-wall-delete-pair {
  margin-top: 0;
}

.messages-message-item .messages-bubble-actions .profile-wall-post-edit,
.messages-message-item .messages-bubble-actions .profile-wall-delete-toggle,
.messages-message-item .messages-bubble-actions .profile-wall-delete-direct {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 8px;
}

.messages-message-item .messages-bubble-actions .profile-wall-delete-pair {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.messages-bubble-meta time {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .messages-message-item {
    max-width: 92%;
  }

  .messages-message-item .messages-bubble-actions {
    padding-right: 2px;
  }
}

/* messages page message options menu: compact three-dot action inside the bubble */
.messages-bubble {
  overflow: visible;
  padding-right: 42px;
}

.messages-bubble.is-own {
  padding-right: 42px;
}

.messages-bubble-menu {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 8;
}

.messages-bubble-menu-toggle {
  appearance: none;
  width: 26px;
  height: 22px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  background: rgba(8, 19, 33, 0.22);
  color: rgba(224, 233, 249, 0.62);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  cursor: pointer;
  opacity: 0.74;
  transition: opacity .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.messages-bubble:hover .messages-bubble-menu-toggle,
.messages-bubble:focus-within .messages-bubble-menu-toggle,
.messages-bubble-menu.is-open .messages-bubble-menu-toggle {
  opacity: 1;
}

.messages-bubble-menu-toggle:hover,
.messages-bubble-menu-toggle:focus-visible,
.messages-bubble-menu.is-open .messages-bubble-menu-toggle {
  color: var(--text);
  background: rgba(126, 199, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(126, 199, 255, 0.18);
  outline: none;
  transform: translateY(-1px);
}

.messages-bubble-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 164px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(126, 199, 255, 0.18);
  border-radius: 14px;
  background: rgba(9, 20, 34, 0.96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(.98);
  transform-origin: top right;
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.messages-bubble-menu.is-open .messages-bubble-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.messages-bubble-menu-item {
  appearance: none;
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  background: transparent;
  color: rgba(224, 233, 249, 0.9);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.messages-bubble-menu-item svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: currentColor;
}

.messages-bubble-menu-item:hover,
.messages-bubble-menu-item:focus-visible {
  background: rgba(126, 199, 255, 0.12);
  color: var(--text);
  outline: none;
  transform: translateX(1px);
}

.messages-bubble-menu-item-danger {
  color: #ff8a8a;
}

.messages-bubble-menu-item-danger:hover,
.messages-bubble-menu-item-danger:focus-visible,
.messages-bubble-menu-item-danger.is-confirming {
  background: rgba(255, 73, 73, 0.14);
  color: #ffd0d0;
}

.messages-bubble-menu-item-danger.is-confirming {
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.22);
}

.messages-message-item .messages-bubble-actions {
  display: none !important;
}

@media (max-width: 640px) {
  .messages-bubble {
    padding-right: 38px;
  }

  .messages-bubble.is-own {
    padding-right: 38px;
  }

  .messages-bubble-menu-panel {
    min-width: 150px;
  }
}

/* messages page inline actions: time + controls inside the message bubble */
.messages-bubble,
.messages-bubble.is-own {
  padding-right: 16px !important;
  overflow: visible !important;
}

.messages-bubble-menu {
  display: none !important;
}

.messages-bubble .messages-bubble-meta {
  width: 100%;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  flex-wrap: nowrap;
}

.messages-bubble.is-own .messages-bubble-meta {
  justify-content: flex-end;
}

.messages-bubble .messages-bubble-meta time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.messages-message-item .messages-bubble-meta .messages-bubble-actions,
.messages-bubble .messages-bubble-meta .messages-bubble-actions {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}

.messages-bubble .messages-bubble-actions .profile-wall-post-edit,
.messages-bubble .messages-bubble-actions .profile-wall-report-button,
.messages-bubble .messages-bubble-actions .profile-wall-delete-pair,
.messages-bubble .messages-bubble-actions .profile-wall-delete-toggle,
.messages-bubble .messages-bubble-actions .profile-wall-delete-direct {
  margin-top: 0 !important;
}

.messages-bubble .messages-bubble-actions .profile-wall-post-edit,
.messages-bubble .messages-bubble-actions .profile-wall-report-button,
.messages-bubble .messages-bubble-actions .profile-wall-delete-pair,
.messages-bubble .messages-bubble-actions .profile-wall-delete-toggle,
.messages-bubble .messages-bubble-actions .profile-wall-delete-direct {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.messages-bubble .messages-bubble-actions .profile-wall-delete-pair {
  flex: 0 0 26px;
}

.messages-bubble-delete-pair.is-confirming .profile-wall-delete-toggle.is-hidden-by-test {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  .messages-bubble,
  .messages-bubble.is-own {
    padding-right: 14px !important;
  }

  .messages-bubble .messages-bubble-meta {
    gap: 6px;
  }
}

/* messages page date + actions stable placement fix */
.messages-bubble .messages-bubble-meta {
  flex-wrap: nowrap !important;
  row-gap: 0;
  white-space: nowrap;
}

.messages-bubble .messages-bubble-meta time {
  flex: 0 0 auto;
  max-width: none;
  overflow-wrap: normal;
  white-space: nowrap;
}

.messages-bubble .messages-bubble-actions,
.messages-bubble .messages-bubble-actions button,
.messages-bubble .messages-bubble-actions .profile-wall-delete-pair {
  pointer-events: auto !important;
}

.messages-bubble .messages-bubble-actions {
  flex: 0 0 auto;
}

.messages-bubble .messages-bubble-actions button {
  position: relative;
  z-index: 2;
}

/* messages page action buttons spacing/alignment polish */
.messages-bubble,
.messages-bubble.is-own {
  padding-right: 15px !important;
}

.messages-bubble .messages-bubble-meta,
.messages-bubble.is-own .messages-bubble-meta {
  justify-content: flex-end !important;
  gap: 8px !important;
  width: 100% !important;
}

.messages-bubble .messages-bubble-actions {
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.messages-bubble .messages-bubble-actions .profile-wall-post-edit,
.messages-bubble .messages-bubble-actions .profile-wall-report-button,
.messages-bubble .messages-bubble-actions .profile-wall-delete-pair,
.messages-bubble .messages-bubble-actions .profile-wall-delete-toggle,
.messages-bubble .messages-bubble-actions .profile-wall-delete-direct {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  margin: 0 !important;
}

.messages-bubble .messages-bubble-actions .profile-wall-delete-pair,
.messages-bubble .messages-bubble-actions .messages-bubble-delete-pair {
  position: relative !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.messages-bubble .messages-bubble-actions .messages-bubble-delete-pair .profile-wall-delete-toggle,
.messages-bubble .messages-bubble-actions .messages-bubble-delete-pair .profile-wall-delete-direct {
  position: absolute !important;
  inset: 0 !important;
  transform: none !important;
}

@media (max-width: 640px) {
  .messages-bubble,
  .messages-bubble.is-own {
    padding-right: 15px !important;
  }
}

/* messages page: instant bottom open and 1000-symbol composer cap */
.messages-thread {
  scroll-behavior: auto !important;
}

.messages-thread.is-initial-scroll {
  visibility: hidden;
}

#messages-send-editor-input.messages-send-rich-editor[data-wall-max-length="1000"],
.messages-send-editor[data-wall-max-length="1000"] #messages-send-editor-input.messages-send-rich-editor {
  caret-color: var(--text);
}

/* messages page: new dialog quick search */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.messages-sidebar {
  grid-template-rows: auto auto minmax(0, 1fr) !important;
}

.messages-sidebar-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 22px 16px 12px !important;
  border-bottom: 0 !important;
}

.messages-sidebar-head h1 {
  margin: 0 !important;
  min-width: 0;
}

.messages-new-dialog-button {
  appearance: none;
  width: 30px;
  height: 30px;
  min-width: 30px;
  flex: 0 0 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(120, 225, 255, 0.28);
  border-radius: 10px;
  background: rgba(15, 31, 49, 0.92);
  color: rgba(224, 245, 255, 0.9);
  cursor: pointer;
  box-shadow:
    0 8px 22px rgba(3, 12, 24, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.messages-new-dialog-button:hover,
.messages-new-dialog-button:focus-visible,
.messages-new-dialog-button.is-active {
  color: var(--text);
  border-color: rgba(120, 225, 255, 0.52);
  background: rgba(18, 42, 66, 0.96);
  box-shadow:
    0 10px 26px rgba(3, 12, 24, 0.3),
    inset 0 0 0 1px rgba(143, 236, 255, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.messages-new-dialog-icon {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
  pointer-events: none;
}

.messages-recipient-form.messages-new-dialog-form {
  display: none !important;
  gap: 8px;
  padding: 1px 16px 10px;
  border-bottom: 0;
}

.messages-recipient-form.messages-new-dialog-form.is-open {
  display: grid !important;
}

.messages-recipient-form.messages-new-dialog-form[hidden] {
  display: none !important;
}

.messages-new-dialog-form .messages-recipient-row {
  display: block;
}

.messages-new-dialog-form .messages-recipient-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  height: 50px;
  padding: 0 15px;
  border-radius: 18px;
  border: 1px solid rgba(88, 126, 167, 0.24);
  background: rgba(15, 31, 49, 0.9);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow:
    0 12px 34px rgba(3, 12, 24, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.messages-new-dialog-form .messages-recipient-input::placeholder {
  color: rgba(224, 233, 249, 0.46);
  font-weight: 650;
}

.messages-new-dialog-form .messages-recipient-input:focus {
  border-color: rgba(120, 225, 255, 0.46);
  background: rgba(18, 38, 60, 0.96);
  outline: none;
}

.messages-new-dialog-form .messages-recipient-results {
  display: grid;
  gap: 8px;
}

.messages-new-dialog-form .messages-recipient-result {
  appearance: none;
  position: relative;
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 7px;
  border-radius: 18px;
  border: 1px solid rgba(88, 126, 167, 0.24);
  background: rgba(15, 31, 49, 0.9);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 12px 34px rgba(3, 12, 24, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.messages-new-dialog-form .messages-recipient-result:hover,
.messages-new-dialog-form .messages-recipient-result:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(120, 225, 255, 0.42);
  background: rgba(18, 38, 60, 0.96);
  outline: none;
}

.messages-recipient-result-avatar {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background-color: rgba(255,255,255,0.06);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.messages-recipient-result-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.messages-recipient-result-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.messages-recipient-result-main span {
  color: rgba(224, 233, 249, 0.52);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
}

.messages-new-dialog-form .messages-recipient-empty {
  margin: 0;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(15, 31, 49, 0.64);
  color: var(--muted);
  padding: 12px 14px;
  font-size: .9rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .messages-sidebar-head {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .messages-recipient-form.messages-new-dialog-form {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* messages page: pinned dialogs */
.messages-chat-user {
  min-width: 0;
}

.messages-chat-pin-button {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  border-radius: 8px !important;
}

.messages-chat-pin-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none !important;
}

.messages-chat-pin-button svg {
  width: 15px;
  height: 15px;
}

.messages-dialog-item.is-pinned {
  border-color: rgba(255, 214, 102, 0.48) !important;
  box-shadow:
    0 12px 34px rgba(3, 12, 24, 0.22),
    inset 0 0 0 1px rgba(255, 214, 102, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.messages-dialog-item.is-pinned:hover,
.messages-dialog-item.is-pinned:focus-visible {
  border-color: rgba(255, 214, 102, 0.64) !important;
  box-shadow:
    0 14px 36px rgba(3, 12, 24, 0.28),
    inset 0 0 0 1px rgba(255, 214, 102, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.messages-dialog-item.is-pinned.is-active,
.messages-dialog-item.is-pinned.is-active:hover,
.messages-dialog-item.is-pinned.is-active:focus-visible {
  border-color: rgba(255, 214, 102, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(42, 43, 31, 0.96), rgba(26, 38, 50, 0.96)),
    radial-gradient(circle at top right, rgba(255, 214, 102, 0.15), transparent 44%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 214, 102, 0.28),
    0 12px 34px rgba(3, 12, 24, 0.28);
}

@media (max-width: 640px) {
  .messages-chat-pin-button {
    width: 25px !important;
    height: 25px !important;
    flex-basis: 25px !important;
  }
}

/* unified content boxes: use the same deep chat panel background across wall, characters and private messages */
:root {
  --unified-chat-box-bg: rgba(15, 31, 49, 0.9);
  --unified-chat-box-bg-strong: rgba(18, 38, 60, 0.96);
}

.profile-wall-editor,
.profile-wall-post,
.profile-character-card,
.profile-character-entry,
.profile-character-entry-empty,
.messages-sidebar,
.messages-chat,
.messages-auth-card,
.messages-dialog-item,
.messages-recipient-result,
.messages-recipient-empty,
.messages-new-dialog-form .messages-recipient-input,
.messages-new-dialog-form .messages-recipient-result,
.messages-new-dialog-form .messages-recipient-empty {
  background: var(--unified-chat-box-bg) !important;
}

.messages-dialog-item:hover,
.messages-dialog-item:focus-visible,
.messages-dialog-item.is-active,
.messages-new-dialog-form .messages-recipient-input:focus,
.messages-new-dialog-form .messages-recipient-result:hover,
.messages-new-dialog-form .messages-recipient-result:focus-visible {
  background: var(--unified-chat-box-bg-strong) !important;
}

.messages-dialog-item.is-pinned.is-active,
.messages-dialog-item.is-pinned.is-active:hover,
.messages-dialog-item.is-pinned.is-active:focus-visible {
  background:
    radial-gradient(circle at top right, rgba(255, 214, 102, 0.13), transparent 42%),
    var(--unified-chat-box-bg-strong) !important;
}

/* align empty privates notice with chat-panel background */
#profile-privates .profile-placeholder-card,
#profile-privates .profile-private-empty-card,
.profile-private-empty-card {
  background: var(--unified-chat-box-bg) !important;
}

/* keep messages header controls aligned */
.messages-sidebar-head h1 {
  flex: 1 1 auto !important;
}


/* Profile roles: 0=user/default, 1=helper, 2=moderator, 3=administrator, 4=plus */
.profile-role-name {
  transition: color 0.18s ease, text-shadow 0.18s ease, opacity 0.18s ease;
}

.profile-role-name--plus,
.profile-role-name--plus:hover,
.profile-role-name--plus:focus-visible {
  color: #e6c84f !important;
}

.profile-role-name--helper,
.profile-role-name--helper:hover,
.profile-role-name--helper:focus-visible {
  color: #48d17a !important;
}

.profile-role-name--moderator,
.profile-role-name--moderator:hover,
.profile-role-name--moderator:focus-visible,
.profile-role-name--administrator,
.profile-role-name--administrator:hover,
.profile-role-name--administrator:focus-visible {
  color: #ff5b66 !important;
}

/* Reports / administration tickets */
.dropdown-item.has-pending-reports .dropdown-item-label {
  color: var(--text);
}

.reports-modal {
  width: min(100%, 760px);
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reports-modal-header {
  flex: 0 0 auto;
}

.reports-modal-subtitle {
  margin: 8px 0 0;
  color: rgba(159, 176, 200, 0.76);
  line-height: 1.45;
}

.reports-modal-body {
  width: min(100%, 920px);
  margin: 0 auto;
  overflow: auto;
  padding-right: 4px;
}

.reports-support-textarea {
  min-height: 210px;
}

.reports-support-meta {
  width: 100%;
}

.reports-support-actions {
  width: 100%;
}

.reports-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
  color: var(--text);
}

.reports-refresh-button {
  min-height: 36px;
  padding: 0 12px;
}

.reports-list {
  display: grid;
  gap: 12px;
}

.reports-card {
  border: 1px solid rgba(144, 190, 255, 0.13);
  border-radius: 18px;
  background: rgba(4, 16, 30, 0.72);
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.reports-card.is-resolved {
  opacity: 0.72;
}

.reports-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reports-card-title {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.reports-card-meta,
.reports-card-target,
.reports-card-resolved {
  color: rgba(159, 176, 200, 0.76);
  font-size: 0.92rem;
  line-height: 1.45;
}

.reports-card-target {
  margin-top: 10px;
}

.reports-card-text {
  margin-top: 10px;
  color: rgba(231, 239, 255, 0.94);
  line-height: 1.55;
  white-space: normal;
}

.reports-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08);
}

.reports-status.is-open {
  color: #ffd7dd;
  background: rgba(255, 77, 93, 0.12);
  border-color: rgba(255, 77, 93, 0.2);
}

.reports-status.is-resolved {
  color: #bff4d0;
  background: rgba(86, 201, 132, 0.12);
  border-color: rgba(86, 201, 132, 0.2);
}

.reports-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.reports-resolve-button {
  min-height: 36px;
  min-width: 150px;
  padding: 0 12px;
  border-radius: 12px;
}

.reports-empty,
.reports-loading {
  border: 1px dashed rgba(144, 190, 255, 0.18);
  border-radius: 18px;
  padding: 22px;
  color: rgba(159, 176, 200, 0.86);
  text-align: center;
  background: rgba(4, 16, 30, 0.44);
}

@media (max-width: 720px) {
  .reports-modal {
    width: min(100%, calc(100vw - 24px));
    padding: 18px;
  }

  .reports-card-head,
  .reports-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-card-actions {
    justify-content: stretch;
  }

  .reports-resolve-button,
  .reports-refresh-button {
    width: 100%;
  }
}

/* reports page: chat-like обращения layout */
.reports-page-layout {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  --messages-panel-height: 730px;
  min-height: var(--messages-panel-height);
}

.reports-sidebar,
.reports-chat {
  height: var(--messages-panel-height);
  min-height: var(--messages-panel-height);
  max-height: var(--messages-panel-height);
}

.reports-sidebar-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.reports-conversations {
  padding: 1px 16px 16px;
}

.reports-dialog-item {
  grid-template-columns: 35px minmax(0, 1fr);
  min-height: 58px;
  padding-right: 25px;
}

.reports-dialog-main {
  display: grid !important;
  gap: 2px;
  align-items: center;
}

.reports-dialog-name {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.reports-dialog-preview {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(224, 233, 249, 0.55);
  font-size: 0.78rem;
  line-height: 1.15;
}

.reports-dialog-status {
  justify-self: start;
  margin-top: 1px;
}

.reports-chat-head {
  min-height: 61px;
}

.reports-status-control {
  flex: 0 0 auto;
}

.reports-status-select {
  appearance: none;
  min-height: 34px;
  padding: 0 36px 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(126, 199, 255, 0.25);
  background:
    linear-gradient(180deg, rgba(22, 42, 63, 0.98), rgba(15, 31, 49, 0.98)),
    url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23cfe9ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 13px center / 12px 8px no-repeat;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 22px rgba(3,12,24,0.2);
}

.reports-status-select:focus-visible {
  border-color: rgba(126, 199, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(126, 199, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}

.reports-thread {
  gap: 12px;
}

.reports-context {
  align-self: stretch;
  display: grid;
  gap: 10px;
  margin-bottom: 2px;
}

.reports-attachment {
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid rgba(126, 199, 255, 0.58);
  border-radius: 16px;
  background: rgba(8, 20, 34, 0.42);
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.reports-attachment-title {
  color: rgba(142, 243, 255, 0.92);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reports-attachment-meta {
  margin-top: 6px;
  color: rgba(224, 233, 249, 0.64);
  font-size: 0.82rem;
  font-weight: 750;
}

.reports-attachment-text {
  margin-top: 8px;
  color: rgba(224, 233, 249, 0.92);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.reports-bubble-author {
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  color: rgba(224, 233, 249, 0.82);
}

.reports-message-item.is-system {
  display: flex;
  justify-content: center;
}

.reports-system-bubble {
  max-width: min(520px, 88%);
  align-self: center;
  border-radius: 999px;
  background: rgba(126, 199, 255, 0.08);
  border-color: rgba(126, 199, 255, 0.16);
  color: rgba(224, 233, 249, 0.78);
  text-align: center;
}

.reports-new-avatar {
  display: grid;
  place-items: center;
  background: rgba(126, 199, 255, 0.12);
}

.reports-new-avatar::before {
  content: '?';
  color: rgba(224, 245, 255, 0.95);
  font-weight: 950;
  font-size: 1.2rem;
}

#reports-send-editor-input.messages-send-rich-editor,
#reports-new-editor-input.messages-send-rich-editor {
  box-sizing: border-box !important;
  min-height: 97px !important;
  height: 97px !important;
  max-height: 97px !important;
  padding: 10px !important;
  line-height: 19.25px !important;
  resize: none !important;
  overflow-y: auto !important;
}

#reports-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"],
#reports-new-editor-input.messages-send-rich-editor[data-tiptap-host="true"] {
  min-height: 97px !important;
  height: 97px !important;
  max-height: 97px !important;
  overflow-y: auto !important;
}

#reports-send-editor-input.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror,
#reports-new-editor-input.messages-send-rich-editor[data-tiptap-host="true"] > .wall-rich-editor-surface.ProseMirror {
  box-sizing: border-box !important;
  min-height: 77px !important;
  line-height: 19.25px !important;
  padding: 0 !important;
}

@media (max-width: 900px) {
  .reports-page-layout {
    grid-template-columns: 1fr;
    --messages-panel-height: auto;
    min-height: 0;
  }

  .reports-sidebar,
  .reports-chat {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .reports-chat {
    height: 730px;
    min-height: 560px;
    max-height: 730px;
  }
}

/* reports patch: active/archive filters and custom status dropdown */
.reports-filter-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 14px 9px;
}

.reports-filter-tab {
  appearance: none;
  border: 1px solid rgba(126, 199, 255, 0.16);
  border-radius: 12px;
  background: rgba(9, 22, 38, 0.48);
  color: rgba(224, 233, 249, 0.68);
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.reports-filter-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 999px;
  background: rgba(126, 199, 255, 0.11);
  color: rgba(224, 245, 255, 0.86);
  font-size: 0.68rem;
}

.reports-filter-tab:hover,
.reports-filter-tab:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(126, 199, 255, 0.38);
  color: rgba(244, 249, 255, 0.96);
  outline: none;
}

.reports-filter-tab.is-active {
  border-color: rgba(142, 243, 255, 0.42);
  background: linear-gradient(180deg, rgba(22, 48, 72, 0.88), rgba(12, 28, 48, 0.88));
  color: rgba(244, 252, 255, 0.98);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 22px rgba(0,0,0,0.12);
}

.reports-status-dropdown {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
}

.reports-status-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 13px 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 199, 255, 0.25);
  background: linear-gradient(180deg, rgba(22, 42, 63, 0.98), rgba(15, 31, 49, 0.98));
  color: rgba(236, 247, 255, 0.95);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 22px rgba(3,12,24,0.2);
}

.reports-status-button svg {
  width: 12px;
  height: 8px;
  transition: transform .16s ease;
  opacity: .82;
}

.reports-status-dropdown.is-open .reports-status-button svg {
  transform: rotate(180deg);
}

.reports-status-button.is-open {
  border-color: rgba(126, 199, 255, 0.42);
}

.reports-status-button.is-resolved {
  border-color: rgba(87, 240, 163, 0.28);
  color: rgba(215, 255, 233, 0.95);
}

.reports-status-button:focus-visible {
  border-color: rgba(126, 199, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(126, 199, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}

.reports-status-dropdown.is-loading .reports-status-button {
  pointer-events: none;
  opacity: .68;
}

.reports-status-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  width: max(172px, 100%);
  padding: 6px;
  border-radius: 15px;
  border: 1px solid rgba(126, 199, 255, 0.24);
  background: linear-gradient(180deg, rgba(15, 34, 54, 0.98), rgba(8, 22, 38, 0.98));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255,255,255,0.04);
  z-index: 50;
}

.reports-status-menu-item {
  appearance: none;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(224, 233, 249, 0.78);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.reports-status-menu-item:hover,
.reports-status-menu-item:focus-visible,
.reports-status-menu-item.is-selected {
  background: rgba(126, 199, 255, 0.12);
  color: rgba(244, 252, 255, 0.98);
  outline: none;
}

.reports-status-menu-item.is-selected::after {
  content: '✓';
  margin-left: auto;
  color: rgba(142, 243, 255, 0.95);
  font-weight: 950;
}

@media (max-width: 900px) {
  .reports-filter-tabs {
    padding-left: 16px;
    padding-right: 16px;
  }

  .reports-status-menu {
    right: auto;
    left: 0;
  }
}

/* reports polish patch: sidebar title/arrow, create card, and centered system lines */
.reports-filter-tabs[hidden] {
  display: none !important;
}

.reports-sidebar-head h1#reports-sidebar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-archive-toggle-button {
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
}

.reports-sidebar-arrow-icon {
  width: 18px !important;
  height: 18px !important;
}

.reports-sidebar-arrow-icon path {
  fill: currentColor;
}

.reports-create-dialog-item {
  border-color: rgba(126, 199, 255, 0.38) !important;
  background: linear-gradient(180deg, rgba(18, 45, 68, 0.72), rgba(9, 26, 44, 0.78)) !important;
  min-height: 72px !important;
}

.reports-create-dialog-item:hover,
.reports-create-dialog-item:focus-visible {
  border-color: rgba(142, 243, 255, 0.72) !important;
  box-shadow: 0 0 0 1px rgba(142, 243, 255, 0.12), 0 12px 28px rgba(0, 0, 0, 0.18) !important;
}

.reports-create-dialog-avatar {
  display: grid !important;
  place-items: center !important;
  background: rgba(126, 199, 255, 0.1) !important;
  border: 1px solid rgba(126, 199, 255, 0.34) !important;
  color: rgba(224, 245, 255, 0.95) !important;
}

.reports-create-dialog-avatar svg {
  width: 18px;
  height: 18px;
}

.reports-create-dialog-avatar path {
  fill: currentColor;
}

.reports-conversations-empty {
  margin: 6px 2px 0;
}

.reports-message-item.is-system {
  display: flex !important;
  justify-content: center !important;
  width: 100%;
  padding: 2px 0;
}

.reports-system-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  max-width: min(680px, 92%);
  color: rgba(170, 188, 211, 0.84);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.reports-system-text {
  overflow-wrap: anywhere;
}

.reports-system-time {
  color: rgba(170, 188, 211, 0.48);
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.reports-system-bubble {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* reports polish patch: compact user list, larger status notes, cleaner status menu, dropdown middle-click support */
.reports-sidebar.is-user .reports-sidebar-head h1#reports-sidebar-title {
  font-size: 1.62rem !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
}

.reports-dialog-item.reports-user-dialog-item {
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: 62px !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

.reports-dialog-item.reports-user-dialog-item .reports-dialog-main {
  min-width: 0 !important;
}

.reports-dialog-item.reports-user-dialog-item .reports-dialog-name strong,
.reports-create-dialog-item .reports-dialog-name strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-create-dialog-item .reports-dialog-name {
  min-width: 0;
  max-width: 100%;
}

.reports-create-dialog-item .reports-dialog-main {
  min-width: 0;
}

.reports-system-line {
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  font-weight: 800 !important;
  color: rgba(190, 206, 228, 0.9) !important;
}

.reports-system-time {
  font-size: 0.82rem !important;
}

.reports-status-menu-item.is-selected {
  background: transparent !important;
}

.reports-status-menu-item.is-selected:hover,
.reports-status-menu-item.is-selected:focus-visible {
  background: rgba(126, 199, 255, 0.12) !important;
}

.dropdown-item[href] {
  text-decoration: none;
}

.reports-create-dialog-item .reports-dialog-name strong {
  white-space: normal !important;
  line-height: 1.16 !important;
}

/* reports polish patch: user sidebar fit and staff empty text */
.reports-page-layout.is-user {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) !important;
}

.reports-sidebar.is-user .reports-sidebar-head {
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.reports-sidebar.is-user .reports-sidebar-head h1#reports-sidebar-title {
  font-size: 1.46rem !important;
  line-height: 1.06 !important;
  letter-spacing: -0.04em !important;
}

.reports-sidebar.is-user .reports-conversations {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.reports-sidebar.is-user .reports-create-dialog-item,
.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.reports-sidebar.is-user .reports-create-dialog-item {
  grid-template-columns: 35px minmax(0, 1fr) !important;
}

.reports-sidebar.is-user .reports-dialog-name,
.reports-sidebar.is-user .reports-dialog-preview {
  max-width: 100% !important;
}

.reports-sidebar.is-user .reports-dialog-name strong {
  display: block;
  max-width: 100% !important;
}

.reports-conversations-empty {
  white-space: pre-line;
  line-height: 1.42;
  text-align: center;
}

@media (max-width: 900px) {
  .reports-page-layout.is-user {
    grid-template-columns: 1fr !important;
  }
}

/* reports patch: stable archive cards, source quotes and clickable names */
.reports-conversations {
  overflow-x: hidden !important;
  scrollbar-gutter: stable;
}

.reports-sidebar.is-staff .reports-dialog-item,
.reports-sidebar:not(.is-user) .reports-dialog-item {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 64px !important;
  height: auto !important;
  align-items: start !important;
  padding: 8px 12px 9px 8px !important;
  overflow: hidden !important;
}

.reports-sidebar.is-staff .reports-dialog-main,
.reports-sidebar:not(.is-user) .reports-dialog-main {
  min-width: 0 !important;
  width: 100% !important;
  align-content: center !important;
  gap: 3px !important;
}

.reports-sidebar.is-staff .reports-dialog-name,
.reports-sidebar:not(.is-user) .reports-dialog-name,
.reports-sidebar.is-staff .reports-dialog-name strong,
.reports-sidebar:not(.is-user) .reports-dialog-name strong,
.reports-sidebar.is-staff .reports-dialog-preview,
.reports-sidebar:not(.is-user) .reports-dialog-preview {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.reports-sidebar.is-staff .reports-dialog-status,
.reports-sidebar:not(.is-user) .reports-dialog-status {
  position: static !important;
  justify-self: start !important;
  max-width: 100% !important;
  min-width: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  margin-top: 2px !important;
  transform: none !important;
}

.reports-sidebar.is-staff .messages-dialog-avatar,
.reports-sidebar:not(.is-user) .messages-dialog-avatar {
  flex: 0 0 35px !important;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item,
.reports-sidebar.is-user .reports-create-dialog-item {
  box-sizing: border-box !important;
  width: 100% !important;
  overflow: hidden !important;
}

.reports-attachment-title-link {
  display: inline-block;
  max-width: 100%;
  color: rgba(142, 243, 255, 0.96);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: none;
  overflow-wrap: anywhere;
}

.reports-attachment-title-link:not(.is-disabled):hover,
.reports-attachment-title-link:not(.is-disabled):focus-visible {
  color: rgba(231, 252, 255, 0.98);
  text-decoration: underline;
  outline: none;
}

.reports-attachment-title {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.reports-attachment-meta {
  color: rgba(170, 188, 211, 0.74) !important;
  font-size: 0.82rem !important;
}

.reports-header-profile-link,
.reports-message-profile-link,
.reports-system-profile-link {
  color: inherit;
  text-decoration: none;
}

.reports-header-profile-link:hover,
.reports-header-profile-link:focus-visible,
.reports-message-profile-link:hover,
.reports-message-profile-link:focus-visible,
.reports-system-profile-link:hover,
.reports-system-profile-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.reports-header-profile-link.messages-chat-title-name {
  display: inline-block;
  width: max-content;
  max-width: 100%;
}

.reports-system-line .profile-name-link {
  display: inline;
  font-weight: 950;
}

.is-source-highlight {
  animation: reportSourcePulse 1.8s ease-out 1;
}

@keyframes reportSourcePulse {
  0% { box-shadow: 0 0 0 0 rgba(142, 243, 255, 0.42); }
  45% { box-shadow: 0 0 0 4px rgba(142, 243, 255, 0.22); }
  100% { box-shadow: 0 0 0 0 rgba(142, 243, 255, 0); }
}

.reports-dialog-status.reports-status,
.reports-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
}

/* reports patch: clean archive list cards */
.reports-dialog-item.reports-archive-summary-item {
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: 72px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.reports-dialog-item.reports-archive-summary-item .reports-dialog-main {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  width: 100% !important;
  gap: 4px !important;
}

.reports-dialog-item.reports-archive-summary-item .reports-dialog-name {
  max-width: 100% !important;
}

.reports-dialog-item.reports-archive-summary-item .reports-dialog-name strong {
  display: block;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.reports-dialog-created {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(224, 233, 249, 0.62);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.15;
}

/* reports patch: archive card fit, quote cleanup and nickname search */
.reports-sidebar {
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
}

.reports-sidebar-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.reports-search-button[hidden],
.reports-search-form[hidden] {
  display: none !important;
}

.reports-search-form {
  display: none !important;
  gap: 8px;
  padding: 1px 16px 10px;
  border-bottom: 0;
}

.reports-search-form.is-open {
  display: grid !important;
}

.reports-search-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 14px !important;
  border-radius: 16px !important;
  font-size: 14px !important;
}

.reports-sidebar.is-staff .reports-dialog-item.reports-archive-summary-item,
.reports-sidebar:not(.is-user) .reports-dialog-item.reports-archive-summary-item {
  min-height: 84px !important;
  padding: 9px 13px 10px !important;
  align-items: center !important;
}

.reports-dialog-item.reports-archive-summary-item .reports-dialog-main {
  align-content: center !important;
  gap: 5px !important;
}

.reports-dialog-item.reports-archive-summary-item .reports-dialog-status.reports-status {
  padding: 3px 8px !important;
  font-size: 0.72rem !important;
  line-height: 1.15 !important;
  margin-top: 0 !important;
}

.reports-dialog-item.reports-archive-summary-item .reports-dialog-created {
  font-size: 0.76rem !important;
  line-height: 1.15 !important;
}

.reports-attachment-text {
  margin-top: 7px !important;
}


/* reports patch: user header plus hidden, quote as message, user card status spacing */
.reports-new-button[hidden] {
  display: none !important;
}

.reports-quote-message {
  justify-content: flex-start !important;
  width: 100%;
  padding: 0;
}

.reports-attachment-bubble {
  position: relative;
  max-width: min(640px, 86%) !important;
  border-left: 3px solid rgba(126, 199, 255, 0.82) !important;
  background: rgba(18, 38, 60, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.12) !important;
}

.reports-attachment-bubble::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: rgba(142, 243, 255, 0.95);
}

.reports-attachment-bubble .reports-attachment-title {
  margin-bottom: 7px;
  color: rgba(142, 243, 255, 0.96);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.25;
}

.reports-attachment-bubble .reports-attachment-text {
  margin-top: 0 !important;
  font-size: 0.92rem;
  line-height: 1.45;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item {
  min-height: 76px !important;
  padding-top: 10px !important;
  padding-bottom: 14px !important;
  align-items: center !important;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item .reports-dialog-main {
  gap: 5px !important;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item .reports-dialog-status {
  margin-top: 3px !important;
  margin-bottom: 2px !important;
}

/* reports patch: compact user cards and new appeal hint text */
.reports-new-empty {
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.45 !important;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item {
  min-height: 70px !important;
  padding-top: 12px !important;
  padding-bottom: 16px !important;
  align-items: center !important;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item .reports-dialog-main {
  align-content: center !important;
  gap: 7px !important;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item .reports-dialog-preview {
  display: none !important;
}

.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item .reports-dialog-status {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  align-self: start !important;
}

/* reports patch: one compact summary format for every reports list */
.reports-dialog-item.reports-summary-list-item,
.reports-sidebar.is-staff .reports-dialog-item.reports-summary-list-item,
.reports-sidebar:not(.is-user) .reports-dialog-item.reports-summary-list-item,
.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item.reports-summary-list-item,
.reports-dialog-item.reports-archive-summary-item.reports-summary-list-item {
  grid-template-columns: minmax(0, 1fr) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 82px !important;
  height: auto !important;
  padding: 10px 13px 12px !important;
  align-items: center !important;
  overflow: hidden !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-sidebar.is-staff .reports-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-sidebar:not(.is-user) .reports-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-dialog-item.reports-archive-summary-item.reports-summary-list-item .reports-dialog-main {
  grid-column: 1 / -1 !important;
  display: grid !important;
  min-width: 0 !important;
  width: 100% !important;
  align-content: center !important;
  align-items: start !important;
  justify-items: start !important;
  gap: 6px !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-name,
.reports-dialog-item.reports-summary-list-item .reports-dialog-name strong,
.reports-dialog-item.reports-summary-list-item .reports-dialog-created {
  justify-self: start !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
  text-align: left !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-name {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-name strong {
  display: block !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-created {
  display: block !important;
  color: rgba(190, 206, 228, 0.74) !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-status.reports-status {
  position: static !important;
  justify-self: start !important;
  align-self: start !important;
  max-width: 100% !important;
  min-width: 0 !important;
  width: max-content !important;
  margin: 0 !important;
  padding: 3px 8px !important;
  font-size: 0.72rem !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  transform: none !important;
}

.reports-dialog-item.reports-summary-list-item .messages-dialog-avatar,
.reports-dialog-item.reports-summary-list-item .reports-dialog-preview {
  display: none !important;
}


/* reports patch: new chat header and exact status bottom spacing */
.reports-new-chat-head .reports-new-chat-user {
  gap: 0 !important;
}

.reports-new-chat-title {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

.reports-new-chat-title .messages-chat-title-name {
  display: block !important;
  font-size: 1.08rem !important;
  line-height: 1.18 !important;
}

.reports-dialog-item.reports-summary-list-item,
.reports-sidebar.is-staff .reports-dialog-item.reports-summary-list-item,
.reports-sidebar:not(.is-user) .reports-dialog-item.reports-summary-list-item,
.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item.reports-summary-list-item,
.reports-dialog-item.reports-archive-summary-item.reports-summary-list-item {
  min-height: 83px !important;
  padding-top: 10px !important;
  padding-bottom: 11px !important;
  align-items: start !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-sidebar.is-staff .reports-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-sidebar:not(.is-user) .reports-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-sidebar.is-user .reports-dialog-item.reports-user-dialog-item.reports-summary-list-item .reports-dialog-main,
.reports-dialog-item.reports-archive-summary-item.reports-summary-list-item .reports-dialog-main {
  align-content: start !important;
  align-items: start !important;
}

.reports-dialog-item.reports-summary-list-item .reports-dialog-status.reports-status {
  margin-bottom: 0 !important;
}

/* reports patch: block composer for resolved appeals */
.reports-closed-form {
  min-height: 98px !important;
  display: grid !important;
  place-items: center !important;
  padding: 14px 18px !important;
  border: 1px solid rgba(126, 199, 255, 0.26) !important;
  border-radius: 18px !important;
  background: rgba(15, 32, 51, 0.72) !important;
  color: rgba(190, 206, 228, 0.88) !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

/* reports patch: inline quote inside the first message bubble */
.reports-attachment-inline {
  margin-top: 10px !important;
  padding: 2px 0 2px 12px !important;
  border-left: 3px solid rgba(142, 243, 255, 0.9) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

.messages-bubble.is-own .reports-attachment-inline {
  border-left-color: rgba(224, 233, 249, 0.78) !important;
}

.reports-attachment-inline .reports-attachment-title {
  margin: 0 0 5px !important;
  color: rgba(142, 243, 255, 0.96) !important;
  font-size: 0.78rem !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.reports-attachment-inline .reports-attachment-title-link {
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.reports-attachment-inline .reports-attachment-text {
  margin-top: 0 !important;
  color: rgba(224, 233, 249, 0.86) !important;
  font-size: 0.9rem !important;
  line-height: 1.38 !important;
  overflow-wrap: anywhere !important;
}

.reports-attachment-only-bubble {
  max-width: min(640px, 86%) !important;
}

/* reports patch: moderation delete original quoted message */
.reports-attachment-inline .reports-attachment-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.reports-attachment-title-main {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.reports-attachment-delete-pair {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-left: 2px !important;
}

.reports-attachment-delete-action {
  width: 24px !important;
  height: 24px !important;
}

.reports-attachment-deleted-badge {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 22px !important;
  padding: 3px 8px !important;
  border: 1px solid rgba(120, 214, 174, 0.26) !important;
  border-radius: 999px !important;
  background: rgba(40, 112, 84, 0.22) !important;
  color: rgba(190, 244, 216, 0.94) !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.messages-bubble.is-deleted .messages-bubble-text,
.profile-wall-comment.is-deleted .profile-wall-rich-content {
  color: rgba(190, 206, 228, 0.72) !important;
  font-style: italic !important;
}


/* Site styled alert notifications */
.site-alert-layer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.985);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.site-alert-layer.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.site-alert-layer.is-hiding {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.99);
}

.site-alert-card {
  width: min(430px, calc(100vw - 40px));
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 30px;
  border-radius: 24px;
  border: 1px solid rgba(97, 202, 255, 0.46);
  background:
    radial-gradient(circle at 20% 0%, rgba(95, 221, 255, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(18, 39, 62, 0.98), rgba(9, 22, 38, 0.98));
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(6, 16, 31, 0.7);
}

.site-alert-text {
  color: #eaf4ff;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.42;
  font-weight: 800;
  text-align: center;
  white-space: pre-line;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

/* Staff profile moderation panel */
.profile-summary-compact {
  position: relative;
}

.profile-moderation-button {
  position: absolute;
  top: 10px;
  right: 0;
  z-index: 5;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(92, 185, 255, .42);
  border-radius: 10px;
  background: rgba(12, 31, 50, .88);
  color: #dcecff;
  font-weight: 900;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 10px 30px rgba(0,0,0,.22);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.profile-moderation-button:hover,
.profile-moderation-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(111, 220, 255, .78);
  background: rgba(20, 48, 75, .95);
  color: #88fff3;
  outline: none;
}

.profile-moderation-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 12, 24, .72);
  backdrop-filter: blur(8px);
}

.profile-moderation-overlay.hidden {
  display: none !important;
}

.profile-moderation-modal {
  width: min(780px, calc(100vw - 32px));
  max-height: min(86vh, 820px);
  overflow: hidden;
  border: 1px solid rgba(91, 165, 232, .34);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(13, 30, 49, .98), rgba(8, 22, 38, .98));
  color: #dbe8f7;
  box-shadow: 0 28px 90px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.03);
}

.profile-moderation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(101, 153, 209, .2);
}

.profile-moderation-head h2 {
  margin: 4px 0 0;
  color: #f0f7ff;
  font-size: 28px;
  line-height: 1.05;
}

.profile-moderation-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(92, 185, 255, .36);
  border-radius: 12px;
  background: rgba(12, 31, 50, .88);
  color: #dcecff;
  font-size: 24px;
  cursor: pointer;
}

.profile-moderation-body {
  max-height: calc(min(86vh, 820px) - 88px);
  overflow: auto;
  padding: 18px 24px 24px;
}

.profile-moderation-target {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(92, 185, 255, .24);
  border-radius: 16px;
  background: rgba(8, 22, 38, .62);
}

.profile-moderation-target strong {
  display: block;
  color: #79c5ff;
  font-size: 20px;
}

.profile-moderation-target span {
  display: block;
  margin-top: 3px;
  color: #91a4b9;
  font-size: 12px;
  font-weight: 800;
}

.profile-moderation-target-role {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(92, 185, 255, .12);
  color: #cfe7ff;
  font-size: 12px;
  font-weight: 900;
}

.profile-moderation-card {
  padding: 14px;
  margin-top: 12px;
  border: 1px solid rgba(92, 185, 255, .22);
  border-radius: 18px;
  background: rgba(13, 31, 51, .74);
}

.profile-moderation-card-danger {
  border-color: rgba(255, 92, 122, .36);
  background: rgba(50, 18, 32, .46);
}

.profile-moderation-card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.profile-moderation-card-title strong {
  color: #f0f7ff;
  font-size: 15px;
}

.profile-moderation-status {
  color: #9fb1c7;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.profile-moderation-status.is-active {
  color: #ffd4df;
}

.profile-moderation-status.is-empty {
  color: #9bdcbb;
}

.profile-moderation-status.is-danger {
  color: #ff9aae;
}

.profile-moderation-status small {
  color: #9fb1c7;
  font-size: 11px;
}

.profile-moderation-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.profile-moderation-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #9fb1c7;
  font-size: 12px;
  font-weight: 900;
}

.profile-moderation-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(92, 185, 255, .34);
  border-radius: 12px;
  background: rgba(4, 15, 28, .72);
  color: #e9f4ff;
  padding: 8px 10px;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.profile-moderation-input:focus {
  border-color: rgba(111, 220, 255, .78);
  box-shadow: 0 0 0 3px rgba(70, 190, 255, .14);
}

.profile-moderation-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.profile-moderation-apply,
.profile-moderation-clear,
.profile-moderation-role-apply,
.profile-moderation-delete {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
}

.profile-moderation-delete {
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(159, 44, 69, .9), rgba(120, 26, 48, .9)) !important;
  border-color: rgba(255, 99, 130, .5) !important;
}

.profile-moderation-loading,
.profile-moderation-empty {
  padding: 26px;
  border: 1px dashed rgba(92, 185, 255, .24);
  border-radius: 18px;
  color: #9fb1c7;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 680px) {
  .profile-moderation-row {
    grid-template-columns: 1fr;
  }
  .profile-moderation-card-title,
  .profile-moderation-target {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-moderation-status {
    text-align: left;
  }
}

/* Profile moderation panel polish v2 */
.profile-summary-shell {
  width: 100%;
  max-width: 100%;
}

.profile-summary-compact {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-right: 52px;
}

.profile-moderation-button {
  right: 0;
  top: 6px;
}

.profile-moderation-modal {
  width: min(980px, calc(100vw - 32px));
}

.profile-moderation-card-title {
  align-items: center;
  margin-bottom: 10px;
}

.profile-moderation-card-title strong {
  font-size: 16px;
  letter-spacing: .01em;
}

.profile-moderation-control-line {
  display: grid;
  grid-template-columns: auto 92px auto auto minmax(180px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.profile-moderation-control-line-status {
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
}

.profile-moderation-control-line-role {
  grid-template-columns: minmax(220px, 320px) auto auto;
  justify-content: start;
}

.profile-moderation-control-line-delete {
  grid-template-columns: auto 120px auto minmax(180px, 1fr) auto auto;
}

.profile-moderation-line-label,
.profile-moderation-line-text {
  color: #9fb1c7;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.profile-moderation-input-minutes {
  max-width: 92px;
  text-align: center;
}

.profile-moderation-input-reason,
.profile-moderation-input-wide {
  min-width: 160px;
}

.profile-moderation-role-select {
  min-width: 220px;
}

.profile-moderation-apply,
.profile-moderation-clear,
.profile-moderation-role-apply,
.profile-moderation-status-apply,
.profile-moderation-delete {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  white-space: nowrap;
}

.profile-moderation-delete {
  margin-top: 0;
}

.messages-dialog-item.is-system {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 14px;
}

.messages-chat-head.is-system .messages-chat-user,
.messages-chat-user.is-system {
  gap: 0;
}

.messages-chat-head.is-system .messages-chat-title-name {
  color: rgba(255, 255, 255, .92);
}

.messages-dialog-item.is-system .messages-dialog-name strong {
  color: rgba(255, 255, 255, .92);
  font-weight: 500;
}

.messages-message-item.is-system {
  justify-content: center;
}

.messages-bubble.is-system {
  max-width: min(620px, 92%);
  border-color: rgba(141, 255, 244, .28);
  background: linear-gradient(180deg, rgba(17, 48, 67, .92), rgba(9, 30, 48, .92));
}

@media (max-width: 900px) {
  .profile-moderation-control-line,
  .profile-moderation-control-line-status,
  .profile-moderation-control-line-role,
  .profile-moderation-control-line-delete {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .profile-moderation-line-label,
  .profile-moderation-line-text {
    white-space: normal;
  }

  .profile-moderation-input-minutes,
  .profile-moderation-role-select {
    max-width: none;
    width: 100%;
  }
}

/* Profile moderation history and right-aligned tools */
.profile-moderation-summary-actions {
  position: absolute;
  top: 6px;
  right: 0;
  z-index: 6;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.profile-moderation-summary-actions .profile-moderation-button {
  position: static;
  top: auto;
  right: auto;
}

.profile-moderation-history-button {
  font-size: 14px;
  letter-spacing: .04em;
}

.profile-moderation-history-modal {
  width: min(860px, calc(100vw - 32px));
}

.profile-moderation-history-list {
  display: grid;
  gap: 10px;
}

.profile-moderation-history-item {
  padding: 13px 14px;
  border: 1px solid rgba(92, 185, 255, .22);
  border-radius: 16px;
  background: rgba(13, 31, 51, .74);
}

.profile-moderation-history-item strong {
  display: block;
  color: #f0f7ff;
  font-size: 15px;
  line-height: 1.25;
}

.profile-moderation-history-item span {
  display: block;
  margin-top: 5px;
  color: #9fb1c7;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

/* Admin chat page */
.admin-chat-page-section {
  padding-top: 18px;
}

.admin-chat-shell {
  min-height: 640px;
  border: 1px solid rgba(92, 185, 255, .24);
  border-radius: 26px;
  background: rgba(10, 27, 44, .82);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .22);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.admin-chat-head {
  padding: 22px 26px;
  border-bottom: 1px solid rgba(92, 185, 255, .16);
}

.admin-chat-head h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  color: #f2f7ff;
}

.admin-chat-head p {
  margin: 6px 0 0;
  color: #9fb0c7;
  font-weight: 700;
}

.admin-chat-messages {
  padding: 22px 26px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 64vh;
  min-height: 420px;
}

.admin-chat-message {
  width: min(720px, 88%);
  padding: 13px 15px;
  border: 1px solid rgba(92, 185, 255, .22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 44, 68, .92), rgba(11, 31, 51, .92));
}

.admin-chat-message.is-own {
  align-self: flex-end;
  border-color: rgba(141, 255, 244, .24);
  background: linear-gradient(180deg, rgba(30, 63, 86, .92), rgba(20, 49, 72, .92));
}

.admin-chat-message-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #9fb0c7;
  font-size: 13px;
  font-weight: 800;
}

.admin-chat-message-text {
  color: #f1f6ff;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.admin-chat-empty {
  margin: auto;
  max-width: 520px;
  padding: 28px;
  border: 1px dashed rgba(146, 174, 204, .24);
  border-radius: 22px;
  color: #aab8cc;
  text-align: center;
  font-weight: 800;
}

.admin-chat-form {
  display: flex;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid rgba(92, 185, 255, .16);
  background: rgba(7, 22, 37, .62);
}

.admin-chat-input {
  min-height: 58px;
  resize: vertical;
  flex: 1;
  border-radius: 18px;
  border: 1px solid rgba(92, 185, 255, .45);
  background: rgba(22, 41, 61, .92);
  color: #f4f8ff;
  padding: 13px 15px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.admin-chat-input:focus {
  border-color: rgba(141, 255, 244, .72);
  box-shadow: 0 0 0 3px rgba(92, 185, 255, .13);
}

.admin-chat-submit {
  align-self: stretch;
  min-width: 150px;
}

@media (max-width: 740px) {
  .admin-chat-form {
    flex-direction: column;
  }
  .admin-chat-message {
    width: 100%;
  }
}


/* Admin chat: messages-style layout */
.admin-chat-page-section {
  padding-top: 18px;
}

.admin-chat-shell.messages-shell {
  min-height: 640px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.admin-chat-staff-panel,
.admin-chat-chat {
  min-height: 640px;
  border: 1px solid rgba(92, 185, 255, .24);
  border-radius: 26px;
  background: rgba(10, 27, 44, .82);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.admin-chat-staff-panel {
  padding: 22px 16px;
}

.admin-chat-staff-head h2 {
  margin: 0 0 14px;
  color: #f2f7ff;
  font-size: 24px;
}

.admin-chat-staff-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-chat-staff-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(92, 185, 255, .20);
  border-radius: 16px;
  background: rgba(13, 34, 55, .72);
}

.admin-chat-staff-name {
  font-weight: 900;
}

.admin-chat-staff-status {
  color: #9fb0c7;
  font-size: 13px;
  font-weight: 900;
}

.admin-chat-staff-item.is-game .admin-chat-staff-status,
.admin-chat-staff-item.is-site .admin-chat-staff-status {
  color: #8dfff4;
}

.admin-chat-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.admin-chat-head {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(92, 185, 255, .16);
}

.admin-chat-head .messages-chat-title-name {
  color: #f2f7ff;
  font-size: 20px;
  font-weight: 900;
}

.admin-chat-head .messages-chat-title-prefix {
  color: #9fb0c7;
  font-size: 13px;
  font-weight: 800;
}

.admin-chat-messages {
  min-height: 0;
  max-height: none;
  padding: 22px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-chat-message {
  width: min(720px, 86%);
  padding: 13px 15px;
  border: 1px solid rgba(92, 185, 255, .22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 44, 68, .92), rgba(11, 31, 51, .92));
}

.admin-chat-message.is-own {
  align-self: flex-end;
  border-color: rgba(141, 255, 244, .24);
  background: linear-gradient(180deg, rgba(30, 63, 86, .92), rgba(20, 49, 72, .92));
}

.admin-chat-message-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #9fb0c7;
  font-size: 13px;
  font-weight: 800;
}

.admin-chat-message-text {
  color: #f1f6ff;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.admin-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid rgba(92, 185, 255, .16);
  background: rgba(7, 22, 37, .62);
}

.admin-chat-input {
  min-height: 78px;
  resize: none;
  border-radius: 18px;
  border: 1px solid rgba(92, 185, 255, .45);
  background: rgba(22, 41, 61, .92);
  color: #f4f8ff;
  padding: 13px 15px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.admin-chat-input:focus {
  border-color: rgba(141, 255, 244, .72);
  box-shadow: 0 0 0 3px rgba(92, 185, 255, .13);
}

.admin-chat-submit {
  align-self: stretch;
  min-width: 0;
}

@media (max-width: 900px) {
  .admin-chat-shell.messages-shell {
    grid-template-columns: 1fr;
  }
  .admin-chat-staff-panel,
  .admin-chat-chat {
    min-height: auto;
  }
}

/* Admin chat final polish: make it visually match personal messages */
.admin-chat-page-section {
  padding-top: 36px !important;
}

.admin-chat-shell.messages-shell {
  display: grid !important;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: stretch !important;
  min-height: var(--messages-panel-height, 730px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.admin-chat-staff-panel,
.admin-chat-chat {
  height: var(--messages-panel-height, 730px) !important;
  min-height: var(--messages-panel-height, 730px) !important;
  max-height: var(--messages-panel-height, 730px) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--panel) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
}

.admin-chat-staff-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  padding: 0 !important;
}

.admin-chat-staff-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 24px 24px 16px !important;
  border-bottom: 1px solid var(--line) !important;
}

.admin-chat-staff-head h2 {
  margin: 4px 0 0 !important;
  color: var(--text) !important;
  font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
}

.admin-chat-staff-list {
  display: grid !important;
  align-content: start !important;
  gap: 10px !important;
  padding: 16px !important;
  overflow: auto !important;
}

.admin-chat-staff-item {
  width: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  gap: 5px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,0.032) !important;
  color: var(--text) !important;
  padding: 12px !important;
}

.admin-chat-staff-name {
  font-weight: 900 !important;
}

.admin-chat-staff-status {
  color: var(--muted) !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
}

.admin-chat-staff-item.is-game .admin-chat-staff-status,
.admin-chat-staff-item.is-site .admin-chat-staff-status {
  color: var(--accent-2) !important;
}

.admin-chat-chat {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  min-width: 0 !important;
}

.admin-chat-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--line) !important;
}

.admin-chat-head .messages-chat-title-name {
  color: var(--text) !important;
  font-size: 1.08rem !important;
  font-weight: 900 !important;
}

.admin-chat-head .messages-chat-title-prefix {
  color: var(--muted) !important;
  font-size: .92rem !important;
  font-weight: 700 !important;
}

.admin-chat-messages {
  min-height: 0 !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 24px !important;
  overflow: auto !important;
}

.admin-chat-message {
  width: auto !important;
  max-width: min(620px, 78%) !important;
  align-self: flex-start !important;
  display: grid !important;
  gap: 7px !important;
  padding: 13px 15px 10px !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: 18px 18px 18px 6px !important;
  background: rgba(255,255,255,0.045) !important;
  line-height: 1.5 !important;
  overflow-wrap: anywhere !important;
}

.admin-chat-message.is-own {
  align-self: flex-end !important;
  border-radius: 18px 18px 6px 18px !important;
  border-color: rgba(126, 199, 255, 0.26) !important;
  background: linear-gradient(135deg, rgba(126, 199, 255, 0.18), rgba(137, 255, 241, 0.11)) !important;
}

.admin-chat-message-head {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: .84rem !important;
  font-weight: 800 !important;
}

.admin-chat-message-text {
  color: var(--text) !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  word-break: break-word !important;
}

.admin-chat-message-meta {
  justify-content: flex-end !important;
}

.admin-chat-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: end !important;
  padding: 18px 24px 22px !important;
  border-top: 1px solid var(--line) !important;
  background: transparent !important;
}

.admin-chat-input {
  width: 100% !important;
  min-height: 54px !important;
  max-height: 160px !important;
  resize: vertical !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,0.045) !important;
  color: var(--text) !important;
  padding: 14px 16px !important;
  font: inherit !important;
  font-weight: 700 !important;
  outline: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
  transition: border-color .2s ease, background .2s ease !important;
}

.admin-chat-input:focus {
  border-color: rgba(126, 199, 255, 0.32) !important;
  background: rgba(255,255,255,0.06) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.admin-chat-submit {
  min-width: 0 !important;
  min-height: 46px !important;
  align-self: end !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  .admin-chat-shell.messages-shell {
    grid-template-columns: 1fr !important;
    --messages-panel-height: auto;
  }

  .admin-chat-staff-panel,
  .admin-chat-chat {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

.admin-chat-author.profile-name-link,
.admin-chat-staff-name.profile-name-link {
  text-decoration: none !important;
  cursor: pointer !important;
}

.admin-chat-author.profile-name-link:hover,
.admin-chat-staff-name.profile-name-link:hover,
.admin-chat-author.profile-name-link:focus-visible,
.admin-chat-staff-name.profile-name-link:focus-visible {
  text-decoration: underline !important;
}


/* Admin chat final alignment with private messages page */
.admin-chat-page-section.messages-page-section {
  padding-top: 22px !important;
}

.admin-chat-shell.messages-page-layout,
.admin-chat-shell.messages-shell {
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 20px !important;
  align-items: start !important;
  --messages-panel-height: 730px !important;
  min-height: var(--messages-panel-height) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.admin-chat-staff-panel.messages-sidebar,
.admin-chat-chat.messages-chat {
  height: var(--messages-panel-height) !important;
  min-height: var(--messages-panel-height) !important;
  max-height: var(--messages-panel-height) !important;
  border-radius: 28px !important;
  border: 1px solid rgba(91, 126, 166, 0.28) !important;
  background: var(--unified-chat-box-bg, rgba(15, 31, 49, 0.9)) !important;
  box-shadow:
    0 16px 44px rgba(3, 12, 24, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
  overflow: hidden !important;
}

.admin-chat-staff-panel.messages-sidebar {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  padding: 0 !important;
}

.admin-chat-staff-head.messages-sidebar-head {
  display: block !important;
  padding: 22px 16px 12px !important;
  border-bottom: 0 !important;
}

.admin-chat-staff-head h1,
.admin-chat-staff-head h2 {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 28px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
}

.admin-chat-staff-list.messages-conversations {
  min-height: 0 !important;
  padding: 1px 16px 16px !important;
  gap: 10px !important;
  overflow: auto !important;
}

.admin-chat-staff-item {
  position: relative !important;
  width: 100% !important;
  min-height: 50px !important;
  display: grid !important;
  gap: 2px !important;
  align-content: center !important;
  padding: 6px 24px 6px 10px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(88, 126, 167, 0.24) !important;
  background: var(--unified-chat-box-bg, rgba(15, 31, 49, 0.9)) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease !important;
}

.admin-chat-staff-item:hover,
.admin-chat-staff-item:focus-within {
  transform: translateY(-1px) !important;
  border-color: rgba(120, 225, 255, 0.42) !important;
  background: var(--unified-chat-box-bg-strong, rgba(18, 38, 60, 0.96)) !important;
}

.admin-chat-staff-name {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.admin-chat-staff-status {
  color: rgba(224, 233, 249, 0.55) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

.admin-chat-staff-item.is-game .admin-chat-staff-status,
.admin-chat-staff-item.is-site .admin-chat-staff-status {
  color: var(--accent-2) !important;
}

.admin-chat-chat.messages-chat {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  min-width: 0 !important;
}

.admin-chat-head.messages-chat-head {
  gap: 10px !important;
  padding: 12px 18px !important;
  border-bottom: 1px solid var(--line) !important;
}

.admin-chat-head .messages-chat-user {
  gap: 10px !important;
}

.admin-chat-head .messages-chat-title {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 5px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.98rem !important;
  line-height: 1.2 !important;
}

.admin-chat-head .messages-chat-title-name {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--text) !important;
  font-size: 1.02rem !important;
  font-weight: 900 !important;
}

.admin-chat-head .messages-chat-title-prefix {
  flex: 0 0 auto !important;
  color: var(--muted) !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
}

.admin-chat-messages.messages-thread {
  min-height: 0 !important;
  gap: 12px !important;
  padding: 24px !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  scroll-behavior: smooth !important;
}

.admin-chat-messages.messages-thread::before {
  content: '' !important;
  margin-top: auto !important;
}

.admin-chat-form.messages-send-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  padding: 12px 18px 14px !important;
  border-top: 1px solid var(--line) !important;
  background: transparent !important;
}

.admin-chat-input.messages-send-input {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 97px !important;
  height: 97px !important;
  max-height: 97px !important;
  padding: 10px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,0.045) !important;
  color: var(--text) !important;
  font: inherit !important;
  font-weight: 700 !important;
  line-height: 19.25px !important;
  resize: none !important;
  overflow-y: auto !important;
  outline: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
  transition: border-color .2s ease, background .2s ease !important;
}

.admin-chat-input.messages-send-input:focus {
  border-color: rgba(126, 199, 255, 0.32) !important;
  background: rgba(255,255,255,0.06) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.admin-chat-submit {
  display: none !important;
}

@media (max-width: 900px) {
  .admin-chat-shell.messages-page-layout,
  .admin-chat-shell.messages-shell {
    grid-template-columns: 1fr !important;
    --messages-panel-height: auto !important;
    min-height: 0 !important;
  }

  .admin-chat-staff-panel.messages-sidebar,
  .admin-chat-chat.messages-chat {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .admin-chat-chat.messages-chat {
    height: 730px !important;
    min-height: 560px !important;
    max-height: 730px !important;
  }
}

@media (max-width: 640px) {
  .admin-chat-head.messages-chat-head,
  .admin-chat-form.messages-send-form {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* admin chat replies, pinned messages, grouped staff and normal text weight */
.admin-chat-staff-panel.messages-sidebar {
  grid-template-rows: minmax(0, 1fr) !important;
}

.admin-chat-staff-list.messages-conversations {
  padding-top: 18px !important;
}

.admin-chat-staff-group {
  display: grid !important;
  gap: 10px !important;
}

.admin-chat-staff-group + .admin-chat-staff-group {
  margin-top: 18px !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.admin-chat-staff-group-title {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 1.05rem !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em !important;
}

.admin-chat-staff-group-list {
  display: grid !important;
  gap: 10px !important;
}

.admin-chat-staff-empty {
  padding: 10px 2px !important;
  color: rgba(224, 233, 249, 0.5) !important;
  font-size: 0.88rem !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
}

.admin-chat-chat.messages-chat {
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
}

.admin-chat-message-text.messages-bubble-text,
.admin-chat-input.messages-send-input,
.admin-chat-input.messages-send-input::placeholder {
  font-weight: 400 !important;
}

.admin-chat-input.messages-send-input::placeholder {
  color: rgba(224, 233, 249, 0.46) !important;
  opacity: 1 !important;
}

.admin-chat-message.messages-bubble {
  position: relative !important;
  overflow: visible !important;
  padding-right: 42px !important;
  scroll-margin: 96px !important;
}

.admin-chat-message.messages-bubble.is-targeted {
  border-color: rgba(120, 225, 255, 0.72) !important;
  box-shadow: 0 0 0 2px rgba(120, 225, 255, 0.18), 0 16px 36px rgba(3, 12, 24, 0.3) !important;
}

.admin-chat-message.messages-bubble.is-pinned {
  border-color: rgba(255, 207, 117, 0.32) !important;
}

.admin-chat-message-actions.messages-bubble-actions {
  position: absolute !important;
  top: 6px !important;
  right: 7px !important;
  z-index: 5 !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  opacity: 0.58 !important;
  transform: none !important;
  transition: opacity .16s ease !important;
}

.admin-chat-message:hover .admin-chat-message-actions,
.admin-chat-message:focus-within .admin-chat-message-actions {
  opacity: 1 !important;
}

.admin-chat-message-action-button {
  appearance: none !important;
  width: 26px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: rgba(8, 19, 33, 0.22) !important;
  color: rgba(224, 233, 249, 0.68) !important;
  cursor: pointer !important;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

.admin-chat-message-action-button svg {
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
}

.admin-chat-message-action-button:hover,
.admin-chat-message-action-button:focus-visible,
.admin-chat-message-action-button.is-active {
  color: var(--text) !important;
  background: rgba(126, 199, 255, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(126, 199, 255, 0.18) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.admin-chat-message-pin-button.is-active {
  color: #ffd98a !important;
  background: rgba(255, 207, 117, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 207, 117, 0.24) !important;
}

.admin-chat-reply-quote,
.admin-chat-pinned-card {
  text-decoration: none !important;
}

.admin-chat-reply-quote {
  display: grid !important;
  gap: 5px !important;
  margin: 8px 0 10px !important;
  padding: 8px 10px 8px 12px !important;
  border-left: 3px solid rgba(120, 225, 255, 0.86) !important;
  border-radius: 0 12px 12px 0 !important;
  background: rgba(126, 199, 255, 0.055) !important;
  color: inherit !important;
}

.admin-chat-reply-quote:hover,
.admin-chat-reply-quote:focus-visible {
  background: rgba(126, 199, 255, 0.09) !important;
  outline: none !important;
}

.admin-chat-reply-quote-head,
.admin-chat-pinned-head {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  min-width: 0 !important;
  color: rgba(159, 235, 255, 0.95) !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.admin-chat-reply-quote-author.profile-name-link,
.admin-chat-pinned-author.profile-name-link {
  font-size: inherit !important;
  font-weight: 900 !important;
}

.admin-chat-reply-quote-text,
.admin-chat-pinned-text {
  min-width: 0 !important;
  color: rgba(224, 233, 249, 0.72) !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.admin-chat-pinned-message {
  padding: 10px 18px !important;
  border-bottom: 1px solid var(--line) !important;
  background: rgba(255, 207, 117, 0.035) !important;
}

.admin-chat-pinned-message[hidden] {
  display: none !important;
}

.admin-chat-pinned-card {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  padding: 9px 11px !important;
  border: 1px solid rgba(255, 207, 117, 0.18) !important;
  border-radius: 16px !important;
  background: rgba(255, 207, 117, 0.06) !important;
  color: var(--text) !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease !important;
}

.admin-chat-pinned-card:hover,
.admin-chat-pinned-card:focus-visible {
  border-color: rgba(255, 207, 117, 0.32) !important;
  background: rgba(255, 207, 117, 0.09) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

.admin-chat-pinned-label {
  align-self: center !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 207, 117, 0.12) !important;
  color: #ffd98a !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.admin-chat-pinned-main {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.admin-chat-reply-preview {
  min-width: 0 !important;
  margin-bottom: 8px !important;
}

.admin-chat-reply-preview[hidden] {
  display: none !important;
}

.admin-chat-reply-preview-card {
  position: relative !important;
  display: grid !important;
  gap: 5px !important;
  padding: 8px 38px 8px 10px !important;
  border: 1px solid rgba(126, 199, 255, 0.16) !important;
  border-radius: 16px !important;
  background: rgba(126, 199, 255, 0.06) !important;
}

.admin-chat-reply-preview-label {
  color: rgba(159, 235, 255, 0.95) !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.admin-chat-reply-preview-card .admin-chat-reply-quote {
  margin: 0 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.admin-chat-reply-preview-cancel {
  appearance: none !important;
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,0.055) !important;
  color: rgba(224, 233, 249, 0.62) !important;
  font: inherit !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.admin-chat-reply-preview-cancel:hover,
.admin-chat-reply-preview-cancel:focus-visible {
  color: var(--text) !important;
  background: rgba(255,255,255,0.1) !important;
  outline: none !important;
}

.admin-chat-mention,
.messages-inline-admin-chat-link {
  color: rgba(159, 235, 255, 0.96) !important;
  font-weight: 800 !important;
}

.messages-inline-admin-chat-link {
  text-decoration: none !important;
  border-bottom: 1px dashed rgba(159, 235, 255, 0.55) !important;
}

.messages-inline-admin-chat-link:hover,
.messages-inline-admin-chat-link:focus-visible {
  color: var(--text) !important;
  border-bottom-color: currentColor !important;
  outline: none !important;
}

@media (max-width: 640px) {
  .admin-chat-pinned-card {
    grid-template-columns: 1fr !important;
  }

  .admin-chat-message-actions.messages-bubble-actions {
    top: 5px !important;
    right: 5px !important;
  }
}


/* Admin chat hotfix: keep composer visible, use PM star pin button, remove bold text */
body[data-page="admin-chat"] .admin-chat-chat.messages-chat {
  display: flex !important;
  flex-direction: column !important;
  min-height: var(--messages-panel-height, 730px) !important;
  height: var(--messages-panel-height, 730px) !important;
  max-height: var(--messages-panel-height, 730px) !important;
  overflow: hidden !important;
}

body[data-page="admin-chat"] .admin-chat-head.messages-chat-head,
body[data-page="admin-chat"] .admin-chat-pinned-message,
body[data-page="admin-chat"] .admin-chat-form.messages-send-form {
  flex: 0 0 auto !important;
}

body[data-page="admin-chat"] .admin-chat-messages.messages-thread {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body[data-page="admin-chat"] .admin-chat-form.messages-send-form {
  display: block !important;
  width: 100% !important;
  min-height: 123px !important;
  padding: 12px 18px 14px !important;
  border-top: 1px solid var(--line) !important;
  background: var(--unified-chat-box-bg, rgba(15, 31, 49, 0.94)) !important;
  position: relative !important;
  z-index: 10 !important;
}

body[data-page="admin-chat"] .admin-chat-input.messages-send-input {
  display: block !important;
  width: 100% !important;
  min-height: 97px !important;
  height: 97px !important;
  max-height: 97px !important;
  font-weight: 400 !important;
  resize: none !important;
}

body[data-page="admin-chat"] .admin-chat-input.messages-send-input::placeholder {
  font-weight: 400 !important;
}

body[data-page="admin-chat"] .admin-chat-message-text.messages-bubble-text,
body[data-page="admin-chat"] .admin-chat-message-text.messages-bubble-text * {
  font-weight: 400 !important;
}

body[data-page="admin-chat"] .admin-chat-message-head {
  gap: 0 !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin {
  margin: 0 !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: rgba(255, 214, 102, 0.88) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.18) !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin:hover,
body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin:focus-visible {
  background: rgba(255, 214, 102, 0.12) !important;
  color: rgba(255, 214, 102, 0.96) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.28) !important;
  transform: translateY(-1px) !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin.is-active {
  background: rgba(255, 214, 102, 0.18) !important;
  color: #ffd666 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.32) !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin svg {
  width: 15px !important;
  height: 15px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linejoin: round !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin.is-active svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}

@media (max-width: 900px) {
  body[data-page="admin-chat"] .admin-chat-chat.messages-chat {
    min-height: 560px !important;
    height: 730px !important;
    max-height: 730px !important;
  }
}

/* Admin chat action row/title polish: actions stay beside time like private messages */
body[data-page="admin-chat"] .messages-page-hero-title .eyebrow {
  letter-spacing: 0.16em !important;
}

body[data-page="admin-chat"] .admin-chat-head .messages-chat-title-name {
  font-weight: 900 !important;
}

body[data-page="admin-chat"] .admin-chat-head .messages-chat-title-prefix {
  display: none !important;
}

body[data-page="admin-chat"] .admin-chat-message.messages-bubble,
body[data-page="admin-chat"] .admin-chat-message.messages-bubble.is-own {
  padding-right: 15px !important;
  overflow: visible !important;
}

body[data-page="admin-chat"] .admin-chat-message-meta.messages-bubble-meta,
body[data-page="admin-chat"] .admin-chat-message.messages-bubble.is-own .admin-chat-message-meta.messages-bubble-meta {
  width: 100% !important;
  margin-top: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

body[data-page="admin-chat"] .admin-chat-message-meta.messages-bubble-meta time {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

body[data-page="admin-chat"] .admin-chat-message-actions.messages-bubble-actions {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}

body[data-page="admin-chat"] .admin-chat-message-actions.messages-bubble-actions button {
  position: relative !important;
  z-index: 2 !important;
  margin: 0 !important;
}

body[data-page="admin-chat"] .admin-chat-message-action-button,
body[data-page="admin-chat"] .admin-chat-message-reply-button,
body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  border: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  cursor: pointer !important;
}

body[data-page="admin-chat"] .admin-chat-message-reply-button {
  background: rgba(123, 189, 255, 0.12) !important;
  color: #9fd2ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18) !important;
}

body[data-page="admin-chat"] .admin-chat-message-reply-button:hover,
body[data-page="admin-chat"] .admin-chat-message-reply-button:focus-visible {
  background: rgba(123, 189, 255, 0.18) !important;
  color: #cce8ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.32) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

body[data-page="admin-chat"] .admin-chat-message-reply-button svg {
  width: 15px !important;
  height: 15px !important;
  fill: currentColor !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin {
  background: transparent !important;
  color: rgba(255, 214, 102, 0.88) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.18) !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin:hover,
body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin:focus-visible {
  background: rgba(255, 214, 102, 0.12) !important;
  color: rgba(255, 214, 102, 0.96) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.28) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin.is-active {
  background: rgba(255, 214, 102, 0.18) !important;
  color: #ffd666 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.32) !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin svg {
  width: 15px !important;
  height: 15px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linejoin: round !important;
}

body[data-page="admin-chat"] .admin-chat-message-pin-button.profile-wall-post-pin.is-active svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}

@media (max-width: 640px) {
  body[data-page="admin-chat"] .admin-chat-message-actions.messages-bubble-actions {
    position: static !important;
    flex-direction: row !important;
  }
}


/* Admin chat mention suggestions and scroll-safe action polish */
body[data-page="admin-chat"] .admin-chat-mention-suggest {
  display: grid !important;
  gap: 6px !important;
  width: min(360px, 100%) !important;
  margin: 0 0 10px !important;
  padding: 8px !important;
  border: 1px solid rgba(126, 199, 255, 0.18) !important;
  border-radius: 14px !important;
  background: rgba(10, 22, 37, 0.98) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28) !important;
  position: relative !important;
  z-index: 14 !important;
}

body[data-page="admin-chat"] .admin-chat-mention-suggest[hidden] {
  display: none !important;
}

body[data-page="admin-chat"] .admin-chat-mention-option {
  appearance: none !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 9px 10px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: var(--text) !important;
  font: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: background .16s ease, transform .16s ease, color .16s ease !important;
}

body[data-page="admin-chat"] .admin-chat-mention-option:hover,
body[data-page="admin-chat"] .admin-chat-mention-option:focus-visible,
body[data-page="admin-chat"] .admin-chat-mention-option.is-active {
  background: rgba(126, 199, 255, 0.11) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

body[data-page="admin-chat"] .admin-chat-mention-option-name {
  min-width: 0 !important;
  color: rgba(159, 235, 255, 0.96) !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="admin-chat"] .admin-chat-mention-option-desc {
  flex: 0 0 auto !important;
  color: rgba(224, 233, 249, 0.52) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

body[data-page="admin-chat"] .admin-chat-message-reply-button[data-tooltip],
body[data-page="admin-chat"] .admin-chat-message-pin-button[data-tooltip] {
  position: relative !important;
}


/* private messages: reply button, quote and composer preview */
.messages-reply-quote {
  display: grid !important;
  gap: 5px !important;
  margin: 2px 0 9px !important;
  padding: 8px 10px 8px 12px !important;
  border-left: 3px solid rgba(120, 225, 255, 0.86) !important;
  border-radius: 0 12px 12px 0 !important;
  background: rgba(126, 199, 255, 0.055) !important;
  color: inherit !important;
  text-decoration: none !important;
}

.messages-reply-quote:hover,
.messages-reply-quote:focus-visible {
  background: rgba(126, 199, 255, 0.09) !important;
  outline: none !important;
}

.messages-reply-quote-head {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  min-width: 0 !important;
  color: rgba(159, 235, 255, 0.95) !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.messages-reply-quote-author.profile-name-link {
  font-size: inherit !important;
  font-weight: 900 !important;
}

.messages-reply-quote-text {
  min-width: 0 !important;
  color: rgba(224, 233, 249, 0.72) !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.messages-reply-preview {
  min-width: 0 !important;
  margin-bottom: 8px !important;
}

.messages-reply-preview[hidden] {
  display: none !important;
}

.messages-reply-preview-card {
  position: relative !important;
  display: grid !important;
  gap: 5px !important;
  padding: 8px 38px 8px 10px !important;
  border: 1px solid rgba(126, 199, 255, 0.16) !important;
  border-radius: 16px !important;
  background: rgba(126, 199, 255, 0.06) !important;
}

.messages-reply-preview-label {
  color: rgba(159, 235, 255, 0.95) !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.messages-reply-preview-card .messages-reply-quote {
  margin: 0 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.messages-reply-preview-cancel {
  appearance: none !important;
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,0.055) !important;
  color: rgba(224, 233, 249, 0.62) !important;
  font: inherit !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.messages-reply-preview-cancel:hover,
.messages-reply-preview-cancel:focus-visible {
  color: var(--text) !important;
  background: rgba(255,255,255,0.1) !important;
  outline: none !important;
}

.messages-message-item.is-targeted .messages-bubble {
  border-color: rgba(120, 225, 255, 0.62) !important;
  box-shadow: inset 0 0 0 1px rgba(120, 225, 255, 0.26), 0 0 24px rgba(120, 225, 255, 0.12) !important;
}

.messages-bubble-reply-button svg {
  width: 15px !important;
  height: 15px !important;
  fill: currentColor !important;
}

/* messages page: recipient search replaces dialog list */
.messages-conversations.is-search-results {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.messages-conversations.is-search-results .messages-recipient-result {
  appearance: none;
  position: relative;
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 7px;
  border-radius: 18px;
  border: 1px solid rgba(88, 126, 167, 0.24);
  background: rgba(15, 31, 49, 0.9);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 12px 34px rgba(3, 12, 24, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.messages-conversations.is-search-results .messages-recipient-result:hover,
.messages-conversations.is-search-results .messages-recipient-result:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(120, 225, 255, 0.42);
  background: rgba(18, 38, 60, 0.96);
  outline: none;
}

.messages-conversations.is-search-results .messages-recipient-empty {
  margin: 0;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(15, 31, 49, 0.64);
  color: var(--muted);
  padding: 12px 14px;
  font-size: .9rem;
  line-height: 1.45;
}

/* Header global search refinements */
.search-results-dropdown-menu {
  max-height: calc(100vh - 96px);
}

.search-results-box {
  max-height: min(520px, calc(100vh - 116px));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 199, 255, 0.38) rgba(255, 255, 255, 0.04);
}

.search-results-box::-webkit-scrollbar {
  width: 8px;
}

.search-results-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.search-results-box::-webkit-scrollbar-thumb {
  background: rgba(126, 199, 255, 0.38);
  border-radius: 999px;
}

.search-filter-mark {
  border-radius: 5px;
}

.search-filter-option.is-active .search-filter-mark {
  box-shadow: inset 0 0 0 3px rgba(8, 18, 31, 0.98), 0 0 14px rgba(126, 199, 255, 0.18);
}

.search-results-empty--loading strong {
  color: var(--accent);
}

.knowledge-card.is-search-target {
  outline: 2px solid rgba(126, 199, 255, 0.72);
  box-shadow: 0 0 0 6px rgba(126, 199, 255, 0.12), var(--shadow);
}

.search-result-hit {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(126, 199, 255, 0.18);
  color: inherit;
}

/* custom profile avatar editor */
.profile-avatar-settings-card {
  display: grid;
  gap: 14px;
}

.profile-avatar-current,
.profile-avatar-editor {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-avatar-editor.is-hidden,
.profile-avatar-editor[hidden] {
  display: none;
}

.profile-avatar-current-preview,
.profile-avatar-editor-preview {
  width: 148px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background-color: rgba(7, 16, 30, 0.92);
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(122, 184, 255, 0.16);
  user-select: none;
}

.profile-avatar-editor-preview {
  cursor: grab;
  touch-action: none;
}

.profile-avatar-editor-preview.is-dragging {
  cursor: grabbing;
}

.profile-avatar-current-info,
.profile-avatar-editor-panel {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.profile-avatar-current-label {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.profile-avatar-range-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-avatar-range {
  width: 100%;
  accent-color: var(--accent);
}

.profile-avatar-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.profile-summary-avatar,
.profile-wall-avatar,
.dropdown-avatar,
.messages-recipient-result-avatar,
.messages-dialog-avatar,
.messages-chat-avatar {
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (max-width: 640px) {
  .profile-avatar-current,
  .profile-avatar-editor {
    grid-template-columns: 1fr;
  }

  .profile-avatar-current-preview,
  .profile-avatar-editor-preview {
    width: min(100%, 180px);
  }
}

/* vForum initial forum system */
.forum-hero {
  padding-bottom: 18px;
}

.forum-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: stretch;
}

.forum-hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 24% 18%, rgba(126, 199, 255, 0.16), transparent 42%),
    rgba(255,255,255,0.035);
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.forum-hero-card span,
.forum-hero-card strong,
.forum-hero-card em {
  display: block;
  font-style: normal;
}

.forum-hero-card strong {
  color: var(--text);
  font-size: 1.35rem;
}

.forum-section {
  padding-top: 12px;
}

.forum-shell {
  overflow: visible;
}

.forum-app {
  display: grid;
  gap: 18px;
}

.forum-loading,
.forum-empty {
  border: 1px solid rgba(126, 199, 255, 0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.025);
  padding: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.forum-empty strong,
.forum-empty span {
  display: block;
}

.forum-empty strong {
  color: var(--text);
  margin-bottom: 4px;
}

.forum-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 4px;
  flex-wrap: wrap;
}

.forum-breadcrumbs,
.forum-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.forum-breadcrumbs {
  color: var(--muted);
  font-weight: 700;
}

.forum-breadcrumbs a,
.forum-inline-button,
.forum-text-button {
  color: var(--accent-2);
  text-decoration: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.forum-breadcrumbs a:hover,
.forum-inline-button:hover,
.forum-text-button:hover,
.forum-breadcrumbs a:focus-visible,
.forum-inline-button:focus-visible,
.forum-text-button:focus-visible {
  color: var(--text);
  outline: none;
}

.forum-breadcrumb-sep {
  color: rgba(196,210,231,0.28);
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.forum-main,
.forum-side,
.forum-topic-page,
.forum-comments-list {
  display: grid;
  gap: 16px;
}

.forum-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid rgba(126, 199, 255, 0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.025);
  padding: 18px;
}

.forum-topline h2,
.forum-comments-head h2,
.forum-topic-post h2 {
  margin-bottom: 8px;
}

.forum-topline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.forum-create-toggle {
  flex: 0 0 auto;
  margin-top: 4px;
}

.forum-section-card,
.forum-subsection-card,
.forum-topic-row,
.forum-topic-post,
.forum-comment,
.forum-comments-block,
.forum-note-card,
.forum-stats {
  border: 1px solid rgba(126, 199, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(11, 28, 49, 0.72), rgba(7, 19, 34, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.035),
    0 14px 30px rgba(0,0,0,0.13);
}

.forum-section-card,
.forum-subsection-card,
.forum-topic-row,
.forum-topic-post,
.forum-comment,
.forum-comments-block,
.forum-note-card {
  padding: 18px;
}

.forum-card-main,
.forum-topic-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.forum-card-main h3,
.forum-topic-link h3 {
  margin: 5px 0 8px;
  font-size: 1.28rem;
}

.forum-card-main p,
.forum-topic-link p,
.forum-note-card span {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.forum-card-kicker,
.forum-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid rgba(126, 199, 255, 0.16);
  background: rgba(126, 199, 255, 0.07);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forum-status.is-closed,
.forum-subsection-card.is-closed .forum-card-kicker {
  border-color: rgba(239, 83, 80, 0.22);
  background: rgba(239, 83, 80, 0.07);
  color: #ff9b9b;
}

.forum-status.is-open {
  border-color: rgba(78, 224, 115, 0.2);
  background: rgba(78, 224, 115, 0.075);
  color: #91f5ad;
}

.forum-card-meta,
.forum-topic-row-foot,
.forum-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.forum-card-meta span,
.forum-topic-row-foot {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
}

.forum-card-actions {
  justify-content: flex-end;
}

.forum-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
  gap: 10px;
}

.forum-stats div {
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
  padding: 13px;
}

.forum-stats strong,
.forum-stats span,
.forum-note-card strong,
.forum-note-card span {
  display: block;
}

.forum-stats strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.forum-stats span {
  color: var(--muted);
  margin-top: 6px;
}

.forum-note-card strong {
  color: var(--text);
  margin-bottom: 7px;
}

.forum-form {
  display: grid;
  gap: 14px;
  width: 100%;
  border: 1px solid rgba(126, 199, 255, 0.12);
  border-radius: 20px;
  background: rgba(5, 17, 31, 0.5);
  padding: 16px;
}

.forum-form--compact {
  max-width: 520px;
}

.forum-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.forum-form input[type="text"],
.forum-form textarea {
  width: 100%;
  border: 1px solid rgba(126, 199, 255, 0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.forum-form textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.55;
}

.forum-form input[type="text"]:focus,
.forum-form textarea:focus {
  border-color: rgba(126, 199, 255, 0.36);
  box-shadow: 0 0 0 3px rgba(126, 199, 255, 0.08);
}

.forum-checkbox {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 10px !important;
  color: var(--muted) !important;
}

.forum-checkbox input {
  width: 18px;
  height: 18px;
}

.forum-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.forum-submit-button {
  justify-content: center;
  width: auto;
  min-width: 180px;
}

.forum-topic-list {
  display: grid;
  gap: 14px;
}

.forum-topic-row-head,
.forum-topic-post-head,
.forum-comments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.forum-author {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.forum-author-avatar-link,
.forum-author-profile {
  color: inherit;
  text-decoration: none;
}

.forum-author-avatar {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(126, 199, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.forum-author-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.forum-author-name {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-author-text span:last-child:not(.forum-author-name) {
  color: var(--muted);
  font-size: 0.9rem;
}

.forum-topic-counts {
  min-width: 68px;
  border-radius: 16px;
  background: rgba(126, 199, 255, 0.07);
  border: 1px solid rgba(126, 199, 255, 0.12);
  padding: 8px 10px;
  text-align: center;
}

.forum-topic-counts span,
.forum-topic-counts small {
  display: block;
}

.forum-topic-counts span {
  color: var(--text);
  font-weight: 800;
  font-size: 1.18rem;
}

.forum-topic-counts small {
  color: var(--muted);
}

.forum-topic-post--main {
  padding: 22px;
}

.forum-rich-text {
  color: var(--text);
  line-height: 1.72;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.forum-rich-text p {
  margin-bottom: 12px;
}

.forum-rich-text p:last-child {
  margin-bottom: 0;
}

.forum-comments-block {
  display: grid;
  gap: 16px;
}

.forum-comments-head {
  margin-bottom: 0;
}

.forum-comments-head span {
  color: var(--muted);
  font-weight: 700;
}

.forum-comment {
  display: grid;
  gap: 12px;
  background: rgba(255,255,255,0.025);
}

.forum-comment-form {
  margin-top: 2px;
}

@media (max-width: 980px) {
  .forum-hero-grid,
  .forum-layout {
    grid-template-columns: 1fr;
  }

  .forum-hero-card {
    display: none;
  }

  .forum-side {
    order: -1;
  }
}

@media (max-width: 640px) {
  .forum-shell {
    padding: 18px;
  }

  .forum-toolbar,
  .forum-topline,
  .forum-topic-row-head,
  .forum-topic-post-head,
  .forum-comments-head {
    align-items: stretch;
  }

  .forum-toolbar-actions,
  .forum-form-actions {
    width: 100%;
  }

  .forum-submit-button,
  .forum-inline-button {
    width: 100%;
  }

  .forum-stats {
    grid-template-columns: 1fr 1fr;
  }

  .forum-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }
}


@media (max-width: 640px) {
  .forum-section-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .forum-section-panel-head {
    display: grid;
  }

  .forum-section-open {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .forum-tree {
    padding-left: 0;
  }

  .forum-tree-branch {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .forum-tree-branch::before {
    left: 12px;
  }

  .forum-tree-line::after {
    left: 12px;
    width: 18px;
  }

  .forum-tree-content {
    padding: 12px;
  }

  .forum-tree-topic,
  .forum-tree-more,
  .forum-tree-topic-empty {
    width: 100%;
    justify-content: space-between;
  }
}

/* Forum minimal tree layout */
.forum-section {
  padding-top: 44px;
}

.forum-shell {
  padding: 24px 26px 28px;
}

.forum-app {
  gap: 14px;
}

.forum-minimal-root {
  display: grid;
  gap: 18px;
}

.forum-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.forum-section-panels--minimal {
  gap: 22px;
}

.forum-section-panel {
  border: 1px solid rgba(126, 199, 255, 0.12);
  border-radius: 20px;
  background: rgba(7, 19, 34, 0.42);
  box-shadow: none;
  padding: 22px 24px;
}

.forum-section-panel-head {
  display: block;
}

.forum-section-panel-head h3 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.15;
}

.forum-section-title-link {
  color: inherit;
  text-decoration: none;
}

.forum-section-title-link:hover,
.forum-section-title-link:focus-visible {
  color: var(--accent-2);
  outline: none;
}

.forum-section-panel-head p,
.forum-section-view-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.forum-tree {
  margin-top: 18px;
  padding-left: 0;
  gap: 0;
}

.forum-tree-branch {
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 74px;
}

.forum-tree-branch::before {
  left: 16px;
  width: 2px;
  background: rgba(126, 199, 255, 0.28);
}

.forum-tree-branch:first-child::before {
  top: 23px;
}

.forum-tree-branch:last-child::before {
  bottom: calc(100% - 23px);
}

.forum-tree-line::after {
  left: 16px;
  top: 23px;
  width: 32px;
  background: rgba(126, 199, 255, 0.28);
}

.forum-tree-content,
.forum-tree-branch.is-closed .forum-tree-content {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 12px 0 14px 18px;
}

.forum-tree-subsection-head {
  gap: 8px;
}

.forum-tree-subsection-title {
  font-size: 1.05rem;
  line-height: 1.25;
}

.forum-tree-description,
.forum-section-panel-meta,
.forum-tree-meta {
  display: none;
}

.forum-tree-topics {
  margin-top: 5px;
  gap: 6px 14px;
}

.forum-tree-topic,
.forum-tree-more,
.forum-tree-topic-empty {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 600;
}

.forum-tree-topic:hover,
.forum-tree-topic:focus-visible,
.forum-tree-more:hover,
.forum-tree-more:focus-visible {
  color: var(--accent-2);
  border-color: transparent;
  background: transparent;
}

.forum-tree-more {
  color: var(--accent-2);
}

.forum-tree-actions {
  margin-top: 5px;
  justify-content: flex-start;
  font-size: 0.9rem;
}

.forum-section-view-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.forum-section-view-head h2 {
  margin-bottom: 8px;
}

.forum-subsection-page .forum-section-view-head {
  border-bottom: 1px solid rgba(126, 199, 255, 0.11);
  padding-bottom: 14px;
}

.forum-subsection-summary span,
.forum-page-link,
.forum-page-dots {
  background: transparent;
}

.forum-topic-row {
  box-shadow: none;
}

.forum-topic-row-foot span {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 640px) {
  .forum-section {
    padding-top: 28px;
  }

  .forum-shell {
    padding: 18px;
  }

  .forum-tree-branch {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .forum-tree-branch::before {
    left: 10px;
  }

  .forum-tree-line::after {
    left: 10px;
    width: 20px;
  }

  .forum-tree-content,
  .forum-tree-branch.is-closed .forum-tree-content {
    padding-left: 10px;
  }

  .forum-tree-topic,
  .forum-tree-more,
  .forum-tree-topic-empty {
    width: auto;
    justify-content: flex-start;
  }
}


/* Forum minimal header and tree polish */
.forum-page-hero-title {
  padding-bottom: 0;
}

.forum-page-hero-title .eyebrow {
  margin-bottom: 0;
}

.page-shell[data-page="forum"] .forum-section {
  padding-top: 22px;
}

.page-shell[data-page="forum"] .forum-app {
  gap: 18px;
}

.page-shell[data-page="forum"] .forum-section-panels--minimal {
  gap: 22px;
}

.page-shell[data-page="forum"] .forum-section-panel {
  overflow: hidden;
}

.page-shell[data-page="forum"] .forum-tree {
  position: relative;
  margin-top: 8px;
  padding-left: 0;
  gap: 0;
}

.page-shell[data-page="forum"] .forum-tree::before {
  content: '';
  position: absolute;
  left: 16px;
  top: -2px;
  bottom: 23px;
  width: 2px;
  border-radius: 0 0 999px 999px;
  background: rgba(126, 199, 255, 0.28);
  pointer-events: none;
}

.page-shell[data-page="forum"] .forum-tree-branch {
  position: relative;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 70px;
}

.page-shell[data-page="forum"] .forum-tree-branch::before {
  display: none;
}

.page-shell[data-page="forum"] .forum-tree-line::after {
  left: 16px;
  top: 23px;
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: rgba(126, 199, 255, 0.28);
}

.page-shell[data-page="forum"] .forum-tree-content,
.page-shell[data-page="forum"] .forum-tree-branch.is-closed .forum-tree-content {
  padding: 12px 0 14px 18px;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-section {
    padding-top: 18px;
  }

  .page-shell[data-page="forum"] .forum-tree::before {
    left: 10px;
    bottom: 22px;
  }

  .page-shell[data-page="forum"] .forum-tree-branch {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .page-shell[data-page="forum"] .forum-tree-line::after {
    left: 10px;
    width: 20px;
  }
}

/* Forum compact polish v2: cleaner root, knowledge-like panels, inline controls */
.page-shell[data-page="forum"] .forum-section-panel,
.page-shell[data-page="forum"] .forum-topic-row,
.page-shell[data-page="forum"] .forum-topic-post,
.page-shell[data-page="forum"] .forum-comment,
.page-shell[data-page="forum"] .forum-comments-block,
.page-shell[data-page="forum"] .forum-note-card {
  border: 1px solid rgba(91, 126, 166, 0.28);
  background:
    linear-gradient(180deg, rgba(20, 34, 51, 0.96) 0%, rgba(14, 27, 44, 0.94) 100%),
    radial-gradient(circle at top right, rgba(87, 216, 255, 0.08), transparent 42%);
  box-shadow:
    0 16px 44px rgba(3, 12, 24, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-shell[data-page="forum"] .forum-section-panel {
  padding: 24px 28px 28px;
}

.page-shell[data-page="forum"] .forum-tree {
  margin-top: 8px;
}

.page-shell[data-page="forum"] .forum-tree::before {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-tree-branch::before {
  content: '';
  display: block !important;
  position: absolute;
  left: 16px;
  top: -2px;
  bottom: -2px;
  width: 2px;
  border-radius: 0;
  background: rgba(126, 199, 255, 0.28);
  pointer-events: none;
}

.page-shell[data-page="forum"] .forum-tree-branch:first-child::before {
  top: -2px;
}

.page-shell[data-page="forum"] .forum-tree-branch:last-child::before {
  content: '';
  display: block !important;
  position: absolute;
  left: 16px;
  top: -2px;
  width: 32px;
  height: 25px;
  background: transparent;
  border-left: 2px solid rgba(126, 199, 255, 0.28);
  border-bottom: 2px solid rgba(126, 199, 255, 0.28);
  border-bottom-left-radius: 12px;
  pointer-events: none;
}

.page-shell[data-page="forum"] .forum-tree-branch:last-child .forum-tree-line::after {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-tree-subsection-head {
  align-items: baseline;
  gap: 8px 12px;
}

.page-shell[data-page="forum"] .forum-tree-inline-action {
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
}

.page-shell[data-page="forum"] .forum-tree-actions {
  display: none !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-section-panel {
    padding: 20px 18px 22px;
  }

  .page-shell[data-page="forum"] .forum-tree-branch::before {
    left: 10px;
  }

  .page-shell[data-page="forum"] .forum-tree-branch:last-child::before {
    left: 10px;
    width: 20px;
  }
}

/* Forum tree moderator icon buttons: aligned with private/admin message action buttons */
.page-shell[data-page="forum"] .forum-tree-toggle-button {
  appearance: none !important;
  position: relative !important;
  z-index: 2 !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: -3px 0 0 2px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button svg {
  width: 15px !important;
  height: 15px !important;
  display: block !important;
  fill: currentColor !important;
  pointer-events: none !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-lock {
  background: rgba(255, 73, 73, 0.12) !important;
  color: #ff5b5b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-lock:hover,
.page-shell[data-page="forum"] .forum-tree-toggle-button.is-lock:focus-visible {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ff7272 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.28) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-unlock {
  background: rgba(123, 189, 255, 0.12) !important;
  color: #9fd2ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-unlock:hover,
.page-shell[data-page="forum"] .forum-tree-toggle-button.is-unlock:focus-visible {
  background: rgba(123, 189, 255, 0.18) !important;
  color: #cce8ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.32) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button:disabled,
.page-shell[data-page="forum"] .forum-tree-toggle-button.is-pending {
  cursor: wait !important;
  opacity: 0.68 !important;
  transform: none !important;
}

.page-shell[data-page="forum"] .forum-closed-lock-badge {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -1px 0 0 2px;
  border-radius: 8px;
  color: #ff5b5b;
  background: rgba(255, 73, 73, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.16);
}

.page-shell[data-page="forum"] .forum-closed-lock-badge svg {
  width: 13px;
  height: 13px;
  display: block;
  fill: currentColor;
}

.page-shell[data-page="forum"] .forum-tree-inline-action {
  display: none !important;
}


/* Forum polish: admin create button should not shift the section list, tooltips use site style */
.page-shell[data-page="forum"] .forum-minimal-root {
  position: relative;
}

.page-shell[data-page="forum"] .forum-actions-row--floating {
  position: absolute;
  top: -44px;
  right: 0;
  z-index: 4;
  margin: 0 !important;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
}

.page-shell[data-page="forum"] .forum-actions-row--floating > * {
  pointer-events: auto;
}

.page-shell[data-page="forum"] .forum-actions-row--form {
  margin: 0 0 18px !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button,
.page-shell[data-page="forum"] .forum-closed-lock-badge {
  user-select: none;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-lock,
.page-shell[data-page="forum"] .forum-closed-lock-badge {
  background: rgba(255, 73, 73, 0.12) !important;
  color: #ff5b5b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-lock:hover,
.page-shell[data-page="forum"] .forum-tree-toggle-button.is-lock:focus-visible {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ff7272 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.28) !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-unlock {
  background: rgba(123, 189, 255, 0.12) !important;
  color: #9fd2ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-tree-toggle-button.is-unlock:hover,
.page-shell[data-page="forum"] .forum-tree-toggle-button.is-unlock:focus-visible {
  background: rgba(123, 189, 255, 0.18) !important;
  color: #cce8ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.32) !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-actions-row--floating {
    position: static;
    margin: 0 0 12px !important;
    justify-content: flex-start;
  }
}

/* Forum structure management controls: rename/delete near section and subsection titles */
.page-shell[data-page="forum"] .forum-title-row,
.page-shell[data-page="forum"] .forum-tree-subsection-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-shell[data-page="forum"] .forum-title-row h3,
.page-shell[data-page="forum"] .forum-section-panel-head .forum-title-row h3 {
  margin: 0;
}

.page-shell[data-page="forum"] .forum-section-panel-head .forum-title-row + p {
  margin-top: 8px;
}

.page-shell[data-page="forum"] .forum-structure-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  vertical-align: middle;
}

.page-shell[data-page="forum"] .forum-structure-action-button,
.page-shell[data-page="forum"] .forum-structure-delete-pair,
.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-toggle,
.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-direct {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  margin: 0 !important;
}

.page-shell[data-page="forum"] .forum-structure-action-button {
  padding: 0 !important;
}

.page-shell[data-page="forum"] .forum-structure-action-button svg,
.page-shell[data-page="forum"] .forum-structure-delete-pair svg {
  width: 15px !important;
  height: 15px !important;
  display: block !important;
  fill: currentColor !important;
  pointer-events: none !important;
}

.page-shell[data-page="forum"] .forum-structure-delete-pair {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-toggle,
.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-direct {
  position: absolute !important;
  inset: 0 !important;
  transform: none !important;
}

.page-shell[data-page="forum"] .forum-rename-form {
  width: min(100%, 560px);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.page-shell[data-page="forum"] .forum-rename-form input {
  min-width: min(280px, 100%);
  flex: 1 1 260px;
  height: 36px;
  border: 1px solid rgba(126, 199, 255, 0.22);
  border-radius: 10px;
  background: rgba(7, 18, 31, 0.72);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-shell[data-page="forum"] .forum-rename-form input:focus {
  border-color: rgba(126, 199, 255, 0.46);
  box-shadow: 0 0 0 3px rgba(126, 199, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.page-shell[data-page="forum"] .forum-rename-save,
.page-shell[data-page="forum"] .forum-rename-cancel {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-direct:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-structure-actions {
    gap: 5px;
  }

  .page-shell[data-page="forum"] .forum-rename-form {
    align-items: stretch;
  }

  .page-shell[data-page="forum"] .forum-rename-save,
  .page-shell[data-page="forum"] .forum-rename-cancel {
    flex: 1 1 auto;
  }
}

/* Forum structure controls polish: right aligned and same action style as messages */
.page-shell[data-page="forum"] .forum-section-panel-head > div {
  width: 100%;
  min-width: 0;
}

.page-shell[data-page="forum"] .forum-title-row,
.page-shell[data-page="forum"] .forum-tree-subsection-head {
  width: 100%;
}

.page-shell[data-page="forum"] .forum-title-row > h3,
.page-shell[data-page="forum"] .forum-tree-subsection-title {
  min-width: 0;
  margin-right: auto !important;
}

.page-shell[data-page="forum"] .forum-structure-actions {
  margin-left: 0 !important;
  justify-content: flex-end;
}

.page-shell[data-page="forum"] .forum-title-row .forum-structure-actions {
  margin-left: auto !important;
}

.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-closed-lock-badge,
.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-tree-toggle-button {
  margin-left: auto;
}

.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-tree-toggle-button + .forum-structure-actions,
.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-closed-lock-badge + .forum-structure-actions {
  margin-left: 0 !important;
}

.page-shell[data-page="forum"] .forum-structure-action-button.profile-wall-post-edit {
  background: rgba(123, 189, 255, 0.12) !important;
  color: #9fd2ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-structure-action-button.profile-wall-post-edit:hover,
.page-shell[data-page="forum"] .forum-structure-action-button.profile-wall-post-edit:focus-visible {
  background: rgba(123, 189, 255, 0.18) !important;
  color: #cce8ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.32) !important;
  outline: none !important;
  transform: translateY(-1px);
}

.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-toggle,
.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-direct {
  background: rgba(255, 73, 73, 0.12) !important;
  color: #ff5b5b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-toggle:hover,
.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-toggle:focus-visible,
.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-direct:hover,
.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-direct:focus-visible {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ff7272 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.28) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.page-shell[data-page="forum"] .forum-structure-delete-pair .profile-wall-delete-icon img {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-title-row,
  .page-shell[data-page="forum"] .forum-tree-subsection-head {
    flex-wrap: wrap;
  }

  .page-shell[data-page="forum"] .forum-tree-subsection-title {
    flex: 1 1 calc(100% - 78px);
  }
}


/* Forum closed subsection marker: players see it on the left before subsection title */
.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-closed-lock-badge {
  margin-left: 0 !important;
  margin-right: 8px !important;
  order: 0;
}

.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-closed-lock-badge + .forum-tree-subsection-title {
  order: 1;
  margin-right: auto !important;
}

.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-tree-subsection-title + .forum-tree-toggle-button {
  margin-left: auto !important;
}

.page-shell[data-page="forum"] .forum-tree-subsection-head .forum-tree-subsection-title + .forum-structure-actions {
  margin-left: auto !important;
}


/* Forum: create subsection directly from root section cards */
.page-shell[data-page="forum"] .forum-section-title-row .forum-section-create-subsection-button {
  margin-left: auto;
  white-space: nowrap;
  flex: 0 0 auto;
}

.page-shell[data-page="forum"] .forum-section-title-row .forum-section-create-subsection-button + .forum-structure-actions {
  margin-left: 2px !important;
}

.page-shell[data-page="forum"] .forum-section-create-subsection-form {
  margin: 14px 0 6px 48px;
  max-width: min(560px, calc(100% - 48px));
}

.page-shell[data-page="forum"] .forum-section-create-subsection-form .forum-form {
  margin: 0;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-section-title-row .forum-section-create-subsection-button {
    order: 3;
    margin-left: 0;
  }

  .page-shell[data-page="forum"] .forum-section-create-subsection-form {
    margin: 12px 0 4px;
    max-width: 100%;
  }
}


/* Forum: place create-subsection control above section action buttons */
.page-shell[data-page="forum"] .forum-section-admin-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.page-shell[data-page="forum"] .forum-section-admin-stack .forum-section-create-subsection-button {
  order: 0;
  margin-left: 0 !important;
  margin-right: 0;
  white-space: nowrap;
}

.page-shell[data-page="forum"] .forum-section-admin-stack .forum-structure-actions {
  order: 1;
  margin-left: 0 !important;
  justify-content: flex-end;
}

.page-shell[data-page="forum"] .forum-section-title-row .forum-section-admin-stack .forum-section-create-subsection-button + .forum-structure-actions {
  margin-left: 0 !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-section-admin-stack {
    width: 100%;
    align-items: flex-start;
    margin-left: 0;
    order: 3;
  }
}

/* Forum: informative compact subsection/topic layout */
.page-shell[data-page="forum"] .forum-tree-subsection-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

.page-shell[data-page="forum"] .forum-subsection-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.page-shell[data-page="forum"] .forum-subsection-title-group .forum-tree-subsection-title {
  margin-right: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-shell[data-page="forum"] .forum-subsection-stats {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(58px, auto));
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--muted);
}

.page-shell[data-page="forum"] .forum-subsection-stats > span {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(126, 199, 255, 0.08);
}

.page-shell[data-page="forum"] .forum-subsection-stats strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1;
}

.page-shell[data-page="forum"] .forum-subsection-stats small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.page-shell[data-page="forum"] .forum-tree-topics--pinned {
  margin-top: 6px;
}

.page-shell[data-page="forum"] .forum-tree-topic--pinned {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}

.page-shell[data-page="forum"] .forum-tree-topic-pin {
  color: #ffcf7a;
  font-size: 0.62rem;
  line-height: 1;
  filter: drop-shadow(0 0 5px rgba(255, 207, 122, 0.22));
}

.page-shell[data-page="forum"] .forum-topic-list {
  gap: 6px !important;
}

.page-shell[data-page="forum"] .forum-topic-row--compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(20, 34, 51, 0.88) 0%, rgba(12, 25, 42, 0.86) 100%),
    radial-gradient(circle at top right, rgba(87, 216, 255, 0.055), transparent 38%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025) !important;
}

.page-shell[data-page="forum"] .forum-topic-row--compact.is-pinned {
  border-color: rgba(255, 207, 122, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(28, 37, 50, 0.92) 0%, rgba(14, 27, 44, 0.88) 100%),
    radial-gradient(circle at top left, rgba(255, 207, 122, 0.09), transparent 35%) !important;
}

.page-shell[data-page="forum"] .forum-topic-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.page-shell[data-page="forum"] .forum-topic-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-link {
  display: inline-block !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text) !important;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-link:hover,
.page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-link:focus-visible {
  color: var(--accent-2) !important;
  outline: none;
}

.page-shell[data-page="forum"] .forum-topic-meta-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.page-shell[data-page="forum"] .forum-inline-author {
  text-decoration: none;
  color: inherit;
}

.page-shell[data-page="forum"] .forum-inline-author:hover .profile-role-name,
.page-shell[data-page="forum"] .forum-inline-author:focus-visible .profile-role-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-shell[data-page="forum"] .forum-topic-side {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.page-shell[data-page="forum"] .forum-topic-stat {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.028);
  border: 1px solid rgba(126, 199, 255, 0.08);
  color: var(--muted);
}

.page-shell[data-page="forum"] .forum-topic-stat strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1;
}

.page-shell[data-page="forum"] .forum-topic-stat small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.page-shell[data-page="forum"] .forum-topic-pin-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 207, 122, 0.24);
  background: rgba(255, 207, 122, 0.1);
  color: #ffcf7a;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.page-shell[data-page="forum"] .forum-topic-pin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

.page-shell[data-page="forum"] .forum-topic-pin-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.page-shell[data-page="forum"] .forum-topic-pin-button.is-pin {
  background: rgba(123, 189, 255, 0.12);
  color: #9fd2ff;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18);
}

.page-shell[data-page="forum"] .forum-topic-pin-button.is-unpin {
  background: rgba(255, 207, 122, 0.12);
  color: #ffcf7a;
  box-shadow: inset 0 0 0 1px rgba(255, 207, 122, 0.2);
}

.page-shell[data-page="forum"] .forum-topic-pin-button:hover,
.page-shell[data-page="forum"] .forum-topic-pin-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.page-shell[data-page="forum"] .forum-topic-pin-button.is-pin:hover,
.page-shell[data-page="forum"] .forum-topic-pin-button.is-pin:focus-visible {
  background: rgba(123, 189, 255, 0.18);
  color: #cce8ff;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.32);
}

.page-shell[data-page="forum"] .forum-topic-pin-button.is-unpin:hover,
.page-shell[data-page="forum"] .forum-topic-pin-button.is-unpin:focus-visible {
  background: rgba(255, 207, 122, 0.18);
  color: #ffe3a6;
  box-shadow: inset 0 0 0 1px rgba(255, 207, 122, 0.34);
}

.page-shell[data-page="forum"] .forum-topic-pin-button:disabled,
.page-shell[data-page="forum"] .forum-topic-pin-button.is-pending {
  cursor: wait;
  opacity: 0.58;
  transform: none !important;
}

.page-shell[data-page="forum"] .forum-topic-post-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.page-shell[data-page="forum"] .forum-topic-post-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-shell[data-page="forum"] .forum-topic-post-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(126, 199, 255, 0.1);
  background: rgba(255,255,255,0.028);
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-tree-subsection-head {
    flex-wrap: wrap !important;
  }

  .page-shell[data-page="forum"] .forum-subsection-title-group {
    flex: 1 1 100%;
  }

  .page-shell[data-page="forum"] .forum-subsection-stats {
    margin-left: 0;
  }

  .page-shell[data-page="forum"] .forum-topic-row--compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .page-shell[data-page="forum"] .forum-topic-side {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.page-shell[data-page="forum"] .forum-tree-topics--pinned:empty {
  display: none;
}

/* Forum polish: soft breadcrumbs, no back buttons, plain stats columns */
.page-shell[data-page="forum"] .forum-toolbar--breadcrumbs-only {
  justify-content: flex-start;
  padding-bottom: 2px;
}

.page-shell[data-page="forum"] .forum-toolbar--breadcrumbs-only .forum-breadcrumbs {
  width: 100%;
}

.page-shell[data-page="forum"] .forum-breadcrumbs,
.page-shell[data-page="forum"] .forum-breadcrumbs a,
.page-shell[data-page="forum"] .forum-breadcrumbs span {
  color: rgba(188, 199, 214, 0.84) !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}

.page-shell[data-page="forum"] .forum-breadcrumbs a {
  text-decoration: none;
}

.page-shell[data-page="forum"] .forum-breadcrumbs a:hover,
.page-shell[data-page="forum"] .forum-breadcrumbs a:focus-visible {
  color: rgba(232, 240, 250, 0.96) !important;
  outline: none;
}

.page-shell[data-page="forum"] .forum-breadcrumb-sep {
  color: rgba(188, 199, 214, 0.45) !important;
  font-weight: 400 !important;
}

.page-shell[data-page="forum"] .forum-toolbar-actions {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-subsection-stats {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 18px !important;
  min-width: 172px;
  margin-left: auto !important;
  color: var(--muted) !important;
  text-align: right;
}

.page-shell[data-page="forum"] .forum-subsection-stats > span {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.page-shell[data-page="forum"] .forum-subsection-stats strong {
  color: var(--text) !important;
  font-size: 0.9rem !important;
  line-height: 1 !important;
}

.page-shell[data-page="forum"] .forum-subsection-stats small {
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
}

.page-shell[data-page="forum"] .forum-topic-stat {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  min-width: 78px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
}

.page-shell[data-page="forum"] .forum-topic-stat strong {
  color: var(--text) !important;
  font-size: 0.92rem !important;
}

.page-shell[data-page="forum"] .forum-topic-stat small {
  color: var(--muted) !important;
  font-size: 0.78rem !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-subsection-stats {
    min-width: 0;
    margin-left: 0 !important;
    justify-content: flex-start !important;
  }

  .page-shell[data-page="forum"] .forum-topic-stat {
    justify-content: flex-start !important;
  }
}

/* Forum polish: current breadcrumb is the title, so duplicate large titles are hidden */
.page-shell[data-page="forum"] .forum-subsection-page .forum-section-view-head {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 8px;
}

.page-shell[data-page="forum"] .forum-subsection-page .forum-section-view-head > div:empty {
  display: none;
}

.page-shell[data-page="forum"] .forum-topic-post--main .forum-topic-post-stats {
  margin-top: 8px;
}

/* Forum topic controls and topic moderation polish */
.page-shell[data-page="forum"] .forum-subsection-controls {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.page-shell[data-page="forum"] .forum-subsection-controls--bottom {
  margin: 14px 0 0;
}

.page-shell[data-page="forum"] .forum-subsection-controls-create {
  flex: 0 0 auto;
  min-width: 0;
}

.page-shell[data-page="forum"] .forum-subsection-controls .forum-create-toggle {
  margin: 0 !important;
}

.page-shell[data-page="forum"] .forum-subsection-controls .forum-pagination,
.page-shell[data-page="forum"] .forum-subsection-controls .profile-wall-pagination {
  flex: 0 0 auto;
  margin: 0 !important;
  justify-content: flex-end;
}

.page-shell[data-page="forum"] .forum-page-link.profile-wall-pagination-button,
.page-shell[data-page="forum"] .forum-page-dots.profile-wall-pagination-ellipsis {
  min-width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
  padding: 0 10px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
}

.page-shell[data-page="forum"] .forum-page-dots.profile-wall-pagination-ellipsis {
  border: 0 !important;
  background: transparent !important;
  padding: 0 2px !important;
}

.page-shell[data-page="forum"] .forum-topic-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: 4px;
  flex: 0 0 auto;
}

.page-shell[data-page="forum"] .forum-topic-action-button,
.page-shell[data-page="forum"] .forum-topic-pin-button,
.page-shell[data-page="forum"] .forum-topic-delete-pair,
.page-shell[data-page="forum"] .forum-topic-delete-pair .profile-wall-delete-toggle,
.page-shell[data-page="forum"] .forum-topic-delete-pair .profile-wall-delete-direct {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  margin: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-action-button,
.page-shell[data-page="forum"] .forum-topic-pin-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

.page-shell[data-page="forum"] .forum-topic-action-button svg,
.page-shell[data-page="forum"] .forum-topic-pin-button svg {
  width: 15px !important;
  height: 15px !important;
  display: block !important;
  fill: currentColor !important;
  pointer-events: none !important;
}

.page-shell[data-page="forum"] .forum-topic-lock-button.is-lock {
  background: rgba(255, 73, 73, 0.12) !important;
  color: #ff5b5b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-topic-lock-button.is-lock:hover,
.page-shell[data-page="forum"] .forum-topic-lock-button.is-lock:focus-visible {
  background: rgba(255, 73, 73, 0.18) !important;
  color: #ff7272 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.28) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.page-shell[data-page="forum"] .forum-topic-lock-button.is-unlock {
  background: rgba(123, 189, 255, 0.12) !important;
  color: #9fd2ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18) !important;
}

.page-shell[data-page="forum"] .forum-topic-lock-button.is-unlock:hover,
.page-shell[data-page="forum"] .forum-topic-lock-button.is-unlock:focus-visible {
  background: rgba(123, 189, 255, 0.18) !important;
  color: #cce8ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.32) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.page-shell[data-page="forum"] .forum-topic-action-button:disabled,
.page-shell[data-page="forum"] .forum-topic-action-button.is-pending {
  cursor: wait;
  opacity: 0.58;
  transform: none !important;
}

.page-shell[data-page="forum"] .forum-topic-closed-badge {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff5b5b;
  background: rgba(255, 73, 73, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.18);
}

.page-shell[data-page="forum"] .forum-topic-closed-badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.page-shell[data-page="forum"] .forum-topic-row--compact.is-closed {
  border-color: rgba(255, 91, 91, 0.16) !important;
}

.page-shell[data-page="forum"] .forum-topic-title-line .forum-rename-form,
.page-shell[data-page="forum"] .forum-topic-title-edit-block .forum-rename-form {
  width: min(100%, 680px);
}

.page-shell[data-page="forum"] .forum-topic-title-edit-block {
  margin: 10px 0 12px;
}

.page-shell[data-page="forum"] .forum-topic-text-edit-form {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-subsection-controls {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .page-shell[data-page="forum"] .forum-subsection-controls .forum-pagination,
  .page-shell[data-page="forum"] .forum-subsection-controls .profile-wall-pagination {
    margin-left: auto !important;
  }

  .page-shell[data-page="forum"] .forum-topic-actions {
    margin-left: 0;
  }
}

/* Forum polish: pinned icon and profile-wall-like pagination */
.page-shell[data-page="forum"] .forum-topic-row--compact.is-pinned {
  border-color: rgba(91, 126, 166, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(20, 34, 51, 0.88) 0%, rgba(12, 25, 42, 0.86) 100%),
    radial-gradient(circle at top right, rgba(87, 216, 255, 0.055), transparent 38%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025) !important;
}

.page-shell[data-page="forum"] .forum-topic-pin-badge {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-topic-pin-marker {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  color: rgba(150, 184, 219, 0.88);
  opacity: 0.92;
  vertical-align: middle;
}

.page-shell[data-page="forum"] .forum-topic-pin-marker svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  filter: drop-shadow(0 0 4px rgba(126, 199, 255, 0.12));
}

.page-shell[data-page="forum"] .forum-tree-topic--pinned .forum-topic-pin-marker {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  color: rgba(150, 184, 219, 0.78);
}

.page-shell[data-page="forum"] .forum-tree-topic--pinned .forum-topic-pin-marker svg {
  width: 12px;
  height: 12px;
}

.page-shell[data-page="forum"] .forum-tree-topic-pin {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-subsection-controls {
  min-height: 30px;
  margin: 0 0 10px !important;
  gap: 12px !important;
}

.page-shell[data-page="forum"] .forum-subsection-controls--bottom {
  margin: 10px 0 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-list + .forum-subsection-controls,
.page-shell[data-page="forum"] .forum-subsection-controls + .forum-topic-list {
  margin-top: 0;
}

.page-shell[data-page="forum"] .forum-pagination.profile-wall-pagination {
  gap: 6px !important;
}

.page-shell[data-page="forum"] .forum-page-link.profile-wall-pagination-button,
.page-shell[data-page="forum"] .forum-page-nav.profile-wall-pagination-button,
.page-shell[data-page="forum"] .forum-page-dots.profile-wall-pagination-ellipsis {
  min-width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

.page-shell[data-page="forum"] .forum-page-link.profile-wall-pagination-button,
.page-shell[data-page="forum"] .forum-page-nav.profile-wall-pagination-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(93, 137, 192, 0.22) !important;
  background: rgba(8, 20, 36, 0.82) !important;
  color: var(--text) !important;
  cursor: pointer !important;
  padding: 0 10px !important;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, opacity 0.18s ease !important;
}

.page-shell[data-page="forum"] .forum-page-link.profile-wall-pagination-button:hover,
.page-shell[data-page="forum"] .forum-page-link.profile-wall-pagination-button:focus-visible,
.page-shell[data-page="forum"] .forum-page-nav.profile-wall-pagination-button:hover,
.page-shell[data-page="forum"] .forum-page-nav.profile-wall-pagination-button:focus-visible {
  outline: none !important;
  border-color: rgba(114, 173, 238, 0.42) !important;
  background: rgba(14, 30, 49, 0.92) !important;
  transform: translateY(-1px) !important;
}

.page-shell[data-page="forum"] .forum-page-link.profile-wall-pagination-button.is-active {
  background: rgba(72, 143, 210, 0.2) !important;
  border-color: rgba(114, 173, 238, 0.5) !important;
}

.page-shell[data-page="forum"] .forum-page-nav.is-disabled {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.45 !important;
  cursor: default !important;
  pointer-events: none !important;
  transform: none !important;
  border: 1px solid rgba(93, 137, 192, 0.22) !important;
  background: rgba(8, 20, 36, 0.82) !important;
  color: var(--text) !important;
  padding: 0 8px !important;
}

.page-shell[data-page="forum"] .forum-page-nav span {
  display: inline-block;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-subsection-controls {
    gap: 10px !important;
  }
}

/* Forum controls spacing: align create-topic/pagination gap with profile wall */
.page-shell[data-page="forum"] .forum-subsection-controls--top {
  margin-bottom: 0 !important;
}

.page-shell[data-page="forum"] .forum-subsection-controls--top + .forum-topic-list,
.page-shell[data-page="forum"] .forum-subsection-controls--top + .forum-form + .forum-topic-list {
  margin-top: 0 !important;
}

.page-shell[data-page="forum"] .forum-subsection-controls--bottom {
  margin-top: 14px !important;
}

/* Forum typography polish: stats and topic titles should not be bold */
.page-shell[data-page="forum"] .forum-subsection-stats strong,
.page-shell[data-page="forum"] .forum-topic-stat strong {
  font-weight: 400 !important;
}

.page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-link,
.page-shell[data-page="forum"] .forum-tree-topic,
.page-shell[data-page="forum"] .forum-tree-more {
  font-weight: 400 !important;
}

/* Forum topic list avatars */
.page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-main {
  grid-template-columns: 38px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 12px !important;
}

.page-shell[data-page="forum"] .forum-topic-main-text {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.page-shell[data-page="forum"] .forum-topic-list-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  align-self: center;
  border-radius: 10px;
  text-decoration: none;
  overflow: hidden;
  flex: 0 0 auto;
}

.page-shell[data-page="forum"] .forum-topic-list-avatar {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(126, 199, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 6px 14px rgba(2, 10, 20, 0.18);
}

.page-shell[data-page="forum"] .forum-topic-list-avatar-link:hover .forum-topic-list-avatar,
.page-shell[data-page="forum"] .forum-topic-list-avatar-link:focus-visible .forum-topic-list-avatar {
  border-color: rgba(143, 218, 255, 0.32);
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-main {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    column-gap: 10px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-list-avatar-link,
  .page-shell[data-page="forum"] .forum-topic-list-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
}


/* Forum topic avatar spacing polish */
.page-shell[data-page="forum"] .forum-topic-row--compact {
  padding-left: 5px !important;
  min-height: 66px !important;
}

.page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-main {
  grid-template-columns: 52px minmax(0, 1fr) !important;
  column-gap: 10px !important;
}

.page-shell[data-page="forum"] .forum-topic-list-avatar-link,
.page-shell[data-page="forum"] .forum-topic-list-avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-row--compact {
    padding-left: 5px !important;
    min-height: 58px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-row--compact .forum-topic-main {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    column-gap: 9px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-list-avatar-link,
  .page-shell[data-page="forum"] .forum-topic-list-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 11px !important;
  }
}


/* Forum stats compact vertical layout */
.page-shell[data-page="forum"] .forum-subsection-stats {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 3px !important;
  min-width: 92px !important;
  margin-left: auto !important;
  color: var(--muted) !important;
  text-align: right !important;
}

.page-shell[data-page="forum"] .forum-subsection-stats > span {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.page-shell[data-page="forum"] .forum-subsection-stats strong,
.page-shell[data-page="forum"] .forum-subsection-stats small,
.page-shell[data-page="forum"] .forum-topic-stat strong,
.page-shell[data-page="forum"] .forum-topic-stat small {
  font-size: 0.82rem !important;
  line-height: 1.15 !important;
  font-weight: 400 !important;
}

.page-shell[data-page="forum"] .forum-subsection-stats strong,
.page-shell[data-page="forum"] .forum-topic-stat strong {
  color: var(--text) !important;
}

.page-shell[data-page="forum"] .forum-subsection-stats small,
.page-shell[data-page="forum"] .forum-topic-stat small {
  color: var(--muted) !important;
}

.page-shell[data-page="forum"] .forum-topic-side {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex: 0 0 auto !important;
}

.page-shell[data-page="forum"] .forum-topic-stats-block {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 3px !important;
  min-width: 96px !important;
  color: var(--muted) !important;
  text-align: right !important;
}

.page-shell[data-page="forum"] .forum-topic-stat {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
}

.page-shell[data-page="forum"] .forum-comments-list:empty {
  display: none !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-subsection-stats,
  .page-shell[data-page="forum"] .forum-topic-stats-block {
    align-items: flex-start !important;
    text-align: left !important;
    min-width: 0 !important;
  }
}

/* Forum topic create form polish: normal text and header-like action buttons */
.page-shell[data-page="forum"] .forum-form input[type="text"],
.page-shell[data-page="forum"] .forum-form textarea {
  font-weight: 400 !important;
}

.page-shell[data-page="forum"] .forum-form input[type="text"]::placeholder,
.page-shell[data-page="forum"] .forum-form textarea::placeholder {
  font-weight: 400 !important;
}

.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-actions {
  justify-content: flex-end !important;
  gap: 18px !important;
}

.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 8px 0 7px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font: inherit;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button::after,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(126, 199, 255, 0.58);
  box-shadow: 0 1px 4px rgba(126, 199, 255, 0.1);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease, opacity 0.18s ease;
  opacity: 0.95;
}

.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button:focus-visible,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button:focus-visible {
  color: var(--text) !important;
  outline: none !important;
}

.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button:hover::after,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button:focus-visible::after,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button:hover::after,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button:focus-visible::after {
  transform: scaleX(1);
}

/* Forum topic form buttons: no underline */
.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button::after,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button::after {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-form-link-button:focus-visible,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-topic-create-form .forum-submit-button.forum-form-link-button:focus-visible {
  color: var(--text) !important;
  text-decoration: none !important;
}

/* Forum topic page: closer to profile feed/comment concept */
.page-shell[data-page="forum"] .forum-topic-page {
  display: grid;
  gap: 16px;
}

.page-shell[data-page="forum"] .forum-topic-post--feed {
  --forum-topic-avatar-size: 42px;
  --forum-topic-avatar-gap: 12px;
  padding: 18px !important;
  border-radius: 22px;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-topic-post-head {
  align-items: flex-start;
  margin-bottom: 0;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-topic-post-stats {
  margin: 4px 0 0 calc(var(--forum-topic-avatar-size) + var(--forum-topic-avatar-gap));
  padding: 0;
  gap: 10px;
  font-size: 0.9rem;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-topic-post-stats span {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.page-shell[data-page="forum"] .forum-topic-post-body {
  margin-top: 14px;
  margin-left: calc(var(--forum-topic-avatar-size) + var(--forum-topic-avatar-gap));
}

.page-shell[data-page="forum"] .forum-topic-post-body .forum-rich-text p,
.page-shell[data-page="forum"] .forum-topic-comment-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-shell[data-page="forum"] .forum-topic-post-body .forum-rich-text p + p,
.page-shell[data-page="forum"] .forum-topic-comment-body p + p {
  margin-top: 12px;
}

.page-shell[data-page="forum"] .forum-topic-comments {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.page-shell[data-page="forum"] .forum-topic-comments .forum-comments-list {
  display: grid;
  gap: 12px;
}

.page-shell[data-page="forum"] .forum-topic-comments .forum-comments-list:empty {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-topic-comment {
  display: grid;
  gap: 8px;
  margin-left: calc(var(--forum-topic-avatar-size) + var(--forum-topic-avatar-gap));
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-topic-comment-head {
  min-width: 0;
}

.page-shell[data-page="forum"] .forum-topic-comment .forum-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.page-shell[data-page="forum"] .forum-topic-comment .forum-author {
  gap: 10px;
}

.page-shell[data-page="forum"] .forum-topic-comment-body {
  margin-left: 46px;
}

.page-shell[data-page="forum"] .forum-comment-form--inline {
  margin-top: 4px;
  margin-left: calc(var(--forum-topic-avatar-size) + var(--forum-topic-avatar-gap));
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-comment-form--inline label {
  color: var(--muted);
  font-weight: 600;
}

.page-shell[data-page="forum"] .forum-comment-form--inline textarea {
  min-height: 78px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(6, 18, 34, 0.96), rgba(4, 14, 28, 0.96));
}

.page-shell[data-page="forum"] .forum-comment-form--inline > textarea {
  width: 100% !important;
  resize: vertical !important;
}

.page-shell[data-page="forum"] .forum-comment-form--inline .forum-form-actions {
  justify-content: flex-end;
}

.page-shell[data-page="forum"] .forum-comment-form--inline .forum-submit-button {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding-inline: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  text-align: right;
}

.page-shell[data-page="forum"] .forum-comment-form--inline .forum-submit-button:hover,
.page-shell[data-page="forum"] .forum-comment-form--inline .forum-submit-button:focus-visible {
  color: var(--text) !important;
  outline: none !important;
  text-decoration: none !important;
}

.page-shell[data-page="forum"] .forum-comments-block,
.page-shell[data-page="forum"] .forum-comments-head {
  display: none !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-topic-post--feed {
    --forum-topic-avatar-size: 38px;
    --forum-topic-avatar-gap: 10px;
    padding: 16px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post-body,
  .page-shell[data-page="forum"] .forum-topic-post--feed .forum-topic-post-stats,
  .page-shell[data-page="forum"] .forum-topic-comment,
  .page-shell[data-page="forum"] .forum-comment-form--inline {
    margin-left: 0;
  }

  .page-shell[data-page="forum"] .forum-topic-comment-body {
    margin-left: 46px;
  }
}

/* Forum topic posts: every reply is a separate feed-style card */
.page-shell[data-page="forum"] .forum-topic-page--post-list {
  display: grid !important;
  gap: 14px !important;
}

.page-shell[data-page="forum"] .forum-topic-replies-list {
  display: grid;
  gap: 14px;
}

.page-shell[data-page="forum"] .forum-topic-replies-list:empty {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-post {
  margin: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-post .forum-topic-post-head {
  margin-bottom: 0;
}

.page-shell[data-page="forum"] .forum-topic-reply-post-body {
  margin-top: 14px;
}

.page-shell[data-page="forum"] .forum-topic-comments,
.page-shell[data-page="forum"] .forum-topic-comments .forum-comments-list,
.page-shell[data-page="forum"] .forum-topic-comment,
.page-shell[data-page="forum"] .forum-topic-comment-head,
.page-shell[data-page="forum"] .forum-topic-comment-body {
  all: unset;
}

.page-shell[data-page="forum"] .forum-comment-form--inline {
  margin-top: 2px !important;
  margin-left: 0 !important;
  padding: 18px !important;
  border: 1px solid rgba(91, 126, 166, 0.28) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(20, 34, 51, 0.96) 0%, rgba(14, 27, 44, 0.94) 100%),
    radial-gradient(circle at top right, rgba(87, 216, 255, 0.08), transparent 42%) !important;
  box-shadow:
    0 16px 44px rgba(3, 12, 24, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-topic-page--post-list,
  .page-shell[data-page="forum"] .forum-topic-replies-list {
    gap: 12px !important;
  }

  .page-shell[data-page="forum"] .forum-comment-form--inline {
    padding: 16px !important;
  }
}

/* Forum message actions: top controls inside each topic message/reply head */
.page-shell[data-page="forum"] .forum-message-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  margin: 0 !important;
  min-height: 28px !important;
  position: static !important;
  float: none !important;
  transform: none !important;
  inset: auto !important;
}

.page-shell[data-page="forum"] .forum-topic-post-actions .forum-message-actions {
  margin: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-actions {
  margin-left: auto !important;
}

.page-shell[data-page="forum"] .forum-message-action-button,
.page-shell[data-page="forum"] .forum-comment-delete-pair,
.page-shell[data-page="forum"] .forum-comment-delete-pair .profile-wall-delete-toggle,
.page-shell[data-page="forum"] .forum-comment-delete-pair .profile-wall-delete-direct {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  margin: 0 !important;
}

.page-shell[data-page="forum"] .forum-message-action-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 9px !important;
  padding: 0 !important;
  cursor: pointer !important;
  background: rgba(123, 189, 255, 0.12) !important;
  color: #9fd2ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.18) !important;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease !important;
}

.page-shell[data-page="forum"] .forum-message-action-button svg {
  width: 15px !important;
  height: 15px !important;
  fill: currentColor !important;
  pointer-events: none !important;
}

.page-shell[data-page="forum"] .forum-message-action-button:hover,
.page-shell[data-page="forum"] .forum-message-action-button:focus-visible {
  background: rgba(123, 189, 255, 0.18) !important;
  color: #cce8ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 189, 255, 0.32) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

.page-shell[data-page="forum"] .forum-message-report-button {
  background: rgba(255, 92, 92, 0.12) !important;
  color: #ff7b7b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 92, 92, 0.22) !important;
}

.page-shell[data-page="forum"] .forum-message-report-button:hover,
.page-shell[data-page="forum"] .forum-message-report-button:focus-visible {
  background: rgba(255, 92, 92, 0.2) !important;
  color: #ffb0b0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 92, 92, 0.38) !important;
}

.page-shell[data-page="forum"] .forum-comment-delete-pair {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.page-shell[data-page="forum"] .forum-comment-delete-pair .profile-wall-delete-toggle,
.page-shell[data-page="forum"] .forum-comment-delete-pair .profile-wall-delete-direct {
  position: absolute !important;
  inset: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post.is-deleted {
  opacity: 0.75 !important;
}

.page-shell[data-page="forum"] .forum-topic-post.is-deleted .forum-rich-text {
  color: var(--muted) !important;
  font-style: italic !important;
}

.page-shell[data-page="forum"] .forum-comment-edited-meta {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 0.86rem !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-reply-quote {
  position: relative !important;
  margin: 12px 0 0 calc(var(--forum-topic-avatar-size, 42px) + var(--forum-topic-avatar-gap, 12px)) !important;
  padding: 10px 12px !important;
  border-left: 3px solid rgba(126, 199, 255, 0.38) !important;
  border-radius: 14px !important;
  background: rgba(126, 199, 255, 0.055) !important;
  color: var(--muted) !important;
}

.page-shell[data-page="forum"] .forum-reply-quote--form {
  margin: 0 0 12px 0 !important;
  padding-right: 38px !important;
}

.page-shell[data-page="forum"] .forum-reply-quote-head {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: var(--text-soft) !important;
}

.page-shell[data-page="forum"] .forum-reply-quote-text {
  margin-top: 5px !important;
  font-size: 0.93rem !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere !important;
}

.page-shell[data-page="forum"] .forum-reply-quote-cancel {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 24px !important;
  height: 24px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--muted) !important;
  cursor: pointer !important;
}

.page-shell[data-page="forum"] .forum-reply-quote-cancel:hover,
.page-shell[data-page="forum"] .forum-reply-quote-cancel:focus-visible {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
}

.page-shell[data-page="forum"] .forum-comment-edit-form {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-comment-edit-form textarea {
  min-height: 96px !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-reply-quote {
    margin-left: 0 !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post-actions {
    justify-content: flex-start !important;
  }
}

/* Forum topic quote/avatar/composer polish */
.page-shell[data-page="forum"] .forum-topic-post--feed {
  --forum-topic-avatar-size: 52px !important;
  --forum-topic-avatar-gap: 10px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-avatar-link,
.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
  flex: 0 0 52px !important;
}

.page-shell[data-page="forum"] .forum-reply-quote[data-forum-quote-target] {
  cursor: pointer !important;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
}

.page-shell[data-page="forum"] .forum-reply-quote[data-forum-quote-target]:hover,
.page-shell[data-page="forum"] .forum-reply-quote[data-forum-quote-target]:focus-visible {
  border-left-color: rgba(126, 199, 255, 0.68) !important;
  background: rgba(126, 199, 255, 0.085) !important;
  box-shadow: inset 0 0 0 1px rgba(126, 199, 255, 0.09) !important;
  outline: none !important;
}

.page-shell[data-page="forum"] .forum-topic-post.is-quote-highlight {
  animation: forumQuoteHighlight 1.55s ease-out 1;
}

@keyframes forumQuoteHighlight {
  0% {
    border-color: rgba(126, 199, 255, 0.78);
    box-shadow:
      0 0 0 2px rgba(126, 199, 255, 0.24),
      0 18px 52px rgba(3, 12, 24, 0.46),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  100% {
    border-color: rgba(91, 126, 166, 0.28);
    box-shadow:
      0 16px 44px rgba(3, 12, 24, 0.46),
      inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }
}

.page-shell[data-page="forum"] .forum-comment-form--inline {
  margin-top: 2px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-comment-form--inline textarea[data-forum-comment-textarea] {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 97px !important;
  height: 97px !important;
  max-height: 97px !important;
  padding: 10px !important;
  line-height: 19.25px !important;
  resize: none !important;
  overflow-y: auto !important;
  border-radius: 18px !important;
  border: 1px solid rgba(126, 199, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.045) !important;
  color: var(--text) !important;
  font: inherit !important;
}

.page-shell[data-page="forum"] .forum-comment-form--inline textarea[data-forum-comment-textarea]:focus {
  border-color: rgba(126, 199, 255, 0.32) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  outline: none !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-post--feed {
    --forum-topic-avatar-size: 44px !important;
    --forum-topic-avatar-gap: 9px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-avatar-link,
  .page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 11px !important;
    flex-basis: 44px !important;
  }
}

/* Forum topic footer stats + likes */
.page-shell[data-page="forum"] .forum-author-meta-line {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 9px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
  line-height: 1.25 !important;
}

.page-shell[data-page="forum"] .forum-author-date {
  color: var(--muted) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-text {
  display: block !important;
}

.page-shell[data-page="forum"] .forum-topic-post-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 16px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(126, 199, 255, 0.1) !important;
}

.page-shell[data-page="forum"] .forum-topic-post-like-slot {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 32px !important;
}

.page-shell[data-page="forum"] .forum-topic-like-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(126, 199, 255, 0.16) !important;
  border-radius: 999px !important;
  background: rgba(126, 199, 255, 0.08) !important;
  color: #b9ddff !important;
  font: inherit !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease !important;
}

.page-shell[data-page="forum"] .forum-topic-like-button svg {
  width: 15px !important;
  height: 15px !important;
  fill: currentColor !important;
}

.page-shell[data-page="forum"] .forum-topic-like-button:hover,
.page-shell[data-page="forum"] .forum-topic-like-button:focus-visible {
  transform: translateY(-1px) !important;
  background: rgba(126, 199, 255, 0.14) !important;
  color: #d7ecff !important;
  border-color: rgba(126, 199, 255, 0.28) !important;
  outline: none !important;
}

.page-shell[data-page="forum"] .forum-topic-like-button.is-liked {
  background: rgba(255, 92, 126, 0.12) !important;
  border-color: rgba(255, 92, 126, 0.28) !important;
  color: #ff8da5 !important;
}

.page-shell[data-page="forum"] .forum-topic-like-button.is-liked:hover,
.page-shell[data-page="forum"] .forum-topic-like-button.is-liked:focus-visible {
  background: rgba(255, 92, 126, 0.18) !important;
  border-color: rgba(255, 92, 126, 0.38) !important;
  color: #ffbdca !important;
}

.page-shell[data-page="forum"] .forum-topic-post-footer .forum-topic-post-stats {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 0.88rem !important;
}

.page-shell[data-page="forum"] .forum-topic-post-footer .forum-topic-post-stats span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.032) !important;
  border: 1px solid rgba(126, 199, 255, 0.08) !important;
}

.page-shell[data-page="forum"] .forum-topic-stats-block {
  flex-wrap: wrap !important;
}

@media (max-width: 640px) {
  .page-shell[data-page="forum"] .forum-topic-post-footer {
    align-items: stretch !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post-like-slot,
  .page-shell[data-page="forum"] .forum-topic-like-button,
  .page-shell[data-page="forum"] .forum-topic-post-footer .forum-topic-post-stats {
    width: 100% !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post-footer .forum-topic-post-stats {
    justify-content: flex-start !important;
  }
}

/* Forum topic header row: author/meta left, stats/actions/like right */
.page-shell[data-page="forum"] .forum-topic-post--feed .forum-topic-post-head {
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  margin-bottom: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-text,
.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-meta-line {
  min-width: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-meta-line {
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 9px !important;
}

.page-shell[data-page="forum"] .forum-topic-post-actions {
  margin-left: auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
}

.page-shell[data-page="forum"] .forum-topic-main-actions {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-topic-header-stats {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--muted) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-topic-header-stats span {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
}

.page-shell[data-page="forum"] .forum-topic-main-actions .forum-message-actions {
  flex: 0 0 auto !important;
}

.page-shell[data-page="forum"] .forum-topic-main-actions .forum-topic-like-button {
  order: 99 !important;
  flex: 0 0 auto !important;
}

.page-shell[data-page="forum"] .forum-topic-like-button {
  min-width: 44px !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 9px !important;
  gap: 5px !important;
  border-radius: 9px !important;
  line-height: 1 !important;
}

.page-shell[data-page="forum"] .forum-topic-like-button svg {
  width: 14px !important;
  height: 14px !important;
}

.page-shell[data-page="forum"] .forum-topic-like-count {
  min-width: 1ch !important;
  line-height: 1 !important;
}

.page-shell[data-page="forum"] .forum-topic-post-footer {
  display: none !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-post--feed .forum-topic-post-head {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post-actions,
  .page-shell[data-page="forum"] .forum-topic-main-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-meta-line {
    flex-wrap: wrap !important;
  }
}

/* Forum topic message micro-layout: avatar 5px from card edges, top-aligned meta/actions, like at bottom right */
.page-shell[data-page="forum"] .forum-topic-post--feed {
  padding: 5px 18px 18px 5px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-topic-post-head {
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: var(--forum-topic-avatar-size, 52px) !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author {
  align-items: flex-start !important;
  gap: var(--forum-topic-avatar-gap, 10px) !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-avatar-link,
.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-avatar {
  align-self: flex-start !important;
  display: block !important;
  margin: 0 !important;
  line-height: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-text {
  align-self: flex-start !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-meta-line {
  align-items: flex-start !important;
  line-height: 1.1 !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-name,
.page-shell[data-page="forum"] .forum-topic-post--feed .forum-author-date {
  line-height: 1.1 !important;
}

.page-shell[data-page="forum"] .forum-topic-post-actions,
.page-shell[data-page="forum"] .forum-topic-main-actions,
.page-shell[data-page="forum"] .forum-topic-reply-actions,
.page-shell[data-page="forum"] .forum-message-actions,
.page-shell[data-page="forum"] .forum-topic-header-stats {
  align-items: flex-start !important;
  align-self: flex-start !important;
  line-height: 1.1 !important;
}

.page-shell[data-page="forum"] .forum-topic-like-bottom-row {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin: 12px 0 0 calc(var(--forum-topic-avatar-size, 52px) + var(--forum-topic-avatar-gap, 10px)) !important;
  min-height: 26px !important;
}

.page-shell[data-page="forum"] .forum-topic-like-bottom-row:empty {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-topic-like-bottom-row .forum-topic-like-button {
  width: auto !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-post--feed {
    padding: 5px 14px 16px 5px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-like-bottom-row {
    margin-left: 0 !important;
  }

  .page-shell[data-page="forum"] .forum-topic-like-bottom-row .forum-topic-like-button {
    width: auto !important;
  }
}

/* Forum topic posts: classic forum layout from the reference, adapted to the site style */
.page-shell[data-page="forum"] .forum-topic-page--classic {
  gap: 12px !important;
}

.page-shell[data-page="forum"] .forum-topic-replies-list {
  display: grid !important;
  gap: 12px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic {
  --forum-topic-classic-left: 156px !important;
  display: grid !important;
  grid-template-columns: var(--forum-topic-classic-left) minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.page-shell[data-page="forum"] .forum-topic-author-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  min-width: 0 !important;
  min-height: 152px !important;
  padding: 14px 10px !important;
  text-align: center !important;
  border: 1px solid rgba(126, 199, 255, 0.13) !important;
  border-right: 0 !important;
  border-radius: 20px 0 0 20px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(126, 199, 255, 0.105), transparent 58%),
    linear-gradient(180deg, rgba(11, 28, 49, 0.74), rgba(7, 19, 34, 0.74)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-post .forum-topic-author-card {
  min-height: 126px !important;
}

.page-shell[data-page="forum"] .forum-topic-author-avatar-link,
.page-shell[data-page="forum"] .forum-topic-author-profile {
  color: inherit !important;
  text-decoration: none !important;
}

.page-shell[data-page="forum"] .forum-topic-author-avatar-link {
  display: block !important;
  line-height: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-author-avatar {
  display: block !important;
  width: 72px !important;
  height: 72px !important;
  border-radius: 18px !important;
  background-size: cover !important;
  background-position: center !important;
  border: 1px solid rgba(126, 199, 255, 0.2) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 22px rgba(0, 0, 0, 0.16) !important;
}

.page-shell[data-page="forum"] .forum-topic-author-info {
  display: grid !important;
  justify-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: 100% !important;
}

.page-shell[data-page="forum"] .forum-topic-author-name {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.page-shell[data-page="forum"] .forum-topic-author-role {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  max-width: 100% !important;
  min-height: 22px !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(126, 199, 255, 0.12) !important;
  background: rgba(126, 199, 255, 0.075) !important;
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-topic-message-panel {
  min-width: 0 !important;
  min-height: 152px !important;
  border: 1px solid rgba(126, 199, 255, 0.13) !important;
  border-radius: 0 20px 20px 0 !important;
  background:
    linear-gradient(180deg, rgba(11, 28, 49, 0.7), rgba(7, 19, 34, 0.7)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 14px 30px rgba(0, 0, 0, 0.13) !important;
  overflow: hidden !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-post .forum-topic-message-panel {
  min-height: 126px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border-bottom: 1px solid rgba(126, 199, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.025) !important;
}

.page-shell[data-page="forum"] .forum-topic-post-date-line {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  color: var(--muted) !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-topic-post-edited {
  color: rgba(184, 213, 241, 0.72) !important;
  font-weight: 700 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-actions,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-main-actions,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-reply-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-message-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-header-stats {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--muted) !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-header-stats span {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-body {
  margin: 0 !important;
  padding: 18px 24px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--main.forum-topic-post--classic .forum-topic-post-body {
  min-height: 104px !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-post.forum-topic-post--classic .forum-topic-post-body {
  min-height: 78px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-rich-text {
  line-height: 1.65 !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-reply-quote {
  margin: 12px 18px 0 18px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-like-bottom-row {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 12px 12px 18px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-like-bottom-row:empty {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-like-bottom-row .forum-topic-like-button {
  width: auto !important;
  min-width: 48px !important;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 0 0 auto !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-full-edit-form,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-title-edit-block,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-comment-edit-form {
  margin: 18px !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-post--classic {
    grid-template-columns: 1fr !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-card {
    min-height: 0 !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    text-align: left !important;
    border-right: 1px solid rgba(126, 199, 255, 0.13) !important;
    border-bottom: 0 !important;
    border-radius: 18px 18px 0 0 !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-info {
    justify-items: start !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 14px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-message-panel {
    min-height: 0 !important;
    border-radius: 0 0 18px 18px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-head {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-actions,
  .page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-main-actions,
  .page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-reply-actions,
  .page-shell[data-page="forum"] .forum-topic-post--classic .forum-message-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post-date-line {
    white-space: normal !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-body {
    padding: 15px 14px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-post--classic .forum-reply-quote {
    margin: 10px 12px 0 12px !important;
  }
}


/* Forum topic post cleanup: feed-like background, no in-topic stats/pinned markers */
.page-shell[data-page="forum"] .forum-topic-post--classic {
  grid-template-columns: var(--forum-topic-classic-left) minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
  background: var(--panel) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
  overflow: hidden !important;
}

.page-shell[data-page="forum"] .forum-topic-author-card {
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-topic-message-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-head {
  background: transparent !important;
  border-bottom: 1px solid var(--line) !important;
}

.page-shell[data-page="forum"] .forum-topic-pin-marker,
.page-shell[data-page="forum"] .forum-topic-header-stats {
  display: none !important;
}

.page-shell[data-page="forum"] .forum-topic-row--compact.is-pinned {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.page-shell[data-page="forum"] .forum-topic-author-info {
  gap: 4px !important;
}

.page-shell[data-page="forum"] .forum-topic-author-role {
  display: block !important;
  max-width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--plus,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--helper,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--moderator,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--administrator {
  color: inherit !important;
}

.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--plus {
  color: #e6c84f !important;
}

.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--helper {
  color: #48d17a !important;
}

.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--moderator,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--administrator {
  color: #ff5b66 !important;
}

.page-shell[data-page="forum"] .forum-topic-author-name {
  margin-top: 0 !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-post--classic {
    grid-template-columns: 1fr !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-card {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-info {
    align-content: center !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-role,
  .page-shell[data-page="forum"] .forum-topic-author-name {
    text-align: left !important;
  }
}

/* Forum topic author card final polish: avatar margins + neutral role text */
.page-shell[data-page="forum"] .forum-topic-post--classic {
  --forum-topic-classic-left: 156px !important;
  --forum-topic-author-avatar-offset: 14px !important;
  --forum-topic-author-avatar-size: calc(var(--forum-topic-classic-left) - (var(--forum-topic-author-avatar-offset) * 2)) !important;
}

.page-shell[data-page="forum"] .forum-topic-author-card {
  padding-top: var(--forum-topic-author-avatar-offset) !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.page-shell[data-page="forum"] .forum-topic-author-avatar {
  width: var(--forum-topic-author-avatar-size) !important;
  height: var(--forum-topic-author-avatar-size) !important;
  border-radius: 20px !important;
}

.page-shell[data-page="forum"] .forum-topic-author-role,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--plus,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--helper,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--moderator,
.page-shell[data-page="forum"] .forum-topic-author-role.profile-role-name--administrator {
  color: rgba(226, 237, 248, 0.82) !important;
  font-weight: 400 !important;
}

.page-shell[data-page="forum"] .forum-topic-author-name,
.page-shell[data-page="forum"] .forum-topic-author-name.profile-role-name,
.page-shell[data-page="forum"] .forum-topic-author-profile .forum-topic-author-name {
  font-weight: 400 !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-topic-post--classic {
    --forum-topic-author-avatar-size: 50px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-card {
    padding: 10px 12px !important;
  }

  .page-shell[data-page="forum"] .forum-topic-author-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 14px !important;
  }
}

/* Forum topic final spacing pass: input width, like bottom offset, reply pagination */
.page-shell[data-page="forum"] .forum-topic-page--classic {
  --forum-topic-classic-left: 156px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-like-bottom-row {
  align-items: flex-end !important;
  min-height: 0 !important;
  padding: 0 12px 9px 18px !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-like-bottom-row .forum-topic-like-button {
  margin: 0 0 0 auto !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-pagination {
  margin: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-pagination .forum-subsection-controls-spacer {
  display: block !important;
}

.page-shell[data-page="forum"] .forum-comment-form--inline {
  box-sizing: border-box !important;
  width: calc(100% - var(--forum-topic-classic-left)) !important;
  max-width: none !important;
  margin-top: 0 !important;
  margin-left: var(--forum-topic-classic-left) !important;
}

.page-shell[data-page="forum"] .forum-comment-form--inline textarea[data-forum-comment-textarea] {
  width: 100% !important;
}

@media (max-width: 760px) {
  .page-shell[data-page="forum"] .forum-comment-form--inline {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* Forum topic pagination/feed background/like bottom alignment pass */
.page-shell[data-page="forum"] .forum-topic-post--classic {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--panel) !important;
  box-shadow: var(--shadow) !important;
}

.page-shell[data-page="forum"] .forum-topic-author-card {
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-topic-message-panel {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-head {
  flex: 0 0 auto !important;
  background: transparent !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-body {
  flex: 1 1 auto !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-like-bottom-row {
  flex: 0 0 auto !important;
  margin-top: auto !important;
  padding: 0 12px 9px 18px !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-pagination.forum-subsection-controls--top {
  margin-bottom: 0 !important;
}

.page-shell[data-page="forum"] .forum-topic-reply-pagination.forum-subsection-controls--bottom {
  margin-top: 0 !important;
}

.page-shell[data-page="forum"] .forum-comment-form--inline + .forum-topic-reply-pagination {
  margin-top: 0 !important;
}

/* Forum topic exact profile-feed background color fix */
.page-shell[data-page="forum"] .forum-topic-page--classic {
  --forum-topic-feed-bg-exact: rgb(11, 23, 41) !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic,
.page-shell[data-page="forum"] .forum-topic-post--classic.forum-topic-post--feed,
.page-shell[data-page="forum"] .forum-topic-post--classic.forum-topic-post--main,
.page-shell[data-page="forum"] .forum-topic-reply-post.forum-topic-post--classic {
  background: var(--forum-topic-feed-bg-exact) !important;
  background-color: var(--forum-topic-feed-bg-exact) !important;
  background-image: none !important;
}

.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-author-card,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-message-panel,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-head,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-post-body,
.page-shell[data-page="forum"] .forum-topic-post--classic .forum-topic-like-bottom-row {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* v54 simple wall inputs + forum edit link buttons */
.profile-wall-post-composer {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.profile-wall-simple-composer {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-wall-simple-composer-post {
  width: calc(100% - (42px + 12px));
  max-width: calc(100% - (42px + 12px));
  margin-left: calc(42px + 12px);
}

.profile-wall-comments-panel .profile-wall-comment-editor-inline.profile-wall-simple-composer-comment {
  width: calc(100% - (var(--wall-avatar-size) + var(--wall-avatar-gap)));
  max-width: calc(100% - (var(--wall-avatar-size) + var(--wall-avatar-gap)));
  margin-left: calc(var(--wall-avatar-size) + var(--wall-avatar-gap));
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-wall-simple-input {
  display: block;
  width: 100%;
  min-height: 44px;
  height: 44px;
  max-height: 180px;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(7, 18, 33, 0.76);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 20px;
  resize: none;
  overflow-y: hidden;
  outline: none;
  box-shadow: none;
}

.profile-wall-simple-input::placeholder {
  color: rgba(190, 203, 222, 0.58);
  font-weight: 400;
}

.profile-wall-simple-input:focus {
  border-color: rgba(126, 199, 255, 0.22);
  background: rgba(7, 18, 33, 0.86);
  box-shadow: none;
}

@media (max-width: 640px) {
  .profile-wall-simple-composer-post,
  .profile-wall-comments-panel .profile-wall-comment-editor-inline.profile-wall-simple-composer-comment {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

.page-shell[data-page="forum"] .forum-comment-edit-form .forum-form-actions,
.page-shell[data-page="forum"] .forum-topic-text-edit-form .forum-form-actions,
.page-shell[data-page="forum"] .forum-topic-full-edit-form .forum-form-actions,
.page-shell[data-page="forum"] .forum-rename-form .forum-rename-actions {
  justify-content: flex-end !important;
  gap: 18px !important;
  width: 100%;
}

.page-shell[data-page="forum"] .forum-comment-edit-form .forum-form-link-button,
.page-shell[data-page="forum"] .forum-topic-text-edit-form .forum-form-link-button,
.page-shell[data-page="forum"] .forum-topic-full-edit-form .forum-form-link-button,
.page-shell[data-page="forum"] .forum-rename-form .forum-form-link-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 8px 0 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font: inherit;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.page-shell[data-page="forum"] .forum-comment-edit-form .forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-comment-edit-form .forum-form-link-button:focus-visible,
.page-shell[data-page="forum"] .forum-topic-text-edit-form .forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-topic-text-edit-form .forum-form-link-button:focus-visible,
.page-shell[data-page="forum"] .forum-topic-full-edit-form .forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-topic-full-edit-form .forum-form-link-button:focus-visible,
.page-shell[data-page="forum"] .forum-rename-form .forum-form-link-button:hover,
.page-shell[data-page="forum"] .forum-rename-form .forum-form-link-button:focus-visible {
  color: var(--text) !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}

.page-shell[data-page="forum"] .forum-rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
}

.page-shell[data-page="forum"] .forum-rename-form input[name="title"] {
  width: 100%;
}

/* v55 profile wall composer: topic-like post form + plain edit buttons */
.profile-wall-post-composer {
  padding: 18px !important;
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
  background: var(--panel) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
  overflow: visible !important;
}

.profile-wall-new-post-form,
.profile-wall-edit-editor {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.profile-wall-new-post-form label,
.profile-wall-edit-editor label {
  display: grid !important;
  gap: 8px !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.profile-wall-new-post-form .profile-wall-simple-input,
.profile-wall-edit-editor .profile-wall-simple-input {
  width: 100% !important;
  min-height: 128px !important;
  height: auto;
  max-height: none;
  box-sizing: border-box !important;
  padding: 13px 14px !important;
  border: 1px solid rgba(126, 199, 255, 0.14) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,0.04) !important;
  color: var(--text) !important;
  font: inherit !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  resize: vertical !important;
  overflow-y: auto !important;
  outline: none !important;
  box-shadow: none !important;
}

.profile-wall-edit-editor-comment .profile-wall-simple-input-edit {
  min-height: 96px !important;
}

.profile-wall-new-post-form .profile-wall-simple-input::placeholder,
.profile-wall-edit-editor .profile-wall-simple-input::placeholder {
  color: rgba(196, 210, 231, 0.46) !important;
  font-weight: 400 !important;
}

.profile-wall-new-post-form .profile-wall-simple-input:focus,
.profile-wall-edit-editor .profile-wall-simple-input:focus {
  border-color: rgba(126, 199, 255, 0.36) !important;
  background: rgba(255,255,255,0.04) !important;
  box-shadow: 0 0 0 3px rgba(126, 199, 255, 0.08) !important;
}

.profile-wall-form-actions,
.profile-wall-edit-actions,
.profile-wall-new-post-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 18px !important;
  width: 100% !important;
  margin-top: 0 !important;
  flex-wrap: wrap !important;
}

.profile-wall-form-link-button {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 8px 0 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font: inherit !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: color 0.18s ease, opacity 0.18s ease !important;
}

.profile-wall-form-link-button:hover,
.profile-wall-form-link-button:focus-visible {
  color: var(--text) !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}

/* ===== Help page: knowledge-base style ===== */
.page-shell[data-page="help"] .help-page-section {
  padding-top: 28px !important;
}

.page-shell[data-page="help"] .help-layout {
  align-items: start;
  margin-top: 0 !important;
}

.page-shell[data-page="help"] .help-sidebar,
.page-shell[data-page="help"] .help-content {
  margin-top: 0 !important;
}

.page-shell[data-page="help"] .help-content {
  min-height: 520px;
}

.page-shell[data-page="help"] .help-sidebar-list .help-anchor-link {
  text-decoration: none;
}

.page-shell[data-page="help"] .help-sidebar-list .help-anchor-link::after {
  content: "›";
  color: rgba(142, 243, 255, 0.78);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.page-shell[data-page="help"] .help-article-card {
  color: #f6f8ff;
}

.page-shell[data-page="help"] .help-download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.page-shell[data-page="help"] .help-download-card,
.page-shell[data-page="help"] .help-info-card,
.page-shell[data-page="help"] .help-launcher-card {
  border-radius: 22px;
  border: 1px solid rgba(90, 177, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(21, 38, 60, 0.9), rgba(13, 28, 48, 0.86)),
    radial-gradient(circle at top right, rgba(108, 227, 255, 0.08), transparent 44%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-shell[data-page="help"] .help-download-card {
  min-height: 244px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 20px 20px;
}

.page-shell[data-page="help"] .help-download-card.is-recommended {
  border-color: rgba(255, 215, 99, 0.34);
}

.page-shell[data-page="help"] .help-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(74, 68, 34, 0.78);
  color: #ffd763;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.page-shell[data-page="help"] .help-pill-muted {
  background: rgba(45, 95, 123, 0.72);
  color: #8ff6ff;
}

.page-shell[data-page="help"] .help-download-card h2 {
  margin: 14px 0 10px;
  font-size: 24px;
  line-height: 1.1;
}

.page-shell[data-page="help"] .help-download-card p,
.page-shell[data-page="help"] .help-info-card p,
.page-shell[data-page="help"] .help-article-section p,
.page-shell[data-page="help"] .help-launcher-card figcaption {
  color: rgba(220, 229, 244, 0.84);
  line-height: 1.7;
}

.page-shell[data-page="help"] .help-download-card p {
  margin: 0 0 18px;
}

.page-shell[data-page="help"] .help-download-button {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 99, 0.36);
  background: rgba(55, 48, 24, 0.5);
  color: #ffd763;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.page-shell[data-page="help"] .help-download-button:hover,
.page-shell[data-page="help"] .help-download-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 223, 129, 0.58);
  background: rgba(70, 59, 28, 0.68);
  color: #ffe59b;
}

.page-shell[data-page="help"] .help-download-button-secondary {
  border-color: rgba(142, 243, 255, 0.3);
  background: rgba(34, 72, 95, 0.42);
  color: #8ef3ff;
}

.page-shell[data-page="help"] .help-download-button-secondary:hover,
.page-shell[data-page="help"] .help-download-button-secondary:focus-visible {
  border-color: rgba(142, 243, 255, 0.54);
  background: rgba(39, 83, 108, 0.6);
  color: #b9fbff;
}

.page-shell[data-page="help"] .help-article-section {
  scroll-margin-top: 110px;
}

.page-shell[data-page="help"] .help-step-row {
  background: transparent !important;
  border: 1px solid rgba(90, 177, 255, 0.24) !important;
}

.page-shell[data-page="help"] .help-launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.page-shell[data-page="help"] .help-launcher-card {
  margin: 0;
  padding: 14px;
}

.page-shell[data-page="help"] .help-launcher-image-wrap {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(90, 177, 255, 0.18);
  background: rgba(3, 13, 24, 0.42);
  overflow: hidden;
}

.page-shell[data-page="help"] .help-launcher-image-wrap--small {
  min-height: 128px;
}

.page-shell[data-page="help"] .help-launcher-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.page-shell[data-page="help"] .help-launcher-image-wrap--small img {
  max-width: 360px;
}

.page-shell[data-page="help"] .help-launcher-card figcaption {
  margin: 12px 2px 0;
  font-size: 14px;
}

.page-shell[data-page="help"] .help-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.page-shell[data-page="help"] .help-info-card {
  padding: 18px 20px;
}

.page-shell[data-page="help"] .help-info-card h4 {
  margin: 0 0 8px;
  color: #8ef3ff;
  font-size: 18px;
}

.page-shell[data-page="help"] .help-info-card p {
  margin: 0;
}

.page-shell[data-page="help"] .help-inline-link {
  color: #8ef3ff;
  font-weight: 900;
  text-decoration: none;
}

.page-shell[data-page="help"] .help-inline-link:hover,
.page-shell[data-page="help"] .help-inline-link:focus-visible {
  color: #b9fbff;
  text-decoration: underline;
}

.page-shell[data-page="help"] code {
  color: #8ef3ff;
  font-weight: 900;
}

@media (max-width: 760px) {
  .page-shell[data-page="help"] .help-download-grid,
  .page-shell[data-page="help"] .help-info-grid,
  .page-shell[data-page="help"] .help-launcher-grid {
    grid-template-columns: 1fr;
  }

  .page-shell[data-page="help"] .help-download-card {
    min-height: 0;
  }

  .page-shell[data-page="help"] .help-launcher-image-wrap {
    min-height: 92px;
  }
}

/* ===== Help page: align left column with knowledge base sidebar ===== */
@media (min-width: 901px) {
  .page-shell[data-page="help"] .help-layout {
    align-items: start !important;
  }

  .page-shell[data-page="help"] .help-sidebar {
    position: sticky !important;
    top: 92px !important;
    align-self: start !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    transform: none !important;
  }
}


/* ===== Help page final KB top alignment override ===== */
.page-shell[data-page="help"] .help-page-section {
  padding-top: 28px !important;
}

.page-shell[data-page="help"] .help-layout {
  align-items: start !important;
  margin-top: 0 !important;
}

.page-shell[data-page="help"] .help-sidebar,
.page-shell[data-page="help"] .help-content {
  margin-top: 0 !important;
}

@media (min-width: 901px) {
  .page-shell[data-page="help"] .help-sidebar {
    position: sticky !important;
    top: 92px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* ===== Help page: exact knowledge-base top alignment ===== */
.page-shell[data-page="help"] .help-page-section {
  padding-top: 0 !important;
}

.page-shell[data-page="help"] .help-layout {
  margin-top: 0 !important;
  align-items: start !important;
}

.page-shell[data-page="help"] .help-sidebar,
.page-shell[data-page="help"] .help-content {
  margin-top: 0 !important;
  transform: none !important;
}

/* ===== Help page: sticky sidebar without top gap, like knowledge base scroll behavior ===== */
@media (min-width: 901px) {
  .page-shell[data-page="help"] .help-sidebar {
    position: sticky !important;
    top: 0 !important;
  }
}


/* ===== Header continuity fix v4 =====
   The header is now real inline HTML in every page, not a second document in
   an iframe. It is interactive immediately, including the profile caret.
   Cross-document navigation preserves the old header snapshot until the new
   page is ready, then swaps it without a fade or dimming frame. */
@view-transition {
  navigation: auto;
}

#site-header {
  view-transition-name: improve-site-header;
}

::view-transition-old(root),
::view-transition-new(root),
::view-transition-old(improve-site-header),
::view-transition-new(improve-site-header),
::view-transition-group(improve-site-header) {
  animation: none !important;
  animation-duration: 0s !important;
  mix-blend-mode: normal;
}

::view-transition-old(improve-site-header),
::view-transition-new(improve-site-header) {
  opacity: 1 !important;
}

#site-header.site-header-transition-host {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-frame-height);
  min-height: var(--header-frame-height);
  isolation: isolate;
  overflow: visible;
  background: rgba(6, 16, 28, 0.72);
}

.site-header-transition-host .site-header-fallback {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1 !important;
  pointer-events: auto;
  transition: none !important;
}

/* Old v1-v3 iframe, if it remains in browser cache during one deployment,
   is forcibly hidden. New pages no longer create it. */
.site-header-transition-host .site-frame-header {
  display: none !important;
}

.site-header-transition-host .site-header-fallback .site-header {
  position: relative;
  top: auto;
  min-height: var(--header-frame-height);
}

.site-header-transition-host .fallback-auth-widget {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
}

