:root {
  color-scheme: dark;
  --bg: #080b0a;
  --bg-elevated: #111714;
  --bg-panel: #151d18;
  --bg-panel-2: #1b241d;
  --border: #2c3a31;
  --border-strong: #436044;
  --text: #eef6ee;
  --muted: #9fb1a3;
  --faint: #6f8174;
  --green: #52d273;
  --green-2: #2aa84e;
  --gold: #f2b84b;
  --red: #ef6461;
  --cyan: #5fd4c7;
  --stone: #8d948f;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius: 8px;
  --radius-sm: 6px;
  --pixel-border: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(7, 10, 9, 0.82), rgba(7, 10, 9, 0.98)),
    repeating-linear-gradient(90deg, rgba(85, 121, 72, 0.08) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(242, 184, 75, 0.04) 0 1px, transparent 1px 64px),
    #080b0a;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.19;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 12px);
  mix-blend-mode: soft-light;
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.maintenance-screen,
.ban-screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.maintenance-card {
  width: min(680px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: clamp(24px, 6vw, 48px);
  border: 1px solid rgba(82, 210, 115, 0.35);
  border-radius: var(--radius);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(16, 23, 19, 0.95), rgba(8, 11, 10, 0.98)),
    repeating-linear-gradient(90deg, rgba(82, 210, 115, 0.11) 0 16px, transparent 16px 32px);
  box-shadow: var(--shadow), 0 0 80px rgba(82, 210, 115, 0.12);
}

.ban-card {
  border-color: rgba(239, 100, 97, 0.45);
  box-shadow: var(--shadow), 0 0 80px rgba(239, 100, 97, 0.12);
}

.maintenance-logo {
  width: 72px;
  height: 72px;
}

.maintenance-card h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.maintenance-card p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.maintenance-return {
  color: var(--gold) !important;
  font-weight: 800;
}

.maintenance-loader {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  gap: 8px;
  height: 38px;
  align-items: end;
}

.maintenance-loader span {
  display: block;
  width: 22px;
  background: var(--green);
  box-shadow: var(--pixel-border);
  animation: block-bounce 1s infinite ease-in-out;
}

.maintenance-loader span:nth-child(2) {
  animation-delay: 120ms;
  background: var(--gold);
}

.maintenance-loader span:nth-child(3) {
  animation-delay: 240ms;
  background: var(--cyan);
}

.maintenance-loader span:nth-child(4) {
  animation-delay: 360ms;
  background: var(--red);
}

@keyframes block-bounce {
  0%,
  100% {
    height: 12px;
  }
  50% {
    height: 36px;
  }
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(117, 155, 118, 0.28);
  border-radius: var(--radius);
  background: rgba(12, 17, 14, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  border: 2px solid #20170f;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(0, 0, 0, 0.32) 28% 34%, transparent 34% 66%, rgba(0, 0, 0, 0.32) 66% 72%, transparent 72%),
    linear-gradient(0deg, #6b3f1d 0 26%, #59b85c 26% 44%, #2d8f43 44% 100%);
  box-shadow: var(--pixel-border), 0 8px 18px rgba(82, 210, 115, 0.14);
  image-rendering: pixelated;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.primary-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nav-link,
.button,
.icon-button,
.text-button {
  border: 0;
  color: var(--text);
}

.nav-link {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: #1b2a20;
  box-shadow: inset 0 -2px 0 var(--green);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.live-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(82, 210, 115, 0.32);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: #111a14;
  white-space: nowrap;
}

.live-pill strong {
  color: var(--text);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(82, 210, 115, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(82, 210, 115, 0);
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-weight: 750;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.icon-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  border: 1px solid rgba(82, 210, 115, 0.72);
  background: linear-gradient(180deg, #62dc7e, #2c9f4a);
  color: #061108;
}

.button-secondary {
  border: 1px solid rgba(95, 212, 199, 0.45);
  background: #11302d;
  color: #c9fff7;
}

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #161d19;
}

.button-danger {
  border: 1px solid rgba(239, 100, 97, 0.45);
  background: #3a1718;
  color: #ffd7d6;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #151b17;
}

.bell-shape {
  width: 14px;
  height: 17px;
  display: block;
  border-radius: 8px 8px 4px 4px;
  border: 2px solid var(--muted);
  border-bottom-width: 3px;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #180b0b;
  background: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
}

.hidden,
.admin-only.hidden {
  display: none !important;
}

.command-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  margin-top: 24px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(117, 155, 118, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(14, 43, 25, 0.9), rgba(21, 29, 24, 0.82)),
    repeating-linear-gradient(90deg, rgba(82, 210, 115, 0.18) 0 8px, rgba(37, 71, 43, 0.18) 8px 16px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.command-strip h1 {
  max-width: 900px;
  margin: 4px 0 0;
  font-size: clamp(1.7rem, 4.4vw, 4.1rem);
  line-height: 1;
  letter-spacing: 0;
}

.command-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

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

.stat-tile,
.presence-tile {
  min-height: 84px;
  padding: 16px;
  border: 1px solid rgba(117, 155, 118, 0.23);
  border-radius: var(--radius);
  background: rgba(17, 24, 20, 0.86);
  box-shadow: var(--pixel-border);
}

.stat-tile span,
.presence-tile span,
.sort-control label,
.field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.stat-tile strong,
.presence-tile strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1;
}

.presence-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 850;
}

.presence-online {
  color: #dffff0;
  background: rgba(82, 210, 115, 0.22);
}

.presence-idle {
  color: #ffefcc;
  background: rgba(242, 184, 75, 0.22);
}

.presence-offline {
  color: var(--muted);
  background: rgba(159, 177, 163, 0.12);
}

.view {
  display: none;
  margin-top: 22px;
}

.view.is-active {
  display: block;
}

.board-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 18px;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 104px;
  padding: 16px;
  border: 1px solid rgba(117, 155, 118, 0.25);
  border-radius: var(--radius);
  background: rgba(15, 22, 18, 0.9);
  box-shadow: var(--shadow);
}

.panel-heading,
.section-heading,
.card-actions,
.detail-actions,
.profile-row,
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid rgba(159, 177, 163, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #0d120f;
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(82, 210, 115, 0.13);
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.tag-filter-grid,
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(159, 177, 163, 0.2);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(21, 31, 25, 0.92);
  font-size: 0.78rem;
  font-weight: 760;
}

.chip input {
  width: auto;
  min-height: 0;
  accent-color: var(--green);
}

.chip.is-selected,
.chip.good {
  color: #dffff0;
  border-color: rgba(82, 210, 115, 0.55);
  background: rgba(50, 109, 61, 0.46);
}

.chip.warn {
  color: #ffefcc;
  border-color: rgba(242, 184, 75, 0.52);
  background: rgba(93, 68, 24, 0.38);
}

.trusted-badge {
  box-shadow: 0 0 18px rgba(82, 210, 115, 0.16);
}

.elite-badge {
  box-shadow: 0 0 18px rgba(242, 184, 75, 0.16);
}

.chip.danger {
  color: #ffd8d7;
  border-color: rgba(239, 100, 97, 0.45);
  background: rgba(92, 31, 32, 0.38);
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--cyan);
  font-weight: 780;
}

.sort-control {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.sort-control select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(159, 177, 163, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #0d120f;
}

.featured-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.featured-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid rgba(242, 184, 75, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(65, 52, 25, 0.92), rgba(16, 25, 20, 0.94)),
    repeating-linear-gradient(90deg, rgba(242, 184, 75, 0.12) 0 10px, transparent 10px 20px);
  box-shadow: var(--pixel-border);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.team-card,
.lft-card,
.ranking-item,
.profile-card,
.admin-card,
.detail-box,
.comment,
.application-card {
  border: 1px solid rgba(117, 155, 118, 0.24);
  border-radius: var(--radius);
  background: rgba(16, 23, 19, 0.93);
  box-shadow: var(--pixel-border);
}

.team-card,
.lft-card {
  overflow: hidden;
}

.team-card {
  display: grid;
  grid-template-rows: 136px 1fr;
  min-height: 420px;
}

.team-card.is-elite-team {
  border-color: rgba(242, 184, 75, 0.52);
  background:
    linear-gradient(180deg, rgba(42, 35, 18, 0.96), rgba(16, 23, 19, 0.94)),
    rgba(16, 23, 19, 0.93);
}

.elite-locked {
  border-color: rgba(242, 184, 75, 0.38);
}

.team-cover {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(82, 210, 115, 0.18), rgba(95, 212, 199, 0.08)),
    repeating-linear-gradient(90deg, rgba(143, 98, 45, 0.22) 0 18px, rgba(70, 116, 56, 0.2) 18px 36px),
    #172018;
}

.team-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.58));
}

.cover-pattern {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(0, 0, 0, 0.24) 20% 24%, transparent 24% 52%, rgba(0, 0, 0, 0.18) 52% 56%, transparent 56%),
    linear-gradient(0deg, #73502a 0 26%, #33562d 26% 46%, #1d3821 46% 100%);
  image-rendering: pixelated;
}

.team-body,
.lft-body {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.team-title-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.team-title-line h3,
.featured-card h3,
.lft-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.12;
}

.team-title-line h3 {
  overflow-wrap: anywhere;
}

.verified-mark {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #061108;
  background: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
}

.meta-row,
.mini-metrics,
.team-tags,
.detail-metrics,
.compact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-item,
.metric {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: #0d130f;
  font-size: 0.78rem;
  font-weight: 760;
}

.metric strong {
  margin-left: 5px;
  color: var(--text);
}

.team-card p,
.lft-card p,
.featured-card p,
.detail-box p,
.application-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.team-card p {
  display: -webkit-box;
  min-height: 67px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-actions {
  margin-top: auto;
}

.empty-state {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 42px 20px;
  border: 1px dashed rgba(159, 177, 163, 0.28);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(12, 18, 14, 0.82);
  text-align: center;
}

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

.lft-grid,
.ranking-list,
.profile-layout,
.admin-grid {
  display: grid;
  gap: 14px;
}

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

.lft-card {
  padding: 15px;
}

.ranking-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 15px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: #1f301f;
  color: var(--gold);
  font-weight: 900;
  font-size: 1.25rem;
}

.rank-bar {
  width: min(280px, 26vw);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #0b100d;
}

.rank-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.profile-layout {
  grid-template-columns: 360px 1fr;
  align-items: start;
}

.profile-card,
.admin-card,
.detail-box,
.application-card {
  padding: 16px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  border: 1px solid rgba(159, 177, 163, 0.28);
  object-fit: cover;
  background: #142019;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  color: #061108;
  background:
    linear-gradient(135deg, var(--green), var(--gold)),
    #142019;
  font-weight: 900;
  font-size: 2rem;
}

.small-avatar {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.stack {
  display: grid;
  gap: 12px;
}

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

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

.admin-card.full {
  grid-column: 1 / -1;
}

.admin-card h3,
.profile-card h3,
.detail-box h3 {
  margin: 0 0 12px;
}

.admin-row {
  padding: 10px 0;
  border-top: 1px solid rgba(159, 177, 163, 0.12);
}

.admin-row:first-of-type {
  border-top: 0;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 4, 3, 0.72);
  backdrop-filter: blur(12px);
}

.modal {
  width: min(980px, 100%);
  max-height: min(88vh, 920px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(117, 155, 118, 0.34);
  border-radius: var(--radius);
  background: #101611;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid rgba(159, 177, 163, 0.16);
}

.modal-header h2 {
  margin: 4px 0 0;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
}

.modal-body {
  overflow: auto;
  padding: 16px;
}

.detail-hero {
  min-height: 230px;
  margin: -16px -16px 16px;
  display: grid;
  align-items: end;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.78)),
    var(--detail-image),
    linear-gradient(135deg, #1d3821, #62431e);
  background-size: cover;
  background-position: center;
}

.detail-hero h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.detail-box {
  display: grid;
  gap: 12px;
}

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

.detail-metrics .metric {
  justify-content: space-between;
  min-height: 44px;
}

.comment {
  padding: 12px;
}

.comment strong {
  display: block;
  margin-bottom: 4px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 140;
  display: grid;
  gap: 10px;
  width: min(340px, calc(100vw - 28px));
}

.toast {
  padding: 13px 14px;
  border: 1px solid rgba(82, 210, 115, 0.38);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(16, 23, 19, 0.97);
  box-shadow: var(--shadow);
}

.chat-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 58vh) auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(117, 155, 118, 0.28);
  border-radius: var(--radius);
  background: rgba(16, 23, 19, 0.93);
  box-shadow: var(--shadow);
}

.chat-panel h3 {
  margin: 4px 0 0;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(159, 177, 163, 0.16);
  border-radius: var(--radius-sm);
  background: #0b100d;
}

.typing-indicator {
  min-height: 20px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 760;
}

.chat-message {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.chat-message.is-system {
  opacity: 0.82;
}

.chat-bubble {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(159, 177, 163, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(21, 31, 25, 0.94);
}

.chat-meta,
.chat-actions,
.chat-form-row,
.reply-target {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.chat-meta span,
.reply-preview {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-bubble p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-image {
  width: min(360px, 100%);
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.reply-preview,
.reply-target {
  padding: 8px 10px;
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
  background: rgba(95, 212, 199, 0.08);
}

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

.chat-form textarea {
  min-height: 78px;
}

.availability-text {
  color: var(--muted);
  font-size: 0.78rem;
}

.availability-text.is-good {
  color: var(--green);
}

.availability-text.is-bad {
  color: var(--red);
}

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

.war-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(159, 177, 163, 0.18);
  border-radius: var(--radius);
  background: rgba(12, 18, 14, 0.8);
}

.danger-text {
  color: #ffd1d0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.82rem;
}

.divider {
  height: 1px;
  margin: 10px 0;
  background: rgba(159, 177, 163, 0.14);
}

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

  .primary-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .topbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .post-grid,
  .featured-rail,
  .lft-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 10px;
  }

  .command-strip,
  .board-layout,
  .profile-layout,
  .admin-grid,
  .detail-grid,
  .chat-layout,
  .war-board,
  .two-column {
    grid-template-columns: 1fr;
  }

  .command-actions {
    justify-content: flex-start;
  }

  .filter-panel {
    position: static;
  }

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

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

  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    grid-template-rows: auto minmax(300px, 52vh) auto;
  }
}

@media (max-width: 620px) {
  .topbar,
  .command-strip,
  .filter-panel,
  .stat-tile,
  .team-card,
  .lft-card,
  .ranking-item,
  .profile-card,
  .admin-card,
  .detail-box {
    border-radius: 6px;
  }

  .post-grid,
  .featured-rail,
  .lft-grid,
  .stats-grid,
  .presence-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    min-height: 0;
  }

  .ranking-item {
    grid-template-columns: auto 1fr;
  }

  .ranking-item .button {
    grid-column: 1 / -1;
  }

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

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
  }

  .topbar-actions .button,
  .command-actions .button,
  .card-actions .button,
  .detail-actions .button {
    flex: 1 1 auto;
  }
}
