
:root {
  --brand-green: #123524;
  --brand-text: #123524;
  --brand-green-hover: #1a4a33;
  --brand-green-deep: #0b2619;
  --brand-green-soft: #edf3ef;
  --brand-green-soft-hover: #dce8e0;
  --brand-border: #bfd0c5;
  --brand-border-strong: #afc3b6;
  --surface-panel: #ffffff;
  --surface-soft: #f7faf8;
  --separator: #d9e4dc;
  --text-main: #10231d;
  --text-secondary: #253c35;
  --text-muted: #52645e;
  --text-muted-light: #667872;
  --focus-ring: rgba(18, 53, 36, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--brand-green);
  color: var(--text-main);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-panel);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.wide-card {
  max-width: 760px;
}

h1 {
  margin: 0;
  color: var(--brand-text);
  font-size: 42px;
  text-align: center;
  letter-spacing: -1px;
}

h2 {
  margin: 0 0 10px;
  color: var(--brand-text);
  font-size: 20px;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  border: none;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}

.tab.active {
  background: var(--brand-green);
  color: white;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hidden {
  display: none !important;
}

label {
  font-weight: bold;
  font-size: 14px;
}

input {
  padding: 12px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 10px;
  font-size: 15px;
}

input:focus {
  outline: 2px solid var(--brand-green);
  border-color: var(--brand-text);
}

small {
  color: var(--text-muted-light);
  font-size: 12px;
  margin-top: -6px;
}

.checkbox {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: normal;
  margin-top: 12px;
  line-height: 1.4;
}

.checkbox input {
  width: auto;
  margin-top: 2px;
}

button[type="submit"],
button[type="button"],
.secondary-button {
  background: var(--brand-green);
  color: white;
  border: none;
  padding: 13px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
}

button[type="submit"]:hover,
button[type="button"]:hover,
.secondary-button:hover {
  background: var(--brand-green-hover);
}

.secondary-button {
  background: var(--brand-green-soft);
  color: var(--brand-text);
}

.secondary-button:hover {
  background: var(--brand-green-soft-hover);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.link-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.text-button {
  background: none !important;
  border: none;
  color: var(--brand-text);
  cursor: pointer;
  padding: 0;
  font-weight: bold;
  text-decoration: underline;
}

.helper-text {
  margin: 0 0 8px;
  color: var(--text-muted);
  line-height: 1.5;
}

.message {
  min-height: 22px;
  margin-top: 16px;
  text-align: center;
  font-weight: bold;
  line-height: 1.4;
}

.message.error {
  color: #b00020;
}

.message.success {
  color: var(--brand-text);
}

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

.home-header h1,
.home-header .subtitle {
  text-align: left;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.status-box {
  background: var(--brand-green-soft);
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 14px;
}

.status-box span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.status-box strong {
  color: var(--brand-text);
  font-size: 18px;
}

.home-section {
  border-top: 1px solid var(--separator);
  padding-top: 18px;
  margin-top: 18px;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.nav-card {
  border: 1px solid var(--brand-border);
  background: var(--surface-panel);
  color: var(--brand-text);
  padding: 18px 10px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: bold;
}

.nav-card:hover {
  background: var(--brand-green-soft);
}

.rules-box {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--brand-border);
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 18px;
  line-height: 1.55;
}

.rules-box p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

@media (max-width: 650px) {
  .home-header {
    flex-direction: column;
  }

  .status-grid,
  .nav-grid {
    grid-template-columns: 1fr;
  }
}

.account-help {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.recovery-button {
  display: block !important;
  background: var(--brand-green-soft) !important;
  color: var(--brand-green) !important;
  border: 1px solid var(--brand-border) !important;
  padding: 11px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-weight: bold !important;
  text-align: center !important;
  margin-top: 0 !important;
}

.recovery-button:hover {
  background: var(--brand-green-soft-hover) !important;
}

@media (max-width: 430px) {
  .account-help {
    grid-template-columns: 1fr;
  }
}

.profile-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: start;
}

.profile-preview {
  background: var(--brand-green-soft);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--brand-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: bold;
  margin: 0 auto 14px;
}

.profile-avatar-picker {
  min-width: 0;
  margin: 8px 0 2px;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.profile-avatar-picker legend {
  padding: 0 6px;
  color: var(--brand-text);
  font-size: 1rem;
  font-weight: 800;
}

.profile-avatar-picker > .helper-text {
  margin: 0 0 12px;
}

.profile-avatar-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.profile-avatar-option {
  display: grid;
  grid-template-columns: auto 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 2px solid rgba(18, 53, 36, 0.12);
  border-radius: 12px;
  background: var(--surface-panel);
  color: #23372d;
  cursor: pointer;
  font-weight: 700;
}

.profile-avatar-option:hover,
.profile-avatar-option:focus-within {
  border-color: var(--brand-text);
  background: var(--brand-green-soft);
}

.profile-avatar-option:has(input:checked) {
  border-color: var(--brand-text);
  box-shadow: 0 0 0 3px rgba(18, 53, 36, 0.12);
}

.profile-avatar-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand-text);
}

.profile-avatar-option-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.profile-tagline {
  color: var(--text-secondary);
  font-weight: bold;
  line-height: 1.4;
  word-break: break-word;
}

/* Phase 10D.1: private participation statistics */
.profile-statistics-heading {
  align-items: flex-start;
}

.profile-statistics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-statistic-card {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-left: 5px solid var(--brand-green);
  border-radius: 14px;
  background: var(--surface-soft);
}

.profile-statistic-card dt {
  color: #31463a;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.35;
}

.profile-statistic-card dd {
  margin: 8px 0 0;
  color: var(--brand-text);
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 850;
  line-height: 1;
  overflow-wrap: anywhere;
}

.profile-statistics-grid[aria-busy="true"] .profile-statistic-card {
  opacity: 0.68;
}

/* Phase 10E.7: simple recent activity inside My activity */
.profile-recent-activity {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--separator);
}

.profile-recent-activity-heading h3,
.profile-recent-activity-heading p {
  margin-top: 0;
}

.profile-recent-activity-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.profile-recent-activity-list[aria-busy="true"] {
  opacity: 0.68;
}

.profile-recent-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.profile-recent-activity-marker {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-green);
  color: #ffffff;
  font-weight: 850;
}

.profile-recent-activity-copy {
  min-width: 0;
}

.profile-recent-activity-copy strong {
  display: block;
  overflow-wrap: anywhere;
}

.profile-recent-activity-copy .helper-text {
  margin: 4px 0 0;
}

/* Phase 10B.1: short status updates on member profiles */
.profile-statuses-section {
  margin-top: 28px;
  padding-top: 24px;
}

.profile-statuses-heading {
  align-items: flex-start;
}

.profile-statuses-heading h2,
.profile-statuses-heading p {
  margin-top: 0;
}

.profile-status-form {
  padding: 18px;
  border: 2px solid rgba(18, 53, 36, 0.16);
  border-radius: 16px;
  background: var(--brand-green-soft);
}

.profile-status-form textarea {
  min-height: 104px;
  resize: vertical;
}

.profile-status-form-footer {
  display: grid;
  grid-template-columns: auto auto minmax(190px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.profile-status-form-footer .helper-text,
.profile-status-form-footer label,
.profile-status-form-footer select,
.profile-status-form-footer button {
  margin: 0;
}

.profile-status-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.profile-status-card {
  padding: 18px;
  border: 2px solid rgba(18, 53, 36, 0.14);
  border-radius: 16px;
  background: var(--surface-panel);
  box-shadow: 0 5px 14px rgba(18, 53, 36, 0.05);
}

.profile-status-card-header,
.profile-status-author,
.profile-status-card-footer {
  display: flex;
  align-items: center;
}

.profile-status-card-header {
  justify-content: space-between;
  gap: 14px;
}

.profile-status-author {
  min-width: 0;
  gap: 11px;
}

.profile-status-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.profile-status-author-text {
  min-width: 0;
}

.profile-status-author-text strong,
.profile-status-author-text span {
  display: block;
  overflow-wrap: anywhere;
}

.profile-status-author-text span {
  margin-top: 2px;
  color: var(--text-muted);
}

.profile-status-text {
  margin: 16px 0;
  color: #23372d;
  font-size: 1.06rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.profile-status-card-footer {
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
}

.profile-status-audience {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--brand-text);
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-status-delete {
  width: auto;
  min-width: 128px;
  margin: 0;
}

/* Phase 9H.4: central Musallah conversation list on My Profile */
.my-musallah-messages-section {
  margin-top: 28px;
  padding-top: 24px;
}

.my-musallah-messages-heading {
  align-items: flex-start;
  gap: 18px;
}

.my-musallah-messages-heading h2,
.my-musallah-messages-heading p {
  margin-top: 0;
}

.my-musallah-messages-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.my-musallah-message-card {
  padding: 18px;
  border: 2px solid rgba(18, 53, 36, 0.16);
  border-radius: 16px;
  background: var(--surface-panel);
  box-shadow: 0 5px 14px rgba(18, 53, 36, 0.05);
}

.my-musallah-message-card.has-unread {
  border: 3px solid #d69a00;
  background: #fff8dc;
  box-shadow: 0 0 0 4px rgba(214, 154, 0, 0.12);
}

.my-musallah-message-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.my-musallah-message-card-heading h3,
.my-musallah-message-card-heading p {
  margin: 0;
}

.my-musallah-message-unread-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #d69a00;
  border-radius: 999px;
  color: #624500;
  background: #ffe78f;
  font-size: 0.84rem;
  font-weight: 800;
}

.my-musallah-message-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 0;
  color: #23372d;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.my-musallah-message-avatar {
  display: inline-flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.my-musallah-message-author {
  color: #123524;
  font-weight: 800;
  white-space: nowrap;
}

.my-musallah-message-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.my-musallah-message-card-footer .helper-text {
  margin: 0;
}

.my-musallah-message-card-footer button {
  flex: 0 0 auto;
  margin: 0;
}

.notice-box {
  background: var(--surface-soft);
  border: 1px solid var(--brand-border);
  color: var(--text-muted);
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

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

  .profile-avatar-options {
    grid-template-columns: 1fr;
  }

  .profile-statistics-grid {
    grid-template-columns: 1fr;
  }

  .profile-statistics-heading {
    align-items: stretch;
  }

  .profile-statistics-heading .secondary-button {
    width: 100%;
  }

  .profile-status-form-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .profile-status-form-footer button,
  .profile-status-delete {
    width: 100%;
  }

  .profile-status-card-header,
  .profile-status-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-status-audience {
    align-self: flex-start;
  }

  .my-musallah-messages-heading,
  .my-musallah-message-card-heading,
  .my-musallah-message-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .my-musallah-messages-heading button,
  .my-musallah-message-card-footer button {
    width: 100%;
  }

  .my-musallah-message-unread-badge {
    align-self: flex-start;
  }
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.search-row button {
  margin-top: 0;
}

.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 8px;
}

.alphabet-grid button {
  margin-top: 0;
  padding: 10px;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
}

.alphabet-grid button:hover {
  background: var(--brand-green-soft-hover);
}

.number-grid {
  grid-template-columns: repeat(10, 1fr);
}

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

.result-card {
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
}

.result-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: bold;
}

.result-card h3 {
  margin: 0;
  color: var(--brand-text);
}

.result-card p {
  margin: 4px 0 0;
  color: var(--text-muted);
  line-height: 1.4;
}

.result-meta {
  font-size: 13px;
}

@media (max-width: 650px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .alphabet-grid,
  .number-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .result-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .result-avatar {
    margin: 0 auto;
  }
}

.public-profile-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: start;
}

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

.profile-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.profile-action-grid button {
  margin-top: 0;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
}

.profile-action-grid button:hover {
  background: var(--brand-green-soft-hover);
}

.view-profile-button {
  margin-top: 10px !important;
  background: var(--brand-green) !important;
  color: white !important;
  border: none !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
}

@media (max-width: 650px) {
  .public-profile-layout,
  .profile-action-grid {
    grid-template-columns: 1fr;
  }
}

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

/* Phase 10E.8: simple notification inbox views */
.notification-inbox-section > h2 {
  margin-bottom: 6px;
}

.notification-inbox-section > .helper-text {
  margin: 0;
}

.notification-inbox-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

button.notification-filter-button {
  width: 100%;
  margin: 0;
  min-height: 48px;
}

button.notification-filter-button.is-active,
button.notification-filter-button[aria-pressed="true"] {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-text);
}

.notifications-list[aria-busy="true"] {
  opacity: 0.68;
}

.notification-card {
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px;
}

.notification-card.is-unread {
  border-width: 2px;
  border-color: var(--brand-text);
  background: var(--brand-green-soft);
}

.notification-card.is-action-required {
  border-width: 3px;
  border-color: #9a5b00;
  background: #fff4d9;
  box-shadow: 0 8px 20px rgba(112, 66, 0, 0.12);
}

.notification-card.is-action-required h3 {
  color: #704200;
}

.notification-card h3 {
  margin: 0 0 6px;
  color: var(--brand-text);
}

.notification-card p {
  margin: 0 0 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

.maidaan-composer {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 2px solid #dce8e2;
  border-radius: 16px;
  background: #f8fcfa;
}

.maidaan-composer textarea,
.maidaan-composer select {
  width: 100%;
  margin-top: 0.45rem;
}

.maidaan-composer-footer {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  margin-top: 0.75rem;
}

.maidaan-composer-footer > span {
  grid-column: 1 / -1;
}

.maidaan-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1.25rem;
}

button.maidaan-tab {
  margin-top: 0;
  background: #e8f1ed;
  color: #173d31;
  border: 2px solid transparent;
}

button.maidaan-tab:hover,
button.maidaan-tab:focus-visible {
  background: #d8e9e1;
  color: #173d31;
}

button.maidaan-tab.is-active,
button.maidaan-tab.is-active:hover,
button.maidaan-tab.is-active:focus-visible {
  background: #176b52;
  color: #fff;
  border-color: #176b52;
}

.maidaan-trending-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #c9ddd4;
  border-radius: 16px;
  background: #f4faf7;
}

.maidaan-trending-panel h2 {
  margin-bottom: 0.35rem;
}

.maidaan-trending-hashtags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

button.maidaan-trending-hashtag {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid #c9ddd4;
  background: var(--surface-panel);
  color: #173d31;
  text-align: left;
}

button.maidaan-trending-hashtag:hover,
button.maidaan-trending-hashtag:focus-visible {
  background: #e8f4ef;
  color: #173d31;
}

.maidaan-trending-hashtag > span:last-child {
  color: #52645e;
  font-size: 0.8rem;
  white-space: nowrap;
}

.maidaan-trending-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #176b52;
  color: #ffffff;
  font-weight: 800;
}

.maidaan-feed {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}

.maidaan-post {
  padding: 1rem;
  border: 1px solid #d8e3de;
  border-radius: 14px;
  background: var(--surface-panel);
}

.maidaan-post.is-mentioned {
  border: 3px solid #d59b16;
  background: #fff9e8;
}

.maidaan-post-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.maidaan-post-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.maidaan-post-header-tools {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.maidaan-post-author-handle {
  min-width: 0;
  overflow-wrap: anywhere;
}

.maidaan-post-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcebe5;
  color: #176b52;
  font-weight: 800;
}

.maidaan-audience-label {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #edf4f1;
  font-size: 0.82rem;
  white-space: nowrap;
}

.maidaan-post-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.55;
}

.maidaan-post-controls {
  display: flex;
  justify-content: center;
  margin: 0;
}

.maidaan-post-actions-toggle,
button.maidaan-post-actions-toggle {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #176b52;
  font-size: 1.25rem;
  line-height: 1;
}

button.maidaan-post-actions-toggle > i {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  line-height: 1;
}

button.maidaan-post-actions-toggle > i::before {
  display: block;
  line-height: 1;
  vertical-align: 0;
}

button.maidaan-post-actions-toggle:hover,
button.maidaan-post-actions-toggle:focus-visible,
button.maidaan-post-actions-toggle.is-open {
  background: transparent;
  color: #123524;
}

.maidaan-post-actions,
.maidaan-reply-actions,
.maidaan-action-panel .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.maidaan-post-actions {
  margin-top: 0.65rem;
  padding: 0.7rem;
  border: 1px solid #d8e3de;
  border-radius: 12px;
  background: #f7faf8;
}

.maidaan-post-actions button,
.maidaan-reply-actions button {
  padding: 0.65rem 0.8rem;
  margin: 0;
}

.maidaan-post-actions .maidaan-icon-button,
.maidaan-reply-actions .maidaan-icon-button {
  width: 46px;
  height: 46px;
  min-width: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  gap: 0;
  text-align: center;
  vertical-align: middle;
}

.maidaan-icon-button > i {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 1;
  transform: none;
}

.maidaan-icon-button > .button-icon {
  display: none;
}

.maidaan-danger-button {
  color: #9b1c1c;
  border-color: #e3b4b4;
}

.maidaan-danger-button:hover,
.maidaan-danger-button:focus-visible {
  background: #9b1c1c;
  color: #fff;
}

.maidaan-moderation-button {
  color: #704200;
  border-color: #dfc68d;
}

.maidaan-love-button.is-loved {
  background: #176b52;
  color: #fff;
  border-color: #176b52;
}

.maidaan-inline-link {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0 0.12rem;
  border: 0;
  background: transparent;
  color: #176b52;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.maidaan-room-suggestions {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding: 0.65rem;
  border: 1px solid #cbdcd5;
  border-radius: 12px;
  background: var(--surface-panel);
}

.maidaan-room-suggestions button {
  width: 100%;
  margin: 0;
  text-align: left;
}

.maidaan-original-post {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
  margin: 0.9rem 0 0;
  padding: 0.85rem;
  border: 1px solid #cddbd5;
  border-left: 5px solid #176b52;
  border-radius: 10px;
  background: #f7faf9;
  cursor: pointer;
}

.maidaan-original-post:hover,
.maidaan-original-post:focus-visible {
  border-color: #176b52;
  background: #edf7f2;
}

.maidaan-original-post p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.maidaan-action-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 2px solid #176b52;
  border-radius: 14px;
  background: #f5fbf8;
}

.maidaan-action-panel textarea,
.maidaan-action-panel select,
.maidaan-action-panel input {
  width: 100%;
  margin: 0.45rem 0 0.75rem;
}

.maidaan-thread-view {
  margin-top: 1.25rem;
}

.maidaan-thread-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.maidaan-thread-heading > div {
  flex: 1 1 auto;
}

.maidaan-thread-heading h2 {
  margin-bottom: 0.3rem;
}

.maidaan-thread-heading .helper-text {
  margin-bottom: 0;
}

.maidaan-thread-heading button {
  flex: 0 0 auto;
  margin-top: 0;
}

.maidaan-thread-post .maidaan-post {
  border-width: 2px;
  border-color: #a9c7ba;
  box-shadow: 0 8px 22px rgba(18, 53, 36, 0.08);
}

.maidaan-reply-composer {
  margin: 1rem 0;
  padding: 1rem;
  border: 2px solid #176b52;
  border-radius: 16px;
  background: #f5fbf8;
}

.maidaan-reply-composer textarea {
  width: 100%;
  margin-top: 0.45rem;
}

.maidaan-reply-mention-help {
  margin: 0.55rem 0 0;
  line-height: 1.55;
}

.maidaan-reply-suggestions {
  margin-bottom: 0.75rem;
}

.maidaan-reply-suggestions button {
  min-height: 48px;
  font-size: 1rem;
}

.maidaan-reply-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.maidaan-reply-composer-footer .helper-text,
.maidaan-reply-composer-footer button {
  margin: 0;
}

.maidaan-replies-section {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #d3e0db;
  border-radius: 16px;
  background: #f8fbfa;
}

.maidaan-replies-section .section-heading {
  align-items: flex-end;
}

.maidaan-replies-section h3 {
  margin-bottom: 0;
  color: var(--brand-text);
}

.maidaan-replies-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.maidaan-reply-card {
  padding: 0.9rem;
  border: 1px solid #d8e3de;
  border-radius: 14px;
  background: var(--surface-panel);
  scroll-margin-block: 1rem;
}

.maidaan-reply-card.is-mentioned {
  border: 3px solid #d59b16;
  background: #fff9e8;
}

.maidaan-reply-card.is-notification-target {
  outline: 4px solid rgba(23, 107, 82, 0.28);
  outline-offset: 3px;
}

.maidaan-reply-content-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.maidaan-reply-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcebe5;
  color: #176b52;
  font-weight: 800;
}

.maidaan-reply-content {
  min-width: 0;
  flex: 1 1 auto;
}

.maidaan-reply-copy {
  margin: 0;
  color: var(--text-main);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.maidaan-reply-copy strong {
  color: var(--brand-text);
}

.maidaan-reply-mention {
  color: #176b52;
  font-weight: 800;
}

.maidaan-reply-mention-badge {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: #8c6300;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
}

.maidaan-reply-content .helper-text {
  display: block;
  margin: 0.3rem 0 0;
}

.maidaan-replies-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed #b8cec4;
  border-radius: 12px;
  background: var(--surface-panel);
  text-align: center;
}

.maidaan-friend-choices {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.maidaan-friend-choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid #d3e0db;
  border-radius: 10px;
  background: var(--surface-panel);
}

@media (max-width: 640px) {
  .maidaan-composer-footer { grid-template-columns: 1fr; }
  .maidaan-composer-footer > span { grid-column: auto; }
  .maidaan-composer-footer button { width: 100%; }
  .maidaan-trending-hashtags { grid-template-columns: 1fr; }
  .maidaan-thread-heading { flex-direction: column; }
  .maidaan-thread-heading button { width: 100%; }
  .maidaan-reply-composer-footer { align-items: stretch; flex-direction: column; }
  .maidaan-reply-composer-footer button { width: 100%; }
}

.notification-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-actions button {
  margin-top: 0;
  padding: 10px 12px;
}

.friend-status-text {
  margin-top: 10px;
  color: var(--brand-text);
  font-weight: bold;
}

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

.friend-card {
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
}

.friend-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: bold;
}

.friend-card h3 {
  margin: 0;
  color: var(--brand-text);
}

.friend-card p {
  margin: 4px 0 0;
  color: var(--text-muted);
  line-height: 1.4;
}

.friend-label {
  display: inline-block;
  margin-top: 8px;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: bold;
}

.locked-note {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 650px) {
  .friend-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .friend-avatar {
    margin: 0 auto;
  }
}

.nav-card.notification-alert {
  background: #b00020;
  color: white;
  border-color: #b00020;
}

.nav-card.notification-alert:hover {
  background: #8f001a;
  color: white;
}

textarea,
select {
  padding: 12px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 10px;
  font-size: 15px;
  font-family: Arial, sans-serif;
}

textarea:focus,
select:focus {
  outline: 2px solid var(--brand-green);
  border-color: var(--brand-text);
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.moderation-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.moderation-case-card,
.moderation-entry-card {
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px;
}

.moderation-case-card h3,
.moderation-entry-card h3 {
  margin: 0;
  color: var(--brand-text);
}

.moderation-case-card p,
.moderation-entry-card p {
  margin: 6px 0 0;
  color: var(--text-muted);
  line-height: 1.4;
}

.case-status-pill {
  display: inline-block;
  margin-top: 8px;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: bold;
}

.case-status-pill.urgent,
.case-status-pill.high {
  background: #fff0f0;
  color: #b00020;
  border-color: #efb2bd;
}

.moderation-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.moderation-detail-grid div {
  background: var(--brand-green-soft);
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 12px;
}

.moderation-detail-grid p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

@media (max-width: 650px) {
  .moderation-detail-grid {
    grid-template-columns: 1fr;
  }
}

#moderationHomePage .nav-card {
  min-height: 120px;
  font-size: 18px;
}

#bannedEmailsPage .home-header,
#moderationCasesPage .home-header {
  align-items: flex-start;
}

.case-filter-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.case-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.case-filter-grid > div {
  display: grid;
  gap: 6px;
}

@media (max-width: 750px) {
  .case-filter-grid {
    grid-template-columns: 1fr;
  }
}

.case-action-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.case-action-grid button {
  margin-top: 0;
}

.case-action-button.active {
  background: var(--brand-green-hover);
  color: #ffffff;
}

.case-action-panel {
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 16px;
}

.case-action-panel label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
}

.case-subsection {
  border-top: 1px solid var(--separator);
  margin-top: 16px;
  padding-top: 16px;
}

.case-subsection h3 {
  margin: 0 0 10px;
  color: var(--brand-text);
}

@media (max-width: 850px) {
  .case-action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .case-action-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 10C.1: Spark-compatible profile avatar palette */
.profile-avatar-surface {
  --avatar-background: #123524;
  --avatar-foreground: #ffffff;
  background: var(--avatar-background) !important;
  color: var(--avatar-foreground) !important;
}

.profile-avatar-surface[data-avatar-style="ocean"] {
  --avatar-background: #075e54;
}

.profile-avatar-surface[data-avatar-style="sky"] {
  --avatar-background: #215a82;
}

.profile-avatar-surface[data-avatar-style="plum"] {
  --avatar-background: #5b3f72;
}

.profile-avatar-surface[data-avatar-style="rose"] {
  --avatar-background: #7a2947;
}

.profile-avatar-surface[data-avatar-style="clay"] {
  --avatar-background: #7a412f;
}

.profile-avatar-surface[data-avatar-style="olive"] {
  --avatar-background: #4d5b2b;
}

.profile-avatar-surface[data-avatar-style="slate"] {
  --avatar-background: #334155;
}

.danger-button {
  background: #8f1d1d !important;
  color: #ffffff !important;
}

.danger-button:hover {
  background: #6f1515 !important;
}

.moderation-entry-card {
  border-left: 5px solid var(--brand-border);
}

.moderation-entry-meta {
  margin: 4px 0 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: bold;
  line-height: 1.4;
}

.audit-case-created {
  border-left-color: var(--brand-text);
}

.audit-note {
  border-left-color: #6b7280;
}

.audit-status {
  border-left-color: #2563eb;
}

.audit-warning {
  border-left-color: #b45309;
}

.audit-suspension {
  border-left-color: #9333ea;
}

.audit-merge {
  border-left-color: #0f766e;
}

.audit-ban {
  border-left-color: #8f1d1d;
}

.audit-default {
  border-left-color: var(--brand-border);
}

#appealsCard textarea,
#restrictedAccountCard textarea {
  min-height: 140px;
}

#restrictedAccountCard .subtitle {
  color: #8f1d1d;
  font-weight: bold;
}

.appeal-detail-text {
  background: var(--surface-soft);
  border: 1px solid var(--separator);
  border-radius: 12px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.report-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.report-panel h3 {
  margin-top: 0;
}

.report-panel label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 700;
}

.report-panel select,
.report-panel input,
.report-panel textarea {
  width: 100%;
  box-sizing: border-box;
}


/* Shared button and Bootstrap Icon styling */
button {
  font-family: inherit;
  line-height: 1.2;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.button-with-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.button-with-icon .button-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
}

.nav-card.button-with-icon {
  min-height: 88px;
  flex-direction: column;
  gap: 0.55rem;
  text-align: center;
}

.nav-card.button-with-icon .button-icon {
  font-size: 1.45rem;
}

.case-action-button.button-with-icon {
  min-height: 54px;
}

.recovery-button.button-with-icon,
.secondary-button.button-with-icon,
.notification-actions .button-with-icon,
.profile-action-grid .button-with-icon {
  gap: 0.4rem;
}

button[data-prefix] {
  min-width: 0;
}

@media (max-width: 520px) {
  .button-with-icon {
    width: 100%;
  }

  .alphabet-grid .button-with-icon,
  .number-grid .button-with-icon {
    width: auto;
  }
}

/* Phase 7B: Home dashboard */
#homeCard {
  max-width: 1040px;
  padding: 32px;
}

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

.home-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.home-header-actions > button,
.home-header-actions .home-menu-button {
  margin-top: 0;
}

.home-language-selector {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 4px 6px;
  color: var(--brand-text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.home-language-selector:hover,
.home-language-selector:focus-visible {
  color: var(--brand-green-deep);
}

.home-notification-bell {
  display: inline-flex;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--brand-text);
}

.home-notification-bell .button-icon {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.home-notification-bell.notification-alert {
  border-color: var(--brand-text);
  background: var(--brand-green);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(13, 102, 68, 0.18);
}

.home-notification-bell.notification-alert:hover,
.home-notification-bell.notification-alert:focus-visible {
  border-color: var(--brand-green-deep);
  background: var(--brand-green-deep);
  color: #ffffff;
}

.home-menu-wrapper {
  position: relative;
}

.home-menu-button {
  min-width: 112px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.home-menu-button::after {
  display: none;
  content: none;
}

.home-menu-button .button-icon {
  font-size: 1.45rem;
  line-height: 1;
}

.home-quick-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(390px, calc(100vw - 48px));
  max-height: min(720px, 78vh);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  background: var(--surface-panel);
  box-shadow: 0 18px 48px rgba(11, 38, 25, 0.28);
}

.home-quick-menu-heading {
  margin-bottom: 14px;
}

.home-quick-menu-heading h2 {
  margin-bottom: 0;
}

.home-quick-menu .home-action-grid {
  grid-template-columns: 1fr;
}

#homeCard .home-quick-menu .nav-card {
  min-height: 84px;
  padding: 15px 16px;
}

.home-quick-menu-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--separator);
}

.home-menu-sign-out {
  width: 100%;
  margin-top: 0;
  justify-content: center;
}

.home-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.home-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(18, 53, 36, 0.2);
}

.home-dashboard-header h1 {
  text-align: left;
  font-size: 36px;
  line-height: 1;
}

.home-dashboard-header .subtitle {
  text-align: left;
  margin: 6px 0 10px;
  font-size: 16px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 800;
}

.status-pill-success::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #1f7a45;
}

.status-pill-attention {
  border-color: #e0b44a;
  background: #fff8e5;
  color: #765400;
}

.status-pill-closed {
  border-color: #7b8580;
  background: #eef0ef;
  color: #38413c;
}

.status-pill-merged {
  border-color: #5965a8;
  background: #eef0ff;
  color: #303a79;
}

.rooms-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--brand-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(18, 53, 36, 0.13), transparent 42%),
    linear-gradient(135deg, #f8fbf9 0%, var(--brand-green-soft) 100%);
}

.maidaan-spotlight {
  margin-top: 18px;
}

/* Phase 10B.2: accepted friends' profile statuses on Home */
.home-friends-feed {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  background: #f8fbf9;
}

.home-friends-feed-heading {
  align-items: flex-start;
}

.home-friends-feed-heading h2,
.home-friends-feed-heading p {
  margin-top: 0;
}

.home-friends-feed-heading .helper-text {
  max-width: 680px;
  margin-bottom: 0;
  line-height: 1.55;
}

.home-friends-feed-heading button {
  flex: 0 0 auto;
  width: auto;
  margin-top: 0;
}

.home-friends-feed-list {
  margin-top: 14px;
}

.home-friends-feed-card {
  border-color: rgba(18, 53, 36, 0.18);
}

.home-friends-feed-card-footer {
  align-items: flex-end;
}

.home-friends-feed-metadata {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
}

.home-friends-feed-profile-button {
  width: auto;
  min-width: 126px;
  margin: 0;
}

.rooms-spotlight-copy {
  align-self: center;
}

.rooms-spotlight h2 {
  max-width: 680px;
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.2;
}

.rooms-spotlight-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.rooms-spotlight-button {
  margin-top: 20px !important;
  padding-inline: 18px !important;
}

.room-type-preview-grid {
  display: grid;
  gap: 12px;
}

.room-type-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.room-type-preview.home-route-card {
  width: 100%;
  margin-top: 0;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  font: inherit;
  font-weight: 400;
  text-align: left;
}

.room-type-preview.home-route-card:hover {
  border-color: var(--brand-text);
  background: var(--surface-panel);
  box-shadow: 0 7px 18px rgba(18, 53, 36, 0.12);
}

.room-type-preview.home-route-card:focus-visible {
  outline: 3px solid rgba(18, 53, 36, 0.28);
  outline-offset: 3px;
}

.room-type-preview-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 18px;
}

.room-type-preview-copy,
.room-type-preview-title,
.room-type-preview-description {
  display: block;
}

.room-type-preview-title {
  margin: 1px 0 5px;
  color: var(--brand-text);
  font-size: 16px;
  font-weight: 800;
}

.room-type-preview-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 0;
}

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

#homeCard .nav-card {
  position: relative;
  min-height: 136px;
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--brand-border);
  background: var(--surface-panel);
  color: var(--brand-text);
  overflow: hidden;
}

#homeCard .nav-card:hover,
#homeCard .nav-card:focus-visible {
  background: var(--brand-green-soft);
  color: var(--brand-text);
}

#homeCard .nav-card.button-with-icon {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

#homeCard .nav-card.button-with-icon .button-icon {
  margin-bottom: 3px;
  font-size: 1.55rem;
}

.nav-card-title {
  display: block;
  color: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.nav-card-description {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

#homeCard .nav-card:hover .nav-card-description,
#homeCard .nav-card.notification-alert .nav-card-description {
  color: var(--text-secondary);
}

.nav-card-label,
.nav-card-alert {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-card-label {
  background: var(--brand-green-soft);
  color: var(--brand-text);
}

.nav-card-alert {
  display: none;
  background: #b00020;
  color: #ffffff;
}

.nav-card.notification-alert {
  border-color: #b00020;
  background: #fff7f8;
  color: var(--brand-text);
  box-shadow: inset 0 0 0 1px rgba(176, 0, 32, 0.08);
}

.nav-card.notification-alert:hover {
  border-color: #8f001a;
  background: #fff0f2;
  color: var(--brand-text);
}

.nav-card.notification-alert .nav-card-alert {
  display: inline-flex;
}

.home-dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  margin-top: 18px;
}

#homeCard .home-panel {
  margin-top: 0;
  padding: 20px;
  border: 1px solid var(--separator);
  border-radius: 18px;
  background: var(--surface-soft);
}

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

.account-detail-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-panel);
}

.account-detail-row span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-detail-row strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--brand-text);
  font-size: 14px;
}

.account-recovery-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.safety-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-content: start;
}

.safety-panel-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 21px;
}

.safety-panel .secondary-button {
  width: 100%;
}

@media (max-width: 850px) {
  .rooms-spotlight,
  .home-dashboard-columns {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 650px) {
  #homeCard {
    padding: 22px;
  }

  .home-dashboard-header {
    flex-direction: column;
  }

  .home-header-actions {
    width: 100%;
  }

  .home-header-actions > button {
    flex: 0 0 48px;
  }

  .home-menu-wrapper {
    flex: 1 1 auto;
  }

  .home-menu-button {
    width: 100%;
  }

  .rooms-spotlight {
    padding: 20px;
  }

  .home-friends-feed {
    padding: 20px;
  }

  .home-friends-feed-heading,
  .home-friends-feed-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .home-friends-feed-heading button,
  .home-friends-feed-profile-button {
    width: 100%;
  }

  .rooms-spotlight h2 {
    font-size: 23px;
  }
}

@media (max-width: 520px) {
  .home-identity {
    align-items: flex-start;
  }

  .home-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 18px;
    font-size: 22px;
  }

  .home-dashboard-header h1 {
    font-size: 31px;
  }

  .home-action-grid,
  .account-detail-grid {
    grid-template-columns: 1fr;
  }

  #homeCard .nav-card {
    min-height: 118px;
  }
}

/* Phase 7C: clearer moderation workflow and dedicated case workspace */
.dedicated-case-page {
  margin-top: 0;
}

.case-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--separator);
}

.case-page-header h2 {
  margin: 4px 0 0;
}

.case-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.case-workflow-status {
  background: var(--brand-green-soft);
  color: var(--brand-text);
}

.case-target-context {
  margin: 16px 0;
  padding: 13px 15px;
  border: 1px solid var(--brand-border-strong);
  border-left: 5px solid var(--brand-green);
  border-radius: 12px;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  font-weight: 700;
  line-height: 1.5;
}

.case-workflow-guide {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.case-workflow-guide h2 {
  margin-top: 0;
}

.case-workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.case-workflow-grid > div {
  display: grid;
  gap: 5px;
  min-height: 105px;
  padding: 12px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-panel);
}

.case-workflow-grid strong {
  color: var(--brand-text);
}

.case-workflow-grid span {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.case-status-form {
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-panel);
}

.case-status-form label {
  font-weight: 700;
}

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

.case-action-grid button:disabled,
.case-status-form button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.moderation-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.moderation-card-actions button {
  margin-top: 0;
}

.moderation-case-summary-card {
  display: grid;
  align-content: start;
}

.profile-moderation-entry {
  background: var(--surface-panel);
}

.appeal-decision-help {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .case-workflow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .case-page-header {
    flex-direction: column;
  }

  .case-page-header button {
    width: 100%;
  }

  .case-workflow-grid,
  .case-action-grid {
    grid-template-columns: 1fr;
  }
}

.moderation-tool-grid .nav-card {
  align-items: flex-start;
  text-align: left;
}

.moderation-tool-grid .nav-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  min-height: 132px;
  margin-top: 0;
  padding: 18px;
}

.moderation-tool-grid .nav-card.button-with-icon .button-icon {
  margin-bottom: 3px;
  font-size: 1.4rem;
}

/* Phase 8A: Musallah foundation */

.musallah-foundation-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-green-soft), #ffffff);
}

.musallah-foundation-banner h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.musallah-foundation-banner p:last-child {
  margin-bottom: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.musallah-foundation-banner button {
  min-width: 180px;
  margin-top: 0;
}

.musallah-create-actions {
  display: grid;
  gap: 12px;
  min-width: 230px;
}

.musallah-template-actions {
  display: grid;
  gap: 8px;
}

.musallah-template-actions span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.musallah-template-actions button {
  width: 100%;
  min-width: 0;
  font-size: 13px;
}

.musallah-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--separator);
}

.musallah-tab-bar button {
  margin-top: 0;
}

.musallah-tab-bar button.active {
  background: var(--brand-green);
  color: #ffffff;
}

.musallah-directory-heading {
  align-items: flex-start;
  gap: 20px;
}

.musallah-directory-heading button {
  margin-top: 0;
  flex: 0 0 auto;
}

.musallah-directory-search {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.musallah-directory-search h3 {
  margin: 0 0 10px;
  color: var(--brand-text);
}

.musallah-directory-browse {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.musallah-directory-search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.musallah-directory-search-footer .helper-text,
.musallah-directory-search-footer button {
  margin: 0;
}

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

.musallah-list > .notice-box,
.musallah-list > .helper-text {
  grid-column: 1 / -1;
}

.musallah-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  background: var(--surface-panel);
  box-shadow: 0 8px 24px rgba(18, 53, 36, 0.08);
}

.musallah-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.musallah-card-header h3,
.musallah-card h3 {
  margin: 3px 0 0;
  color: var(--brand-text);
  font-size: 19px;
}

.musallah-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.musallah-card-description {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.musallah-card-meta {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.musallah-card > button {
  align-self: flex-start;
  margin-top: auto;
}

.musallah-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.musallah-detail-grid > div {
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.musallah-detail-grid strong {
  color: var(--brand-text);
}

.musallah-detail-grid p {
  margin: 7px 0 0;
  color: var(--text-secondary);
}

.musallah-detail-section {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-panel);
}

.musallah-detail-section h3 {
  margin: 0 0 10px;
  color: var(--brand-text);
}

.musallah-detail-section p {
  margin-bottom: 0;
  line-height: 1.55;
}

.musallah-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.musallah-url-row input {
  width: 100%;
  background: var(--surface-soft);
}

.musallah-url-row button {
  margin-top: 0;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .musallah-foundation-banner {
    grid-template-columns: 1fr;
  }

  .musallah-foundation-banner button {
    width: 100%;
  }

  .musallah-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .musallah-tab-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .musallah-directory-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .musallah-directory-heading button {
    width: 100%;
  }

  .musallah-directory-search-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .musallah-directory-search-footer button {
    width: 100%;
  }

  .musallah-card-header {
    flex-direction: column;
  }

  .musallah-card-badges {
    justify-content: flex-start;
  }

  .musallah-detail-grid,
  .musallah-url-row {
    grid-template-columns: 1fr;
  }

  .musallah-url-row button {
    width: 100%;
  }
}

/* Phase 10E.12: peaceful public landing and sign-in page */
body.landing-visible {
  background: #f6f3ea;
}

body.landing-visible .page {
  display: block;
  min-height: 100vh;
  padding: 0;
}

body.landing-visible .site-privacy-controls {
  padding: 18px 16px 22px;
  background: var(--brand-green-deep);
}

.landing-page.card {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: #fbfaf6;
  box-shadow: none;
}

.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(18, 53, 36, 0.1);
  background: rgba(251, 250, 246, 0.96);
  backdrop-filter: blur(10px);
}

.landing-wordmark {
  color: var(--brand-text);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.landing-language-selector {
  color: var(--brand-text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  direction: ltr;
}

.landing-language-selector:hover,
.landing-language-selector:focus-visible {
  text-decoration: underline;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  gap: 28px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 72px;
  align-items: stretch;
}

.landing-hero-visual {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-radius: 28px;
  background: #d9dfd4;
  box-shadow: 0 18px 42px rgba(20, 47, 34, 0.14);
}

.landing-hero-visual > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.landing-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 29, 19, 0.08) 20%,
    rgba(8, 29, 19, 0.72) 100%
  );
}

.landing-hero-copy {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  max-width: 760px;
  padding: clamp(28px, 5vw, 58px);
  color: #ffffff;
}

.landing-hero-copy h1 {
  max-width: 680px;
  margin: 8px 0 16px;
  color: #ffffff;
  font-size: clamp(2.2rem, 4.7vw, 4.35rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-align: start;
}

.landing-hero-copy > p:last-child {
  max-width: 620px;
  margin: 0;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.6;
}

.landing-eyebrow {
  margin: 0 0 8px;
  color: #416c56;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.landing-hero-copy .landing-eyebrow {
  color: #f6e9c9;
}

.landing-auth-panel {
  align-self: center;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid #d8e1d8;
  border-radius: 24px;
  background: var(--surface-panel);
  box-shadow: 0 16px 42px rgba(20, 47, 34, 0.11);
}

.landing-auth-panel .landing-access-title {
  margin-bottom: 8px;
  color: var(--brand-text);
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  line-height: 1.15;
}

.landing-auth-panel .subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: start;
}

.landing-auth-panel .tabs {
  margin-bottom: 22px;
}

.landing-auth-panel .tab,
.landing-auth-panel button,
.landing-auth-panel input {
  min-height: 50px;
}

.landing-auth-panel label {
  margin-top: 2px;
  font-size: 0.96rem;
}

.landing-auth-panel input {
  padding: 13px 14px;
  font-size: 1rem;
}

.landing-section {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0;
}

.landing-section > h2,
.landing-closing-copy > h2 {
  max-width: 760px;
  margin: 0;
  color: var(--brand-text);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.landing-section-intro {
  max-width: 720px;
  margin: 16px 0 36px;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

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

.landing-feature-card {
  overflow: hidden;
  border: 1px solid #d7e0d7;
  border-radius: 24px;
  background: var(--surface-panel);
  box-shadow: 0 12px 30px rgba(20, 47, 34, 0.08);
}

.landing-feature-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.landing-feature-copy {
  position: relative;
  padding: 28px;
}

.landing-feature-copy h3,
.landing-value-card h3 {
  margin: 0 0 10px;
  color: var(--brand-text);
  font-size: 1.45rem;
  line-height: 1.25;
}

.landing-feature-copy p,
.landing-value-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.landing-feature-icon {
  position: absolute;
  inset-inline-end: 26px;
  top: -30px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 1.35rem;
  box-shadow: 0 8px 20px rgba(18, 53, 36, 0.18);
}

.landing-global-musallah-section {
  padding-top: 62px;
}

.landing-global-room-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.landing-global-room-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid #ccd9ce;
  border-radius: 26px;
  background: var(--surface-panel);
  box-shadow: 0 12px 30px rgba(20, 47, 34, 0.08);
}

.landing-global-room-card-ayat {
  background: #f8f4e9;
}

.landing-global-room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.landing-global-room-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 1.45rem;
}

.landing-global-room-badge {
  padding: 7px 11px;
  border: 1px solid #c6d8c8;
  border-radius: 999px;
  background: #edf5ee;
  color: var(--brand-text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.landing-global-room-card h3 {
  margin: 0;
  color: var(--brand-text);
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  line-height: 1.25;
}

.landing-global-room-card > p {
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.landing-global-room-card .landing-global-room-type {
  color: #345744;
  font-weight: 700;
}

.landing-global-room-purpose {
  color: var(--brand-green) !important;
  font-weight: 650;
}

.landing-global-example {
  display: grid;
  gap: 9px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #dde6dd;
  border-radius: 18px;
  background: #f7faf7;
}

.landing-global-example > span {
  color: var(--brand-text);
  font-size: 0.86rem;
  font-weight: 800;
}

.landing-global-example small {
  color: var(--text-muted);
  line-height: 1.45;
}

.landing-global-task-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border-radius: 11px;
  background: var(--surface-panel);
  color: #263e30;
}

.landing-global-task-row span {
  color: #3f6d50;
  font-size: 0.82rem;
  font-weight: 700;
}

.landing-global-ayat-preview {
  margin-top: 24px;
  padding: 20px;
  border-radius: 18px;
  background: var(--brand-green);
  color: #ffffff;
  font-family: "Traditional Arabic", "Segoe UI", Tahoma, Arial, serif;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.8;
  text-align: center;
}

.landing-global-room-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 20px !important;
  color: #365c43 !important;
  font-weight: 650;
}

.landing-global-room-note i {
  margin-top: 2px;
  color: var(--brand-text);
  font-size: 1.1rem;
}

.landing-global-room-button {
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
}

.landing-global-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 26px;
  background: #fffefb;
  color: var(--text-main);
  box-shadow: 0 24px 70px rgba(8, 25, 15, 0.28);
}

.landing-global-dialog::backdrop {
  background: rgba(9, 28, 17, 0.62);
}

.landing-global-dialog-content {
  position: relative;
  padding: clamp(30px, 5vw, 52px);
}

.landing-global-dialog-close {
  position: sticky;
  z-index: 3;
  top: 0;
  float: inline-end;
  display: grid;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid #cfdbd0;
  border-radius: 50%;
  background: var(--surface-panel);
  color: var(--brand-text);
  font-size: 1.2rem;
}

.landing-global-preview-panel {
  clear: both;
  padding-top: 8px;
}

.landing-global-preview-panel > h2 {
  max-width: 620px;
  margin: 0;
  color: var(--brand-text);
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  line-height: 1.2;
}

.landing-global-preview-purpose {
  max-width: 640px;
  margin: 12px 0 0;
  color: #355a43;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.6;
}

.landing-global-guest-notice,
.landing-global-rule-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid #d2dfd3;
  border-radius: 14px;
  background: #edf5ee;
  color: #294b36;
  line-height: 1.55;
}

.landing-global-guest-notice i,
.landing-global-rule-note i {
  margin-top: 2px;
  color: var(--brand-text);
  font-size: 1.15rem;
}

.landing-global-preview-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.landing-global-preview-summary-single {
  grid-template-columns: minmax(0, 1fr);
}

.landing-global-preview-summary > div {
  display: grid;
  gap: 3px;
  padding: 18px;
  border-radius: 16px;
  background: #f4efe1;
  text-align: center;
}

.landing-global-preview-summary strong {
  color: var(--brand-text);
  font-size: 1.65rem;
}

.landing-global-preview-summary span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.landing-global-preview-panel > h3,
.landing-global-auth-callout h3 {
  margin: 28px 0 12px;
  color: var(--brand-text);
  font-size: 1.3rem;
}

.landing-global-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-global-steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
}

.landing-global-steps li > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-green);
  color: #ffffff;
  font-weight: 800;
}

.landing-global-steps p {
  margin: 5px 0 0;
  color: #354d3d;
  line-height: 1.55;
}

.landing-global-ayat-full {
  margin: 24px 0;
  padding: 24px;
  border-radius: 18px;
  background: var(--brand-green);
  color: #ffffff;
  text-align: center;
}

.landing-global-ayat-full p:first-child {
  margin: 0;
  font-family: "Traditional Arabic", "Segoe UI", Tahoma, Arial, serif;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.85;
}

.landing-global-ayat-full > span {
  display: block;
  margin-top: 18px;
  color: #dce7dc;
  font-size: 0.82rem;
  font-weight: 700;
}

.landing-global-ayat-full p:last-child {
  margin: 7px 0 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.6;
}

.landing-global-auth-callout {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #d5ded5;
  border-radius: 18px;
  background: #f8faf7;
}

.landing-global-auth-callout h3 {
  margin-top: 0;
}

.landing-global-auth-callout p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-global-auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.landing-global-auth-actions button {
  min-height: 50px;
}

.home-global-musallahs .room-type-preview-grid {
  margin-top: 18px;
}

.landing-simple-section {
  width: min(1240px, calc(100% - 48px));
  margin-top: 16px;
  padding-inline: clamp(24px, 4vw, 54px);
  border-radius: 30px;
  background: #edf3ed;
}

.landing-value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.landing-value-card {
  padding: 24px;
  border: 1px solid #d2ded3;
  border-radius: 20px;
  background: var(--surface-panel);
}

.landing-value-card > i {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-green-soft);
  color: var(--brand-text);
  font-size: 1.45rem;
}

.landing-verse-band {
  position: relative;
  width: min(1040px, calc(100% - 48px));
  margin: 24px auto;
  padding: clamp(38px, 6vw, 68px);
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px) 0 0 / 32px 32px,
    var(--brand-green);
  color: #ffffff;
  text-align: center;
}

.landing-verse-figure {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.landing-verse-figure blockquote {
  margin: 0;
}

.landing-verse-ornament {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto 26px;
  border: 2px solid #d7c48b;
  transform: rotate(45deg);
  opacity: 0.9;
}

.landing-verse-arabic {
  margin: 0;
  color: #ffffff;
  font-family: "Traditional Arabic", "Segoe UI", Tahoma, Arial, serif;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 500;
  line-height: 1.9;
  text-align: center;
}

.landing-verse-translation {
  max-width: 820px;
  margin: 26px auto 0;
  color: #f4f7f3;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.75;
  text-align: center;
}

.landing-verse-reference {
  display: grid;
  gap: 5px;
  max-width: 520px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: #dfe9df;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
}

.landing-verse-reference a {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #d7c48b;
  text-underline-offset: 4px;
}

.landing-verse-reference a:hover,
.landing-verse-reference a:focus-visible {
  color: #fff3c7;
}

.landing-closing {
  position: relative;
  width: min(1160px, calc(100% - 48px));
  margin: 92px auto 60px;
  overflow: hidden;
  border-radius: 30px;
  background: #f2ead9;
}

.landing-closing-pattern {
  position: absolute;
  inset: 0 0 0 auto;
  width: 42%;
  opacity: 0.18;
  background:
    linear-gradient(30deg, transparent 40%, #123524 41%, #123524 44%, transparent 45%) 0 0 / 42px 72px,
    linear-gradient(-30deg, transparent 40%, #123524 41%, #123524 44%, transparent 45%) 0 0 / 42px 72px;
}

.landing-closing-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: clamp(38px, 6vw, 70px);
}

.landing-closing-copy > p:not(.landing-eyebrow) {
  margin: 16px 0 26px;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.landing-sign-in-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--brand-green);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.landing-sign-in-link:hover,
.landing-sign-in-link:focus-visible {
  background: var(--brand-green-hover);
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 24px 40px;
  color: #56675f;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.landing-footer strong {
  color: var(--brand-text);
  font-size: 1.08rem;
}

html[dir="rtl"] .landing-hero-copy,
html[dir="rtl"] .landing-auth-panel,
html[dir="rtl"] .landing-section,
html[dir="rtl"] .landing-feature-copy,
html[dir="rtl"] .landing-value-card,
html[dir="rtl"] .landing-closing-copy,
html[dir="rtl"] .landing-global-room-card,
html[dir="rtl"] .landing-global-preview-panel,
html[dir="rtl"] .landing-global-auth-callout {
  text-align: start;
}

html.high-contrast-mode .landing-page,
html.high-contrast-mode body.landing-visible {
  background: var(--surface-panel);
}

html.high-contrast-mode .landing-auth-panel,
html.high-contrast-mode .landing-feature-card,
html.high-contrast-mode .landing-value-card,
html.high-contrast-mode .landing-global-room-card,
html.high-contrast-mode .landing-global-dialog,
html.high-contrast-mode .landing-global-auth-callout {
  border-color: #123524;
}

html.high-contrast-mode .landing-verse-band {
  outline: 3px solid #ffffff;
  outline-offset: -6px;
  background: #123524;
}

@media (max-width: 980px) {
  .landing-hero {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 40px));
  }

  .landing-hero-visual {
    min-height: 520px;
  }

  .landing-auth-panel {
    width: 100%;
  }

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

  .landing-global-room-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .landing-topbar {
    min-height: 64px;
    padding: 10px 18px;
  }

  .landing-wordmark {
    font-size: 1.7rem;
  }

  .landing-language-selector {
    max-width: 210px;
    font-size: 0.78rem;
  }

  .landing-hero {
    width: calc(100% - 28px);
    gap: 18px;
    padding: 18px 0 48px;
  }

  .landing-hero-visual {
    min-height: 440px;
    border-radius: 22px;
  }

  .landing-hero-copy {
    padding: 28px;
  }

  .landing-hero-copy h1 {
    font-size: clamp(2.1rem, 11vw, 3.4rem);
  }

  .landing-auth-panel {
    padding: 24px;
    border-radius: 20px;
  }

  .landing-section,
  .landing-simple-section,
  .landing-closing,
  .landing-verse-band {
    width: calc(100% - 28px);
  }

  .landing-section {
    padding: 58px 0;
  }

  .landing-simple-section {
    padding-inline: 20px;
  }

  .landing-verse-band {
    padding: 34px 22px;
    border-radius: 22px;
  }

  .landing-verse-arabic {
    font-size: clamp(1.65rem, 7.5vw, 2.1rem);
    line-height: 1.9;
  }

  .landing-verse-translation {
    margin-top: 20px;
    font-size: 1.05rem;
    line-height: 1.7;
  }

  .landing-feature-grid,
  .landing-value-grid {
    grid-template-columns: 1fr;
  }

  .landing-global-room-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .landing-global-room-heading {
    align-items: flex-start;
  }

  .landing-global-task-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-global-dialog {
    width: calc(100% - 18px);
    max-height: 92vh;
    border-radius: 20px;
  }

  .landing-global-dialog-content {
    padding: 24px 20px 28px;
  }

  .landing-global-preview-summary {
    grid-template-columns: 1fr;
  }

  .landing-global-auth-actions {
    flex-direction: column;
  }

  .landing-global-auth-actions button {
    width: 100%;
  }

  .landing-feature-copy,
  .landing-value-card {
    padding: 22px;
  }

  .landing-closing {
    margin-top: 66px;
  }

  .landing-closing-pattern {
    width: 58%;
  }

  .landing-closing-copy {
    padding: 38px 28px;
  }

  .landing-footer {
    flex-direction: column;
  }
}

/* Phase 8B: secure Musallah creation */

.musallah-creation-form {
  max-width: 820px;
  margin-top: 18px;
}

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

.musallah-form-grid > div {
  min-width: 0;
}

.musallah-creation-form textarea {
  min-height: 150px;
  resize: vertical;
}

.field-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 6px;
}

.field-meta-row p {
  margin: 0;
}

.character-count {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.musallah-name-availability {
  min-height: 21px;
  margin-top: 7px;
}

.musallah-name-availability.success-text {
  color: #17633a;
  font-weight: 700;
}

.musallah-name-availability.error-text {
  color: #9c1c1c;
  font-weight: 700;
}

.musallah-name-availability.checking-text {
  color: var(--text-muted);
}

.musallah-type-options {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.musallah-type-options > :first-child {
  margin-top: 0;
}

.musallah-type-options .notice-box {
  margin-top: 16px;
}

.musallah-custom-task-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.musallah-custom-task-row {
  padding: 12px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-panel);
}

.musallah-custom-task-row label {
  margin-top: 0;
}

.musallah-owner-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 420px) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.musallah-owner-setting-row select,
.musallah-owner-setting-row button {
  margin-top: 0;
}

.musallah-danger-zone {
  border-color: #c84545;
  background: #fff8f8;
}

.musallah-danger-zone h3 {
  color: #8f1d1d;
}

.musallah-deletion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.musallah-deletion-actions button {
  margin-top: 0;
}

.musallah-merge-panel {
  border-color: #6974b5;
  background: #f8f8ff;
}

.musallah-merge-panel + .musallah-danger-zone {
  margin-top: 24px;
}

.musallah-merge-panel h4 {
  margin-top: 0;
}

.musallah-merge-safety-notice {
  margin: 14px 0;
  border-width: 2px;
}

.musallah-merge-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.musallah-merge-target-row input,
.musallah-merge-target-row button {
  margin-top: 0;
}

.musallah-merge-preview {
  margin: 18px 0;
  padding: 18px;
  border: 2px solid #6974b5;
  border-radius: 14px;
  background: var(--surface-panel);
}

.musallah-merge-preview h4,
.musallah-merge-preview p:last-child {
  margin-bottom: 0;
}

.musallah-merge-member-check.is-safe {
  color: #1f6a46;
  font-weight: 800;
}

.musallah-merge-member-check.is-blocked {
  color: #9a2727;
  font-weight: 800;
}

#mergeMusallahButton {
  margin-top: 16px;
}

.tasbih-recent-line {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--separator);
  color: var(--brand-text);
  font-weight: 800;
}

.tasbih-recent-line:last-child {
  border-bottom: 0;
}

#musallahTasbihShowAllActivityButton {
  margin-top: 14px;
}

#musallahTasbihAllActivity {
  margin-top: 14px;
}

.tasbih-league-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
}

.tasbih-league-table th,
.tasbih-league-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--separator);
  text-align: left;
}

.tasbih-league-table th {
  color: var(--brand-text);
  font-size: 13px;
}

.tasbih-league-table td:last-child,
.tasbih-league-table th:last-child {
  text-align: right;
}

.musallah-task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.musallah-task-claim-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.musallah-task-claim-options .helper-text {
  margin: 0;
}

#musallahTaskClaimLimitRow {
  display: grid;
  gap: 8px;
}

.musallah-task-card {
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.musallah-task-card.is-completed {
  border-color: #79a98a;
  background: #f2faf5;
}

.musallah-task-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.musallah-task-card h4 {
  margin: 3px 0 0;
  color: var(--brand-text);
}

.musallah-task-card p {
  margin: 10px 0 0;
  color: var(--text-secondary);
}

.musallah-task-card .status-pill.success {
  border-color: #79a98a;
  background: #e7f5ec;
  color: #155b32;
}

.musallah-task-claim-details {
  font-size: 0.9rem;
}

.musallah-task-action-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--separator);
}

.musallah-task-action-area button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  margin-top: 0;
  padding-inline: 18px;
  font-size: 1rem;
}

.musallah-prominent-join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  padding: 22px;
  border: 3px solid var(--brand-green);
  border-radius: 18px;
  background: linear-gradient(135deg, #edf8f1, #ffffff);
  box-shadow: 0 10px 24px rgba(18, 53, 36, 0.12);
}

.musallah-prominent-join h3 {
  margin: 2px 0 8px;
  color: var(--brand-text);
  font-size: 1.55rem;
}

.musallah-prominent-join p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.musallah-prominent-join .musallah-invitation-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.musallah-prominent-join #musallahRequestToJoinButton {
  min-width: 210px;
  min-height: 58px;
  font-size: 1.08rem;
}

.musallah-prominent-join .message {
  max-width: 360px;
  margin: 8px 0 0;
  text-align: left;
}

.musallah-owner-request-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 22px;
  border: 3px solid #9a5b00;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff4d9, #ffffff);
  box-shadow: 0 10px 24px rgba(112, 66, 0, 0.14);
}

.musallah-owner-request-alert h3 {
  margin: 2px 0 7px;
  color: #704200;
  font-size: 1.5rem;
}

.musallah-owner-request-alert p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.musallah-owner-request-count {
  display: grid;
  place-items: center;
  min-width: 70px;
  min-height: 70px;
  padding: 10px;
  border-radius: 18px;
  background: #704200;
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 800;
}

.musallah-owner-request-alert button {
  min-width: 210px;
  margin: 0;
  background: #704200;
}

.musallah-owner-join-requests-panel {
  border: 3px solid #9a5b00;
  background: #fffaf0;
}

.musallah-task-owner-assignment {
  display: grid;
  gap: 16px;
  margin: 20px 0 4px;
  padding: 20px;
  border: 2px solid var(--brand-border);
  border-radius: 16px;
  background: var(--surface-panel);
}

.musallah-task-owner-assignment h4 {
  margin: 2px 0 6px;
  color: var(--brand-text);
  font-size: 1.25rem;
}

.musallah-task-assignment-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.musallah-task-assignment-controls > div {
  display: grid;
  gap: 7px;
}

.musallah-task-assignment-controls select,
.musallah-task-assignment-controls button {
  min-height: 52px;
  margin-top: 0;
  font-size: 1rem;
}

.musallah-task-owner-assignment .message {
  margin: 0;
  text-align: left;
}

.musallah-task-own-status {
  margin: 0 !important;
  color: var(--brand-green) !important;
  font-weight: 800;
}

.musallah-task-own-status.completed {
  color: #155b32 !important;
}

.musallah-task-progress-grid,
.musallah-task-results {
  margin-top: 20px;
}

/* Phase 9G: protected Musallah messages */
.musallah-messages-content {
  display: grid;
  gap: 20px;
}

.musallah-message-composer {
  padding: 18px;
  border: 2px solid rgba(18, 53, 36, 0.18);
  border-radius: 16px;
  background: #f7fbf8;
}

.musallah-message-composer h4 {
  margin: 0 0 12px;
}

.musallah-message-composer textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  font: inherit;
}

.musallah-message-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.musallah-message-compose-footer .helper-text {
  margin: 0;
}

.musallah-messages-list {
  display: grid;
  gap: 14px;
}

.musallah-message-card {
  padding: 14px 16px;
  border: 1px solid rgba(18, 53, 36, 0.16);
  border-radius: 14px;
  background: var(--surface-panel);
  box-shadow: 0 5px 14px rgba(18, 53, 36, 0.06);
}

.musallah-message-content-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.musallah-message-avatar {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(18, 53, 36, 0.2);
  border-radius: 50%;
  color: #ffffff;
  background: #356849;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.musallah-message-compact-content {
  flex: 1 1 auto;
  min-width: 0;
}

.musallah-message-inline-copy,
.musallah-message-body {
  margin: 0;
}

.musallah-message-inline-copy {
  color: #23372d;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.musallah-message-inline-author {
  color: #123524;
  font-weight: 800;
  white-space: nowrap;
}

.musallah-message-body {
  color: #23372d;
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.musallah-message-metadata {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.musallah-message-metadata .helper-text {
  margin: 0;
  font-size: 0.82rem;
}

/* Phase 9G.1: message reports and moderation history */
.musallah-message-author {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.musallah-message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.musallah-message-actions button {
  margin-top: 0;
}

.musallah-message-report-form {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(136, 50, 50, 0.22);
  border-radius: 12px;
  background: #fff9f7;
}

.musallah-message-report-form textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  font: inherit;
}

.musallah-message-report-form .helper-text {
  margin: 0;
}

.musallah-message-card.is-removed {
  border-color: rgba(136, 50, 50, 0.28);
  background: #fffaf8;
}

.musallah-message-removed-badge {
  color: #7b2828;
  background: #fbe4e1;
}

.musallah-message-removal-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(136, 50, 50, 0.18);
  color: #6f2929;
  font-size: 0.94rem;
  line-height: 1.5;
}

.musallah-message-history-title {
  margin: 20px 0 0;
  padding-top: 20px;
  border-top: 2px solid rgba(18, 53, 36, 0.14);
  color: #123524;
}

.musallah-message-reports-panel {
  padding: 20px;
  border: 2px solid rgba(136, 50, 50, 0.18);
  border-radius: 16px;
  background: #fffdfb;
}

.musallah-message-reports-list {
  display: grid;
  gap: 14px;
}

.musallah-message-report-card {
  padding: 17px;
  border: 1px solid rgba(136, 50, 50, 0.22);
  border-radius: 13px;
  background: var(--surface-panel);
}

.musallah-message-report-card h5,
.musallah-message-report-card p {
  margin-top: 0;
}

.musallah-message-report-quote {
  padding: 12px;
  border-left: 4px solid #123524;
  border-radius: 6px;
  background: #f4f8f5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* Phase 9H.1: latest Musallah messages on the main overview */
.musallah-message-preview-section {
  margin-top: 24px;
  padding: 24px;
  border: 2px solid rgba(18, 53, 36, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fbf8 0%, #ffffff 100%);
}

.musallah-message-preview-heading h3,
.musallah-message-preview-heading p {
  margin-top: 0;
}

.musallah-message-preview-heading .helper-text {
  margin-bottom: 0;
}

.musallah-message-preview-list {
  margin-top: 18px;
}

.musallah-message-preview-composer {
  margin-top: 18px;
}

.musallah-message-preview-card {
  box-shadow: none;
}

.musallah-message-card.is-mentioned {
  border: 3px solid #d69a00;
  background: #fff8dc;
  box-shadow: 0 0 0 4px rgba(214, 154, 0, 0.12);
}

.musallah-message-card.is-notification-target {
  animation: musallah-mentioned-message-focus 1.4s ease-in-out 2;
}

.musallah-message-mentioned-badge {
  color: #624500;
  background: #ffe78f;
  border: 1px solid #d69a00;
}

@keyframes musallah-mentioned-message-focus {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(214, 154, 0, 0.12);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(214, 154, 0, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .musallah-message-card.is-notification-target {
    animation: none;
  }
}

.musallah-mention-suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(18, 53, 36, 0.2);
  border-radius: 12px;
  background: var(--surface-panel);
}

.musallah-mention-suggestion,
button.musallah-mention-suggestion {
  min-height: 48px;
  margin: 0;
  padding: 11px 13px;
  text-align: left;
  white-space: normal;
}

.musallah-mention-suggestion strong,
.musallah-mention-suggestion span {
  display: block;
}

.musallah-mention-suggestion span {
  margin-top: 3px;
  font-size: 0.88rem;
  font-weight: 500;
}

.musallah-full-conversation-button,
button.musallah-full-conversation-button {
  width: 100%;
  min-height: 60px;
  margin-top: 20px;
  font-size: 1.05rem;
}

@media (max-width: 700px) {
  .musallah-task-list {
    grid-template-columns: 1fr;
  }

  .musallah-task-action-area,
  .musallah-task-action-area button {
    width: 100%;
  }

  .musallah-prominent-join,
  .musallah-task-assignment-controls {
    grid-template-columns: 1fr;
  }

  .musallah-prominent-join .musallah-invitation-actions,
  .musallah-prominent-join button,
  .musallah-task-assignment-controls button {
    width: 100%;
  }

  .musallah-message-compose-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .musallah-message-compose-footer button {
    width: 100%;
  }

  .musallah-message-actions,
  .musallah-message-actions button {
    width: 100%;
  }

  .musallah-message-preview-section {
    padding: 18px;
  }

  .musallah-mention-suggestions {
    grid-template-columns: 1fr;
  }
}

.compact-notice {
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.5;
}

.form-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.form-action-row button {
  margin-top: 0;
}

@media (max-width: 640px) {
  .musallah-form-grid {
    grid-template-columns: 1fr;
  }

  .field-meta-row {
    align-items: flex-start;
  }

  .form-action-row button {
    width: 100%;
  }

  .musallah-owner-setting-row {
    grid-template-columns: 1fr;
  }

  .musallah-owner-setting-row button {
    width: 100%;
  }
}

.musallah-membership-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.musallah-membership-heading h3,
.musallah-membership-panel h4 {
  margin-top: 0;
}

.musallah-owner-membership-tools {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

.musallah-membership-panel {
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.musallah-invite-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}

.musallah-invite-search-row input,
.musallah-invite-search-row button {
  margin-top: 0;
}

.musallah-member-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.musallah-member-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-panel);
}

.musallah-member-identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.musallah-member-avatar {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.musallah-member-details {
  min-width: 0;
}

.musallah-member-card h5,
.musallah-member-card p {
  margin: 0;
}

.musallah-member-card p + p {
  margin-top: 4px;
}

.musallah-member-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.musallah-member-actions button {
  width: auto;
  margin-top: 0;
}

.musallah-inline-status {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 700;
}

.musallah-invitation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.musallah-invitation-actions button {
  width: auto;
  margin-top: 0;
}

@media (max-width: 760px) {
  .musallah-membership-columns {
    grid-template-columns: 1fr;
  }

  .musallah-member-card {
    flex-direction: column;
  }

  .musallah-member-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .musallah-invite-search-row {
    grid-template-columns: 1fr;
  }

  .musallah-invite-search-row button,
  .musallah-member-actions button,
  .musallah-invitation-actions button {
    width: 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.compact-section-heading {
  align-items: flex-start;
  gap: 12px;
}

.compact-section-heading h4,
.compact-section-heading p {
  margin-top: 0;
}

.compact-section-heading button {
  width: auto;
  margin-top: 0;
  flex: 0 0 auto;
}

#musallahJoinRequestSection .notice-box {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .compact-section-heading {
    align-items: stretch;
  }

  .compact-section-heading button {
    width: 100%;
  }
}

/* Phase 8E: Musallah membership lifecycle */

.musallah-self-membership-panel {
  margin-top: 18px;
}

.musallah-self-membership-panel button {
  width: auto;
  margin-top: 10px;
}

.musallah-former-member-card {
  background: #fffdf8;
}

.musallah-membership-reason {
  max-width: 620px;
  margin-top: 8px !important;
}

.musallah-moderator-member-note {
  max-width: 280px;
  text-align: right;
}

.musallah-status-left,
.musallah-status-removed {
  background: #f3f4f6;
  color: #374151;
}

.musallah-status-blocked {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 760px) {
  .musallah-moderator-member-note {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .musallah-self-membership-panel button {
    width: 100%;
  }
}

/* Phase 9A: Shared Tasbih contributions */

/* Phase 9A.1: make the Tasbih contribution action the primary Musallah action */

.tasbih-primary-section {
  border: 2px solid var(--brand-green);
  background: linear-gradient(180deg, var(--surface-soft) 0, #ffffff 260px);
  box-shadow: 0 12px 30px rgba(18, 53, 36, 0.1);
}

.tasbih-primary-section > .section-heading {
  margin-bottom: 0;
}

.tasbih-primary-section .tasbih-submit-panel {
  margin-top: 18px;
  padding: 22px;
  border: 2px solid var(--brand-green);
  background: var(--surface-panel);
  box-shadow: 0 10px 24px rgba(18, 53, 36, 0.1);
}

.tasbih-primary-section .tasbih-submit-panel h4 {
  margin-top: 0;
  color: var(--brand-text);
  font-size: 1.25rem;
}

.tasbih-primary-section .tasbih-progress-grid {
  margin-top: 22px;
}


.tasbih-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tasbih-progress-grid > div {
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.tasbih-progress-grid strong {
  color: var(--brand-text);
  font-size: 13px;
}

.tasbih-progress-grid p {
  margin: 7px 0 0;
  color: var(--brand-text);
  font-size: 22px;
  font-weight: 800;
}

.tasbih-progress-track {
  width: 100%;
  height: 16px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: var(--surface-soft);
}

.tasbih-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-green);
  transition: width 220ms ease;
}

.tasbih-completed-notice {
  margin-top: 14px;
  border-color: var(--brand-text);
  font-weight: 700;
}

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

.tasbih-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.tasbih-activity-card,
.tasbih-submission-card,
.tasbih-review-card {
  padding: 14px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-panel);
}

.tasbih-activity-card h5,
.tasbih-activity-card p,
.tasbih-submission-card h5,
.tasbih-submission-card p,
.tasbih-review-card h5,
.tasbih-review-card p {
  margin: 0;
}

.tasbih-activity-card p + p,
.tasbih-submission-card p,
.tasbih-review-card p {
  margin-top: 5px;
}

.tasbih-submission-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.tasbih-status-approved {
  background: #dcfce7;
  color: #166534;
}

.tasbih-status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.tasbih-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.tasbih-decision-reason {
  margin-top: 8px !important;
  color: var(--text-secondary);
}

.tasbih-submit-panel,
.tasbih-review-panel {
  margin-top: 18px;
}

.tasbih-counter-row {
  display: grid;
  grid-template-columns: auto minmax(110px, 180px) auto minmax(180px, auto);
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.tasbih-counter-row button,
.tasbih-counter-row input {
  width: 100%;
  margin-top: 0;
}

.tasbih-counter-row input {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.tasbih-review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
  align-items: start;
}

.tasbih-review-actions label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.tasbih-review-actions input {
  width: 100%;
  margin-top: 0;
}

.tasbih-review-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tasbih-review-button-row button {
  width: auto;
  margin-top: 0;
}

@media (max-width: 800px) {
  .tasbih-progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tasbih-content-grid,
  .tasbih-review-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tasbih-counter-row {
    grid-template-columns: 1fr 1fr;
  }

  .tasbih-counter-row input,
  .tasbih-counter-row #musallahTasbihSubmitButton {
    grid-column: 1 / -1;
  }

  .tasbih-review-button-row button {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .tasbih-progress-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 9E: simple, focused Musallah pages */

.musallah-detail-page {
  font-size: 17px;
}

.musallah-page-header {
  align-items: center;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--brand-border);
}

.musallah-page-header h2 {
  margin: 4px 0 8px;
  color: var(--brand-text);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
}

.musallah-page-header .helper-text {
  max-width: 680px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.musallah-large-action {
  min-height: 54px;
  padding: 13px 20px;
  font-size: 1rem;
}

.musallah-page-view {
  margin-top: 24px;
}

.musallah-task-primary-section,
.musallah-overview-stats {
  margin-top: 18px;
  padding: 22px;
  border: 2px solid var(--brand-border);
  border-radius: 18px;
  background: var(--surface-panel);
}

.musallah-task-primary-section {
  border-color: var(--brand-text);
  background: linear-gradient(180deg, var(--surface-soft), #ffffff 220px);
  box-shadow: 0 12px 30px rgba(18, 53, 36, 0.1);
}

.musallah-task-overview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 24px;
  border: 3px solid var(--brand-green);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-green-soft), #ffffff);
  box-shadow: 0 12px 30px rgba(18, 53, 36, 0.11);
}

.musallah-task-overview-panel h3 {
  margin: 2px 0 8px;
  color: var(--brand-text);
  font-size: 1.55rem;
}

.musallah-task-overview-panel p {
  margin: 0;
  line-height: 1.55;
}

.musallah-task-overview-progress {
  display: grid;
  gap: 8px;
}

.musallah-task-overview-progress .tasbih-progress-track {
  margin-top: 2px;
}

.musallah-task-overview-panel > button {
  min-width: 190px;
  margin: 0;
}

.musallah-task-full-section {
  border-color: var(--brand-text);
  background: linear-gradient(180deg, var(--surface-soft), #ffffff 220px);
}

.musallah-task-list {
  grid-template-columns: 1fr;
}

.musallah-overview-stats h3,
.musallah-section-navigation h3,
.musallah-subpage-header h3 {
  margin: 0;
  color: var(--brand-text);
  font-size: 1.55rem;
  line-height: 1.25;
}

.musallah-overview-stats .musallah-detail-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 16px;
}

.musallah-overview-stats .musallah-detail-grid > div,
.tasbih-progress-grid > div {
  min-height: 104px;
  padding: 17px;
}

.musallah-overview-stats .musallah-detail-grid strong,
.tasbih-progress-grid strong {
  font-size: 0.9rem;
}

.musallah-overview-stats .musallah-detail-grid p {
  font-size: 1rem;
  font-weight: 700;
}

.musallah-section-navigation {
  margin-top: 24px;
  padding: 24px;
  border: 2px solid var(--brand-border);
  border-radius: 18px;
  background: var(--surface-soft);
}

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

.musallah-navigation-button,
button.musallah-navigation-button {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 92px;
  margin: 0;
  padding: 18px 20px;
  border: 2px solid var(--brand-green);
  background: var(--brand-green);
  color: #ffffff;
  text-align: left;
  white-space: normal;
}

.musallah-navigation-button:hover,
.musallah-navigation-button:focus-visible {
  border-color: var(--brand-green-hover);
  background: var(--brand-green-hover);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 53, 36, 0.12);
}

.musallah-navigation-button.button-with-icon {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 5px;
  align-items: center;
  justify-content: stretch;
}

.musallah-navigation-button.button-with-icon .button-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1 / 3;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 1.7rem;
}

.musallah-navigation-title {
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
}

.musallah-navigation-description {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

.musallah-navigation-button.button-with-icon .musallah-navigation-title {
  grid-column: 2;
  grid-row: 1;
}

.musallah-navigation-button.button-with-icon .musallah-navigation-description {
  grid-column: 2;
  grid-row: 2;
}

button.musallah-navigation-danger {
  border-color: #8f1d1d;
  background: #8f1d1d;
  color: #ffffff;
}

button.musallah-navigation-danger:hover,
button.musallah-navigation-danger:focus-visible {
  border-color: #711717;
  background: #711717;
  color: #ffffff;
}

.musallah-navigation-danger .musallah-navigation-title,
.musallah-navigation-danger .musallah-navigation-description {
  color: #ffffff;
}

.musallah-focused-page {
  min-height: 520px;
}

.musallah-subpage-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 2px solid var(--brand-border);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-green-soft), #ffffff);
}

.musallah-subpage-header .eyebrow {
  margin-bottom: 6px;
}

.musallah-subpage-header button {
  flex: 0 0 auto;
  margin: 0;
}

.musallah-focused-content {
  margin-top: 18px;
  padding: 24px;
  border: 2px solid var(--brand-border);
  border-radius: 18px;
  background: var(--surface-panel);
}

.musallah-focused-content > :first-child {
  margin-top: 0;
}

.musallah-focused-content > :last-child {
  margin-bottom: 0;
}

.musallah-focused-content label,
.musallah-focused-content h4 {
  color: var(--brand-text);
  font-size: 1.12rem;
  font-weight: 800;
}

.musallah-focused-content p,
.musallah-focused-content .helper-text {
  line-height: 1.65;
}

.musallah-focused-content .musallah-url-row input,
.musallah-focused-content .musallah-url-row button,
.musallah-focused-content select {
  min-height: 52px;
  font-size: 1rem;
}

/* Phase 9I.1: room-level safety reports */
.musallah-report-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 20px;
  border: 2px solid rgba(18, 53, 36, 0.16);
  border-radius: 16px;
  background: #f7fbf8;
}

.musallah-report-form h4 {
  margin: 0 0 4px;
}

.musallah-report-form label {
  margin-top: 8px;
}

.musallah-report-form input,
.musallah-report-form select,
.musallah-report-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
}

.musallah-report-form textarea {
  min-height: 150px;
  resize: vertical;
}

.musallah-report-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.musallah-report-actions button {
  margin: 0;
}

.musallah-report-existing-notice {
  margin-top: 18px;
  border-color: rgba(214, 154, 0, 0.5);
  background: #fff8dc;
  color: #624500;
  font-weight: 700;
}

/* Phase 9I.2: clear Musallah lifecycle states */
.musallah-lifecycle-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 20px 0;
  padding: 20px 22px;
  border: 3px solid #2f7652;
  border-radius: 18px;
  background: #edf8f1;
  color: #123524;
}

.musallah-lifecycle-banner h3,
.musallah-lifecycle-banner p {
  margin-top: 0;
}

.musallah-lifecycle-banner h3 {
  margin-bottom: 5px;
  font-size: 1.35rem;
}

.musallah-lifecycle-banner p:last-child {
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.55;
}

.musallah-lifecycle-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #1f6a46;
  color: #ffffff;
  font-size: 1.8rem;
}

.musallah-lifecycle-banner.is-completed {
  border-color: #a56f00;
  background: #fff7db;
  color: #5f4100;
}

.musallah-lifecycle-banner.is-completed .musallah-lifecycle-icon {
  background: #916300;
}

.musallah-lifecycle-banner.is-closed {
  border-color: #616b66;
  background: #f1f3f2;
  color: #29312d;
}

.musallah-lifecycle-banner.is-closed .musallah-lifecycle-icon {
  background: #4f5954;
}

.musallah-lifecycle-banner.is-merged {
  border-color: #5965a8;
  background: #eef0ff;
  color: #252e65;
}

.musallah-lifecycle-banner.is-merged .musallah-lifecycle-icon {
  background: #485493;
}

.musallah-merged-target-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 15px;
  border-radius: 10px;
  background: #3d4988;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.musallah-merged-target-link:hover,
.musallah-merged-target-link:focus-visible {
  background: #2f396f;
  color: #ffffff;
}

.musallah-owner-setting-group + .musallah-owner-setting-group {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 2px solid rgba(18, 53, 36, 0.14);
}

.musallah-owner-setting-group h4 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

.musallah-lifecycle-setting-help {
  margin-top: 14px;
  line-height: 1.6;
}

.musallah-overview-results .musallah-membership-panel {
  padding: 20px;
  border-width: 2px;
}

.musallah-overview-results h4 {
  font-size: 1.18rem;
}

.tasbih-primary-section .tasbih-submit-panel h4 {
  font-size: 1.35rem;
}

.tasbih-counter-row button,
.tasbih-counter-row input,
#musallahTasbihSubmitButton {
  min-height: 56px;
  font-size: 1.08rem;
}

.tasbih-counter-row #musallahTasbihDecreaseButton,
.tasbih-counter-row #musallahTasbihIncreaseButton {
  min-width: 64px;
  font-size: 1.35rem;
}

.tasbih-recent-line,
.tasbih-league-table th,
.tasbih-league-table td {
  font-size: 1rem;
}

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

  .musallah-task-overview-panel > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .musallah-overview-stats .musallah-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .musallah-overview-stats .musallah-detail-grid > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .musallah-merge-target-row {
    grid-template-columns: 1fr;
  }
  .musallah-owner-request-alert,
  .musallah-task-overview-panel {
    grid-template-columns: 1fr;
  }

  .musallah-owner-request-count {
    width: 70px;
  }

  .musallah-owner-request-alert button,
  .musallah-task-overview-panel > button {
    width: 100%;
  }

  .musallah-page-header,
  .musallah-subpage-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .musallah-page-header button,
  .musallah-subpage-header button {
    width: 100%;
  }

  .musallah-navigation-grid {
    grid-template-columns: 1fr;
  }

  .musallah-navigation-button,
  button.musallah-navigation-button {
    min-height: 100px;
  }

  .musallah-focused-content,
  .musallah-subpage-header,
  .musallah-section-navigation,
  .musallah-overview-stats,
  .musallah-task-primary-section,
  .musallah-task-overview-panel,
  .musallah-owner-request-alert {
    padding: 18px;
  }

  .musallah-report-actions,
  .musallah-report-actions button {
    width: 100%;
  }

  .musallah-report-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .musallah-lifecycle-banner {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .musallah-owner-setting-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .musallah-owner-setting-row button,
  .musallah-owner-setting-row select {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .musallah-detail-page {
    font-size: 16px;
  }

  .musallah-overview-stats .musallah-detail-grid {
    grid-template-columns: 1fr;
  }

  .musallah-overview-stats .musallah-detail-grid > div:last-child {
    grid-column: auto;
  }

  .musallah-overview-stats .musallah-detail-grid > div,
  .tasbih-progress-grid > div {
    min-height: 0;
  }
}

/* Phase 10E.1: simple, consistent and senior-friendly pages */
:root {
  --ui-body-size: 17px;
  --ui-control-size: 16px;
  --ui-help-size: 15px;
  --focus-ring: #f1c84b;
}

html.large-text-mode {
  --ui-body-size: 20px;
  --ui-control-size: 19px;
  --ui-help-size: 18px;
}

html.extra-large-text-mode {
  --ui-body-size: 23px;
  --ui-control-size: 22px;
  --ui-help-size: 20px;
}

html.high-contrast-mode {
  --brand-green: #062b1b;
  --brand-text: #062b1b;
  --brand-green-hover: #001a10;
  --brand-green-deep: #001a10;
  --brand-green-soft: #ffffff;
  --brand-green-soft-hover: #edf3ef;
  --brand-border: #10231d;
  --brand-border-strong: #000000;
  --surface-panel: #ffffff;
  --surface-soft: #ffffff;
  --separator: #10231d;
  --text-main: #000000;
  --text-secondary: #000000;
  --text-muted: #202020;
  --text-muted-light: #303030;
  --focus-ring: #ffbf00;
}

html.high-contrast-mode body {
  background: #000000;
}

html.high-contrast-mode .card,
html.high-contrast-mode .home-section,
html.high-contrast-mode .notice-box {
  border-color: var(--brand-border-strong);
}

html.high-contrast-mode .secondary-button,
html.high-contrast-mode .nav-card,
html.high-contrast-mode .simple-page-nav-button,
html.high-contrast-mode button.simple-page-nav-button {
  border: 2px solid var(--brand-green);
}

body {
  font-size: var(--ui-body-size);
  line-height: 1.58;
}

.page {
  align-items: flex-start;
  padding-block: 32px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface-panel);
  color: var(--brand-text);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

.skip-link:focus {
  outline: 4px solid var(--focus-ring);
  outline-offset: 2px;
  transform: translateY(0);
}

#mainContent:focus {
  outline: none;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 2.65rem);
  line-height: 1.15;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.28;
}

h3 {
  line-height: 1.35;
}

p,
li,
dd {
  line-height: 1.65;
}

label,
input,
select,
textarea,
button {
  font-size: var(--ui-control-size);
}

label {
  line-height: 1.45;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 50px;
  padding: 12px 14px;
}

textarea {
  min-height: 120px;
  padding: 13px 14px;
}

button {
  min-height: 48px;
  line-height: 1.35;
}

button[type="submit"],
button[type="button"],
.secondary-button {
  padding: 14px 18px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus-ring) !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--text-main) !important;
}

small,
.helper-text,
.subtitle,
.nav-card-description,
.room-type-preview-description,
.account-recovery-note {
  font-size: var(--ui-help-size) !important;
  line-height: 1.55;
}

small {
  margin-top: 0;
}

.eyebrow {
  font-size: 0.84rem;
  line-height: 1.35;
}

.card {
  border-radius: 16px;
}

.wide-card {
  max-width: 900px;
}

.home-header {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--separator);
}

.home-header h1,
.home-header .subtitle {
  text-align: left;
}

.home-header .subtitle {
  max-width: 620px;
  margin: 7px 0 0;
}

.home-header > button {
  flex: 0 0 auto;
  min-width: 140px;
  margin-top: 0;
}

.simple-page-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
  padding: 12px;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.simple-page-nav-button,
button.simple-page-nav-button {
  min-height: 72px;
  margin: 0;
  border: 2px solid transparent;
  background: var(--surface-panel);
  color: var(--brand-text);
  text-align: center;
}

.simple-page-nav-button:hover,
button.simple-page-nav-button:hover {
  border-color: var(--brand-border-strong);
  background: var(--brand-green-soft);
}

.simple-page-nav-button.is-active,
button.simple-page-nav-button.is-active {
  border-color: var(--brand-text);
  background: var(--brand-green);
  color: #ffffff;
}

.simple-profile-view {
  scroll-margin-top: 20px;
}

.simple-view-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.simple-disclosure-controls {
  display: flex;
  justify-content: flex-start;
  margin: 16px 0;
}

.simple-disclosure-controls > button {
  min-width: 230px;
  margin: 0;
}

.simple-disclosure-controls-primary {
  margin: 20px 0 14px;
}

.simple-disclosure-controls-primary > button {
  min-width: 190px;
}

.simple-disclosure-panel {
  scroll-margin-top: 20px;
}

.home-secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: var(--surface-soft);
}

.home-secondary-actions button {
  width: 100%;
  margin: 0;
}

#homeAccountPanel {
  margin-top: 18px;
}

.home-quick-menu-footer {
  display: grid;
  gap: 10px;
}

.home-quick-menu-footer button {
  width: 100%;
  margin: 0;
}

.rooms-spotlight {
  align-items: center;
}

.rooms-spotlight h2 {
  font-size: 1.85rem;
}

.room-type-preview-title,
.nav-card-title {
  font-size: 1.05rem;
}

.home-notification-bell {
  min-height: 52px;
  height: 52px;
}

.alphabet-grid button,
.number-grid button {
  min-height: 50px;
}

.message:not(:empty),
.notice-box {
  font-size: var(--ui-help-size);
  line-height: 1.6;
}

html.large-text-mode .wide-card {
  max-width: min(1040px, 100%);
}

html.large-text-mode .home-quick-menu {
  width: min(460px, calc(100vw - 32px));
}

html.extra-large-text-mode .wide-card {
  max-width: min(1120px, 100%);
}

html.extra-large-text-mode .home-quick-menu {
  width: min(520px, calc(100vw - 32px));
}

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

@media (max-width: 650px) {
  .page {
    padding: 16px;
  }

  .card,
  #homeCard {
    padding: 20px;
  }

  .home-header {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .home-header > button,
  .simple-disclosure-controls > button {
    width: 100%;
  }

  .home-secondary-actions {
    grid-template-columns: 1fr;
  }

  .home-quick-menu {
    width: min(420px, calc(100vw - 32px));
  }
}

@media (max-width: 480px) {
  .simple-page-nav {
    grid-template-columns: 1fr;
  }

  .simple-page-nav-button,
  button.simple-page-nav-button {
    min-height: 58px;
  }
}

/* Phase 10E.3A: simple Help hub */
.help-topic-nav {
  margin-bottom: 16px;
}

.help-topic-panel {
  margin-top: 0;
  scroll-margin-top: 20px;
}

.help-topic-panel h2 {
  margin-bottom: 8px;
}

.help-step-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 1.6rem;
}

.help-step-list li {
  padding: 14px 16px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: var(--surface-soft);
}

.help-step-list strong {
  color: var(--brand-text);
}

@media (max-width: 650px) {
  .help-page-header {
    grid-template-columns: 1fr;
  }

  .help-page-header > button {
    width: 100%;
  }

  .help-step-list {
    padding-left: 1.35rem;
  }
}

/* Phase 10E.3B: first-visit welcome prompt */
.home-welcome-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 24px;
  align-items: center;
  margin: 0 0 24px;
  padding: 22px;
  border: 2px solid var(--brand-border);
  border-radius: 16px;
  background: var(--brand-green-soft);
}

.home-welcome-guide.hidden {
  display: none;
}

.home-welcome-guide-copy h2 {
  margin-bottom: 6px;
}

.home-welcome-guide-copy > p:last-child,
.home-welcome-guide-reminder {
  margin: 0;
}

.home-welcome-guide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.home-welcome-guide-actions button {
  width: auto;
  margin: 0;
}

.home-welcome-guide-reminder {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--brand-border);
}

@media (max-width: 760px) {
  .home-welcome-guide {
    grid-template-columns: 1fr;
  }

  .home-welcome-guide-actions {
    justify-content: stretch;
  }

  .home-welcome-guide-actions button {
    width: 100%;
  }
}

/* Phase 10E.10: simple first-login guided tour */
.help-tour-replay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: center;
  margin: 18px 0 22px;
  padding: 18px;
  border: 2px solid var(--brand-border);
  border-radius: 14px;
  background: var(--brand-green-soft);
}

.help-tour-replay p {
  margin: 6px 0 0;
}

.help-tour-replay button {
  width: auto;
  min-width: 180px;
  margin: 0;
}

.guided-tour-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: var(--surface-panel);
  color: var(--text-main);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.guided-tour-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.guided-tour-content {
  padding: 28px;
}

.guided-tour-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.guided-tour-progress {
  margin: 0;
  color: var(--text-muted);
  font-weight: 800;
}

.guided-tour-content h2 {
  margin: 8px 0 12px;
  font-size: 1.65rem;
}

.guided-tour-text {
  margin: 0;
  font-size: var(--ui-help-size);
  line-height: 1.7;
}

.guided-tour-location {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.guided-tour-location strong {
  color: var(--brand-text);
}

.guided-tour-location p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.guided-tour-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.guided-tour-actions button,
.guided-tour-close {
  width: 100%;
  margin: 0;
}

.guided-tour-close {
  margin-top: 12px;
}

.guided-tour-reminder {
  margin: 14px 0 0;
  text-align: center;
}

html.high-contrast-mode .guided-tour-dialog,
html.high-contrast-mode .help-tour-replay {
  border: 3px solid var(--text-main);
}

html.extra-large-text-mode .guided-tour-dialog {
  width: min(760px, calc(100vw - 24px));
}

html[dir="rtl"] .guided-tour-dialog,
html[dir="rtl"] .help-tour-replay {
  text-align: right;
}

@media (max-width: 650px) {
  .help-tour-replay {
    grid-template-columns: 1fr;
  }

  .help-tour-replay button {
    width: 100%;
  }

  .guided-tour-content {
    padding: 22px;
  }
}

@media (max-width: 440px) {
  .guided-tour-actions {
    grid-template-columns: 1fr;
  }
}

/* Phase 10E.9A: Urdu language and right-to-left foundation */
.language-preferences-dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: var(--surface-panel);
  color: var(--text-main);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.language-preferences-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.language-preferences-content {
  padding: 26px;
}

.language-preferences-content h2 {
  margin-bottom: 8px;
}

.language-preferences-content > p:not(.eyebrow) {
  margin: 0 0 18px;
}

.language-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

button.language-choice-button {
  width: 100%;
  min-height: 54px;
  margin: 0;
  border: 2px solid var(--brand-green);
  background: var(--surface-panel);
  color: var(--brand-text);
  font-size: var(--ui-control-size);
}

button.language-choice-button[aria-pressed="true"] {
  background: var(--brand-green);
  color: #ffffff;
}

.language-preferences-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: var(--ui-help-size);
  font-weight: 700;
}

button.language-preferences-close {
  width: 100%;
  margin-top: 14px;
}

html.high-contrast-mode .language-preferences-dialog {
  border: 3px solid #000000;
  box-shadow: none;
}

html.extra-large-text-mode .language-preferences-dialog {
  width: min(660px, calc(100vw - 24px));
}

html[dir="rtl"] body {
  text-align: right;
  font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] .card,
html[dir="rtl"] .home-section,
html[dir="rtl"] .home-quick-menu,
html[dir="rtl"] .nav-card,
html[dir="rtl"] .room-type-preview,
html[dir="rtl"] .notice-box,
html[dir="rtl"] .language-preferences-dialog {
  text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] input[autocomplete="username"],
html[dir="rtl"] input[type="date"] {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .profile-statistic-card {
  border-left-width: 1px;
  border-right: 5px solid var(--brand-green);
}

@media (max-width: 650px) {
  .language-choice-list {
    grid-template-columns: 1fr;
  }
}

/* Phase 10E.6: simple display and accessibility controls */
.display-preferences-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: var(--surface-panel);
  color: var(--text-main);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.display-preferences-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.display-preferences-content {
  padding: 26px;
}

.display-preferences-content h2 {
  margin-bottom: 8px;
}

.display-preferences-content > p:not(.eyebrow) {
  margin: 0 0 18px;
}

.display-size-fieldset {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 14px;
}

.display-size-fieldset legend {
  padding: 0 8px;
  color: var(--brand-text);
  font-size: var(--ui-control-size);
  font-weight: 800;
}

.display-size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

button.display-size-choice {
  width: 100%;
  margin: 0;
  border: 2px solid var(--brand-green);
  background: var(--surface-panel);
  color: var(--brand-text);
}

button.display-size-choice:hover {
  background: var(--brand-green-soft-hover);
}

button.display-size-choice[aria-pressed="true"] {
  background: var(--brand-green);
  color: #ffffff;
}

.display-contrast-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 14px;
  background: var(--surface-soft);
}

.display-contrast-setting .helper-text {
  margin: 4px 0 0;
}

.display-contrast-setting + .display-contrast-setting {
  margin-top: 12px;
}

button.display-contrast-button {
  min-width: 180px;
  margin: 0;
}

.display-preferences-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: var(--ui-help-size);
  font-weight: 700;
}

button.display-preferences-close {
  width: 100%;
  margin-top: 14px;
}

html.high-contrast-mode .display-preferences-dialog {
  border: 3px solid #000000;
  box-shadow: none;
}

html.extra-large-text-mode .display-preferences-dialog {
  width: min(680px, calc(100vw - 24px));
}

@media (max-width: 650px) {
  .display-size-options,
  .display-contrast-setting {
    grid-template-columns: 1fr;
  }

  button.display-contrast-button {
    width: 100%;
  }
}

/* Phase 10H.1: simple analytics privacy choice */
.site-privacy-controls {
  width: 100%;
  padding: 0 16px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

button.site-privacy-button {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #ffffff;
  text-decoration: underline;
}

button.site-privacy-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.analytics-consent-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 2px solid var(--brand-border);
  border-radius: 18px;
  background: var(--surface-panel);
  color: var(--text-main);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.analytics-consent-dialog::backdrop {
  background: rgba(5, 20, 13, 0.72);
}

.analytics-consent-content {
  padding: 26px;
}

.analytics-consent-content h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.analytics-consent-content > p:not(.eyebrow) {
  line-height: 1.6;
}

.analytics-consent-status {
  min-height: 24px;
  margin: 18px 0 10px;
  color: var(--brand-text);
  font-weight: bold;
}

.analytics-consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-consent-actions button.analytics-choice-button {
  width: 100%;
  min-height: 54px;
  margin: 0;
  border: 2px solid var(--brand-green);
  background: var(--brand-green-soft);
  color: var(--brand-text);
}

.analytics-consent-actions button.analytics-choice-button:hover {
  background: var(--brand-green-soft-hover);
}

.analytics-consent-actions button.analytics-choice-button[aria-pressed="true"] {
  background: var(--brand-green);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.analytics-consent-close {
  width: 100%;
  margin-top: 14px;
}

html.large-text-mode .analytics-consent-dialog {
  width: min(640px, calc(100vw - 32px));
}

@media (max-width: 560px) {
  .analytics-consent-content {
    padding: 22px;
  }

  .analytics-consent-actions {
    grid-template-columns: 1fr;
  }
}

/* Phase 10E.13: optional dark display, stored only on this device */
html.dark-mode {
  color-scheme: dark;
  --brand-green: #367d5a;
  --brand-text: #a9e2c2;
  --brand-green-hover: #2d6b4b;
  --brand-green-deep: #06150e;
  --brand-green-soft: #17352a;
  --brand-green-soft-hover: #21483a;
  --brand-border: #45695a;
  --brand-border-strong: #638373;
  --surface-panel: #10251c;
  --surface-soft: #162d23;
  --separator: #37594a;
  --text-main: #f5faf7;
  --text-secondary: #d7e5de;
  --text-muted: #b8cac1;
  --text-muted-light: #a9bbb2;
  --focus-ring: #f1c84b;
}

html.dark-mode body {
  background: #06150e;
}

html.dark-mode input:not([type="checkbox"]):not([type="radio"]),
html.dark-mode select,
html.dark-mode textarea {
  border-color: var(--brand-border-strong);
  background: #132c21;
  color: var(--text-main);
}

html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder {
  color: var(--text-muted-light);
  opacity: 1;
}

html.dark-mode input[type="checkbox"],
html.dark-mode input[type="radio"] {
  accent-color: var(--brand-green);
}

html.dark-mode :where(
  .maidaan-composer,
  .maidaan-trending-panel,
  .maidaan-post-actions,
  .maidaan-room-suggestions,
  .maidaan-original-post,
  .maidaan-action-panel,
  .maidaan-reply-composer,
  .maidaan-replies-section,
  .home-friends-feed,
  .landing-global-example,
  .landing-global-auth-callout,
  .musallah-task-card.is-completed,
  .musallah-message-composer,
  .musallah-message-report-quote,
  .musallah-report-form,
  .musallah-lifecycle-banner
) {
  border-color: var(--brand-border);
  background: var(--surface-soft);
}

html.dark-mode :where(
  button.maidaan-tab,
  button.maidaan-trending-hashtag:focus-visible,
  .maidaan-audience-label,
  .maidaan-original-post:focus-visible,
  .landing-global-room-badge,
  .landing-global-guest-notice,
  .landing-global-rule-note,
  .landing-simple-section,
  .musallah-task-card .status-pill.success,
  .tasbih-status-approved
) {
  border-color: var(--brand-border);
  background: #18372a;
}

html.dark-mode :where(
  .my-musallah-message-card.has-unread,
  .notification-card.is-action-required,
  .maidaan-post.is-mentioned,
  .maidaan-reply-card.is-mentioned,
  .status-pill-attention,
  .musallah-owner-join-requests-panel,
  .musallah-message-card.is-mentioned,
  .musallah-report-existing-notice,
  .tasbih-status-pending,
  .musallah-lifecycle-banner.is-completed
) {
  border-color: #8d7229;
  background: #3a3015;
}

html.dark-mode :where(
  .my-musallah-message-unread-badge,
  .musallah-message-mentioned-badge
) {
  background: #6d5517;
  color: #fff4bf;
}

html.dark-mode :where(
  .notification-card.is-action-required h3,
  .status-pill-attention,
  .maidaan-moderation-button,
  .musallah-owner-request-alert h3,
  .musallah-report-existing-notice,
  .tasbih-status-pending,
  .musallah-lifecycle-banner.is-completed
) {
  color: #f5dc83;
}

html.dark-mode :where(
  .case-status-pill.high,
  .nav-card.notification-alert,
  .musallah-danger-zone,
  .musallah-message-report-form,
  .musallah-message-card.is-removed,
  .musallah-message-reports-panel,
  .musallah-former-member-card,
  .musallah-status-blocked,
  .tasbih-status-rejected
) {
  border-color: #a85660;
  background: #351b20;
}

html.dark-mode :where(
  .message.error,
  .case-status-pill.high,
  .maidaan-danger-button,
  #restrictedAccountCard .subtitle,
  .musallah-name-availability.error-text,
  .musallah-danger-zone h3,
  .musallah-merge-member-check.is-blocked,
  .musallah-message-removed-badge,
  .musallah-message-removal-note,
  .musallah-status-blocked,
  .tasbih-status-rejected
) {
  color: #ffb7c0;
}

html.dark-mode :where(
  .musallah-merge-panel,
  .status-pill-merged,
  .musallah-lifecycle-banner.is-merged
) {
  border-color: #747fc5;
  background: #242740;
  color: #d9ddff;
}

html.dark-mode :where(
  .status-pill-closed,
  .musallah-status-removed,
  .musallah-lifecycle-banner.is-closed
) {
  border-color: #67766f;
  background: #252d29;
  color: #d7e0db;
}

html.dark-mode :where(
  .musallah-name-availability.success-text,
  .musallah-merge-member-check.is-safe,
  .musallah-task-card .status-pill.success,
  .musallah-task-own-status.completed,
  .tasbih-status-approved
) {
  color: #a6e5bb !important;
}

html.dark-mode :where(
  .profile-avatar-option,
  .profile-statistic-card dt,
  .profile-status-text,
  .my-musallah-message-preview,
  .maidaan-trending-hashtag > span:last-child,
  .musallah-message-inline-copy,
  .musallah-message-body
) {
  color: var(--text-secondary);
}

html.dark-mode :where(
  button.maidaan-tab,
  button.maidaan-tab:focus-visible,
  button.maidaan-trending-hashtag,
  button.maidaan-trending-hashtag:focus-visible,
  .maidaan-post-avatar,
  button.maidaan-post-actions-toggle,
  button.maidaan-post-actions-toggle.is-open,
  .maidaan-reply-avatar
) {
  color: var(--brand-text);
}

html.dark-mode :where(
  .maidaan-post-avatar,
  .maidaan-reply-avatar
) {
  background: #204536;
}

html.dark-mode :where(
  .my-musallah-message-author,
  .maidaan-inline-link,
  .maidaan-reply-mention,
  .musallah-message-inline-author,
  .musallah-message-history-title,
  .musallah-lifecycle-banner
) {
  color: var(--brand-text);
}

html.dark-mode .home-quick-menu {
  border-color: var(--brand-border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

html.dark-mode :where(
  .room-type-preview,
  .room-type-preview.home-route-card,
  .room-type-preview.home-route-card:hover
) {
  border-color: var(--brand-border);
  background: rgba(16, 37, 28, 0.96);
}

html.dark-mode .profile-avatar-option,
html.dark-mode .account-detail-row,
html.dark-mode .case-workflow-grid > div,
html.dark-mode .case-status-form,
html.dark-mode .profile-moderation-entry,
html.dark-mode .musallah-card,
html.dark-mode .musallah-detail-section,
html.dark-mode .musallah-custom-task-row,
html.dark-mode .musallah-merge-preview,
html.dark-mode .musallah-task-owner-assignment,
html.dark-mode .musallah-message-card,
html.dark-mode .musallah-message-report-card,
html.dark-mode .musallah-mention-suggestions,
html.dark-mode .musallah-member-card,
html.dark-mode .tasbih-primary-section .tasbih-submit-panel,
html.dark-mode .tasbih-review-card,
html.dark-mode .musallah-overview-stats,
html.dark-mode .musallah-focused-content,
html.dark-mode .guided-tour-dialog,
html.dark-mode .language-preferences-dialog,
html.dark-mode .display-preferences-dialog,
html.dark-mode .analytics-consent-dialog {
  border-color: var(--brand-border);
}

html.dark-mode body.landing-visible {
  background: #071711;
}

html.dark-mode .landing-page.card {
  background: #0b1d15;
}

html.dark-mode .landing-topbar {
  border-bottom-color: rgba(169, 226, 194, 0.16);
  background: rgba(11, 29, 21, 0.96);
}

html.dark-mode .landing-hero-visual {
  background: #173228;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html.dark-mode :where(
  .landing-auth-panel,
  .landing-feature-card,
  .landing-global-room-card,
  .landing-global-task-row,
  .landing-global-dialog,
  .landing-global-dialog-close,
  .landing-value-card
) {
  border-color: var(--brand-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

html.dark-mode .landing-global-room-card-ayat {
  background: #211f17;
}

html.dark-mode .landing-global-dialog {
  background: var(--surface-panel);
}

html.dark-mode .landing-global-preview-summary > div {
  background: #22271f;
}

html.dark-mode .landing-closing {
  background: #18271f;
}

html.dark-mode :where(
  .landing-eyebrow,
  .landing-global-room-card .landing-global-room-type,
  .landing-global-room-purpose,
  .landing-global-example > span,
  .landing-global-task-row,
  .landing-global-task-row span,
  .landing-global-room-note,
  .landing-global-room-note i,
  .landing-global-preview-purpose,
  .landing-global-guest-notice,
  .landing-global-rule-note,
  .landing-global-steps p,
  .landing-footer,
  .landing-footer strong
) {
  color: var(--text-secondary) !important;
}

html.dark-mode :where(
  .landing-eyebrow,
  .landing-global-room-card .landing-global-room-type,
  .landing-global-room-purpose,
  .landing-global-example > span,
  .landing-global-room-note i,
  .landing-footer strong
) {
  color: var(--brand-text) !important;
}

html.dark-mode .landing-feature-icon {
  border-color: var(--surface-panel);
}

html.dark-mode .landing-closing-pattern {
  opacity: 0.13;
}

html.dark-mode .skip-link {
  border: 2px solid var(--brand-border-strong);
}

html.dark-mode .display-dark-setting {
  background: #18372a;
}

html.dark-mode .musallah-message-removed-badge {
  background: #5a2930;
}

html.dark-mode .musallah-former-member-card {
  border-color: var(--brand-border);
  background: #29261e;
}

html.dark-mode.high-contrast-mode {
  --brand-green: #286b48;
  --brand-text: #c4f7d9;
  --brand-green-hover: #1f573a;
  --brand-green-deep: #000000;
  --brand-green-soft: #0b0b0b;
  --brand-green-soft-hover: #161616;
  --brand-border: #ffffff;
  --brand-border-strong: #ffffff;
  --surface-panel: #000000;
  --surface-soft: #0b0b0b;
  --separator: #ffffff;
  --text-main: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #ededed;
  --text-muted-light: #dddddd;
  --focus-ring: #ffcf33;
}

html.dark-mode.high-contrast-mode body,
html.dark-mode.high-contrast-mode body.landing-visible,
html.dark-mode.high-contrast-mode .landing-page.card {
  background: #000000;
}

html.dark-mode.high-contrast-mode :where(
  .card,
  .home-section,
  .notice-box,
  .nav-card,
  .maidaan-post,
  .musallah-card,
  .musallah-detail-section,
  .landing-auth-panel,
  .landing-feature-card,
  .landing-global-room-card,
  .landing-global-dialog,
  .landing-global-auth-callout,
  .landing-value-card,
  .guided-tour-dialog,
  .language-preferences-dialog,
  .display-preferences-dialog,
  .analytics-consent-dialog
) {
  border-color: #ffffff;
}

html.dark-mode.high-contrast-mode .landing-topbar {
  border-bottom-color: #ffffff;
  background: #000000;
}

html.dark-mode.high-contrast-mode input:not([type="checkbox"]):not([type="radio"]),
html.dark-mode.high-contrast-mode select,
html.dark-mode.high-contrast-mode textarea {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
}
