:root {
  --bg: #f4ede1;
  --bg-soft: #fbf7f1;
  --surface: rgba(6, 10, 12, 0.34);
  --surface-strong: rgba(10, 16, 18, 0.62);
  --ink: #f5f3eb;
  --muted: rgba(234, 236, 231, 0.82);
  --line: rgba(255, 255, 255, 0.14);
  --brand: #0d6b57;
  --brand-strong: #084c3e;
  --accent: #d98b2b;
  --accent-soft: #f5d7aa;
  --danger: #a33a2a;
  --shadow: 0 18px 40px rgba(38, 28, 14, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1240px;
  --font-sans: "Segoe UI Variable", "Aptos", "Trebuchet MS", sans-serif;
  --font-display: "Bahnschrift", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #0b0f0d;
  color: var(--ink);
  font-family: var(--font-sans);
  min-height: 100%;
}

body::before {
  display: none;
}

.media-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 60%;
  opacity: 0;
  filter: saturate(1) contrast(1.04) brightness(0.82);
  animation: bgPulse 32s ease-in-out infinite;
}

.video-a {
  opacity: 0.62;
  animation: bgPulseFirst 32s ease-in-out infinite;
}

.video-b {
  animation-delay: 8s;
}

.video-c {
  animation-delay: 16s;
}

.video-d {
  animation-delay: 24s;
}

.media-overlay {
  display: none;
}

.media-pattern {
  display: none;
}

@keyframes bgPulse {
  0%,
  28% {
    opacity: 0;
    transform: scale(1.05);
  }
  33%,
  61% {
    opacity: 0.62;
    transform: scale(1);
  }
  66%,
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

@keyframes bgPulseFirst {
  0%,
  28% {
    opacity: 0.62;
    transform: scale(1);
  }
  33%,
  61% {
    opacity: 0;
    transform: scale(1.03);
  }
  66%,
  95% {
    opacity: 0;
    transform: scale(1.04);
  }
  100% {
    opacity: 0.62;
    transform: scale(1);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

#app {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.shell {
  width: min(var(--max), calc(100vw - 24px));
  margin: 0 auto;
  padding: 16px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(4, 8, 10, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  position: sticky;
  top: 14px;
  z-index: 20;
  box-shadow: var(--shadow);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, #1f8f71 55%, var(--accent) 100%);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.brand-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
}

.brand-copy span {
  display: block;
  color: rgba(245, 243, 235, 0.82);
  font-size: 0.82rem;
}

.nav {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: rgba(245, 243, 235, 0.84);
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

.sidebar,
.panel,
.hero,
.stat-card,
.card,
.list-card,
.message-panel,
.empty-state {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sidebar,
.panel,
.stat-card,
.card,
.list-card,
.message-panel,
.empty-state {
  background:
    linear-gradient(180deg, rgba(7, 12, 14, 0.44), rgba(7, 12, 14, 0.26)),
    rgba(7, 12, 14, 0.24);
}

.panel,
.card,
.list-card,
.message-panel,
.sidebar,
.empty-state {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.hero {
  border-radius: 32px;
  padding: 28px;
  overflow: hidden;
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  color: #f9f1e4;
}

.hero::before {
  display: none;
}

.hero::after {
  display: none;
}

.hero-copy {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
  width: fit-content;
}

.hero h1,
.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.9rem);
  line-height: 0.96;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  color: #ffffff;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hero p,
.page-head p,
.muted {
  color: rgba(245, 243, 235, 0.82);
  line-height: 1.55;
}

.hero p,
.hero .muted {
  color: rgba(249, 241, 228, 0.86);
}

.hero-actions,
.stack,
.actions,
.card-grid,
.feed-list,
.detail-stack,
.form-grid,
.split,
.stats-grid,
.pill-row,
.notification-list,
.admin-grid {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats-grid,
.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.page-head {
  display: grid;
  gap: 10px;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffcf7a;
}

.stat-card {
  border-radius: var(--radius-md);
  padding: 16px;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  font-family: var(--font-display);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3,
.card h3,
.list-card h3 {
  margin: 0;
  font-family: var(--font-display);
  color: #ffffff;
}

.pill-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f7f4ec;
  font-size: 0.88rem;
}

.tag {
  background: rgba(217, 139, 43, 0.2);
  color: #ffe7bf;
}

.button,
.ghost-button,
.danger-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.button {
  background: linear-gradient(135deg, var(--brand) 0%, #177f66 100%);
  color: white;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ghost-button {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.danger-button {
  background: rgba(163, 58, 42, 0.12);
  color: var(--danger);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metric {
  display: grid;
  gap: 6px;
}

.metric strong {
  font-size: 1.8rem;
}

.input,
.textarea,
.select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  padding: 13px 14px;
  color: #ffffff;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(245, 243, 235, 0.56);
}

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

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

.form-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.helper {
  color: rgba(245, 243, 235, 0.72);
  font-size: 0.9rem;
}

.post-card {
  display: grid;
  gap: 14px;
}

.meta,
.micro,
.message-meta {
  color: rgba(245, 243, 235, 0.74);
  font-size: 0.88rem;
}

.author-row,
.space-between,
.message-row,
.notification-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.avatar,
.avatar-lg {
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 107, 87, 0.18), rgba(217, 139, 43, 0.24));
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
}

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

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.3rem;
}

.detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.comment {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.message-shell {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

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

.conversation-item {
  border-radius: 16px;
  border: 1px solid transparent;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.conversation-item.active {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.message-thread {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.bubble {
  border-radius: 18px;
  padding: 12px 14px;
  max-width: min(100%, 520px);
  background: rgba(255, 255, 255, 0.08);
}

.bubble.me {
  margin-left: auto;
  background: rgba(13, 107, 87, 0.26);
}

.notice,
.alert,
.empty-state {
  color: var(--muted);
}

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(217, 139, 43, 0.14);
  color: #ffe0ab;
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(163, 58, 42, 0.12);
  color: var(--danger);
}

.footer-note {
  text-align: center;
  color: rgba(245, 243, 235, 0.78);
  margin-top: 26px;
  font-size: 0.92rem;
}

.status-banner {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(7, 12, 14, 0.52), rgba(7, 12, 14, 0.28)),
    rgba(7, 12, 14, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.status-banner strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.mobile-nav {
  position: sticky;
  bottom: 12px;
  z-index: 15;
  background: rgba(4, 8, 10, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.mobile-nav a {
  text-align: center;
  padding: 10px 0;
  border-radius: 999px;
  color: rgba(245, 243, 235, 0.82);
  font-size: 0.84rem;
}

.mobile-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sticky-card {
  position: sticky;
  top: 92px;
}

.mono {
  font-family: "Cascadia Code", "Consolas", monospace;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.lang-button {
  border: none;
  min-width: 42px;
  min-height: 36px;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 243, 235, 0.82);
  font-weight: 800;
}

.lang-button.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.video-corner-button {
  position: fixed;
  top: 112px;
  right: 28px;
  z-index: 18;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(4, 8, 10, 0.7);
  color: #ffffff;
  min-height: 46px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.video-corner-button:hover {
  background: rgba(13, 107, 87, 0.52);
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }

  .layout {
    grid-template-columns: 1.6fr 0.86fr;
    align-items: start;
  }

  .split {
    grid-template-columns: 1.25fr 0.85fr;
  }

  .detail-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .message-shell {
    grid-template-columns: 320px 1fr;
  }

  .mobile-nav {
    display: none;
  }
}

@media (max-width: 859px) {
  .video-corner-button {
    top: 86px;
    right: 16px;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}
