* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f5f7;
    color: #1f2933;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #111827;
    color: #1f2937;
    padding: 28px 24px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.sidebar h2 {
    margin: 0 0 28px;
    font-size: 24px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    color: #d1d5db;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,.10);
    color: #ffffff;
}

.sidebar hr {
    border: none;
    border-top: 1px solid #374151;
    margin: 16px 0;
}

.content {
    flex: 1;
    padding: 48px 56px;
}

.content h1 {
    margin-top: 0;
    font-size: 42px;
}

.lead {
    font-size: 20px;
    color: #4b5563;
    max-width: 720px;
}

.placeholder {
    margin-top: 36px;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    font-size: 18px;
    color: #4b5563;
}

/* ===== Личный кабинет ===== */

.profile-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 48px;
}

.profile-header {
    margin-bottom: 28px;
}

.profile-eyebrow {
    margin: 0 0 10px;
    color: #667085;
    font-size: 14px;
    font-weight: 600;
}

.profile-header h1 {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 1.1;
}

.profile-header p {
    margin: 0;
    color: #475467;
    font-size: 17px;
}

.profile-success {
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid #86d3a0;
    border-radius: 12px;
    background: #eaf8ef;
    color: #176b38;
    font-weight: 700;
}

.profile-success::before {
    content: "✓ ";
}

.profile-card {
    margin-bottom: 22px;
    padding: 26px;
    border: 1px solid #d9dee7;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

.profile-card h2 {
    margin: 0 0 22px;
    font-size: 24px;
}

.profile-card label {
    display: block;
    margin-bottom: 18px;
    color: #344054;
    font-weight: 600;
}

.profile-card input[type="text"],
.profile-card input[type="email"],
.profile-card select,
.profile-card textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 11px 13px;
    border: 1px solid #cfd5df;
    border-radius: 9px;
    background: #ffffff;
    color: #182230;
    font: inherit;
}

.profile-card input:focus,
.profile-card select:focus,
.profile-card textarea:focus {
    border-color: #3267d6;
    outline: 3px solid rgba(50, 103, 214, 0.14);
}

.profile-card input:disabled {
    background: #f2f4f7;
    color: #667085;
}

.profile-card textarea {
    min-height: 130px;
    resize: vertical;
}

.profile-card label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.profile-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.profile-card button,
.profile-navigation button {
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: #1f5fd2;
    color: #1f2937;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.profile-card button:hover,
.profile-navigation button:hover {
    background: #174cad;
}

.profile-details {
    margin: 0;
}

.profile-details div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eaecf0;
}

.profile-details div:last-child {
    border-bottom: 0;
}

.profile-details dt {
    color: #667085;
    font-weight: 600;
}

.profile-details dd {
    margin: 0;
    color: #182230;
}

.profile-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 26px;
}

.profile-navigation form {
    margin: 0;
}

.profile-navigation button {
    background: #b42318;
}

.profile-navigation button:hover {
    background: #912018;
}

@media (max-width: 720px) {
    .profile-page {
        max-width: none;
    }

    .profile-header h1 {
        font-size: 34px;
    }

    .profile-card {
        padding: 20px;
    }

    .profile-details div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .profile-navigation {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-navigation button {
        width: 100%;
    }
}

.profile-navigation a {
    color: #1f5fd2;
    font-weight: 700;
    text-decoration: none;
}

.profile-navigation a:visited {
    color: #1f5fd2;
}

.profile-navigation a:hover {
    text-decoration: underline;
}

.profile-success {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ===== Discussion topic ===== */

.room-page {
    max-width: 980px;
}

.room-header {
    margin-bottom: 28px;
}

.room-card {
    background: #ffffff;
    border: 1px solid #dfe5ee;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(28, 39, 55, 0.06);
}

.message-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.message-item {
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    padding: 18px 20px;
    background: #f8fafc;
}

.message-item header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    color: #5f6b7a;
    font-size: 14px;
}

.message-item strong {
    color: #1f2937;
    font-size: 16px;
}

.message-item p {
    margin: 0;
    line-height: 1.65;
    white-space: pre-wrap;
}

.room-card form {
    display: grid;
    gap: 16px;
}

.room-card label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.room-card textarea,
.room-card input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    padding: 14px 16px;
    font: inherit;
    background: #ffffff;
}

.room-card textarea:focus,
.room-card input[type="text"]:focus {
    outline: none;
    border-color: #2b6de5;
    box-shadow: 0 0 0 3px rgba(43, 109, 229, 0.12);
}

.room-card button,
.room-action {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    background: #2463d4;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.room-card button:hover,
.room-action:hover {
    background: #174fae;
    color: #ffffff;
}

.room-navigation {
    margin-top: 22px;
}


/* ===== Topic cards in room list ===== */

.topic-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.topic-card {
    padding: 18px 20px;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    background: #f8fafc;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.topic-card:hover {
    transform: translateY(-2px);
    border-color: #b9c9df;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
}

.topic-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.topic-card h3 a {
    color: #1f2937;
    text-decoration: none;
}

.topic-card h3 a:hover {
    color: #2463d4;
}

.topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #657186;
    font-size: 14px;
}

.topic-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


.topic-preview {
    margin: 0 0 12px;
    color: #4f5d70;
    line-height: 1.55;
    font-size: 15px;
}


.recent-activity {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-activity h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.activity-item:hover {
  transform: translateY(-2px);
  background: #eef4fb;
  border-color: #c7d7ee;
}

.activity-icon {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1.2;
}

.activity-content {
  min-width: 0;
}

.activity-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #4b5563;
  font-size: 14px;
}

.activity-line strong {
  color: #1f2937;
}

.activity-title {
  margin-top: 5px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 700;
}

.activity-preview {
  margin-top: 6px;
  color: #6b7280;
  line-height: 1.5;
}

.activity-time {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
  font-size: 13px;
}

.activity-empty {
  color: #8f97a3;
}


/* ===== Hall — unified dark design ===== */

.hall-page {
    padding-bottom: 56px !important;
}

.hall-header {
    margin-bottom: 26px !important;
}

.hall-header h1 span {
    font-size: 0.52em;
    font-weight: 500;
    font-style: italic;
    color: rgba(226, 232, 240, 0.7);
}

.hall-header > p:last-child span {
    color: rgba(226, 232, 240, 0.68);
    font-style: italic;
}

.hall-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.hall-grid .hall-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 320px;
    margin: 0 !important;
    padding: 24px !important;
    overflow: hidden;

    color: #f8fafc !important;
    text-decoration: none !important;

    background: linear-gradient(
        180deg,
        rgba(30, 41, 59, 0.98),
        rgba(24, 34, 49, 0.98)
    ) !important;

    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28) !important;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.hall-grid .hall-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.72) !important;
    box-shadow: 0 22px 56px rgba(2, 6, 23, 0.38) !important;
}

.hall-card-icon {
    display: block;
    margin-bottom: 14px;
    font-size: 28px;
    line-height: 1;
}

.hall-grid .hall-card h2 {
    margin: 0 0 10px;
    color: #f8fafc !important;
    font-size: 22px;
    line-height: 1.25;
}

.hall-grid .hall-card h2 span {
    display: block;
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.66);
    font-size: 0.68em;
    font-weight: 500;
    font-style: italic;
}

.hall-card-description {
    margin: 0 !important;
    color: rgba(226, 232, 240, 0.76) !important;
    line-height: 1.55;
}

.hall-card-description span {
    color: rgba(226, 232, 240, 0.62);
    font-style: italic;
}

.hall-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 18px 0 16px;
    padding: 13px 0;

    color: rgba(226, 232, 240, 0.72);
    font-size: 13px;
    line-height: 1.45;

    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hall-card-stats em {
    color: rgba(226, 232, 240, 0.56);
    font-style: italic;
}

.hall-card-latest {
    display: grid;
    gap: 5px;
    margin-bottom: 18px;
    padding: 14px;

    color: rgba(226, 232, 240, 0.68);
    font-size: 13px;
    line-height: 1.45;

    background: rgba(8, 18, 32, 0.58);
    border: 1px solid rgba(100, 116, 139, 0.32);
    border-radius: 12px;
}

.hall-card-latest-label {
    color: rgba(148, 163, 184, 0.92);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hall-card-latest strong {
    color: #f8fafc;
    font-size: 15px;
}

.hall-card-latest-empty {
    color: rgba(226, 232, 240, 0.58);
}

.hall-card-link {
    display: block;
    margin-top: auto;

    color: #60a5fa;
    font-weight: 700;
}

.hall-grid .hall-card:hover .hall-card-link {
    text-decoration: underline;
}

.hall-card-members {
    grid-column: 1 / -1;
    min-height: 250px !important;
}

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

    .hall-card-members {
        grid-column: auto;
    }

    .hall-grid .hall-card {
        min-height: 0;
    }
}


.hall-intro {
  margin: 0 0 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(20, 29, 45, 0.96), rgba(12, 18, 30, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.hall-intro-greeting {
  margin: 0 0 14px;
  color: rgba(248, 250, 252, 0.96);
  font-size: 22px;
  line-height: 1.3;
}

.hall-intro-greeting > span,
.hall-intro-text > span {
  display: block;
  margin-top: 5px;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.78em;
  font-weight: 400;
}

.hall-intro-text {
  max-width: 920px;
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  font-size: 16px;
  line-height: 1.7;
}

.hall-first-word {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 28px;
  padding: 26px 28px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.hall-first-word-copy h2 {
  margin: 0 0 10px;
  color: rgba(248, 250, 252, 0.98);
  font-size: 23px;
  line-height: 1.25;
}

.hall-first-word-copy h2 span,
.hall-first-word-copy p span,
.hall-first-word-copy small span,
.hall-first-word-link span {
  display: block;
  margin-top: 4px;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.72em;
  font-weight: 400;
}

.hall-first-word-copy p {
  margin: 0 0 8px;
  color: rgba(226, 232, 240, 0.96);
  font-size: 19px;
  line-height: 1.45;
}

.hall-first-word-copy small {
  color: rgba(203, 213, 225, 0.78);
  font-size: 14px;
  line-height: 1.5;
}

.hall-first-word-link {
  flex: 0 0 auto;
  min-width: 170px;
  padding: 13px 20px;
  color: rgba(248, 250, 252, 0.98);
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95));
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hall-first-word-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

 (max-width: 720px) {
  .hall-intro,
  .hall-first-word {
    padding: 20px;
    border-radius: 15px;
  }

  .hall-first-word {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  .hall-first-word-link {
    width: 100%;
  }
}

.topic-unread{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin:0 0 12px;
    padding:4px 10px;
    background:#f4e3b2;
    color:#6d4b18;
    border:1px solid #d6b56d;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    letter-spacing:.02em;
}


/* ===== Ветки обсуждений ===== */

.message-thread {
    margin-top: 10px;
    padding-left: 18px;
    border-left: 2px solid #8ea7d6;
}

.message-thread > summary {
    cursor: pointer;
    font-weight: 700;
    color: #2f5fa8;
    list-style: none;
    margin: 6px 0 10px;
}

.message-thread > summary::-webkit-details-marker {
    display: none;
}

.message-thread > summary::before {
    content: "▶";
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.15s ease;
}

.message-thread[open] > summary::before {
    transform: rotate(90deg);
}

.thread-replies {
    position: relative;
    padding-left: 18px;
}

.thread-replies > .message-item {
    position: relative;
    margin-top: 10px;
    background: #f8faff;
}

.thread-replies > .message-item::before {
    content: "";
    position: absolute;
    top: 22px;
    left: -20px;
    width: 18px;
    border-top: 2px solid #8ea7d6;
}

.thread-reply {
    border-left: 2px solid #b8c8e6;
}

.reply-to-label {
    margin: 6px 0;
    color: #52647f;
    font-size: 14px;
}

.message-item:target {
    outline: 3px solid rgba(47, 95, 168, 0.25);
    background: #f2f6ff;
}


.message-thread > summary {
    outline: none;
    border: none;
    box-shadow: none;
    width: fit-content;
    padding: 2px 4px;
    border-radius: 6px;
}

.message-thread > summary:focus,
.message-thread > summary:focus-visible {
    outline: none;
    box-shadow: none;
}

.message-thread > summary:hover {
    background: rgba(47, 95, 168, 0.08);
}


/* ===== Полировка дерева обсуждений ===== */

.room-card > .message-item {
    margin-top: 18px;
}

.message-thread {
    margin-top: 12px;
    padding-left: 28px;
}

.thread-replies {
    padding-left: 24px;
}

.thread-replies > .message-item {
    margin-top: 12px;
}

.thread-replies > .message-item::before {
    left: -26px;
    width: 22px;
}

.thread-replies > .message-item {
    background: #fbfcff;
}

.thread-replies .thread-replies > .message-item {
    background: #f8faff;
}

.thread-replies .thread-replies .thread-replies > .message-item {
    background: #f5f8fd;
}

.message-thread > summary {
    margin: 8px 0 12px;
    padding: 4px 8px;
    font-size: 14px;
}

.message-actions {
    margin-top: 10px;
    gap: 8px;
}

.reply-to-label {
    margin: 8px 0 10px;
}


/* ===== Компактное дерево обсуждений ===== */

.message-thread {
    padding-left: 14px;
}

.thread-replies {
    padding-left: 14px;
}

.thread-replies > .message-item::before {
    left: -16px;
    width: 14px;
}

.thread-replies > .message-item {
    border: 1px solid #dfe6f3;
}

.thread-replies .thread-replies,
.thread-replies .thread-replies .thread-replies {
    padding-left: 12px;
}

.thread-replies .thread-replies > .message-item::before,
.thread-replies .thread-replies .thread-replies > .message-item::before {
    left: -14px;
    width: 12px;
}

.reply-to-label {
    font-weight: 600;
    color: #465d7f;
}

.message-thread > summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3f6fb;
    border: 1px solid #d7e0ef;
}

.message-thread > summary:hover {
    background: #eaf0f9;
}


/* ===== Чистая геометрия дерева обсуждений ===== */

/* Убираем прежние длинные линии вокруг details и карточек */
.message-thread {
    border-left: 0;
    padding-left: 14px;
}

.thread-reply {
    border-left: 0;
}

/* Контейнер дочерних сообщений */
.thread-replies {
    position: relative;
    padding-left: 22px;
    margin-top: 8px;
}

/* Одна вертикальная линия уровня */
.thread-replies::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 18px;
    left: 7px;
    width: 2px;
    background: #7f9fd8;
    border-radius: 2px;
}

/* Горизонтальный соединитель к каждой карточке */
.thread-replies > .message-item::before {
    content: "";
    position: absolute;
    top: 28px;
    left: -16px;
    width: 16px;
    height: 2px;
    border: 0;
    background: #7f9fd8;
}

/* У последнего ответа вертикальная линия заканчивается у соединителя */
.thread-replies > .message-item:last-child::after {
    content: "";
    position: absolute;
    left: -17px;
    top: 30px;
    bottom: -2px;
    width: 4px;
    background: #fbfcff;
}

/* Карточки остаются поверх линий */
.thread-replies > .message-item {
    position: relative;
    z-index: 1;
}

/* Чуть меньше накопительный сдвиг на глубоких уровнях */
.thread-replies .thread-replies {
    padding-left: 18px;
}

.thread-replies .thread-replies::before {
    left: 6px;
}

.thread-replies .thread-replies > .message-item::before {
    left: -13px;
    width: 13px;
}


/* ===== Финальная геометрия веток ===== */

/* Линия начинается почти сразу под счётчиком ответов */
.message-thread > .thread-replies {
    margin-top: 4px;
}

.thread-replies::before {
    top: -6px;
}

/* Соединители чуть длиннее */
.thread-replies > .message-item::before {
    left: -22px;
    width: 22px;
}

.thread-replies .thread-replies > .message-item::before {
    left: -18px;
    width: 18px;
}

/* Вложенные карточки слегка уже */
.thread-replies > .message-item {
    width: calc(100% - 8px);
}

.thread-replies .thread-replies > .message-item {
    width: calc(100% - 14px);
}

.thread-replies .thread-replies .thread-replies > .message-item {
    width: calc(100% - 20px);
}

/* Чуть больше воздуха между сообщениями */
.thread-replies > .message-item + .message-item {
    margin-top: 14px;
}



.notifications-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.notifications-heading h2 {
    margin: 0;
}

.notifications-list {
    display: grid;
    gap: 10px;
}

.notification-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dfe6f3;
    border-radius: 12px;
    background: #ffffff;
}

.notification-item.is-unread {
    border-color: #8ea7d6;
    background: #f3f7ff;
}

.notification-icon {
    flex: 0 0 auto;
    font-size: 20px;
}

.notification-content {
    display: grid;
    gap: 6px;
}

.notification-content p {
    margin: 0;
}

.notification-content time {
    color: #748198;
    font-size: 13px;
}

.notification-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935 !important;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

/* ===== Независимая прокрутка ===== */

html,
body{
    height:100%;
    overflow:hidden;
}

.layout{
    display:flex;
    height:100vh;
    overflow:hidden;
}

.sidebar{
    flex:0 0 280px;
    height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
    position:sticky;
    top:0;
    scrollbar-gutter:stable;
}

.content{
    flex:1;
    background:#f3efe8;
    height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
    padding:48px 56px 80px;
    color:#222;
    scrollbar-gutter:stable;
}

/* Мобильные устройства */

@media (max-width:900px){

    html,
    body{
        overflow:auto;
    }

    .layout{
        display:block;
        height:auto;
    }

    .sidebar{
        position:relative;
        width:100%;
        height:auto;
        overflow:visible;
    }

    .content{
        height:auto;
        overflow:visible;
        padding:24px 18px 48px;
    }
}


/* ===== Баннер личного кабинета ===== */

.profile-hero{
    position:relative;
    min-height:320px;
    margin-bottom:30px;
    border-radius:24px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    padding:42px 48px;
    background:
        url('/gostinaya/public/profile-hero.jpg')
        center center / cover no-repeat;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
}

.profile-hero-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            90deg,
            rgba(7,10,18,.12) 0%,
            rgba(7,10,18,.28) 42%,
            rgba(7,10,18,.84) 72%,
            rgba(7,10,18,.95) 100%
        );
}

.profile-hero-content{
    position:relative;
    z-index:1;
    width:min(460px,100%);
    color:#fff;
}

.profile-hero-eyebrow{
    margin:0 0 10px;
    color:#d2b48c;
    font-size:14px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.profile-hero h1{
    margin:0 0 10px;
    color:#fff;
    font-size:44px;
    line-height:1.05;
}

.profile-hero-description{
    margin:0 0 22px;
    color:rgba(255,255,255,.82);
    font-size:17px;
}

.profile-hero-meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.profile-hero-meta span,
.profile-hero-meta a{
    display:inline-flex;
    align-items:center;
    min-height:36px;
    padding:8px 12px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:999px;
    background:rgba(7,10,18,.42);
    color:#fff;
    text-decoration:none;
    font-size:13px;
    backdrop-filter:blur(8px);
}

.profile-hero-meta a:hover{
    background:rgba(255,255,255,.14);
}

@media (max-width:900px){
    .profile-hero{
        min-height:360px;
        padding:28px 22px;
        align-items:flex-end;
        justify-content:flex-start;
        background-position:42% center;
    }

    .profile-hero-overlay{
        background:
            linear-gradient(
                180deg,
                rgba(7,10,18,.12) 0%,
                rgba(7,10,18,.42) 42%,
                rgba(7,10,18,.94) 100%
            );
    }

    .profile-hero-content{
        width:100%;
    }

    .profile-hero h1{
        font-size:34px;
    }
}


/* ===== Баннер личного кабинета ===== */

.profile-hero{
    position:relative;
    min-height:320px;
    margin-bottom:30px;
    border-radius:24px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    padding:42px 48px;
    background:
        url('/gostinaya/public/profile-hero.jpg')
        center center / cover no-repeat;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
}

.profile-hero-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            90deg,
            rgba(7,10,18,.12) 0%,
            rgba(7,10,18,.28) 42%,
            rgba(7,10,18,.84) 72%,
            rgba(7,10,18,.95) 100%
        );
}

.profile-hero-content{
    position:relative;
    z-index:1;
    width:min(460px,100%);
    color:#fff;
}

.profile-hero-eyebrow{
    margin:0 0 10px;
    color:#d2b48c;
    font-size:14px;
    font-weight:700;
    letter-spacing:.04em;
    text-transform:uppercase;
}

.profile-hero h1{
    margin:0 0 10px;
    color:#fff;
    font-size:44px;
    line-height:1.05;
}

.profile-hero-description{
    margin:0 0 22px;
    color:rgba(255,255,255,.82);
    font-size:17px;
}

.profile-hero-meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.profile-hero-meta span,
.profile-hero-meta a{
    display:inline-flex;
    align-items:center;
    min-height:36px;
    padding:8px 12px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:999px;
    background:rgba(7,10,18,.42);
    color:#fff;
    text-decoration:none;
    font-size:13px;
    backdrop-filter:blur(8px);
}

.profile-hero-meta a:hover{
    background:rgba(255,255,255,.14);
}

@media (max-width:900px){
    .profile-hero{
        min-height:360px;
        padding:28px 22px;
        align-items:flex-end;
        justify-content:flex-start;
        background-position:42% center;
    }

    .profile-hero-overlay{
        background:
            linear-gradient(
                180deg,
                rgba(7,10,18,.12) 0%,
                rgba(7,10,18,.42) 42%,
                rgba(7,10,18,.94) 100%
            );
    }

    .profile-hero-content{
        width:100%;
    }

    .profile-hero h1{
        font-size:34px;
    }
}



/* ==================================================
   ОБЩИЙ БАННЕР ГОСТИНОЙ
   ================================================== */

:root{
    --lounge-banner-height: 210px;
}

html,
body{
    height:100%;
    overflow:hidden;
}

body{
    display:flex;
    flex-direction:column;
}

.lounge-banner{
    position:relative;
    flex:0 0 var(--lounge-banner-height);
    width:100%;
    min-height:var(--lounge-banner-height);
    overflow:hidden;
    background:
        url('/gostinaya/public/profile-hero.jpg')
        center 52% / cover no-repeat;
    border-bottom:1px solid rgba(255,255,255,.08);
    box-shadow:0 8px 28px rgba(7,10,18,.24);
}

.lounge-banner-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            90deg,
            rgba(5,8,14,.88) 0%,
            rgba(5,8,14,.58) 36%,
            rgba(5,8,14,.18) 72%,
            rgba(5,8,14,.38) 100%
        );
}

.lounge-banner-content{
    position:relative;
    z-index:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    width:100%;
    height:100%;
    padding:28px 56px;
    color:#fff;
}

.lounge-banner-eyebrow{
    margin:0 0 7px;
    color:#d7b27b;
    font-size:13px;
    font-weight:800;
    letter-spacing:.14em;
}

.lounge-banner h1{
    margin:0 0 8px;
    color:#fff;
    font-size:38px;
    line-height:1.05;
}

.lounge-banner h1 span{
    color:rgba(255,255,255,.68);
    font-weight:500;
}

.lounge-banner-content > p:last-child{
    margin:0;
    color:rgba(255,255,255,.82);
    font-size:16px;
}

.layout{
    flex:1 1 auto;
    min-height:0;
    height:calc(100vh - var(--lounge-banner-height));
}

.sidebar{
    height:100%;
    min-height:0;
    position:relative;
    top:auto;
}

.content{
    height:100%;
    min-height:0;
}

/* Возвращаем ЛК к обычной ширине страницы */
.profile-page{
    max-width:1280px;
}

/* Старый баннер ЛК больше не участвует в оформлении */
.profile-hero{
    display:none;
}

@media (max-width:900px){
    :root{
        --lounge-banner-height: 132px;
    }

    html,
    body{
        height:auto;
        min-height:100%;
        overflow:auto;
    }

    body{
        display:block;
    }

    .lounge-banner{
        min-height:var(--lounge-banner-height);
        background-position:38% center;
    }

    .lounge-banner-content{
        padding:20px 22px;
    }

    .lounge-banner h1{
        font-size:27px;
    }

    .lounge-banner-content > p:last-child{
        font-size:13px;
    }

    .layout{
        display:block;
        height:auto;
        min-height:auto;
    }

    .sidebar,
    .content{
        height:auto;
        overflow:visible;
    }
}

/* Корректировка общего баннера */
.lounge-banner{
    background-position:center 68%;
}

.lounge-banner-overlay{
    background:
        linear-gradient(
            90deg,
            rgba(5,8,14,.68) 0%,
            rgba(5,8,14,.34) 38%,
            rgba(5,8,14,.10) 72%,
            rgba(5,8,14,.22) 100%
        );
}


/* Полноформатный общий баннер */

:root{
    --lounge-banner-height:auto;
}

.lounge-banner{
    position:relative;
    flex:0 0 auto;
    width:100%;
    min-height:0;
    overflow:hidden;
    background:#080b11;
    border-bottom:1px solid rgba(255,255,255,.08);
    box-shadow:0 8px 28px rgba(7,10,18,.24);
}

.lounge-banner-top,
.lounge-banner-bottom{
    display:flex;
    align-items:center;
    width:100%;
    min-height:44px;
    padding:10px 48px;
    background:#090c12;
    color:#fff;
}

.lounge-banner-top{
    gap:18px;
}

.lounge-banner-top span{
    color:#d7b27b;
    font-size:12px;
    font-weight:800;
    letter-spacing:.16em;
}

.lounge-banner-top strong{
    font-size:20px;
    font-weight:650;
}



.lounge-banner-bottom{
    color:rgba(255,255,255,.78);
    font-size:14px;
}

.layout{
    flex:1 1 auto;
    min-height:0;
    height:auto;
}

@media (max-width:900px){
    .lounge-banner-top,
    .lounge-banner-bottom{
        min-height:38px;
        padding:9px 18px;
    }

    .lounge-banner-top{
        flex-direction:column;
        align-items:flex-start;
        gap:3px;
    }

    .lounge-banner-top strong{
        font-size:17px;
    }

    .lounge-banner-bottom{
        font-size:12px;
    }

    
}

/* Исправление общего баннера: компактный, без перекрытия Гостиной */

.lounge-banner{
    flex:0 0 auto;
    width:100%;
    background:#080b11;
}



.layout{
    flex:1 1 auto;
    min-height:0;
    height:calc(100vh - 318px);
}

.sidebar,
.content{
    height:100%;
    min-height:0;
    overflow-y:auto;
}

@media (max-width:900px){
    

    .layout{
        height:auto;
    }

    .sidebar,
    .content{
        height:auto;
        overflow:visible;
    }
}

/* Показываем панораму целиком, без обрезки лампы и краёв */


.layout{
    height:calc(100vh - 348px);
}

@media (max-width:900px){
    

    .layout{
        height:auto;
    }
}

/* Точный полноширинный баннер без обрезки */


.lounge-banner{
    overflow:hidden;
}

.layout{
    height:calc(100vh - 380px);
}

@media (max-width:900px){
    

    .layout{
        height:auto;
    }
}


/* Финальное отображение общего баннера */
.lounge-banner-image{
    display:block;
    width:100%;
    height:auto;
    max-height:none;
    object-fit:fill;
}

.lounge-banner{
    width:100%;
    overflow:hidden;
    background:#080b11;
}

.layout{
    height:auto;
    min-height:0;
}

/* ===== Финальная конструкция общего баннера ===== */

html,
body{
    height:100%;
    overflow:hidden;
}

body{
    display:flex;
    flex-direction:column;
}

.lounge-banner{
    position:relative !important;
    flex:0 0 auto !important;
    width:100% !important;
    aspect-ratio:1774 / 325;
    min-height:0 !important;
    overflow:hidden !important;
    background:#070a10 !important;
    box-shadow:0 6px 22px rgba(0,0,0,.24);
}

.lounge-banner-image{
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-height:none !important;
    object-fit:fill !important;
    object-position:center !important;
    background:none !important;
}

.lounge-banner-brand{
    position:absolute;
    right:4.2%;
    bottom:12%;
    z-index:2;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    max-width:420px;
    text-align:right;
    color:#fff;
    text-shadow:0 2px 12px rgba(0,0,0,.9);
}

.lounge-banner-logo{
    margin-bottom:5px;
    color:#d5ad73;
    font-size:13px;
    font-weight:800;
    letter-spacing:.16em;
}

.lounge-banner-brand strong{
    font-size:27px;
    line-height:1.12;
    font-weight:700;
}

.lounge-banner-brand small{
    margin-top:7px;
    color:rgba(255,255,255,.78);
    font-size:13px;
    line-height:1.35;
}

.layout{
    flex:1 1 auto !important;
    height:auto !important;
    min-height:0 !important;
}

.sidebar,
.content{
    height:100% !important;
    min-height:0 !important;
    overflow-y:auto !important;
}

@media (max-width:900px){
    html,
    body{
        height:auto;
        min-height:100%;
        overflow:auto;
    }

    body{
        display:block;
    }

    .lounge-banner{
        height:150px;
        aspect-ratio:auto;
    }

    .lounge-banner-image{
        object-fit:cover !important;
        object-position:center !important;
    }

    .lounge-banner-brand{
        right:18px;
        bottom:14px;
        max-width:260px;
    }

    .lounge-banner-logo{
        font-size:10px;
    }

    .lounge-banner-brand strong{
        font-size:19px;
    }

    .lounge-banner-brand small{
        display:none;
    }

    .layout{
        height:auto !important;
    }

    .sidebar,
    .content{
        height:auto !important;
        overflow:visible !important;
    }
}

/* ===== Тёплый кабинет: карточки и формы на всех страницах ===== */

:root{
    --lounge-bg:#f3efe8;
    --lounge-card:#fbf8f2;
    --lounge-card-strong:#fffdf9;
    --lounge-border:#ded4c5;
    --lounge-text:#2b2925;
    --lounge-muted:#6f685e;
    --lounge-shadow:0 12px 30px rgba(63,45,24,.08);
}

.content{
    background:var(--lounge-bg) !important;
    color:var(--lounge-text);
}

/* Карточки разных разделов */
.profile-card,
.room-card,
.placeholder,
.topic-card,
.message-card,
.notification-card,
.settings-card,
.subscription-card,
.member-card,
.hall-card,
.card{
    background:var(--lounge-card) !important;
    border-color:var(--lounge-border) !important;
    box-shadow:var(--lounge-shadow) !important;
}

/* Поля форм */
input,
select,
textarea{
    background:var(--lounge-card-strong) !important;
    border-color:#d8cdbc !important;
    color:var(--lounge-text) !important;
}

input:disabled{
    background:#eee9e0 !important;
    color:#71695f !important;
}

/* Вторичный текст */
.lead,
.profile-header p,
.room-card p,
.topic-card p,
.message-card p,
.notification-card p,
small,
.muted{
    color:var(--lounge-muted);
}

/* Заголовки */
.content h1,
.content h2,
.content h3{
    color:#28251f;
}

/* Мягкий переход от баннера */
.layout{
    box-shadow:inset 0 14px 24px -24px rgba(52,35,16,.65);
}

/* Кнопки личного кабинета и настроек */
.profile-page button,
.profile-page input[type="submit"],
.profile-page .button,
.profile-page .btn{
    font-family:inherit !important;
    font-size:14px !important;
    font-weight:700 !important;
    color:#ffffff !important;
    line-height:1.2 !important;
}

/* Текст внутри кнопок-ссылок */
.profile-page a.button,
.profile-page a.btn{
    color:#ffffff !important;
    text-decoration:none !important;
}

/* Убираем лишнюю пустоту над меню */
.sidebar{
    padding-top:18px !important;
}

.sidebar h2{
    margin-top:0 !important;
    margin-bottom:18px !important;
}

.sidebar nav{
    margin-top:0 !important;
}

/* Публичные страницы Гостиной */

.public-content {
    width: 100%;
    padding: 48px 24px 72px;
    background: #f6f3ee;
}

.public-lounge {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 44px 48px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.public-lounge h1 {
    margin-top: 0;
    font-size: 38px;
    line-height: 1.15;
}

.public-lounge h2 {
    margin-top: 34px;
}

.public-lounge p,
.public-lounge li {
    line-height: 1.65;
}

.lounge-banner {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #080b11;
}

.lounge-banner-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 700px) {
    .public-content {
        padding: 24px 14px 40px;
    }

    .public-lounge {
        padding: 28px 22px;
        border-radius: 12px;
    }

    .public-lounge h1 {
        font-size: 30px;
    }

    .lounge-banner {
        height: 210px;
    }
}

.public-lounge > p:last-child {
    display: flex;
    gap: 14px;
    margin-top: 34px !important;
    margin-bottom: 0;
}

.public-lounge > p:last-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.public-lounge > p:last-child a:first-child {
    background: #1d4ed8;
    color: #fff;
}

.public-lounge > p:last-child a:last-child {
    background: #eef1f5;
    color: #243244;
}

@media (max-width: 520px) {
    .public-lounge > p:last-child {
        flex-direction: column;
    }

    .public-lounge > p:last-child a {
        width: 100%;
    }
}

/* Разрешаем обычную прокрутку публичных страниц */
html,
body {
    min-height: 100%;
}

body {
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden;
}

.public-content {
    min-height: auto;
    overflow: visible !important;
}

.public-lounge {
    overflow: visible;
}

/* Публичная страница прокручивается целиком вместе с баннером */
html {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
}

.public-content {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

/* Публичные формы входа и регистрации */

.auth-page {
    width: 100%;
    padding: 48px 24px 72px;
    background: #f6f3ee;
}

.auth-card {
    width: min(540px, 100%);
    margin: 0 auto;
    padding: 40px 42px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    margin: 0 0 18px;
    font-size: 34px;
}

.auth-card form {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.auth-card label {
    display: block;
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d7dce2;
    border-radius: 9px;
    font: inherit;
}

.auth-card button {
    min-height: 46px;
    margin-top: 8px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #1d4ed8;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 22px;
}

.auth-links a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 600px) {
    .auth-page {
        padding: 24px 14px 40px;
    }

    .auth-card {
        padding: 28px 22px;
    }
}

/* Публичные формы входа и регистрации */

.auth-page {
    width: 100%;
    padding: 48px 24px 72px;
    background: #f6f3ee;
}

.auth-card {
    width: min(540px, 100%);
    margin: 0 auto;
    padding: 40px 42px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    margin: 0 0 18px;
    font-size: 34px;
}

.auth-card form {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.auth-card label {
    display: block;
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d7dce2;
    border-radius: 9px;
    font: inherit;
}

.auth-card button {
    min-height: 46px;
    margin-top: 8px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #1d4ed8;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 22px;
}

.auth-links a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 600px) {
    .auth-page {
        padding: 24px 14px 40px;
    }

    .auth-card {
        padding: 28px 22px;
    }
}

/* Единый стандарт публичных карточек */

.public-lounge,
.auth-card {
    width: min(900px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.auth-card {
    padding: 44px 48px;
}

.auth-card form {
    max-width: 520px;
}

.auth-links {
    max-width: 520px;
}

@media (max-width: 700px) {
    .auth-card {
        padding: 28px 22px;
    }
}

/* ===== AFTER LOGIN DARK DESIGN SYSTEM v1 ===== */

:root {
    color-scheme: dark;

    --al-bg: #0d1118;
    --al-bg-soft: #121925;
    --al-card: #18212e;
    --al-card-hover: #1d2837;
    --al-field: #101722;
    --al-border: #2d3a4d;

    --al-text: #f2eee7;
    --al-text-soft: #c4cbd5;
    --al-english: #929eae;

    --al-link: #82aaff;
    --al-blue: #315eea;
    --al-blue-hover: #426df3;
    --al-gold: #d6b36a;
}

/* Единый шрифт без внешней загрузки */
html,
body,
button,
input,
select,
textarea {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif !important;
}

html,
body {
    background: var(--al-bg) !important;
    color: var(--al-text) !important;
}

.public-content,
.auth-page {
    background:
        radial-gradient(circle at 50% 0%, rgba(68, 85, 116, 0.18), transparent 38%),
        var(--al-bg) !important;
}

.public-lounge,
.auth-card {
    background:
        linear-gradient(145deg, rgba(29, 40, 55, 0.98), rgba(21, 29, 41, 0.98))
        !important;
    color: var(--al-text) !important;
    border: 1px solid var(--al-border);
    border-radius: 18px;
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.public-lounge h1,
.public-lounge h2,
.auth-card h1,
.auth-card h2,
.auth-card label {
    color: var(--al-text) !important;
}

.public-lounge p,
.public-lounge li,
.auth-intro,
.auth-links,
.auth-message {
    color: var(--al-text-soft);
}

/* Английский перевод: меньше, светлее и курсивом */
.auth-card h1 span,
.auth-card label span,
.auth-card button span,
.auth-intro br + *,
.auth-links br + *,
.auth-kicker {
    color: var(--al-english) !important;
    font-size: 0.88em;
    font-style: italic;
    font-weight: 400;
}

.auth-kicker {
    letter-spacing: 0.05em;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    color: var(--al-text) !important;
    background: var(--al-field) !important;
    border: 1px solid var(--al-border) !important;
    border-radius: 10px;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
    background: #131c29 !important;
    border-color: #537cff !important;
    box-shadow: 0 0 0 3px rgba(83, 124, 255, 0.16);
}

.auth-card select {
    color-scheme: dark;
}

.auth-card button,
.public-lounge > p:last-child a:first-child {
    color: #fff !important;
    background: linear-gradient(180deg, var(--al-blue-hover), var(--al-blue)) !important;
    border: 1px solid rgba(122, 157, 255, 0.35) !important;
    box-shadow: 0 8px 20px rgba(28, 71, 197, 0.25);
    transition:
        transform 0.16s ease,
        filter 0.16s ease,
        box-shadow 0.16s ease;
}

.auth-card button:hover,
.public-lounge > p:last-child a:first-child:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 11px 25px rgba(28, 71, 197, 0.32);
}

.public-lounge > p:last-child a:last-child {
    color: var(--al-text) !important;
    background: var(--al-card-hover) !important;
    border: 1px solid var(--al-border);
}

.auth-links a,
.public-lounge a {
    color: var(--al-link);
}

.auth-card input::placeholder,
.auth-card textarea::placeholder {
    color: #778293;
}

@media (max-width: 700px) {
    .public-content,
    .auth-page {
        padding: 22px 12px 38px !important;
    }

    .public-lounge,
    .auth-card {
        padding: 28px 21px !important;
        border-radius: 14px;
    }

    .auth-card h1,
    .public-lounge h1 {
        font-size: 30px;
    }
}

/* ===== AFTER LOGIN DARK DESIGN SYSTEM v1.1 ===== */

.public-content,
.auth-page {
    background:
        radial-gradient(circle at 50% -10%, rgba(55, 84, 132, 0.22), transparent 42%),
        linear-gradient(180deg, #0d131d 0%, #0a0f16 100%) !important;
}

.public-lounge,
.auth-card {
    padding: 44px 42px !important;
}

.auth-card h1,
.public-lounge h1 {
    font-size: 34px;
    line-height: 1.08;
    margin-bottom: 6px;
}

.auth-card form {
    margin-top: 26px;
}

.auth-card .form-group,
.auth-card form > div {
    margin-bottom: 18px;
}

.auth-card label {
    display: block;
    margin-bottom: 8px;
}

.auth-card h1 span,
.auth-card label span,
.auth-card button span,
.auth-kicker {
    color: #aab4c3 !important;
}

.auth-intro {
    line-height: 1.5;
    margin-top: 18px;
    margin-bottom: 26px;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
    min-height: 50px;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
    background: #162131 !important;
}

.auth-card button {
    min-height: 52px;
    border-radius: 11px !important;
    font-size: 16px;
}

.auth-links {
    margin-top: 28px;
    line-height: 1.45;
}

@media (max-width: 700px) {
    .public-lounge,
    .auth-card {
        padding: 30px 22px !important;
    }

    .auth-card h1,
    .public-lounge h1 {
        font-size: 30px;
    }

    .auth-card form {
        margin-top: 22px;
    }
}

/* ===== AFTER LOGIN DARK DESIGN SYSTEM v1.2 ===== */

/* Убираем повтор названия Гостиной внутри карточки */
.auth-card .auth-kicker,
.public-lounge .auth-kicker {
    display: none !important;
}

/* Более собранная ширина карточки */
.auth-card,
.public-lounge {
    width: min(680px, calc(100% - 32px)) !important;
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Заголовок становится главным визуальным акцентом */
.auth-card h1,
.public-lounge h1 {
    font-size: 38px !important;
    font-weight: 750;
    letter-spacing: -0.025em;
    margin-top: 0 !important;
}

/* Английский заголовок — отдельная спокойная подпись */
.auth-card h1 span,
.public-lounge h1 span {
    display: block;
    margin-top: 5px;
    font-size: 0.78em !important;
    line-height: 1.05;
    color: #a8b3c3 !important;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Мягкое растворение баннера в фоне */
.lounge-hero,
.public-hero,
.hero-banner,
.banner {
    position: relative;
}

.lounge-hero::after,
.public-hero::after,
.hero-banner::after,
.banner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 55px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(13, 19, 29, 0),
        rgba(13, 19, 29, 0.9) 78%,
        #0d131d 100%
    );
}

/* Чуть более выразительная фирменная кнопка */
.auth-card button {
    box-shadow:
        0 10px 26px rgba(47, 94, 234, 0.3),
        0 0 22px rgba(62, 105, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

.auth-card button:hover {
    box-shadow:
        0 14px 32px rgba(47, 94, 234, 0.38),
        0 0 28px rgba(62, 105, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

/* Чуть больше воздуха перед формой */
.auth-card .auth-intro {
    margin-top: 16px;
    margin-bottom: 30px;
}

@media (max-width: 700px) {
    .auth-card,
    .public-lounge {
        width: calc(100% - 24px) !important;
        padding: 28px 20px !important;
    }

    .auth-card h1,
    .public-lounge h1 {
        font-size: 31px !important;
    }

    .lounge-hero::after,
    .public-hero::after,
    .hero-banner::after,
    .banner::after {
        height: 36px;
    }
}


/* ===== PUBLIC NAVIGATION ===== */

.public-nav {
    width: min(680px, calc(100% - 32px));
    margin: 0 auto 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-size: 15px;
}

.public-nav a {
    color: #aab5c6;
    text-decoration: none;
    line-height: 1.3;
    transition:
        color 0.18s ease,
        transform 0.18s ease;
}

.public-nav a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.public-nav span {
    color: #8490a1;
    font-size: 0.92em;
    font-style: italic;
    font-weight: 400;
}

@media (max-width: 700px) {
    .public-nav {
        width: calc(100% - 24px);
        gap: 14px;
        font-size: 13px;
    }

    .public-nav a:last-child {
        text-align: right;
    }
}


/* ===== WELCOME PAGE ===== */

.public-welcome span{
display:block;
margin-top:3px;
color:var(--al-english)!important;
font-style:italic;
font-weight:400;
font-size:.92em;
}

.public-welcome ul span{
display:block;
margin-left:18px;
margin-top:2px;
}

.welcome-actions{
display:flex;
gap:16px;
margin-top:34px;
}

.welcome-actions a{
flex:1;
text-align:center;
text-decoration:none;
border-radius:11px;
padding:14px 18px;
transition:.18s;
}

.welcome-primary{
background:linear-gradient(180deg,var(--al-blue-hover),var(--al-blue));
color:#fff!important;
box-shadow:0 10px 24px rgba(49,94,234,.28);
}

.welcome-primary:hover{
transform:translateY(-1px);
}

.welcome-secondary{
background:var(--al-card-hover);
border:1px solid var(--al-border);
color:var(--al-text)!important;
}

.welcome-secondary:hover{
background:#263446;
}

.welcome-actions span{
display:block;
margin-top:3px;
color:#b0bac8;
font-style:italic;
font-size:.9em;
}

@media(max-width:700px){

.welcome-actions{
flex-direction:column;
}

}

/* ===== PUBLIC ENTRANCE FINAL POLISH ===== */

/* Карточку Добро пожаловать не сужаем */
.auth-card.public-welcome {
    width: min(820px, calc(100% - 32px)) !important;
    max-width: 820px !important;
}

/* Русский текст — основной */
.public-welcome p,
.public-welcome li {
    color: var(--al-text-soft) !important;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
}

/* Вводная фраза не должна проваливаться */
.public-welcome .auth-intro {
    color: var(--al-text) !important;
    font-size: 17px !important;
    line-height: 1.5;
    font-weight: 500;
}

/* Английский текст — всегда второй уровень */
.public-welcome p > span,
.public-welcome li > span,
.public-welcome h2 > span,
.public-welcome .auth-intro > span {
    display: block;
    margin-top: 3px;
    color: var(--al-english) !important;
    font-size: 0.92em !important;
    line-height: 1.45;
    font-style: italic !important;
    font-weight: 400 !important;
}

/* Английский текст в пунктах списка */
.public-welcome li > span {
    margin-left: 0;
}

/* Заголовки разделов */
.public-welcome h2 {
    margin-top: 30px;
    margin-bottom: 14px;
    color: var(--al-text) !important;
    font-size: 24px;
    line-height: 1.2;
}

.public-welcome h2 > span {
    font-size: 0.72em !important;
}

/* Кнопки */
.welcome-actions {
    display: flex !important;
    gap: 16px;
    margin-top: 34px;
}

.welcome-actions a {
    display: flex !important;
    flex: 1;
    min-height: 56px;
    padding: 10px 18px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 11px;
    text-align: center;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 700;
    transition:
        transform 0.18s ease,
        filter 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.welcome-actions a > span {
    display: block;
    margin-top: 2px;
    font-size: 0.88em !important;
    line-height: 1.1;
    font-style: italic !important;
    font-weight: 400 !important;
}

.welcome-primary {
    color: #fff !important;
    background: linear-gradient(
        180deg,
        var(--al-blue-hover),
        var(--al-blue)
    ) !important;
    border: 1px solid rgba(122, 157, 255, 0.35);
    box-shadow:
        0 10px 26px rgba(47, 94, 234, 0.3),
        0 0 22px rgba(62, 105, 255, 0.1);
}

.welcome-primary > span {
    color: #cbd7ff !important;
}

.welcome-secondary {
    color: var(--al-text) !important;
    background: var(--al-card-hover) !important;
    border: 1px solid var(--al-border);
}

.welcome-secondary > span {
    color: var(--al-english) !important;
}

.welcome-actions a:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* Реальное плавное растворение баннера */
.lounge-banner {
    position: relative !important;
    overflow: hidden;
}

.lounge-banner::after {
    content: "";
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 74px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(13, 19, 29, 0) 0%,
        rgba(13, 19, 29, 0.42) 45%,
        rgba(13, 19, 29, 0.92) 86%,
        #0d131d 100%
    );
}

.lounge-banner-image {
    filter: brightness(0.88);
}

/* Надписи баннера остаются поверх затемнения */
.lounge-banner-brand,
.lounge-banner-content {
    position: relative;
    z-index: 4;
}

@media (max-width: 700px) {
    .auth-card.public-welcome {
        width: calc(100% - 24px) !important;
    }

    .welcome-actions {
        flex-direction: column;
    }

    .lounge-banner::after {
        height: 48px;
    }
}

/* ===== LOUNGE BANNER LAYOUT FIX ===== */

/* Баннер выше, без искажения изображения */
.lounge-banner {
    height: 320px !important;
    min-height: 320px !important;
    position: relative !important;
    overflow: hidden !important;
}

.lounge-banner-image {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center 62% !important;
    filter: brightness(0.9) !important;
}

/* Убираем весь текст с баннера */
.lounge-banner-brand,
.lounge-banner-content,
.lounge-banner-top,
.lounge-banner-bottom,
.lounge-banner-eyebrow {
    display: none !important;
}

/* Мягкое затемнение снизу без перекрытия изображения */
.lounge-banner::after {
    content: "";
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(13, 19, 29, 0),
        rgba(13, 19, 29, 0.55) 58%,
        #0d131d 100%
    );
}

/* Убираем лишнюю пустоту после баннера */
.auth-page {
    padding-top: 34px !important;
}

/* Навигация и карточка ближе к баннеру */
.public-nav {
    margin-top: 0 !important;
}

.auth-card.public-welcome {
    margin-top: 0 !important;
}

/* Вводная фраза заметнее */
.public-welcome .auth-intro {
    font-size: 18px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    color: var(--al-text) !important;
}

.public-welcome .auth-intro > span {
    font-size: 0.9em !important;
    font-weight: 400 !important;
    color: var(--al-english) !important;
    font-style: italic !important;
}

@media (max-width: 700px) {
    .lounge-banner {
        height: 230px !important;
        min-height: 230px !important;
    }

    .lounge-banner-image {
        object-position: center 58% !important;
    }

    .auth-page {
        padding-top: 22px !important;
    }
}

/* ===== PUBLIC ENTRANCE FINAL SPACING ===== */

.lounge-banner {
    height: 340px !important;
    min-height: 340px !important;
}

.auth-page {
    padding-top: 12px !important;
}

.public-nav {
    margin-bottom: 14px !important;
}

.auth-card.public-welcome {
    transform: translateY(-6px);
}

@media (max-width: 700px) {
    .lounge-banner {
        height: 240px !important;
        min-height: 240px !important;
    }

    .auth-page {
        padding-top: 14px !important;
    }

    .auth-card.public-welcome {
        transform: none;
    }
}

/* ===== REGISTER FORM FINAL FIX ===== */

.auth-card select {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    min-height: 50px !important;
    padding: 11px 42px 11px 13px !important;
}

/* Английские строки внизу форм */
.auth-links > span,
.auth-links p > span {
    color: var(--al-english) !important;
    font-style: italic !important;
    font-weight: 400 !important;
    font-size: 0.92em !important;
}

/* Английская часть ссылок */
.auth-links a span {
    color: #91a9d8 !important;
    font-style: italic !important;
    font-weight: 400 !important;
}

/* Password reset — match the public auth group */
.auth-card h1 span,
.auth-intro span,
.auth-form label span,
.auth-form button span,
.auth-links span {
  color: rgba(226, 232, 240, 0.68);
  font-style: italic;
  font-weight: 400;
}

.auth-card h1 span {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.78em;
  line-height: 1.05;
}

.auth-form label span {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.88em;
  line-height: 1.1;
}

.auth-form button span {
  font-size: 0.9em;
}

.auth-message {
  min-height: 24px;
  margin-top: 14px;
  line-height: 1.45;
}

.auth-message.is-success {
  color: #86efac;
}

.auth-message.is-error {
  color: #fca5a5;
}

/* Personal cabinet — unified visual language */
.profile-page {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.profile-header {
  margin-bottom: 22px;
}

.profile-eyebrow {
  margin: 0 0 8px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.95rem;
}

.profile-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.profile-header > p:last-child {
  margin: 12px 0 0;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.6;
}

.profile-card {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.96),
    rgba(24, 34, 49, 0.96)
  );
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.18);
}

.profile-card h2 {
  margin: 0 0 20px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.profile-page label {
  display: block;
  margin-bottom: 18px;
  font-weight: 700;
}

.profile-page input[type="text"],
.profile-page input[type="email"],
.profile-page input[type="password"],
.profile-page select,
.profile-page textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px 14px;
  color: #f8fafc;
  background: rgba(8, 18, 32, 0.92);
  border: 1px solid rgba(100, 116, 139, 0.48);
  border-radius: 10px;
  font: inherit;
}

.profile-page textarea {
  min-height: 140px;
  resize: vertical;
}

.profile-page input:focus,
.profile-page select:focus,
.profile-page textarea:focus {
  outline: none;
  border-color: rgba(96, 133, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.16);
}

.profile-page button {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.profile-page form > button[type="submit"] {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #4b72ff, #3562ee);
  box-shadow: 0 12px 28px rgba(53, 98, 238, 0.24);
}

.profile-success {
  padding: 12px 14px;
  border: 1px solid rgba(134, 239, 172, 0.26);
  border-radius: 10px;
  color: #86efac;
  background: rgba(20, 83, 45, 0.18);
}

.profile-details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-details > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.profile-details > div:last-child {
  border-bottom: 0;
}

.profile-details dt {
  color: rgba(226, 232, 240, 0.66);
}

.profile-details dd {
  margin: 0;
}

.profile-navigation {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}

.profile-navigation a,
.profile-navigation button {
  color: #8fb0ff;
  background: transparent;
  text-decoration: none;
}

.profile-navigation a:hover,
.profile-navigation button:hover {
  color: #b6c9ff;
}

@media (max-width: 700px) {
  .profile-page {
    width: min(100% - 24px, 980px);
    padding-top: 20px;
  }

  .profile-card {
    padding: 18px;
  }

  .profile-details > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-navigation {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ===== Personal cabinet — dark unified theme ===== */

.content:has(.profile-page) {
  background: #081321 !important;
  color: #f8fafc !important;
}

.content .profile-page {
  width: min(980px, calc(100% - 40px)) !important;
  max-width: 980px !important;
  margin: 0 auto !important;
  padding: 30px 0 52px !important;
  color: #f8fafc !important;
}

.content .profile-header,
.content .profile-header h1,
.content .profile-header p {
  color: #f8fafc !important;
}

.content .profile-eyebrow {
  color: rgba(226, 232, 240, 0.7) !important;
}

.content .profile-header > p:last-child {
  color: rgba(226, 232, 240, 0.72) !important;
}

.content .profile-card {
  margin: 18px 0 0 !important;
  padding: 24px !important;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.98),
    rgba(24, 34, 49, 0.98)
  ) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28) !important;
  color: #f8fafc !important;
}

.content .profile-card h2,
.content .profile-card label,
.content .profile-card dt,
.content .profile-card dd {
  color: #f8fafc !important;
}

.content .profile-page input[type="text"],
.content .profile-page input[type="email"],
.content .profile-page input[type="password"],
.content .profile-page select,
.content .profile-page textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 8px !important;
  padding: 12px 14px !important;
  color: #f8fafc !important;
  background: rgba(8, 18, 32, 0.96) !important;
  border: 1px solid rgba(100, 116, 139, 0.5) !important;
  border-radius: 10px !important;
}

.content .profile-page input:disabled {
  color: rgba(226, 232, 240, 0.58) !important;
  background: rgba(15, 23, 42, 0.72) !important;
}

.content .profile-page input::placeholder,
.content .profile-page textarea::placeholder {
  color: rgba(148, 163, 184, 0.72) !important;
}

.content .profile-page input:focus,
.content .profile-page select:focus,
.content .profile-page textarea:focus {
  outline: none !important;
  border-color: rgba(96, 133, 255, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.18) !important;
}

.content .profile-page form > button[type="submit"] {
  width: 100% !important;
  color: #fff !important;
  background: linear-gradient(180deg, #4b72ff, #3562ee) !important;
  box-shadow: 0 12px 28px rgba(53, 98, 238, 0.26) !important;
}

.content .profile-details > div {
  border-bottom-color: rgba(148, 163, 184, 0.16) !important;
}

.content .profile-details dt {
  color: rgba(226, 232, 240, 0.66) !important;
}

@media (max-width: 700px) {
  .content .profile-page {
    width: calc(100% - 24px) !important;
    padding-top: 20px !important;
  }

  .content .profile-card {
    padding: 18px !important;
  }
}

/* Personal cabinet — bilingual typography */
.profile-page h2 span,
.profile-page label span,
.profile-page dt span,
.profile-page .profile-eyebrow span,
.profile-page .profile-header > p span,
.profile-page button span,
.profile-page a span,
.profile-success span {
  color: rgba(226, 232, 240, 0.66);
  font-style: italic;
  font-weight: 400;
}

.profile-page h2 span {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.72em;
}

.profile-page label > span {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.88em;
}

.profile-page .profile-card label:has(input[type="checkbox"]) span {
  display: inline;
  margin: 0;
  font-size: 0.92em;
}

.profile-page button span {
  font-size: 0.9em;
}

.profile-page dt span {
  font-size: 0.86em;
}

/* Safari: normal height for registration selects */
#register-form select {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 42px 0 13px !important;
  font-size: 16px !important;
  line-height: 50px !important;
}

#register-form textarea {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
}

#register-form .auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

#register-form .auth-consent input {
  width: auto;
  margin-top: 0.3rem;
  flex: 0 0 auto;
}

#register-form .auth-consent span {
  line-height: 1.45;
}

#register-form .auth-consent em {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9em;
}

#register-form .auth-consent label {
  cursor: pointer;
  line-height: 1.45;
}

#register-form .auth-consent a {
  color: #9fc4ff;
  text-decoration: underline;
  text-decoration-color: rgba(159, 196, 255, 0.55);
  text-underline-offset: 3px;
}

#register-form .auth-consent a:hover,
#register-form .auth-consent a:focus-visible {
  color: #c9dcff;
  text-decoration-color: currentColor;
}

/* Public legal pages */
.legal-page {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 64px;
  color: #f8fafc;
}

.legal-page .public-nav {
  margin-bottom: 24px;
}

.legal-header,
.legal-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(19, 31, 47, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
}

.legal-header {
  padding: 30px;
  margin-bottom: 18px;
}

.legal-header h1 {
  margin: 6px 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.04;
}

.legal-header h1 span,
.legal-card h2 span,
.legal-card .legal-en {
  color: rgba(203, 213, 225, 0.7);
  font-style: italic;
  font-weight: 400;
}

.legal-kicker,
.legal-updated {
  margin: 0;
  color: rgba(203, 213, 225, 0.72);
}

.legal-card {
  padding: 28px 30px;
  margin-top: 18px;
}

.legal-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.legal-card p,
.legal-card li {
  color: rgba(241, 245, 249, 0.9);
  font-size: 17px;
  line-height: 1.65;
}

.legal-card ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-card a,
.legal-footer a {
  color: #9fc4ff;
}

.legal-card .legal-en {
  margin-top: 12px;
  font-size: 15px;
}

.legal-footer {
  margin-top: 24px;
}

@media (max-width: 700px) {
  .legal-page {
    width: calc(100% - 24px);
    padding: 24px 0 40px;
  }

  .legal-header,
  .legal-card {
    padding: 20px;
    border-radius: 14px;
  }

  .legal-card p,
  .legal-card li {
    font-size: 16px;
  }
}

/* Hall: improve headings and English text readability */
.hall-first-word-copy h2 {
  color: rgba(248, 250, 252, 0.98);
  -webkit-text-fill-color: rgba(248, 250, 252, 0.98);
  background: none;
  font-size: 28px;
}

.hall-intro-greeting > span {
  font-size: 17px;
}

.hall-intro-text > span {
  font-size: 15px;
  line-height: 1.6;
}

.hall-first-word-copy h2 span {
  font-size: 18px;
  -webkit-text-fill-color: rgba(148, 163, 184, 0.88);
}

.hall-first-word-copy p span {
  font-size: 15px;
}

.hall-first-word-copy small span {
  font-size: 13px;
}

.hall-first-word-link span {
  font-size: 12px;
}

/* =========================================================
   MEMBERS — My Profile design standard
   ========================================================= */

.members-page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.members-panel {
  padding: 28px;
}

.members-panel-header {
  margin-bottom: 24px;
}

.members-panel-header h2 {
  margin: 0;
  color: rgba(248, 250, 252, 0.96);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.members-panel-header h2 > span {
  color: rgba(226, 232, 240, 0.66);
  font-size: 0.82em;
  font-style: italic;
  font-weight: 400;
}

.members-panel-header p {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 17px;
  line-height: 1.6;
}

.members-panel-header p > span,
.members-empty p > span {
  display: block;
  margin-top: 3px;
  color: rgba(226, 232, 240, 0.66);
  font-size: 0.82em;
  font-style: italic;
  font-weight: 400;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.member-card {
  padding: 22px;
  background: linear-gradient(
    135deg,
    rgba(20, 29, 45, 0.97),
    rgba(12, 18, 30, 0.97)
  );
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.member-card:hover {
  border-color: rgba(96, 165, 250, 0.32);
  transform: translateY(-2px);
}

.member-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.member-card h3 a {
  color: rgba(248, 250, 252, 0.96);
  text-decoration: none;
}

.member-card h3 a:hover {
  color: #93c5fd;
}

.member-bio {
  min-height: 26px;
  margin: 10px 0 18px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 15px;
  line-height: 1.55;
}

.member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-meta > span {
  padding: 6px 9px;
  color: rgba(203, 213, 225, 0.82);
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.3;
}

.members-empty {
  padding: 28px;
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
}

.members-empty h3 {
  margin: 0;
  color: rgba(248, 250, 252, 0.96);
  font-size: 20px;
}

.members-empty p {
  margin: 10px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 17px;
  line-height: 1.6;
}

.members-navigation {
  margin-top: 22px;
}

.members-navigation a {
  color: #93c5fd;
  font-size: 15px;
  text-decoration: none;
}

.members-navigation a:hover {
  color: #bfdbfe;
}

@media (max-width: 720px) {
  .members-panel {
    padding: 20px;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .member-card {
    padding: 19px;
  }
}

/* Members: override legacy light cards */
.members-page .members-panel .member-card {
  background: linear-gradient(
    135deg,
    rgba(20, 29, 45, 0.97),
    rgba(12, 18, 30, 0.97)
  ) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

.members-page .member-card h3,
.members-page .member-card h3 a {
  color: rgba(248, 250, 252, 0.96) !important;
  -webkit-text-fill-color: rgba(248, 250, 252, 0.96) !important;
}

.members-page .member-bio {
  color: rgba(226, 232, 240, 0.72) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.72) !important;
}

/* =========================================================
   COMMUNITY TOPICS + ARTICLE DISCUSSIONS
   My Profile design standard
   ========================================================= */

.room-page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Short bilingual headings stay on one line */

.room-page-header h1 > span,
.room-panel-header h2 > span {
  display: inline;
  margin: 0;
  color: rgba(226, 232, 240, 0.66);
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66);
  font-size: 0.82em;
  font-style: italic;
  font-weight: 400;
}

.room-panel {
  padding: 28px;
  background: linear-gradient(
    135deg,
    rgba(20, 29, 45, 0.97),
    rgba(12, 18, 30, 0.97)
  ) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.room-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.room-panel-header h2 {
  margin: 0;
  color: rgba(248, 250, 252, 0.96);
  -webkit-text-fill-color: rgba(248, 250, 252, 0.96);
  background: none;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.room-panel-header p {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 17px;
  line-height: 1.6;
}

.room-panel-header p > span {
  display: block;
  margin-top: 3px;
  color: rgba(226, 232, 240, 0.66);
  font-size: 0.82em;
  font-style: italic;
  font-weight: 400;
}

/* New topic button */

.room-page .room-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: 1px solid rgba(147, 197, 253, 0.24) !important;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.room-page .room-action > span {
  margin-left: 5px;
  color: rgba(219, 234, 254, 0.82);
  -webkit-text-fill-color: rgba(219, 234, 254, 0.82);
  font-size: 0.9em;
  font-style: italic;
  font-weight: 400;
}

.room-page .room-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

/* Topic cards */

.room-page .topic-list {
  display: grid;
  gap: 14px;
}

.room-page .topic-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 21px 22px;
  background: rgba(15, 23, 42, 0.76) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  transition: background 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease;
}

.room-page .topic-item:hover {
  background: rgba(20, 30, 48, 0.9) !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
  transform: translateY(-1px);
}

.room-page .topic-main {
  min-width: 0;
  flex: 1 1 auto;
}

.room-page .topic-item h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.room-page .topic-item h3 a {
  color: rgba(248, 250, 252, 0.96) !important;
  -webkit-text-fill-color: rgba(248, 250, 252, 0.96) !important;
  background: none !important;
  text-decoration: none;
}

.room-page .topic-item h3 a:hover {
  color: #93c5fd !important;
  -webkit-text-fill-color: #93c5fd !important;
}

.room-page .topic-preview {
  margin: 9px 0 0;
  color: rgba(226, 232, 240, 0.72) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.72) !important;
  font-size: 15px;
  line-height: 1.55;
}

.room-page .topic-meta {
  flex: 0 1 360px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  color: rgba(203, 213, 225, 0.78) !important;
  font-size: 13px;
  line-height: 1.4;
}

.room-page .topic-meta > span {
  padding: 5px 8px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}

.room-page .topic-meta a {
  color: #93c5fd !important;
  -webkit-text-fill-color: #93c5fd !important;
  text-decoration: none;
}

.room-page .topic-unread {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 9px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

/* Empty state */

.room-page .room-empty {
  padding: 34px 28px;
  color: rgba(226, 232, 240, 0.76) !important;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px;
  text-align: center;
}

.room-page .room-empty h3 {
  margin: 0;
  color: rgba(248, 250, 252, 0.96);
  -webkit-text-fill-color: rgba(248, 250, 252, 0.96);
  font-size: 20px;
  line-height: 1.4;
}

.room-page .room-empty h3 > span {
  color: rgba(226, 232, 240, 0.66);
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66);
  font-size: 0.82em;
  font-style: italic;
  font-weight: 400;
}

.room-page .room-empty p {
  margin: 12px 0 0;
  color: rgba(226, 232, 240, 0.72) !important;
  font-size: 16px;
  line-height: 1.6;
}

.room-navigation {
  margin-top: 22px;
}

.room-navigation a {
  color: #93c5fd;
  font-size: 15px;
  text-decoration: none;
}

.room-navigation a:hover {
  color: #bfdbfe;
}

@media (max-width: 720px) {
  .room-panel {
    padding: 20px;
  }

  .room-panel-header {
    flex-direction: column;
    gap: 17px;
  }

  .room-page .room-action {
    width: 100%;
  }

  .room-page .topic-item {
    flex-direction: column;
    padding: 19px;
  }

  .room-page .topic-meta {
    flex-basis: auto;
    justify-content: flex-start;
  }
}

/* English text in room empty states */
.room-page .room-empty p > span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.66);
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66);
  font-size: 0.82em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
}

/* Room headers: force bilingual title and subtitle */
.room-page .room-page-header h1 > span {
  display: inline !important;
  color: rgba(226, 232, 240, 0.66) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66) !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 0.82em !important;
  font-style: italic !important;
  font-weight: 400 !important;
}

.room-page .room-page-header > p > span {
  display: block !important;
  margin-top: 4px !important;
  color: rgba(226, 232, 240, 0.66) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66) !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 0.82em !important;
  font-style: italic !important;
  font-weight: 400 !important;
}


/* BILINGUAL SECONDARY TEXT */
.en-secondary {
  font-style: italic;
  font-weight: 400;
  font-size: 0.92em;
  opacity: 0.72;
}

.room-intro .en-secondary {
  display: block;
  margin-top: 2px;
}


/* Topic editors — fields and softer focus */

.topic-page .topic-composer input[type="text"] {
  width: 100%;
  margin-top: 8px;
  padding: 13px 15px;
  color: #f8fafc !important;
  background: rgba(8, 18, 32, 0.94) !important;
  border: 1px solid rgba(100, 116, 139, 0.48) !important;
  border-radius: 10px !important;
  font: inherit;
}

.topic-page .topic-composer textarea:focus,
.topic-page .topic-composer input[type="text"]:focus {
  outline: none !important;
  border-color: rgba(96, 165, 250, 0.42) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08) !important;
}


/* =========================================================
   COMMUNITY TOPIC PAGE — unified dark design
   ========================================================= */

.room-page > .room-card {
  margin-top: 22px;
  padding: 26px;
  color: rgba(226, 232, 240, 0.92) !important;
  background:
    linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.98),
    rgba(24, 34, 49, 0.98)    ) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.room-page > .room-card > h2 {
  margin: 0 0 18px;
  color: rgba(248, 250, 252, 0.98) !important;
  -webkit-text-fill-color: rgba(248, 250, 252, 0.98) !important;
  font-size: 21px;
  line-height: 1.35;
}

.room-page .topic-title {
  margin: -6px 0 20px;
  color: rgba(203, 213, 225, 0.76) !important;
  -webkit-text-fill-color: rgba(203, 213, 225, 0.76) !important;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.room-page .message-item {
  margin: 16px 0 0;
  padding: 20px;
  color: rgba(226, 232, 240, 0.9) !important;
  background: rgba(8, 18, 32, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.room-page .message-item:first-of-type {
  margin-top: 0;
}

.room-page .message-item > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.room-page .message-item > header strong,
.room-page .message-item > header a {
  color: #93c5fd !important;
  -webkit-text-fill-color: #93c5fd !important;
  text-decoration: none;
}

.room-page .message-item > header span {
  color: rgba(203, 213, 225, 0.58) !important;
  -webkit-text-fill-color: rgba(203, 213, 225, 0.58) !important;
  font-size: 13px;
}

.room-page .message-item > p {
  margin: 0;
  color: rgba(241, 245, 249, 0.9) !important;
  -webkit-text-fill-color: rgba(241, 245, 249, 0.9) !important;
  line-height: 1.7;
  white-space: pre-wrap;
}

.room-page .reply-to-label {
  margin-bottom: 10px !important;
  color: rgba(147, 197, 253, 0.72) !important;
  -webkit-text-fill-color: rgba(147, 197, 253, 0.72) !important;
  font-size: 13px;
  font-style: italic;
}

.room-page .message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.room-page .message-actions a,
.room-page .message-actions button {
  width: auto;
  min-height: 38px;
  padding: 9px 13px;
  color: rgba(219, 234, 254, 0.9) !important;
  -webkit-text-fill-color: rgba(219, 234, 254, 0.9) !important;
  background: rgba(30, 64, 175, 0.16) !important;
  border: 1px solid rgba(96, 165, 250, 0.2) !important;
  border-radius: 9px !important;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

.room-page .message-actions a:hover,
.room-page .message-actions button:hover {
  color: #eff6ff !important;
  background: rgba(37, 99, 235, 0.24) !important;
  border-color: rgba(96, 165, 250, 0.34) !important;
}

.room-page .message-thread {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.room-page .message-thread > summary {
  color: rgba(147, 197, 253, 0.84);
  font-size: 14px;
  cursor: pointer;
}

.room-page .thread-replies {
  margin-top: 14px;
  padding-left: 18px;
  border-left: 2px solid rgba(96, 165, 250, 0.18);
}

.room-page .thread-reply {
  background: rgba(15, 27, 45, 0.68) !important;
}

.room-page #reply-target {
  margin: 0 0 14px;
  color: rgba(147, 197, 253, 0.78) !important;
  font-size: 14px;
}

.room-page #reply-composer label {
  display: block;
  color: rgba(226, 232, 240, 0.82) !important;
}

.room-page #reply-composer textarea {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 14px 15px;
  color: #f8fafc !important;
  background: rgba(5, 14, 27, 0.82) !important;
  border: 1px solid rgba(100, 116, 139, 0.42) !important;
  border-radius: 11px !important;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.room-page #reply-composer textarea:focus {
  outline: none !important;
  border-color: rgba(96, 165, 250, 0.38) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.07) !important;
}

@media (max-width: 720px) {
  .room-page > .room-card {
    padding: 20px;
  }

  .room-page .message-item {
    padding: 17px;
  }

  .room-page .message-item > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-page .thread-replies {
    padding-left: 10px;
  }
}


/* Topic page — soften bright blue bands */
.room-page > .room-card {
  background: linear-gradient(
    145deg,
    rgba(15, 27, 45, 0.98),
    rgba(8, 17, 30, 0.98)
  ) !important;
}

.room-page > .room-card::before,
.room-page > .room-card::after {
  opacity: 0.18 !important;
}


.room-page > .room-card {
  background: rgba(10, 20, 35, 0.98) !important;
}

.room-page > .room-card::before,
.room-page > .room-card::after {
  display: none !important;
  content: none !important;
}


/* ===== MAIN PAGES BILINGUAL HEADER NORMALIZATION ===== */

/* English part of main page titles */
.hall-page .profile-header h1 > span,
.members-page .profile-header h1 > span,
.room-page .profile-header h1 > span,
.notifications-page .profile-header h1 > span {
  display: inline !important;
  margin: 0 !important;
  color: rgba(226, 232, 240, 0.66) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66) !important;
  font-size: 0.82em !important;
  font-style: italic !important;
  font-weight: 400 !important;
}

/* English part of lower navigation */
.members-navigation a > span,
.room-navigation a > span {
  color: rgba(226, 232, 240, 0.66) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66) !important;
  font-size: 0.92em !important;
  font-style: italic !important;
  font-weight: 400 !important;
}

/* English text in article empty-state description */
.room-page .room-empty p > span {
  display: block;
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.66) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66) !important;
  font-size: 0.82em;
  font-style: italic;
  font-weight: 400;
}

/* ===== Notifications — dark cards and explicit read state ===== */

.notifications-page .notifications-card {
  padding: clamp(18px, 3vw, 28px) !important;
}

.notifications-page .notifications-heading h2 > span {
  display: inline !important;
  margin: 0 !important;
}

.notifications-page .notifications-heading form {
  flex: 0 0 auto;
}

.notifications-page .notifications-heading form > button[type="submit"] {
  width: auto !important;
  padding: 9px 13px !important;
  color: #b8caff !important;
  background: rgba(65, 105, 225, 0.12) !important;
  border: 1px solid rgba(111, 143, 255, 0.34) !important;
  box-shadow: none !important;
}

.notifications-page .notifications-list {
  gap: 12px;
}

.notifications-page .notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(15, 29, 48, 0.98), rgba(12, 23, 39, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.18);
}

.notifications-page .notification-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.notifications-page .notification-item.is-unread {
  background: linear-gradient(135deg, rgba(24, 44, 73, 0.99), rgba(13, 27, 47, 0.99));
  border-color: rgba(104, 137, 255, 0.5);
}

.notifications-page .notification-item.is-unread::before {
  background: linear-gradient(180deg, #80a2ff, #4f6de2);
  box-shadow: 0 0 18px rgba(96, 133, 255, 0.68);
}

.notifications-page .notification-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #c7d5ff;
  background: rgba(81, 111, 211, 0.16);
  border: 1px solid rgba(126, 151, 239, 0.26);
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 700;
}

.notifications-page .notification-content {
  min-width: 0;
  gap: 9px;
}

.notifications-page .notification-meta,
.notifications-page .notification-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.notifications-page .notification-kind,
.notifications-page .notification-state {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.notifications-page .notification-kind {
  color: #aebfff;
}

.notifications-page .notification-state {
  color: rgba(203, 213, 225, 0.62);
}

.notifications-page .is-unread .notification-state {
  color: #9eb5ff;
}

.notifications-page .notification-message {
  display: flex;
  gap: 0.35em;
  flex-wrap: wrap;
  margin: 0;
  color: rgba(226, 232, 240, 0.84) !important;
  line-height: 1.5;
}

.notifications-page .notification-message strong {
  color: #fff;
}

.notifications-page .notification-topic {
  margin: 0;
  color: rgba(203, 213, 225, 0.66) !important;
  font-size: 0.92rem;
  line-height: 1.45;
}

.notifications-page .notification-topic em {
  font-style: italic;
}

.notifications-page .notification-topic strong {
  color: rgba(241, 245, 249, 0.92);
  font-weight: 600;
}

.notifications-page .notification-footer {
  margin-top: 2px;
}

.notifications-page .notification-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  color: #e9efff !important;
  background: linear-gradient(180deg, rgba(75, 114, 255, 0.88), rgba(53, 98, 238, 0.88));
  border: 1px solid rgba(130, 156, 255, 0.42);
  border-radius: 9px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 150ms ease, filter 150ms ease;
}

.notifications-page .notification-open:hover,
.notifications-page .notification-open:focus-visible {
  color: #fff !important;
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.notifications-page .notification-open:visited {
  color: #e9efff !important;
}

.notifications-page .notification-content time {
  color: rgba(203, 213, 225, 0.56);
  font-variant-numeric: tabular-nums;
}

.auth-form button:disabled {
  opacity: 0.58;
  cursor: wait;
  filter: saturate(0.65);
}

@media (max-width: 700px) {
  .notifications-page .notifications-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .notifications-page .notification-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    padding: 15px 13px;
  }

  .notifications-page .notification-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .notifications-page .notification-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== MEMBER PROFILE — unified dark design ===== */

.member-profile-page {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 52px;
}

.member-profile-header h1 {
  margin: 0;
  color: #f8fafc !important;
}

.member-profile-header > p:last-child {
  margin-top: 12px;
  color: rgba(226, 232, 240, 0.72) !important;
  line-height: 1.6;
}

.member-profile-header > p:last-child span,
.member-profile-page h2 > span,
.member-profile-page .room-empty p > span,
.member-profile-page .members-navigation a > span {
  color: rgba(226, 232, 240, 0.66) !important;
  -webkit-text-fill-color: rgba(226, 232, 240, 0.66) !important;
  font-style: italic;
  font-weight: 400;
}

.member-profile-page h2 > span {
  font-size: 0.82em;
}

.member-profile-meta .topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.member-profile-meta .topic-meta > span {
  padding: 6px 9px;
  color: rgba(203, 213, 225, 0.82);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  font-size: 13px;
}

.member-profile-section .room-empty {
  padding: 26px 22px;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px;
  text-align: center;
}

.member-profile-section .room-empty p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72) !important;
}

.member-profile-section .room-empty p > span {
  display: block;
  margin-top: 4px;
  font-size: 0.88em;
}

.member-profile-page .topic-list {
  display: grid;
  gap: 14px;
}

.member-profile-page .topic-card-link {
  text-decoration: none;
}

.member-profile-page .topic-item {
  padding: 20px 21px;
  background: rgba(15, 23, 42, 0.76) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px !important;
}

.member-profile-page .topic-item h3 {
  margin: 0;
  color: rgba(248, 250, 252, 0.96) !important;
}

.member-profile-page .topic-preview {
  margin: 9px 0 0;
  color: rgba(226, 232, 240, 0.72) !important;
  line-height: 1.55;
}

.member-profile-page .members-navigation {
  margin-top: 22px;
}

.member-profile-page .members-navigation a {
  color: #93c5fd;
  text-decoration: none;
}

.member-profile-page .members-navigation a:hover {
  color: #bfdbfe;
}

@media (max-width: 700px) {
  .member-profile-page {
    width: calc(100% - 24px);
    padding-top: 20px;
  }
}


/* ===== ARTICLE DISCUSSIONS ===== */

.article-discussion-list {
  display: grid;
  gap: 22px;
  margin-top: 6px;
}

.article-discussion-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
}

.article-language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(148, 163, 184, 0.14);
}

.article-language-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(15, 23, 42, 0.96);
  color: inherit;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.article-language-card:hover {
  background: rgba(30, 41, 59, 0.98);
}

.article-language-image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
}

.article-language-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.article-language-label {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 3px 7px;
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 6px;
  color: rgba(147, 197, 253, 0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.article-language-card h3 {
  margin: 0 0 10px;
  color: rgba(248, 250, 252, 0.96) !important;
  font-size: 18px;
  line-height: 1.32;
}

.article-language-card p {
  margin: 0 0 18px;
  color: rgba(203, 213, 225, 0.72) !important;
  font-size: 14px;
  line-height: 1.55;
}

.article-read-link {
  margin-top: auto;
  color: rgba(147, 197, 253, 0.9);
  font-size: 13px;
  font-style: italic;
}

.article-discussion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.82);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.article-discussion-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  min-width: 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 13px;
}

.article-discussion-stats strong {
  color: rgba(248, 250, 252, 0.94);
  font-size: 14px;
}

.article-discussion-stats strong span {
  color: rgba(226, 232, 240, 0.62);
  font-style: italic;
  font-weight: 400;
}

.article-discussion-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .article-language-grid {
    grid-template-columns: 1fr;
  }

  .article-language-image {
    height: 200px;
  }

  .article-discussion-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ===== ARTICLE DISCUSSIONS — shared image layout ===== */

.article-shared-image-wrap {
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.article-shared-image {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

.article-language-card {
  min-height: 250px;
}

.article-language-card + .article-language-card {
  border-left: 1px solid rgba(148, 163, 184, 0.14);
}

.article-language-body {
  padding: 20px 22px 22px;
}

.article-language-card h3 {
  font-size: 17px;
}

.article-language-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

@media (max-width: 820px) {
  .article-shared-image {
    height: 210px;
  }

  .article-language-card + .article-language-card {
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
  }
}


/* Article discussion — page heading */





@media (max-width: 700px) {

}

/* ===== ARTICLE DISCUSSION — final header hierarchy ===== */







.article-discussion-source-image {
    overflow: hidden;
    margin: 0 0 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
}

.article-discussion-source-image img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 700px) {



    .article-discussion-source-image img {
        height: 180px;
    }
}

/* Article discussion — hierarchy refinement */






@media (max-width: 700px) {


}

/* Article discussion — final heading proportions */

/* ===== ARTICLE DISCUSSION HEADER — CANONICAL ===== */

.topic-page-header h1.article-discussion-page-title {
    display: block;
    margin: 0 0 14px !important;
    font-size: 19px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

.topic-page-header h1.article-discussion-page-title > span {
    display: block !important;
    margin: 4px 0 0 !important;
    color: rgba(226, 232, 240, 0.62) !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    font-weight: 400 !important;
    font-style: italic !important;
}

.article-discussion-source-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    margin: 0 0 20px;
}

.article-discussion-source-links a {
    color: rgba(248, 250, 252, 0.96) !important;
    font-size: 26px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    font-style: normal !important;
    text-decoration: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.article-discussion-source-links a:nth-child(2) {
    color: rgba(226, 232, 240, 0.72) !important;
    font-size: 21px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
    font-style: italic !important;
}

.article-discussion-source-links a:hover {
    color: #c7a6d9 !important;
    border-bottom-color: rgba(199, 166, 217, 0.6);
}


.article-discussion-source-links a,
.article-discussion-source-links a:hover {
    border-bottom: none !important;
    text-decoration: none !important;
}

/* Article title links — remove all inherited link decoration */
.article-discussion-source-links a,
.article-discussion-source-links a:link,
.article-discussion-source-links a:visited,
.article-discussion-source-links a:hover,
.article-discussion-source-links a:active,
.article-discussion-source-links a:focus {
    text-decoration: none !important;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
    outline: none;
}

.article-discussion-source-links a::before,
.article-discussion-source-links a::after {
    border: 0 !important;
    box-shadow: none !important;
    background: none !important;
}

/* Article discussion panels — soften top border */
.topic-page .topic-replies-panel,
.topic-page .topic-reply-panel {
    border-top-color: rgba(148, 163, 184, 0.12) !important;
}

/* ===== DISCUSSION THREAD — SINGLE CONTINUOUS WINDOW ===== */

.topic-message-list {
    display: block;
}

.topic-message-card {
    margin: 0 !important;
    padding: 18px 18px 16px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.topic-message-card + .topic-message-card {
    border-top: 1px solid rgba(148, 163, 184, 0.12) !important;
}

.topic-message-card.thread-reply {
    margin-left: 28px !important;
    padding-left: 18px !important;
    border-left: 2px solid rgba(148, 163, 184, 0.14) !important;
}

.thread-replies {
    margin-top: 10px;
}

.topic-message-header {
    margin-bottom: 10px;
}

.topic-message-body {
    margin-bottom: 12px;
}

.topic-message-actions {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .topic-message-card.thread-reply {
        margin-left: 14px !important;
        padding-left: 14px !important;
    }
}

/* Discussion thread — remove bright level-2 guide line */
.thread-replies,
.topic-message-card.thread-reply {
    border-left: 0 !important;
}

.thread-replies::before,
.thread-replies::after,
.topic-message-card.thread-reply::before,
.topic-message-card.thread-reply::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

/* Discussion comments — match main site typography */
.topic-message-body p {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.topic-page .topic-message-body p {
    font-size: 18px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
}

.topic-page .topic-message-body,
.topic-page .topic-message-body p {
    font-size: 18px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
}

.topic-page .topic-message-body,
.topic-page .topic-message-body p {
    font-size: 18px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
}

/* ===== DISCUSSION THREAD — ONE CONTINUOUS CONVERSATION ===== */

.topic-replies-panel .topic-message-list {
    overflow: hidden;
    background: rgba(6, 18, 32, 0.46);
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 14px;
}

.topic-replies-panel .topic-message-list > .topic-message-card {
    margin: 0 !important;
    padding: 20px 18px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.topic-replies-panel .topic-message-list > .topic-message-card + .topic-message-card {
    border-top: 1px solid rgba(148, 163, 184, 0.12) !important;
}

.topic-replies-panel .thread-replies {
    margin: 12px 0 0 38px !important;
}

.topic-replies-panel .thread-replies .topic-message-card {
    margin: 0 !important;
    padding: 14px 0 6px 16px !important;
    background: transparent !important;
    border: 0 !important;
    border-left: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 700px) {
.topic-replies-panel .thread-replies {
        margin-left: 18px !important;
    }
}

/* ===== LOUNGE BANNER V2 — RESPONSIVE, WITHOUT DISTORTION ===== */

html,
body {
    width: 100%;
    max-width: 100%;
}

body {
    overflow-x: hidden !important;
}

.lounge-banner {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: clamp(300px, 22vw, 430px) !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    contain: paint;
}

.lounge-banner-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 55% !important;
    filter: brightness(0.9) !important;
}

@media (max-width: 900px) {
    .lounge-banner {
        height: clamp(210px, 42vw, 300px) !important;
    }

    .lounge-banner-image {
        object-position: center 52% !important;
    }
}

/* ===== LOUNGE BANNER V6 — CINEMATIC TYPOGRAPHIC WINGS ===== */

.lounge-banner {
    isolation: isolate;
    height: clamp(300px, 22vw, 430px) !important;
    min-height: 0 !important;
    background:
        radial-gradient(ellipse 34% 115% at 0% 48%, rgba(188, 101, 38, .33), transparent 72%),
        radial-gradient(ellipse 34% 115% at 100% 44%, rgba(16, 91, 151, .38), transparent 72%),
        linear-gradient(90deg, #0c0805 0%, #08090c 45%, #040b13 100%),
        #05080d !important;
    box-shadow:
        inset 0 -1px rgba(211, 164, 103, .18),
        inset 0 -24px 48px rgba(0, 0, 0, .24);
}

.lounge-banner-image {
    position: absolute !important;
    z-index: 0;
    top: 0;
    left: 50%;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: translateX(-50%);
    filter: none !important;
}

.lounge-banner::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(5, 8, 13, .08) 0%,
        rgba(5, 8, 13, .02) 25%,
        transparent 39%,
        transparent 61%,
        rgba(5, 8, 13, .02) 75%,
        rgba(5, 8, 13, .08) 100%
    );
}

.lounge-banner-title,
.lounge-banner-quote {
    display: flex !important;
    position: absolute;
    z-index: 4;
    top: 50%;
    width: min(23vw, 440px);
    margin: 0;
    transform: translateY(-50%);
    color: #f4eee5;
    text-shadow: 0 3px 24px rgba(0, 0, 0, .92);
}

.lounge-banner-title {
    left: clamp(42px, 5vw, 104px);
    flex-direction: column;
    align-items: flex-start;
}

.lounge-banner-mark {
    color: #e5ad62;
    font: 700 clamp(34px, 2.7vw, 52px)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: -.08em;
    text-shadow: 0 0 13px rgba(229, 173, 98, .50), 0 0 34px rgba(188, 101, 38, .36);
}

.lounge-banner-title strong {
    margin-top: 14px;
    font-size: clamp(26px, 2vw, 39px);
    line-height: 1.08;
    letter-spacing: .095em;
}

.lounge-banner-name {
    margin-top: 25px;
    color: #f6e7d1;
    font: italic 600 clamp(44px, 3.35vw, 65px)/.95 "Iowan Old Style", Baskerville, Georgia, "Times New Roman", serif;
    letter-spacing: .015em;
}

.lounge-banner-title small {
    margin-top: 11px;
    color: rgba(235, 239, 247, .72);
    font: italic clamp(15px, 1.05vw, 20px)/1.2 "Iowan Old Style", Baskerville, Georgia, serif;
    font-style: italic;
    letter-spacing: .08em;
}

.lounge-banner-quote {
    right: clamp(42px, 5vw, 104px);
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.lounge-banner-title::before,
.lounge-banner-quote::before {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.lounge-banner-title::before {
    content: "";
    inset: -42px -46px;
    border-left: 2px solid rgba(229, 173, 98, .52);
    background:
        linear-gradient(90deg, rgba(229, 173, 98, .11), transparent 58%),
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(229, 173, 98, .035) 31px 32px);
    box-shadow: -12px 0 38px rgba(188, 101, 38, .16);
}

.lounge-banner-quote::before {
    content: "“";
    top: -96px;
    right: -8px;
    color: rgba(105, 181, 236, .16);
    font: 700 150px/1 Georgia, "Times New Roman", serif;
    text-shadow: 0 0 42px rgba(50, 139, 204, .22);
}

.lounge-banner-quote p {
    margin: 0;
    font: italic clamp(22px, 1.55vw, 30px)/1.48 "Iowan Old Style", Baskerville, Georgia, "Times New Roman", serif;
    text-wrap: balance;
}

.lounge-banner-quote cite {
    width: 100%;
    margin-top: 20px;
    padding-top: 13px;
    color: #e5ad62;
    border-top: 1px solid rgba(105, 181, 236, .34);
    font-size: clamp(14px, .92vw, 18px);
    font-style: normal;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(229, 173, 98, .25);
}

@media (max-width: 1080px) {
    .lounge-banner-title,
    .lounge-banner-quote {
        display: none !important;
    }

    .lounge-banner::before {
        background: linear-gradient(90deg, rgba(5, 8, 13, .35), transparent 24%, transparent 76%, rgba(5, 8, 13, .35));
    }
}

@media (max-width: 700px) {
    .lounge-banner {
        height: clamp(210px, 42vw, 300px) !important;
    }
}

/* Notification preferences: event categories and a separate delivery channel. */
.profile-page .notification-preferences-intro {
    margin: -4px 0 20px;
    color: rgba(235, 239, 247, .82);
    line-height: 1.55;
}

.profile-page .notification-preferences-intro span,
.profile-page .notification-delivery p span,
.profile-page .notification-delivery h3 span {
    color: rgba(196, 207, 224, .62);
    font-style: italic;
    font-weight: 400;
}

.profile-page .notification-delivery {
    margin: 26px 0 24px;
    padding: 22px 24px;
    border: 1px solid rgba(105, 181, 236, .24);
    border-radius: 16px;
    background: rgba(8, 23, 42, .42);
}

.profile-page .notification-delivery h3 {
    margin: 0 0 8px;
    color: #f3f6fb;
    font-size: 1rem;
    letter-spacing: .025em;
}

.profile-page .notification-delivery p {
    margin: 0 0 17px;
    color: rgba(235, 239, 247, .78);
    line-height: 1.5;
}

.profile-page .notification-delivery label:has(input[type="checkbox"]) {
    margin: 0;
}

@media (max-width: 700px) {
    .profile-page .notification-delivery {
        margin-inline: -4px;
        padding: 18px;
    }
}

/* Moderator workspace */
.moderation-page {
    width: min(1120px, calc(100% - 40px)) !important;
    max-width: 1120px !important;
}

.moderation-page .profile-header h1 {
    max-width: 980px;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1.08;
}

.moderation-panel h2 {
    font-size: 1.2rem;
}

.moderation-tabs,
.moderation-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.moderation-button-row {
    display: grid;
    grid-template-columns: max-content max-content minmax(360px, 1fr);
    align-items: center;
    justify-content: start;
}

.moderation-tabs {
    margin: 18px 0;
}

.moderation-tabs a {
    padding: 10px 14px;
    color: #c7d7ff;
    border: 1px solid rgba(105, 181, 236, .28);
    border-radius: 10px;
    background: rgba(8, 23, 42, .62);
    text-decoration: none;
}

.moderation-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.moderation-stats article {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 14px;
    background: rgba(23, 35, 53, .94);
}

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

.moderation-stats strong {
    margin-bottom: 6px;
    color: #8fb0ff;
    font-size: 2rem;
}

.moderation-stats span {
    color: rgba(226, 232, 240, .72);
    font-size: .86rem;
}

.moderation-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 10px;
    margin: 18px 0;
}

.moderation-filter input,
.moderation-filter select,
.moderation-actions input,
.moderation-actions select,
.moderation-button-row input,
.moderation-message input,
.moderation-resolution input {
    min-width: 0;
    padding: 11px 13px;
    color: #f8fafc;
    border: 1px solid rgba(100, 116, 139, .5);
    border-radius: 9px;
    background: rgba(8, 18, 32, .96);
    font: inherit;
}

.moderation-page button {
    color: #fff;
    background: linear-gradient(180deg, #4b72ff, #3562ee);
}

.moderation-page button.danger {
    background: linear-gradient(180deg, #be4557, #963243);
}

.moderation-button-row form,
.moderation-message form {
    align-items: center;
}

.moderation-button-row button,
.moderation-message form button,
.moderation-actions button,
.moderation-resolution button {
    width: auto !important;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: none !important;
    font-size: .82rem !important;
}

.moderation-hide-action input,
.moderation-message form input {
    width: min(260px, 100%);
    min-height: 36px;
    padding: 8px 10px;
    font-size: .86rem;
}

.moderation-list {
    display: grid;
    gap: 14px;
}

.moderation-item {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0 !important;
}

.moderation-item h2,
.moderation-item p {
    margin-top: 0;
}

.moderation-item.is-danger,
.moderation-message.is-danger {
    border-color: rgba(248, 113, 113, .45) !important;
    background: linear-gradient(180deg, rgba(69, 30, 42, .95), rgba(40, 27, 38, .95)) !important;
}

.moderation-item.is-warning {
    border-color: rgba(251, 191, 36, .42) !important;
}

.moderation-warning {
    color: #fda4af !important;
}

.moderation-actions,
.moderation-actions form,
.moderation-resolution,
.moderation-button-row form,
.moderation-message form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.content .profile-page .moderation-button-row > form {
    flex-wrap: nowrap;
    margin: 0;
}

.content .profile-page .moderation-button-row .moderation-hide-action {
    display: grid;
    grid-template-columns: minmax(220px, 320px) max-content;
    align-items: center;
    justify-content: start;
}

.content .profile-page .moderation-button-row .moderation-hide-action input {
    width: 100%;
}

.content .profile-page .moderation-button-row form > button[type="submit"] {
    width: auto !important;
    white-space: nowrap;
}

.content .profile-page .moderation-message-action {
    display: grid;
    grid-template-columns: minmax(220px, 320px) max-content;
    align-items: center;
    justify-content: start;
    width: fit-content;
    max-width: 100%;
    margin: 12px 0 0;
}

.content .profile-page .moderation-message-action input {
    width: 100%;
}

.content .profile-page .moderation-message-action > button[type="submit"] {
    width: auto !important;
    white-space: nowrap;
}

.content .profile-page .moderation-message-restore {
    width: fit-content;
    margin: 12px 0 0;
}

.content .profile-page .moderation-message-restore > button[type="submit"] {
    width: auto !important;
    white-space: nowrap;
}

.topic-closed-notice {
    display: grid;
    gap: 4px;
    margin: 0 0 22px;
    padding: 15px 18px;
    border: 1px solid rgba(251, 191, 36, .38);
    border-radius: 12px;
    color: #f8fafc;
    background: rgba(120, 72, 12, .18);
}

.topic-closed-notice span,
.topic-closed-notice em {
    color: rgba(226, 232, 240, .76);
}

.topic-closed-notice em {
    font-size: .9rem;
}

.moderation-actions {
    min-width: min(420px, 48%);
    flex-direction: column;
}

.moderation-topic-link {
    color: inherit;
    text-decoration: none;
}

.moderation-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.moderation-flags span,
.moderation-flags strong {
    padding: 5px 8px;
    border-radius: 7px;
    background: rgba(8, 18, 32, .72);
    font-size: .82rem;
}

.moderation-message-list,
.moderation-log-list {
    display: grid;
    gap: 12px;
}

.moderation-message,
.moderation-log-list article {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 12px;
    background: rgba(8, 18, 32, .54);
}

.moderation-message header,
.moderation-log-list article {
    display: grid;
    gap: 5px;
}

.moderation-message header {
    grid-template-columns: 1fr auto;
}

.moderation-log-list small {
    color: rgba(226, 232, 240, .58);
}

.report-control {
    margin-top: 12px;
    color: rgba(226, 232, 240, .62);
    font-size: .86rem;
}

.report-control summary {
    cursor: pointer;
}

.report-control form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.report-control textarea {
    min-height: 72px !important;
}

.moderated-placeholder,
.topic-message-card.is-moderated-hidden .topic-message-body {
    color: rgba(226, 232, 240, .58);
    font-style: italic;
}

.topic-message-card.is-moderated-hidden {
    border-style: dashed;
    opacity: .82;
}

@media (max-width: 860px) {
    .moderation-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .moderation-filter,
    .moderation-item {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .moderation-actions {
        width: 100%;
        min-width: 0;
    }

    .moderation-button-row {
        grid-template-columns: max-content max-content;
    }

    .content .profile-page .moderation-button-row .moderation-hide-action {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) max-content;
        width: 100%;
    }

    .content .profile-page .moderation-message-action {
        grid-template-columns: minmax(0, 1fr) max-content;
        width: 100%;
    }
}
