/* ==== core/tokens.css ==== */
/* =========================================================================
   Ploura — Ocean design tokens
   Dark navy is the default identity. Light and system themes override the
   semantic tokens in themes/light.css; every component reads semantic tokens.
   ========================================================================= */
:root {
  /* Ocean palette */
  --ocean-950: #08131F;
  --ocean-900: #0D1B2A;
  --ocean-850: #112438;
  --ocean-800: #152C40;
  --ocean-700: #1C4058;
  --ocean-600: #24617B;
  --ocean-500: #299CC1;
  --ocean-400: #43C5E8;
  --ocean-300: #75D9EF;

  /* Signals */
  --accent: #35C9D9;
  --success: #35C99A;
  --danger: #F06472;
  --warning: #F0B75B;
  --info: #43C5E8;

  /* Text and lines */
  --text-primary: #F5F8FC;
  --text-secondary: #9DADBE;
  --text-faint: #6E8196;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Semantic surfaces (components use these, themes replace them) */
  --bg: var(--ocean-950);
  --bg-2: var(--ocean-900);
  --card: var(--ocean-850);
  --elevated: var(--ocean-800);
  --elevated-2: #1A3650;
  --inset: rgba(8, 19, 31, 0.55);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --faint: var(--text-faint);
  --link: var(--ocean-300);
  --focus: var(--ocean-400);
  --on-accent: #06202C;
  --scrim: rgba(4, 10, 17, 0.66);
  --glass: rgba(13, 27, 42, 0.82);
  --glass-strong: rgba(17, 36, 56, 0.96);

  /* Legacy names still used by older pages (login, onboarding, dating) */
  --pink: var(--ocean-400);
  --pink-soft: var(--ocean-300);
  --purple: var(--ocean-600);
  --violet: var(--ocean-500);
  --gradient: linear-gradient(135deg, var(--ocean-500) 0%, var(--ocean-400) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(41, 156, 193, 0.18), rgba(67, 197, 232, 0.12));

  /* Shape */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
  --shadow-pop: 0 22px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --glow: 0 8px 24px rgba(67, 197, 232, 0.22);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  /* Typography */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-md: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2.1rem;
  --leading: 1.5;

  /* Layout dimensions */
  --topbar: 60px;
  --bottombar: 68px;
  --sidebar: 248px;
  --rail: 320px;
  --col: 640px;
  --col-wide: 960px;
  --chat-list: 340px;

  /* Safe areas (Android and iOS notches / gesture bars) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms;
  --base: 220ms;
  --slow: 360ms;

  /* Layers */
  --z-topbar: 40;
  --z-nav: 45;
  --z-sheet: 70;
  --z-modal: 80;
  --z-toast: 90;
  --z-story: 100;

  color-scheme: dark;
}

/* ==== core/base.css ==== */
/* Foundation: reset-on-top-of-legacy, document defaults, focus, selection, scrollbars. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + var(--safe-top) + 12px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

body.no-scroll {
  overflow: hidden;
}

img,
video,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

audio {
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-5) 0;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
}

::selection {
  background: rgba(67, 197, 232, 0.35);
  color: var(--text);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -60px;
  z-index: calc(var(--z-toast) + 5);
  padding: var(--space-2) var(--space-4);
  background: var(--ocean-400);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-3);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 173, 190, 0.35) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(157, 173, 190, 0.28);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(157, 173, 190, 0.5);
  background-clip: content-box;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==== core/typography.css ==== */
/* Type scale and text helpers. */
h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

h4 {
  font-size: var(--text-md);
}

p {
  margin: 0 0 var(--space-3);
}

p:last-child {
  margin-bottom: 0;
}

.h-sm {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

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

.small {
  font-size: var(--text-sm);
}

.preline {
  white-space: pre-line;
}

.strong {
  font-weight: 700;
}

.center {
  text-align: center;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-wrap {
  white-space: normal;
  word-break: break-word;
  max-width: 340px;
}

ul.tight,
ol.tight {
  margin: var(--space-2) 0 0;
  padding-left: 1.15rem;
}

ul.tight li,
ol.tight li {
  margin-bottom: var(--space-1);
}

dl {
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: var(--text-sm);
}

dd {
  margin: 0 0 var(--space-3);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  background: var(--inset);
}

.hashtag,
.mention {
  color: var(--ocean-300);
  font-weight: 600;
}

.hashtag:hover,
.mention:hover {
  color: var(--ocean-400);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}

.back-link:hover {
  color: var(--text);
  text-decoration: none;
}

/* ==== core/layout.css ==== */
/* Page shell: top bar, sidebar, main column and right rail. Mobile first. */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container.narrow {
  max-width: 760px;
}

.section-pad {
  padding-block: var(--space-6);
}

.shell {
  display: block;
  min-height: calc(100dvh - var(--topbar) - var(--safe-top));
}

.shell-main {
  width: 100%;
  min-width: 0;
  padding: var(--space-4) var(--space-3) calc(var(--bottombar) + var(--safe-bottom) + var(--space-6));
}

.page-col {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
}

.page-col.page-wide {
  max-width: var(--col-wide);
}

.page-head {
  margin-bottom: var(--space-4);
}

.page-head h1 {
  margin-bottom: var(--space-1);
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.row-between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.grow {
  flex: 1 1 auto;
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}

.section {
  margin-bottom: var(--space-6);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.section-head h2 {
  margin: 0;
  font-size: var(--text-lg);
}

.pad {
  padding: var(--space-4);
}

.list-title {
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-1);
  font-size: var(--text-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: 0;
}

.avatar-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.check-list {
  display: grid;
  gap: var(--space-2);
  max-height: 260px;
  overflow: auto;
}

.sticky-save {
  position: sticky;
  bottom: calc(var(--bottombar) + var(--safe-bottom) + var(--space-3));
  z-index: 5;
  padding: var(--space-3);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  justify-content: flex-end;
}

/* ==== core/animations.css ==== */
/* Shared keyframes and entrance motion. */
@keyframes ploura-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ploura-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ploura-pop {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes ploura-slide-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes ploura-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ploura-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

@keyframes ploura-shimmer {
  0% {
    background-position: -240px 0;
  }

  100% {
    background-position: 240px 0;
  }
}

@keyframes ploura-heart {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.28);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes ploura-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(67, 197, 232, 0.55);
  }

  100% {
    box-shadow: 0 0 0 14px rgba(67, 197, 232, 0);
  }
}

@keyframes ploura-dot {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.post,
.compose-card,
.card,
.widget {
  animation: ploura-rise var(--slow) var(--ease-out) both;
}

.modal {
  animation: ploura-pop var(--base) var(--ease-out) both;
}

.modal-backdrop {
  animation: ploura-fade-in var(--fast) linear both;
}

.spinner-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--ocean-400);
  border-radius: 50%;
  animation: ploura-spin 700ms linear infinite;
}

/* ==== core/legacy-bridge.css ==== */
/* Bridges the sign-in, onboarding and verification pages onto the Ocean tokens. */
.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - var(--topbar));
  padding: var(--space-5) var(--space-3);
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(67, 197, 232, 0.14), transparent 70%),
    var(--bg);
}

.container-form {
  width: 100%;
  max-width: 460px;
}

.auth-card,
.otp-card {
  width: 100%;
  padding: var(--space-5);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-card h1,
.otp-title {
  font-size: var(--text-2xl);
}

.otp-lead,
.otp-help {
  color: var(--muted);
}

.otp-timer {
  font-variant-numeric: tabular-nums;
  color: var(--ocean-300);
  font-weight: 700;
}

.gradient-text {
  background: linear-gradient(135deg, var(--ocean-300), var(--ocean-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-6) 0 calc(var(--space-6) + var(--safe-bottom));
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

/* ==== components/buttons.css ==== */
/* Buttons: one family, three weights, consistent states. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 42px;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn[disabled],
.btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ocean-500), var(--ocean-400));
  color: var(--on-accent);
  box-shadow: 0 6px 18px rgba(41, 156, 193, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(67, 197, 232, 0.36);
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--elevated);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--elevated-2);
  border-color: rgba(67, 197, 232, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn-danger {
  background: rgba(240, 100, 114, 0.14);
  color: var(--danger);
  border-color: rgba(240, 100, 114, 0.4);
}

.btn-danger:hover {
  background: var(--danger);
  color: #2B0A10;
}

.btn-sm {
  min-height: 34px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

.btn-lg {
  min-height: 50px;
  padding: 0 var(--space-6);
  font-size: var(--text-lg);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 42px;
  padding: 0;
}

.btn-sm.btn-icon {
  width: 34px;
}

.btn.is-loading {
  position: relative;
  color: transparent;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  animation: ploura-spin 700ms linear infinite;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn i {
  font-size: 1.05rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: rgba(67, 197, 232, 0.5);
  text-decoration: none;
}

.chip.is-on,
.chip[aria-pressed="true"] {
  background: rgba(67, 197, 232, 0.14);
  border-color: var(--ocean-400);
  color: var(--ocean-300);
}

.chip small {
  color: var(--faint);
  font-weight: 500;
}

.chip-static {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(53, 201, 154, 0.12);
  color: var(--success);
  font-size: var(--text-sm);
  font-weight: 600;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block: var(--space-2);
}

/* ==== components/forms.css ==== */
/* Form controls. */
.form-stack {
  display: grid;
  gap: var(--space-4);
}

.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.field > label,
.field > legend,
fieldset.field legend {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--inset);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: rgba(255, 255, 255, 0.26);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px rgba(67, 197, 232, 0.2);
  outline: none;
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239DADBE' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.input[type="file"] {
  padding: 8px;
  min-height: 44px;
}

.input[type="file"]::file-selector-button {
  margin-right: var(--space-3);
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--elevated-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.input[type="datetime-local"],
.input[type="date"] {
  color-scheme: dark;
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: var(--text-sm);
}

.field small.muted {
  font-size: var(--text-xs);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-md);
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ocean-400);
  flex: 0 0 auto;
}

.copy-row {
  display: flex;
  gap: var(--space-2);
}

.copy-row .input {
  flex: 1 1 auto;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-4);
}

.filter-row .input,
.filter-row .select {
  width: auto;
  flex: 1 1 140px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.filters {
  margin-bottom: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.filters > summary {
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.filters > summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  float: right;
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform var(--fast) var(--ease);
}

.filters[open] > summary::after {
  transform: rotate(180deg);
}

.filters > form,
.filters > .form-stack {
  padding: 0 var(--space-4) var(--space-4);
}

.search-big,
.topbar-search,
.chat-search {
  position: relative;
  display: flex;
  align-items: center;
}

.search-big {
  margin-bottom: var(--space-4);
}

.search-big i,
.topbar-search i,
.chat-search i {
  position: absolute;
  left: 14px;
  color: var(--faint);
  pointer-events: none;
}

.search-big input,
.topbar-search input,
.chat-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  background: var(--inset);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
}

.search-big input:focus,
.topbar-search input:focus,
.chat-search input:focus {
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px rgba(67, 197, 232, 0.2);
  outline: none;
}

.suggest-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.suggest-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: 10px 14px;
  color: var(--text);
}

.suggest-item small {
  color: var(--faint);
}

.suggest-item:hover {
  background: rgba(67, 197, 232, 0.1);
  text-decoration: none;
}

.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--inset);
  overflow: hidden;
  margin-top: var(--space-2);
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ocean-500), var(--ocean-300));
  transition: width var(--slow) var(--ease-out);
}

/* ==== components/modals.css ==== */
/* Modals, confirm dialogs and the bottom sheet. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: var(--scrim);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 2 * var(--space-4));
  overflow-y: auto;
  padding: var(--space-5);
  background: var(--glass-strong);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  display: grid;
  gap: var(--space-3);
}

.modal h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.modal-list {
  max-width: 420px;
}

.modal-list .list-card {
  max-height: 46vh;
  overflow: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.share-actions {
  display: grid;
  gap: var(--space-2);
}

.share-actions .btn {
  justify-content: flex-start;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sheet) - 1);
  background: var(--scrim);
  opacity: 0;
  transition: opacity var(--base) var(--ease);
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sheet);
  max-width: 560px;
  margin-inline: auto;
  padding: var(--space-3) var(--space-4) calc(var(--space-5) + var(--safe-bottom));
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-pop);
  transform: translateY(100%);
  transition: transform var(--base) var(--ease-out);
}

.sheet.is-open {
  transform: translateY(0);
}

.sheet-handle {
  width: 44px;
  height: 4px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

.sheet-title {
  font-size: var(--text-lg);
  text-align: center;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.sheet-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: var(--space-3) var(--space-1);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.sheet-item i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(67, 197, 232, 0.12);
  color: var(--ocean-300);
  font-size: 1.15rem;
}

.sheet-item:hover {
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.sheet-item:active {
  transform: scale(0.96);
}

.menu {
  position: relative;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  max-width: 86vw;
  padding: var(--space-2);
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  animation: ploura-pop var(--fast) var(--ease-out) both;
}

.menu-panel a,
.menu-panel button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 10px var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: var(--text-md);
  text-align: left;
  cursor: pointer;
}

.menu-panel a i,
.menu-panel button i {
  width: 18px;
  color: var(--muted);
  text-align: center;
}

.menu-panel a:hover,
.menu-panel button:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.menu-panel .menu-danger,
.menu-panel .menu-danger i {
  color: var(--danger);
}

.menu-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.menu-sep {
  height: 1px;
  margin: var(--space-2) 0;
  background: var(--border);
}

.theme-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--inset);
  border-radius: var(--radius-pill);
}

.theme-switch button {
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--muted);
}

.theme-switch button[aria-pressed="true"] {
  background: var(--elevated-2);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ==== components/cards.css ==== */
/* Cards, notices, empty-state container, widgets. */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.card.form-stack {
  gap: var(--space-3);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.card-title h2,
.card-title h3 {
  margin: 0;
}

.card-inset {
  padding: var(--space-3);
  background: var(--inset);
  border-radius: var(--radius-sm);
}

.list-card {
  padding: 0;
  overflow: hidden;
}

.list-card > .person-row,
.list-card > .ticket-row,
.list-card > .tx-row,
.list-card > .trend {
  border-bottom: 1px solid var(--border);
}

.list-card > :last-child {
  border-bottom: 0;
}

.notice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: rgba(67, 197, 232, 0.08);
  border: 1px solid rgba(67, 197, 232, 0.22);
  border-radius: var(--radius);
  color: var(--text);
}

.notice > i {
  margin-top: 3px;
  color: var(--ocean-300);
}

.notice-warning {
  background: rgba(240, 183, 91, 0.1);
  border-color: rgba(240, 183, 91, 0.3);
}

.notice-warning > i {
  color: var(--warning);
}

.notice-success {
  background: rgba(53, 201, 154, 0.1);
  border-color: rgba(53, 201, 154, 0.3);
}

.notice-success > i {
  color: var(--success);
}

.widgets {
  display: grid;
  gap: var(--space-4);
}

.widget {
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.widget h3 {
  margin-bottom: var(--space-3);
  font-size: var(--text-md);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--text-xs);
}

.widget-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  border-color: rgba(67, 197, 232, 0.35);
  background: rgba(67, 197, 232, 0.08);
}

.widget-alert i {
  font-size: 1.2rem;
  color: var(--ocean-300);
}

.widget-alert small {
  display: block;
  color: var(--muted);
}

.widget-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.mini-person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  color: var(--text);
}

.mini-person span:last-child {
  display: grid;
  min-width: 0;
}

.mini-person small {
  color: var(--muted);
}

.mini-person:hover {
  text-decoration: none;
}

.trend {
  display: grid;
  padding: var(--space-2) 0;
  color: var(--text);
}

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

.trend:hover {
  text-decoration: none;
}

.trend:hover strong {
  color: var(--ocean-300);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.stat-card {
  display: grid;
  gap: 2px;
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-card small {
  color: var(--muted);
}

.stat-card strong {
  font-size: var(--text-xl);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(157, 173, 190, 0.14);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-open,
.status-pending,
.status-under_review,
.status-held,
.status-cooldown,
.status-cooling_down,
.status-needs_info,
.status-in_progress,
.status-reviewing,
.status-processing,
.status-high {
  background: rgba(240, 183, 91, 0.16);
  color: var(--warning);
}

.status-approved,
.status-paid,
.status-active,
.status-visible,
.status-available,
.status-healthy,
.status-resolved,
.status-actioned,
.status-cleared,
.status-normal {
  background: rgba(53, 201, 154, 0.16);
  color: var(--success);
}

.status-rejected,
.status-declined,
.status-removed,
.status-invalid,
.status-suspended,
.status-revoked,
.status-confirmed,
.status-urgent,
.status-no_credit,
.status-disabled {
  background: rgba(240, 100, 114, 0.16);
  color: var(--danger);
}

.status-awaiting_user,
.status-review {
  background: rgba(67, 197, 232, 0.16);
  color: var(--ocean-300);
}

/* ==== components/navigation.css ==== */
/* Navigation: top bar, desktop sidebar, floating bottom tab bar, tabs. */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  padding-top: var(--safe-top);
  background: var(--glass);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--topbar);
}

.topbar .site-header-inner {
  max-width: 1440px;
  padding-inline: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img,
.brand svg {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.brand-short {
  display: none;
}

.topbar-search {
  flex: 1 1 auto;
  max-width: 460px;
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.nav-links {
  display: none;
  gap: var(--space-5);
  margin-left: var(--space-5);
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.mobile-drawer {
  border-top: 1px solid var(--border);
  background: var(--glass-strong);
}

.mobile-drawer .container {
  display: grid;
  padding-block: var(--space-3);
}

.mobile-drawer a {
  padding: var(--space-3) 0;
  color: var(--text);
  font-weight: 600;
}

.bell-count,
.count-dot,
.side-count,
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
}

.icon-btn .bell-count {
  position: absolute;
  top: 2px;
  right: 0;
  box-shadow: 0 0 0 2px var(--bg-2);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-600), var(--ocean-400));
  color: var(--on-accent);
  font-weight: 800;
  font-size: var(--text-sm);
}

.sidebar {
  display: none;
}

.side-nav {
  display: grid;
  gap: 2px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.side-nav a i {
  width: 22px;
  text-align: center;
  font-size: 1.05rem;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
}

.side-nav a[aria-current="page"] {
  background: rgba(67, 197, 232, 0.12);
  color: var(--ocean-300);
}

.side-nav a .side-count {
  margin-left: auto;
}

.side-sep {
  height: 1px;
  margin: var(--space-2) var(--space-3);
  background: var(--border);
}

.side-create {
  width: 100%;
  margin-top: var(--space-4);
}

/* Bottom tab bar: floating pill with a top indicator on the active tab and a highlighted Create button. */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-nav);
  padding: 0 var(--space-3) calc(var(--space-2) + var(--safe-bottom));
  pointer-events: none;
}

.bn-track {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  max-width: 520px;
  height: 62px;
  margin-inline: auto;
  padding: 0 var(--space-2);
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bn-tab {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--base) var(--ease), transform var(--fast) var(--ease);
}

.bn-tab:hover {
  color: var(--muted);
  text-decoration: none;
}

.bn-tab:active {
  transform: scale(0.94);
}

.bn-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 28px;
  font-size: 1.15rem;
  transition: transform var(--base) var(--ease-out);
}

.bn-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bn-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 20px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--ocean-400);
  transform: translateX(-50%) scaleX(0);
  transition: transform var(--base) var(--ease-out);
}

.bn-tab[aria-current="page"] {
  color: var(--ocean-400);
}

.bn-tab[aria-current="page"]::before {
  transform: translateX(-50%) scaleX(1);
}

.bn-tab[aria-current="page"] .bn-icon {
  transform: translateY(-1px) scale(1.08);
}

.bn-create .bn-icon {
  width: 52px;
  height: 52px;
  margin-top: -20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ocean-500), var(--ocean-400));
  color: var(--on-accent);
  font-size: 1.3rem;
  box-shadow: 0 8px 22px rgba(41, 156, 193, 0.5), 0 0 0 5px var(--bg);
  transition: transform var(--base) var(--ease-out), box-shadow var(--base) var(--ease);
}

.bn-create::before {
  display: none;
}

.bn-create .bn-label {
  color: var(--muted);
}

.bn-create:hover .bn-icon {
  transform: translateY(-2px) rotate(90deg);
}

.bn-icon .count-dot {
  position: absolute;
  top: -2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  font-size: 0.6rem;
  box-shadow: 0 0 0 2px var(--bg-2);
}

.tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a {
  flex: 1 0 auto;
  padding: 8px var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.tabs a:hover {
  color: var(--text);
  text-decoration: none;
}

.tabs a[aria-current="page"] {
  background: var(--elevated-2);
  color: var(--ocean-300);
  box-shadow: var(--shadow-sm);
}

.tab-count {
  margin-left: 4px;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.load-more {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
}

/* ==== components/headers.css ==== */
/* Avatars, badges, headers and tiny identity pieces shared by many pages. */
.pa {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-700), var(--ocean-600));
  color: var(--text);
  font-weight: 800;
}

.pa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pa-sm {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
}

.pa-md {
  width: 44px;
  height: 44px;
  font-size: 1rem;
}

.pa-lg {
  width: 62px;
  height: 62px;
  font-size: 1.3rem;
}

.pa-xl {
  width: 112px;
  height: 112px;
  font-size: 2.4rem;
}

.pa-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.pa-ai {
  background: linear-gradient(135deg, var(--ocean-500), var(--accent));
  color: var(--on-accent);
}

.online-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--card);
}

.badge-verified {
  margin-left: 4px;
  color: var(--ocean-400);
  font-size: 0.85em;
}

.badge-photo {
  margin-left: 4px;
  color: var(--success);
  font-size: 0.72em;
}

.verified-badge {
  color: var(--success);
}

.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.person-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  color: var(--text);
}

.person-main:hover {
  text-decoration: none;
}

.person-text {
  display: grid;
  min-width: 0;
}

.person-text strong,
.person-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-text small {
  color: var(--muted);
}

.people-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 148px;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.people-strip::-webkit-scrollbar {
  display: none;
}

.people-card {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-snap-align: start;
  transition: transform var(--base) var(--ease), border-color var(--base) var(--ease);
}

.people-card:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 197, 232, 0.4);
}

.people-card > a {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--text);
}

.people-card > a:hover {
  text-decoration: none;
}

.people-card small {
  color: var(--muted);
  font-size: var(--text-xs);
}

.thread {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.thread-msg {
  padding: var(--space-3) var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.thread-msg header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.thread-msg.is-staff {
  background: rgba(67, 197, 232, 0.08);
  border-color: rgba(67, 197, 232, 0.28);
}

.thread-msg.is-note {
  background: rgba(240, 183, 91, 0.08);
  border-color: rgba(240, 183, 91, 0.3);
}

.about-list {
  display: grid;
  gap: 0;
}

.about-card {
  display: grid;
  gap: var(--space-3);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.achievement {
  display: grid;
  gap: 2px;
  padding: var(--space-3);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--faint);
  opacity: 0.7;
}

.achievement i {
  font-size: 1.3rem;
}

.achievement.is-earned {
  border-style: solid;
  border-color: rgba(67, 197, 232, 0.4);
  background: rgba(67, 197, 232, 0.08);
  color: var(--text);
  opacity: 1;
}

.achievement.is-earned i {
  color: var(--ocean-400);
}

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

/* ==== components/posts.css ==== */
/* Feed: composer entry, posts, media, polls, reactions, share cards. */
.compose-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compose-prompt {
  flex: 1 1 auto;
  min-height: 42px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--inset);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.compose-prompt:hover {
  border-color: rgba(67, 197, 232, 0.5);
  color: var(--text);
}

.feed {
  display: grid;
  gap: var(--space-4);
}

.post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.post-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.post-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  color: var(--text);
}

.post-author-name {
  color: var(--text);
}

.post-author-name:hover {
  color: var(--ocean-300);
  text-decoration: none;
}

.post-author-text {
  display: grid;
  min-width: 0;
}

.post-author-text small {
  color: var(--muted);
  white-space: normal;
}

.post-author-text small a {
  color: var(--muted);
}

.post-author-text small a:hover {
  color: var(--text);
}

.post-pin {
  padding: 0 var(--space-4);
  color: var(--faint);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-notice {
  margin: var(--space-2) var(--space-4) 0;
}

.post-body {
  padding: var(--space-2) var(--space-4) var(--space-3);
  font-size: var(--text-lg);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.link-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 var(--space-4) var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.link-card:hover {
  border-color: rgba(67, 197, 232, 0.4);
  text-decoration: none;
}

.link-card small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52vw;
}

.post-media {
  display: grid;
  gap: 2px;
  background: var(--bg-2);
}

.post-media.media-2 {
  grid-template-columns: 1fr 1fr;
}

.post-photo {
  display: block;
  overflow: hidden;
  background: var(--bg-2);
}

.post-photo img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.post-media.media-2 .post-photo img {
  max-height: 340px;
  aspect-ratio: 1 / 1;
}

.post-photo:hover img {
  transform: scale(1.02);
}

.poll {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
}

.poll-option,
.poll-result {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--inset);
  overflow: hidden;
}

.poll-option {
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.poll-option:hover {
  border-color: var(--ocean-400);
  background: rgba(67, 197, 232, 0.08);
}

.poll-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(67, 197, 232, 0.16);
  transition: width var(--slow) var(--ease-out);
}

.poll-result.is-mine {
  border-color: var(--ocean-400);
}

.poll-result.is-mine .poll-bar {
  background: rgba(67, 197, 232, 0.3);
}

.poll-label,
.poll-pct {
  position: relative;
  font-weight: 600;
}

.shared-post {
  display: grid;
  gap: var(--space-2);
  margin: 0 var(--space-4) var(--space-3);
  padding: var(--space-3);
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.shared-post .post-body {
  padding: 0;
  font-size: var(--text-md);
}

.shared-author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
}

.shared-author small {
  color: var(--muted);
}

.shared-author:hover {
  text-decoration: none;
}

.shared-open {
  font-size: var(--text-sm);
  font-weight: 600;
}

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

.post-stats {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
}

.stat-spacer {
  flex: 1 1 auto;
}

.stat-reactions,
.stat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.stat-reactions:hover,
.stat-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.stat-icons {
  display: inline-flex;
}

.stat-icons .rx + .rx {
  margin-left: -5px;
}

.rx {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-style: normal;
  font-size: 0.6rem;
  color: #fff;
  box-shadow: 0 0 0 2px var(--card);
}

.rx::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.rx-like {
  background: var(--ocean-500);
}

.rx-like::before {
  content: "\f164";
}

.rx-love {
  background: #E8506A;
}

.rx-love::before {
  content: "\f004";
}

.rx-haha {
  background: #E9A93C;
  color: #3A2600;
}

.rx-haha::before {
  content: "\f59b";
}

.rx-wow {
  background: #8D6BE0;
}

.rx-wow::before {
  content: "\f5c2";
}

.rx-angry {
  background: #D5543B;
}

.rx-angry::before {
  content: "\f556";
}

.post-actions {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 4px var(--space-2);
  border-top: 1px solid var(--border);
}

.act {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 42px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

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

.act.is-active {
  color: var(--ocean-300);
}

.act.rx-on-love {
  color: #F06A83;
}

.act.rx-on-haha {
  color: #F0B75B;
}

.act.rx-on-wow {
  color: #A78BF2;
}

.act.rx-on-angry {
  color: #E8694F;
}

.act-react.is-active i {
  animation: ploura-heart 360ms var(--ease-out);
}

.act-save {
  flex: 0 0 48px;
}

.react-wrap {
  position: relative;
  flex: 1 1 0;
  display: flex;
}

.react-wrap .act {
  width: 100%;
}

.react-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease), visibility var(--fast);
}

.react-wrap:hover .react-picker,
.react-wrap:focus-within .react-picker,
.react-wrap.is-open .react-picker {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.pick {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform var(--fast) var(--ease-out);
}

.pick:hover {
  transform: translateY(-4px) scale(1.2);
}

.pick-like {
  color: var(--ocean-400);
}

.pick-love {
  color: #F06A83;
}

.pick-haha {
  color: #F0B75B;
}

.pick-wow {
  color: #A78BF2;
}

.pick-angry {
  color: #E8694F;
}

.post-menu {
  flex: 0 0 auto;
}

.photo-priv {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(8, 19, 31, 0.72);
  color: #fff;
  font-size: 0.65rem;
}

/* ==== components/comments.css ==== */
/* Comments and replies. */
.comments {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--border);
  background: rgba(8, 19, 31, 0.28);
}

.comments-list {
  display: grid;
  gap: var(--space-3);
}

.comments-more {
  margin-top: var(--space-2);
}

.comment {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.comment-main {
  min-width: 0;
  flex: 1 1 auto;
}

.comment-bubble {
  display: inline-block;
  max-width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--elevated);
  border-radius: 16px;
  border-top-left-radius: 4px;
}

.comment-author {
  display: block;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
}

.comment-author:hover {
  text-decoration: none;
  color: var(--ocean-300);
}

.comment-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 2px 0 0 var(--space-3);
  color: var(--faint);
  font-size: var(--text-xs);
}

.comment-meta button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}

.comment-meta button:hover,
.comment-meta button.is-active {
  color: var(--ocean-300);
}

.comment-replies {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.comment.is-held .comment-bubble {
  opacity: 0.7;
  border: 1px dashed var(--border-strong);
}

.comment-form {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.comment-form .input {
  min-height: 40px;
  border-radius: var(--radius-pill);
}

.reply-form {
  margin-top: var(--space-2);
}

/* ==== components/composer.css ==== */
/* Post composer dialog. */
.composer-backdrop {
  align-items: end;
  padding: 0;
}

.composer {
  max-width: 560px;
  padding: var(--space-4);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  gap: var(--space-3);
  padding-bottom: calc(var(--space-4) + var(--safe-bottom));
}

.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.composer-head h2 {
  margin: 0;
}

.composer-form {
  display: grid;
  gap: var(--space-3);
}

.composer-text {
  min-height: 120px;
  border: 0;
  background: transparent;
  font-size: var(--text-lg);
  padding: var(--space-2) 0;
}

.composer-text:focus {
  box-shadow: none;
}

.composer-previews {
  display: flex;
  gap: var(--space-2);
}

.composer-previews:empty {
  display: none;
}

.preview {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--inset);
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview .icon-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  background: rgba(8, 19, 31, 0.78);
  color: #fff;
}

.composer-poll {
  display: grid;
  gap: var(--space-2);
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tool {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ocean-300);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--fast) var(--ease);
}

.tool:hover {
  background: rgba(67, 197, 232, 0.1);
}

.tool-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.tool-check:has(input:checked) {
  background: rgba(67, 197, 232, 0.2);
  color: var(--ocean-400);
}

.allowance {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: right;
}

.allowance.is-empty {
  color: var(--warning);
}

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.composer-foot .select {
  width: auto;
  min-width: 130px;
}

/* ==== components/profiles.css ==== */
/* Profile header, counts, tabs content. */
.profile-head {
  margin-bottom: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cover {
  position: relative;
  height: 150px;
  background: var(--bg-2);
  overflow: hidden;
}

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

.cover-fallback {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(67, 197, 232, 0.42), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(41, 156, 193, 0.38), transparent 60%),
    linear-gradient(135deg, var(--ocean-800), var(--ocean-700));
}

.profile-bar {
  position: relative;
  display: grid;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-3);
}

.profile-avatar {
  margin-top: -56px;
  border: 4px solid var(--card);
  box-shadow: var(--shadow);
}

.profile-id h1 {
  margin-bottom: 2px;
  font-size: var(--text-2xl);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.profile-counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  list-style: none;
  border-top: 1px solid var(--border);
}

.profile-counts a {
  color: var(--muted);
  font-size: var(--text-sm);
}

.profile-counts strong {
  color: var(--text);
  font-size: var(--text-lg);
}

.profile-counts a:hover {
  text-decoration: none;
  color: var(--text);
}

.profile-bio {
  padding: 0 var(--space-4) var(--space-3);
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-head > .chip-row,
.profile-head > .muted {
  padding-inline: var(--space-4);
}

.profile-head > .muted:last-child,
.profile-head > .chip-row:last-child {
  padding-bottom: var(--space-4);
}

.profile-tabs {
  position: sticky;
  top: calc(var(--topbar) + var(--safe-top) + var(--space-2));
  z-index: 10;
}

/* ==== components/gallery.css ==== */
/* Photo grids, photo viewer and album cards. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-grid:empty {
  display: none;
}

.photo-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-2);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease), opacity var(--base) var(--ease);
}

.photo-tile:hover img {
  transform: scale(1.05);
}

.photo-tile.selectable {
  cursor: pointer;
}

.photo-tile.selectable input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.sel-mark {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(8, 19, 31, 0.5);
  color: transparent;
  font-size: 0.7rem;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.photo-tile.selectable input:checked ~ img {
  opacity: 0.6;
}

.photo-tile.selectable input:checked ~ .sel-mark {
  background: var(--ocean-400);
  border-color: var(--ocean-400);
  color: var(--on-accent);
}

.photo-tools {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  padding: 4px;
  background: linear-gradient(0deg, rgba(4, 10, 17, 0.85), transparent);
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}

.photo-tile:hover .photo-tools,
.photo-tile:focus-within .photo-tools {
  opacity: 1;
}

.photo-tools .icon-btn {
  width: 30px;
  height: 30px;
  color: #fff;
}

.photo-view {
  margin: 0 0 var(--space-4);
  background: var(--bg-2);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}

.photo-view img {
  display: inline-block;
  max-height: 78vh;
  width: auto;
  object-fit: contain;
}

.photo-caption {
  margin-block: var(--space-3);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.album-card {
  display: grid;
  gap: 2px;
  color: var(--text);
}

.album-card:hover {
  text-decoration: none;
}

.album-card small {
  color: var(--muted);
}

.album-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: var(--space-2);
  border-radius: var(--radius);
  background: var(--elevated);
  color: var(--faint);
  font-size: 2rem;
  overflow: hidden;
  transition: transform var(--base) var(--ease), box-shadow var(--base) var(--ease);
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card:hover .album-cover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.picker .photo-grid {
  margin-bottom: var(--space-3);
}

/* ==== components/messaging.css ==== */
/* Messages: conversation list, thread, bubbles, composer, voice, typing. */
body.is-chat .shell-main {
  padding: 0;
}

.chat-layout {
  display: grid;
  grid-template-columns: 1fr;
  height: calc(100dvh - var(--topbar) - var(--safe-top) - var(--bottombar) - var(--safe-bottom) - var(--space-3));
  min-height: 420px;
}

.chat-layout.has-active .chat-list {
  display: none;
}

.chat-layout:not(.has-active) .chat-empty {
  display: none;
}

.chat-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg);
  border-right: 1px solid var(--border);
}

.chat-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.chat-list-head h1 {
  margin: 0;
  font-size: var(--text-xl);
}

.chat-search {
  margin: var(--space-2) var(--space-4) var(--space-3);
}

.chat-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background var(--fast) var(--ease);
}

.chat-item:hover {
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.chat-item.is-active {
  background: rgba(67, 197, 232, 0.1);
  border-left-color: var(--ocean-400);
}

.chat-item-text {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

.chat-item-text strong,
.chat-item-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-text small {
  color: var(--muted);
}

.chat-item.is-unread .chat-item-text strong,
.chat-item.is-unread .chat-item-text small {
  color: var(--text);
  font-weight: 800;
}

.chat-item-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--faint);
  font-size: var(--text-xs);
}

.clear-ai {
  margin: var(--space-4);
}

.chat-empty {
  display: grid;
  place-content: center;
  padding: var(--space-5);
}

.chat-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.chat-peer {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: var(--space-3);
  min-width: 0;
  color: var(--text);
}

.chat-peer:hover {
  text-decoration: none;
}

.chat-peer > span:last-child {
  display: grid;
  min-width: 0;
}

.chat-tools {
  display: flex;
  align-items: center;
}

.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-4) var(--space-3);
  background:
    radial-gradient(80% 50% at 80% 0%, rgba(41, 156, 193, 0.08), transparent 60%),
    var(--bg);
}

.chat-older {
  text-align: center;
  margin-bottom: var(--space-3);
}

.chat-messages {
  display: grid;
  gap: 6px;
}

.msg {
  display: flex;
  align-items: flex-end;
  gap: var(--space-1);
  max-width: 86%;
}

.msg-me {
  margin-left: auto;
  flex-direction: row-reverse;
}

.bubble {
  position: relative;
  padding: 8px 12px 6px;
  border-radius: 18px;
  background: var(--elevated);
  color: var(--text);
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-sm);
}

.msg-them .bubble {
  border-bottom-left-radius: 5px;
}

.msg-me .bubble {
  background: linear-gradient(135deg, var(--ocean-600), var(--ocean-500));
  color: #fff;
  border-bottom-right-radius: 5px;
}

.msg-ai .bubble {
  background: var(--card);
  border: 1px solid var(--border);
}

.bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.bubble.is-deleted {
  opacity: 0.65;
  font-style: italic;
}

.bubble-sender {
  display: block;
  margin-bottom: 2px;
  color: var(--ocean-300);
  font-weight: 700;
}

.bubble-quote {
  margin-bottom: 6px;
  padding: 4px 8px;
  border-left: 3px solid var(--ocean-300);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
  font-size: var(--text-sm);
  opacity: 0.9;
}

.bubble-image {
  max-width: min(260px, 64vw);
  max-height: 320px;
  border-radius: 12px;
  object-fit: cover;
}

.bubble audio {
  width: 220px;
  height: 36px;
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
  font-size: 0.65rem;
  opacity: 0.75;
}

.ticks {
  display: inline-flex;
  font-size: 0.6rem;
}

.ticks i + i {
  margin-left: -4px;
}

.ticks-read {
  color: var(--ocean-300);
  opacity: 1;
}

.bubble-reactions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.bubble-reactions .rx {
  box-shadow: none;
}

.msg-tools {
  display: flex;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}

.msg:hover .msg-tools,
.msg:focus-within .msg-tools {
  opacity: 1;
}

.msg-tools .icon-btn {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.chat-typing {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-style: italic;
}

.chat-reply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--card);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}

.chat-compose {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.chat-compose .input {
  flex: 1 1 auto;
  border-radius: var(--radius-pill);
}

.is-recording {
  color: var(--danger);
  animation: ploura-pulse 1s ease-in-out infinite;
}

.chat-back {
  flex: 0 0 auto;
}

.call-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

/* ==========================================================================
   Messaging refresh.
   Root cause of the squeezed one-letter bubbles: the older `.bubble` rule in main.css gave bubbles a percentage
   max-width inside a shrink-to-fit row, so with `overflow-wrap: anywhere` they collapsed to a single character.
   ========================================================================== */
.chat-layout {
  background: var(--bg);
}

.chat-list {
  background: var(--bg-2);
}

.chat-list-head {
  padding: var(--space-4) var(--space-4) var(--space-1);
}

.chat-list-head h1 {
  font-size: var(--text-2xl);
  font-weight: 800;
}

.chat-search {
  position: relative;
  display: block;
  margin: var(--space-3) var(--space-4);
}

.chat-search i {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.chat-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  appearance: none;
  -webkit-appearance: none;
}

.chat-search input::placeholder {
  color: var(--faint);
}

.chat-search input:focus {
  outline: none;
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px rgba(67, 197, 232, 0.18);
}

.chat-item {
  gap: var(--space-3);
  padding: 10px var(--space-4);
  border-left: 0;
  border-radius: 0;
}

.chat-item .pa-md {
  width: 50px;
  height: 50px;
}

.chat-item-text strong {
  font-size: var(--text-md);
}

.chat-item-text small {
  font-size: var(--text-sm);
}

.chat-item.is-active {
  background: rgba(67, 197, 232, 0.12);
  box-shadow: inset 3px 0 0 var(--ocean-400);
}

.chat-item.chat-ai .chat-item-text small {
  color: var(--link);
}

.chat-item-meta .side-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--ocean-500);
  color: #fff;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

.chat-head {
  min-height: 62px;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-2);
}

.chat-head .chat-peer strong {
  font-size: var(--text-md);
  line-height: 1.2;
}

.chat-head .chat-peer small {
  font-size: var(--text-xs);
  line-height: 1.2;
}

.chat-scroll {
  padding: var(--space-4) var(--space-3) var(--space-3);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* A message row is as wide as its text (up to 86% of the thread) and never narrower than one word. */
.msg {
  width: fit-content;
  max-width: 86%;
  min-width: 0;
}

.msg .bubble {
  align-self: auto;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px 6px;
  border-radius: 18px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.4;
}

.msg-me {
  align-self: flex-end;
  margin-left: auto;
}

.msg-them,
.msg-ai {
  align-self: flex-start;
  margin-right: auto;
}

.msg-them .bubble,
.msg-ai .bubble {
  border-bottom-left-radius: 5px;
}

.msg-me .bubble {
  border-bottom-right-radius: 5px;
}

.msg .bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.bubble-meta {
  min-width: 44px;
}

.chat-compose {
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  padding-bottom: calc(var(--space-2) + 2px);
}

.chat-compose .input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--inset);
}

.chat-compose .icon-btn,
.chat-compose .btn-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.chat-compose .btn-icon.btn-primary {
  box-shadow: var(--glow);
}

.chat-compose .btn-icon.btn-secondary {
  border: 1px solid var(--border-strong);
  background: transparent;
}

.ai-error {
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.ai-error [data-ai-error-text] {
  flex: 1 1 180px;
  min-width: 0;
}

.ai-messages .msg-ai {
  max-width: 94%;
}

.chat-empty {
  background: var(--bg);
}

:root[data-theme="light"] .chat-item:hover {
  background: rgba(13, 27, 42, 0.04);
}

/* ==== components/notifications.css ==== */
/* Notification panel (slide-over on desktop, sheet on mobile). */
.notif-scrim {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sheet) - 1);
  background: var(--scrim);
}

.notif-panel {
  position: fixed;
  z-index: var(--z-sheet);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: 82dvh;
  padding-bottom: var(--safe-bottom);
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-pop);
  animation: ploura-slide-up var(--base) var(--ease-out) both;
}

.notif-panel-handle {
  width: 44px;
  height: 4px;
  margin: var(--space-2) auto 0;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
}

.notif-panel-head h2 {
  margin: 0;
  font-size: var(--text-lg);
}

.notif-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font-weight: 700;
  cursor: pointer;
}

.notif-filters {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
  overflow-x: auto;
}

.notif-panel-list {
  flex: 1 1 auto;
  overflow-y: auto;
}

.notif-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  border-top: 1px solid var(--border);
}

.notif-row:hover {
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.notif-row.is-unread {
  background: rgba(67, 197, 232, 0.08);
}

.notif-avatar {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-600), var(--ocean-400));
  color: var(--on-accent);
  font-weight: 800;
}

.notif-avatar.notif-system {
  background: rgba(53, 201, 154, 0.14);
  color: var(--success);
}

.notif-body {
  display: grid;
  min-width: 0;
}

.notif-title {
  font-weight: 700;
}

.notif-text,
.notif-time {
  color: var(--muted);
  font-size: var(--text-sm);
}

.notif-group {
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-1);
  color: var(--faint);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.notif-empty {
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--muted);
}

.notif-dot {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--ocean-400);
}

.notif-all {
  display: block;
  padding: var(--space-3);
  text-align: center;
  border-top: 1px solid var(--border);
  font-weight: 700;
}

.call-banner {
  position: fixed;
  left: var(--space-3);
  right: var(--space-3);
  top: calc(var(--topbar) + var(--safe-top) + var(--space-2));
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--glass-strong);
  border: 1px solid var(--ocean-400);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  animation: ploura-ring 1.4s ease-out infinite;
}

.call-banner span {
  flex: 1 1 auto;
  font-weight: 700;
}

/* ==== components/stories.css ==== */
/* Story tray and full-screen viewer. */
.stories {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.stories::-webkit-scrollbar {
  display: none;
}

.story-tile {
  display: grid;
  justify-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: 74px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: var(--text-xs);
  cursor: pointer;
}

.story-tile small {
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-ring {
  display: grid;
  place-items: center;
  padding: 3px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: transform var(--fast) var(--ease);
}

.story-tile.is-unseen .story-ring {
  background: conic-gradient(var(--ocean-300), var(--ocean-500), var(--accent), var(--ocean-300));
}

.story-ring .pa {
  border: 3px solid var(--bg);
}

.story-tile:hover .story-ring {
  transform: scale(1.05);
}

.story-add .pa-initial {
  background: var(--elevated);
  color: var(--ocean-400);
}

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: var(--z-story);
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 480px;
  margin-inline: auto;
  background: #000;
  color: #fff;
  animation: ploura-fade-in var(--fast) linear both;
}

.story-bars {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  left: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  gap: 4px;
}

.story-bar {
  position: relative;
  flex: 1 1 0;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.story-bar.is-done {
  background: #fff;
}

.story-bar.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left;
  animation: story-progress 6s linear forwards;
}

@keyframes story-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.story-head {
  position: absolute;
  top: calc(var(--safe-top) + 18px);
  left: 12px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.story-head small {
  opacity: 0.8;
}

.story-close {
  margin-left: auto;
  color: #fff;
}

.story-stage {
  position: relative;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.story-stage img,
.story-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.story-caption {
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: calc(80px + var(--safe-bottom));
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
}

.story-nav {
  position: absolute;
  top: 56px;
  bottom: 90px;
  width: 38%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.story-prev {
  left: 0;
}

.story-next {
  right: 0;
}

.story-foot {
  position: relative;
  z-index: 3;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) calc(var(--space-3) + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent);
}

.story-reply {
  display: flex;
  flex: 1 1 auto;
  gap: var(--space-2);
}

.story-reply .input {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: var(--radius-pill);
}

.story-foot .icon-btn {
  color: #fff;
}

/* ==== components/explore.css ==== */
/* Explore, search and community discovery cards. */
.group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.group-card {
  display: grid;
  gap: 2px;
  padding: var(--space-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform var(--base) var(--ease), border-color var(--base) var(--ease);
}

.group-card:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 197, 232, 0.4);
  text-decoration: none;
}

.group-card small {
  color: var(--muted);
}

.group-cover {
  display: grid;
  place-items: center;
  height: 84px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--ocean-700), var(--ocean-600));
  color: var(--ocean-300);
  font-size: 1.6rem;
  overflow: hidden;
}

.group-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-right {
  display: none;
}

.range-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.feed-tabs {
  position: sticky;
  top: calc(var(--topbar) + var(--safe-top) + var(--space-2));
  z-index: 10;
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.empty {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-7) var(--space-4);
  text-align: center;
  color: var(--muted);
}

.empty > i {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-2);
  border-radius: 20px;
  background: rgba(67, 197, 232, 0.1);
  color: var(--ocean-300);
  font-size: 1.6rem;
}

.empty h3 {
  margin: 0;
  color: var(--text);
}

.empty p {
  max-width: 340px;
  margin: 0 0 var(--space-3);
}

.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--text);
}

.ticket-row > span:first-child {
  display: grid;
  min-width: 0;
}

.ticket-row:hover {
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

/* ==== components/marketplace.css ==== */
/* Marketplace listings. */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.listing-card {
  display: grid;
  gap: 2px;
  color: var(--text);
}

.listing-card:hover {
  text-decoration: none;
}

.listing-card strong {
  font-size: var(--text-lg);
}

.listing-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  margin-bottom: var(--space-2);
  border-radius: var(--radius);
  background: var(--elevated);
  color: var(--faint);
  font-size: 2rem;
  overflow: hidden;
  transition: transform var(--base) var(--ease), box-shadow var(--base) var(--ease);
}

.listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card:hover .listing-thumb {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.listing-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(8, 19, 31, 0.8);
  color: #fff;
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 700;
}

.listing-view {
  display: grid;
  gap: var(--space-4);
}

.listing-gallery {
  display: grid;
  gap: var(--space-2);
}

.listing-gallery img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
}

.listing-thumb-lg {
  aspect-ratio: 4 / 3;
}

.listing-info {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.listing-info h1 {
  margin: 0;
}

.listing-price {
  margin: 0;
  color: var(--ocean-300);
  font-size: var(--text-2xl);
  font-weight: 800;
}

.listing-desc {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ==== components/wallet.css ==== */
/* Wallet and referral pages. */
.wallet-hero {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(67, 197, 232, 0.22), transparent 60%),
    linear-gradient(135deg, var(--ocean-800), var(--ocean-850));
  border: 1px solid rgba(67, 197, 232, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.wallet-main small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
}

.wallet-main strong {
  display: block;
  margin-block: var(--space-1);
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.wallet-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.wallet-stats div {
  padding: var(--space-3);
  background: rgba(8, 19, 31, 0.35);
  border-radius: var(--radius-sm);
}

.wallet-stats dt {
  font-size: var(--text-xs);
}

.wallet-stats dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.tx-row > span:first-child {
  display: grid;
  min-width: 0;
}

.tx-amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tx-amount.is-in {
  color: var(--success);
}

.tx-amount.is-out {
  color: var(--danger);
}

/* ==== components/verification.css ==== */
.code-input {
  letter-spacing: 0.5em;
  text-align: center;
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
}

/* ==== components/settings.css ==== */
.config-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.config-item {
  min-width: 0;
}

.config-wide {
  grid-column: 1 / -1;
}

/* ==== components/community.css ==== */
/* Groups, events and support threads. */
.event-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.event-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform var(--base) var(--ease), border-color var(--base) var(--ease);
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 197, 232, 0.4);
  text-decoration: none;
}

.event-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--ocean-700), var(--ocean-600));
  color: var(--ocean-300);
  font-size: 1.8rem;
  overflow: hidden;
}

.event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.event-body small {
  color: var(--muted);
}

.event-date {
  color: var(--ocean-300);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
}

.event-hero {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.event-cover-lg {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ocean-700), var(--ocean-600));
  color: var(--ocean-300);
  font-size: 3rem;
  overflow: hidden;
}

.event-cover-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-hero h1 {
  margin: 0;
}

/* ==== components/ai.css ==== */
/* Ploura AI assistant. */
.ai-welcome {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  max-width: 460px;
  margin: var(--space-6) auto;
  text-align: center;
}

.ai-welcome h2 {
  margin: 0;
}

.ai-welcome .chip-row {
  justify-content: center;
}

.ai-typing {
  display: inline-flex;
  gap: 5px;
  margin: var(--space-3) 0 0 var(--space-2);
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
}

.ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ocean-300);
  animation: ploura-dot 1.2s ease-in-out infinite;
}

.ai-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.ai-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(240, 100, 114, 0.1);
  border-top: 1px solid rgba(240, 100, 114, 0.35);
  color: var(--danger);
  font-size: var(--text-sm);
}

.ai-messages .msg-ai {
  max-width: 94%;
}

.ai-messages .bubble p {
  line-height: 1.6;
}

/* ==== components/calls.css ==== */
/* Voice and video call overlay. */
.call-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-story);
  display: grid;
  place-items: center;
  background: rgba(4, 10, 17, 0.92);
}

.call-box {
  position: relative;
  display: grid;
  gap: var(--space-4);
  width: min(100%, 560px);
  padding: var(--space-5);
  text-align: center;
}

#remote-video {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: #000;
  object-fit: cover;
}

#local-video {
  position: absolute;
  right: var(--space-6);
  top: var(--space-6);
  width: 28%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: #000;
  object-fit: cover;
}

.call-status {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.call-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
}

/* ==== components/toasts.css ==== */
/* Toasts: the small "saved / failed" messages. One definition only.
   (An older copy in main.css used to stretch the region from top to bottom, which drew a tall white pill.) */
.toast-region {
  position: fixed;
  top: auto;
  right: 0;
  bottom: calc(var(--bottombar) + var(--safe-bottom) + var(--space-4));
  left: 0;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: auto;
  height: auto;
  padding-inline: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: auto;
  max-width: min(440px, 100%);
  min-height: 0;
  height: auto;
  padding: 10px 8px 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--glass-strong);
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--shadow-pop);
  pointer-events: auto;
  animation: ploura-rise var(--base) var(--ease-out) both;
}

.toast > i {
  flex: none;
  margin: 0;
  font-size: 1.05rem;
}

.toast > div {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast > button {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.toast > button:hover {
  background: rgba(127, 127, 127, 0.18);
  color: var(--text);
}

.toast.success,
.toast.toast-success {
  border-color: rgba(53, 201, 154, 0.55);
}

.toast.success > i,
.toast.toast-success > i {
  color: var(--success);
}

.toast.error,
.toast.toast-error {
  border-color: rgba(240, 100, 114, 0.6);
}

.toast.error > i,
.toast.toast-error > i {
  color: var(--danger);
}

.toast.info,
.toast.toast-info {
  border-color: rgba(67, 197, 232, 0.5);
}

.toast.info > i,
.toast.toast-info > i {
  color: var(--info);
}

/* Wide screens have no bottom bar: sit in the top right, under the header, like a notification. */
@media (min-width: 1024px) {
  .toast-region {
    top: calc(var(--topbar) + var(--safe-top) + var(--space-3));
    right: var(--space-4);
    bottom: auto;
    left: auto;
    align-items: flex-end;
    width: min(420px, calc(100vw - 32px));
    padding-inline: 0;
  }
}

/* ==== components/skeletons.css ==== */
/* Loading skeletons. */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--elevated);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  background-size: 240px 100%;
  background-repeat: no-repeat;
  animation: ploura-shimmer 1.3s linear infinite;
}

.skeleton-line {
  height: 12px;
  margin-bottom: var(--space-2);
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.skeleton-post {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.skeleton-image {
  aspect-ratio: 16 / 9;
}

/* ==== components/account.css ==== */
/* Account sidebar, settings hub, segmented tabs, story thumbnails and the full-size photo viewer.
   Everything reads the semantic tokens, so dark, light and system themes all work. */

/* ------------------------------------------------------------------ top bar avatar button */
.topbar .menu-trigger {
  flex: 0 0 auto;
  padding: 2px;
  min-height: 0;
  border: 2px solid transparent;
  background: transparent;
  border-radius: 50%;
}

.topbar .menu-trigger:hover,
.topbar .menu-trigger[aria-expanded="true"] {
  border-color: var(--ocean-400);
  background: transparent;
}

.topbar .menu-trigger .avatar {
  width: 36px;
  height: 36px;
  overflow: hidden;
  box-shadow: none;
}

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

/* ------------------------------------------------------------------ account sidebar */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 84;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.drawer-scrim.is-open {
  opacity: 1;
}

.account-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  width: min(340px, 88vw);
  height: 100dvh;
  background: var(--bg-2);
  color: var(--text);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  transform: translateX(104%);
  transition: transform 0.22s var(--ease-out);
  padding-top: var(--safe-top);
}

.account-drawer.is-open {
  transform: none;
}

body.has-drawer {
  overflow: hidden;
}

.drawer-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3) var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.drawer-profile {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: var(--space-3);
  min-width: 0;
  color: var(--text);
}

.drawer-profile:hover {
  text-decoration: none;
}

.drawer-profile .avatar-lg,
.account-drawer .avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
  overflow: hidden;
  flex: none;
}

.drawer-profile-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.drawer-profile-text strong,
.drawer-profile-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-profile-text small {
  color: var(--muted);
}

.drawer-role {
  justify-self: start;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: rgba(67, 197, 232, 0.16);
  color: var(--link);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.drawer-nav {
  display: grid;
  gap: 2px;
  padding: var(--space-2) 0;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 650;
}

.drawer-nav a i {
  width: 20px;
  color: var(--muted);
  text-align: center;
}

.drawer-nav a:hover {
  background: rgba(67, 197, 232, 0.08);
  text-decoration: none;
}

.drawer-nav a[aria-current="page"] {
  background: rgba(67, 197, 232, 0.14);
}

.drawer-nav a[aria-current="page"] i {
  color: var(--link);
}

.drawer-section {
  padding: var(--space-3) 0 var(--space-2);
  border-top: 1px solid var(--border);
}

.drawer-section h2 {
  margin: 0 0 var(--space-2) var(--space-3);
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.drawer-links a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 38px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.drawer-links a i {
  width: 16px;
  color: var(--faint);
  text-align: center;
}

.drawer-links a:hover {
  background: rgba(67, 197, 232, 0.08);
  color: var(--text);
  text-decoration: none;
}

.drawer-foot {
  flex: 0 0 auto;
  padding: var(--space-3) var(--space-4) calc(var(--space-3) + var(--safe-bottom));
  border-top: 1px solid var(--border);
}

.drawer-logout {
  color: var(--danger);
}

/* ------------------------------------------------------------------ segmented tabs (Friends, Profile) */
.tabs.seg-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 4px;
  margin-bottom: var(--space-4);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs.seg-tabs::-webkit-scrollbar {
  display: none;
}

.tabs.seg-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 38px;
  margin: 0;
  padding: 0 var(--space-4);
  border: 0;
  border-bottom: 0;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
  scroll-snap-align: center;
}

.tabs.seg-tabs a:hover {
  color: var(--text);
  background: rgba(67, 197, 232, 0.08);
}

.tabs.seg-tabs a[aria-current="page"] {
  border: 0;
  border-bottom: 0;
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: var(--glow);
}

.tabs.seg-tabs .tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

@media (min-width: 720px) {
  .tabs.seg-tabs a {
    flex: 1 1 auto;
  }
}

/* ------------------------------------------------------------------ settings hub */
.settings-group {
  display: grid;
  gap: 0;
  margin-bottom: var(--space-4);
  padding: 0;
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 64px;
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child {
  border-bottom: 0;
}

a.settings-row:hover {
  background: rgba(67, 197, 232, 0.06);
  text-decoration: none;
}

.settings-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient-soft);
  color: var(--link);
  font-size: 1.05rem;
}

.settings-text {
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
  min-width: 0;
}

.settings-text strong {
  font-size: var(--text-md);
}

.settings-text small {
  color: var(--muted);
  font-size: var(--text-sm);
}

.settings-state {
  flex: none;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(53, 201, 154, 0.14);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 800;
}

.settings-row > .fa-chevron-right {
  flex: none;
  color: var(--faint);
  font-size: 0.8rem;
}

.settings-heading {
  margin: var(--space-5) 0 var(--space-2) var(--space-2);
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.settings-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-weight: 650;
}

.settings-back:hover {
  color: var(--text);
  text-decoration: none;
}

.settings-data {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.settings-data .row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.settings-activity {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.settings-activity .list-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 9px var(--space-3);
  border-bottom: 1px solid var(--border);
}

.settings-activity .list-item:last-child {
  border-bottom: 0;
}

.me-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
}

.me-card .avatar {
  width: 56px;
  height: 56px;
  overflow: hidden;
  font-size: 1.4rem;
}

.me-card-text {
  display: grid;
  min-width: 0;
}

.me-card-text small {
  color: var(--muted);
}

.me-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.me-chips .chip-static {
  padding: 2px 10px;
  font-size: 0.72rem;
}

/* ------------------------------------------------------------------ story tray thumbnails */
.story-ring {
  position: relative;
}

.story-ring .story-thumb {
  display: block;
  width: 62px;
  height: 62px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--elevated);
  object-fit: cover;
}

.story-ring {
  align-self: start;
  width: fit-content;
}

.story-ring .story-mini {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: block;
  width: 26px;
  height: 26px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  overflow: hidden;
}

.story-ring .story-mini .pa {
  width: 100%;
  height: 100%;
  font-size: 0.6rem;
}

.story-ring .story-video-badge {
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 0.9rem;
  pointer-events: none;
}

/* ------------------------------------------------------------------ full-size photo viewer */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 12px) 12px calc(var(--safe-bottom) + 12px);
  background: rgba(0, 0, 0, 0.92);
  animation: ploura-fade-in var(--fast) linear both;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

body.has-lightbox {
  overflow: hidden;
}

[data-lightbox],
.profile-avatar.is-viewable,
.cover.is-viewable {
  cursor: zoom-in;
}

/* ------------------------------------------------------------------ small shared fixes */
.field > label,
.label {
  color: var(--muted);
}

/* Theme switch buttons: no browser-grey backgrounds. */
.theme-switch button {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* ==== admin/admin-shell.css ==== */
/* Admin console shell: sidebar, top bar, content area. A separate interface from the member app. */
.admin-shell {
  display: block;
  min-height: 100dvh;
  background: var(--bg);
}

.admin-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: var(--z-sheet);
  width: min(300px, 86vw);
  padding: calc(var(--safe-top) + var(--space-4)) var(--space-3) calc(var(--safe-bottom) + var(--space-5));
  overflow-y: auto;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  transform: translateX(-102%);
  transition: transform var(--base) var(--ease-out);
}

.admin-sidebar.is-open,
.admin-sidebar.open {
  transform: none;
  box-shadow: var(--shadow-pop);
}

/* The scrim only exists while the drawer is open, and always sits BELOW the drawer.
   (It used to be on screen permanently and, with the legacy z-index, above the menu: the options looked blurred and could not be clicked.) */
.admin-scrim {
  display: none;
}

.admin-sidebar.is-open ~ .admin-scrim,
.admin-sidebar.open ~ .admin-scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sheet) - 1);
  background: var(--scrim);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.admin-sidebar.open,
.admin-sidebar.is-open {
  z-index: var(--z-sheet);
}

.admin-brand {
  display: grid;
  gap: 2px;
  padding: 0 var(--space-2) var(--space-4);
}

.admin-brand small {
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.65rem;
}

.admin-group {
  display: grid;
  gap: 2px;
  margin-bottom: var(--space-4);
}

.admin-group h4 {
  margin: 0;
  padding: 0 var(--space-3) var(--space-1);
  color: var(--faint);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.admin-group a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 9px var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 600;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.admin-group a i {
  width: 20px;
  text-align: center;
}

.admin-group a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
}

.admin-group a[aria-current="page"] {
  background: rgba(67, 197, 232, 0.14);
  color: var(--ocean-300);
  box-shadow: inset 3px 0 0 var(--ocean-400);
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--topbar);
  padding: var(--safe-top) var(--space-4) 0;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.admin-topbar h1 {
  margin: 0;
  font-size: var(--text-lg);
}

.admin-search {
  position: relative;
  display: none;
  align-items: center;
}

.admin-search i {
  position: absolute;
  left: 12px;
  color: var(--faint);
  pointer-events: none;
}

.admin-search input {
  width: 240px;
  height: 38px;
  padding: 0 12px 0 36px;
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
}

.admin-search input:focus {
  border-color: var(--ocean-400);
  outline: none;
}

.admin-content {
  padding: var(--space-4) var(--space-4) calc(var(--space-7) + var(--safe-bottom));
  max-width: 1280px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.metric {
  display: block;
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.metric-link {
  transition: transform var(--base) var(--ease), border-color var(--base) var(--ease);
}

.metric-link:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 197, 232, 0.45);
  text-decoration: none;
}

.stat {
  display: grid;
  gap: 2px;
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--muted);
  font-size: var(--text-sm);
}

.evidence {
  padding: var(--space-3);
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 280px;
  overflow: auto;
}

/* ==== admin/admin-tables.css ==== */
/* Admin tables, filters and bulk rows. */
.table-wrap {
  margin-bottom: var(--space-4);
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: 11px var(--space-4);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th {
  position: sticky;
  top: 0;
  background: var(--elevated);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table tbody tr {
  transition: background var(--fast) var(--ease);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table td.cell-wrap {
  white-space: normal;
}

.table code {
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--inset);
}

.table .row {
  flex-wrap: nowrap;
}

.table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--ocean-400);
}

.list {
  display: grid;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-wrap + .pager,
.card + .pager {
  margin-top: var(--space-3);
}

/* ==== admin/admin-charts.css ==== */
/* Lightweight charts built from plain elements (no external chart library, so nothing is blocked by the CSP). */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  padding-top: var(--space-3);
}

.bar {
  flex: 1 1 0;
  min-width: 3px;
  height: 4%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(0deg, var(--ocean-600), var(--ocean-400));
  transition: height var(--slow) var(--ease-out), filter var(--fast) var(--ease);
}

.bar:hover {
  filter: brightness(1.25);
}

.bar-alt {
  background: linear-gradient(0deg, #1F7A66, var(--success));
}

/* ==== admin/admin-forms.css ==== */
/* Admin forms and decision panels. */
.admin-content .card.form-stack {
  max-width: 100%;
}

.admin-content .field label {
  color: var(--text);
}

.admin-content .grid-3 {
  align-items: end;
}

.admin-content .check-list {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.admin-content .config-grid .check {
  padding: var(--space-3);
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.admin-content .config-grid .check:hover {
  border-color: rgba(67, 197, 232, 0.4);
}

.admin-content details.filters {
  background: var(--card);
}

.card-inset p {
  margin-bottom: var(--space-1);
}

/* ==== pages/landing.css ==== */
/* Public landing page and marketing pages. */
.landing-hero {
  position: relative;
  padding: var(--space-7) 0 var(--space-6);
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 85% 0%, rgba(67, 197, 232, 0.2), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(41, 156, 193, 0.16), transparent 60%),
    var(--bg);
}

.landing-grid {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--ocean-300);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.landing-copy h1 {
  margin-bottom: var(--space-4);
  font-size: clamp(2.3rem, 8vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-lead {
  max-width: 540px;
  margin-bottom: var(--space-5);
  color: var(--muted);
  font-size: var(--text-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.landing-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: var(--text-sm);
}

.landing-ticks i {
  margin-right: 6px;
  color: var(--success);
}

.landing-art {
  display: grid;
  place-items: center;
}

.mock-phone {
  position: relative;
  display: grid;
  gap: var(--space-3);
  width: min(300px, 80vw);
  padding: var(--space-4) var(--space-3) calc(var(--space-6) + 10px);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 34px;
  box-shadow: var(--shadow-pop), 0 0 60px rgba(67, 197, 232, 0.18);
  transform: rotate(-3deg);
}

.mock-top,
.mock-post {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.mock-post > div {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
}

.mock-dot,
.mock-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-600), var(--ocean-400));
}

.mock-line {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--elevated-2);
}

.mock-top .mock-line {
  flex: 1 1 auto;
}

.mock-line.short {
  width: 55%;
}

.mock-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background:
    radial-gradient(60% 70% at 70% 30%, rgba(117, 217, 239, 0.7), transparent 60%),
    linear-gradient(160deg, var(--ocean-600), var(--ocean-800));
}

.mock-actions {
  display: flex;
  gap: var(--space-4);
  color: var(--muted);
}

.mock-nav {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 46px;
  border-radius: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--faint);
}

.mock-nav > i:first-child {
  color: var(--ocean-400);
}

.mock-plus {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ocean-500), var(--ocean-400));
  color: var(--on-accent);
}

.landing-section {
  padding: var(--space-7) 0;
}

.landing-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--border);
}

.landing-head {
  max-width: 620px;
  margin: 0 auto var(--space-6);
  text-align: center;
}

.landing-head h2 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.feature-tile {
  padding: var(--space-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--base) var(--ease), border-color var(--base) var(--ease);
}

.feature-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(67, 197, 232, 0.4);
}

.feature-tile h3 {
  margin-top: var(--space-3);
}

.feature-tile p {
  margin: 0;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(67, 197, 232, 0.12);
  color: var(--ocean-300);
  font-size: 1.2rem;
}

.landing-steps {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  counter-reset: lstep;
}

.landing-steps li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: var(--space-4) var(--space-4) var(--space-4) 64px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.landing-steps li::before {
  counter-increment: lstep;
  content: counter(lstep);
  position: absolute;
  left: var(--space-4);
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--on-accent);
  font-weight: 800;
  transform: translateY(-50%);
}

.faq {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.faq details {
  padding: var(--space-3) var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq details[open] summary {
  margin-bottom: var(--space-2);
  color: var(--ocean-300);
}

.faq p {
  margin: 0;
  color: var(--muted);
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: var(--space-5);
}

.prose p,
.prose li {
  color: var(--muted);
}

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

@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .landing-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .landing-hero {
    padding: 96px 0 var(--space-7);
  }
}

/* ==== pages/auth.css ==== */
/* Registration steps and password feedback (Ocean treatment of the existing flows). */
.stepper {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.stepper li {
  width: 34px;
  height: 4px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  color: transparent;
  font-size: 0;
}

.stepper li.done,
.stepper li.current {
  background: var(--ocean-400);
}

.stepper li.current {
  box-shadow: 0 0 0 3px rgba(67, 197, 232, 0.25);
}

.otp-resend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
}

.otp-resend-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font-weight: 700;
  cursor: pointer;
}

.otp-resend-btn[disabled] {
  color: var(--faint);
  cursor: not-allowed;
}

/* ==== pages/states.css ==== */
/* Cross-component states and accessibility modes. */
.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--elevated);
}

.share-box .copy-row {
  margin-top: var(--space-2);
}

.stat-text {
  color: var(--muted);
  font-size: var(--text-sm);
}

.story-upload,
.composer-link {
  display: block;
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(255, 255, 255, 0.28);
    --border-strong: rgba(255, 255, 255, 0.5);
    --text-secondary: #C6D3E0;
  }

  .btn-secondary,
  .input,
  .select,
  .textarea,
  .card,
  .post {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  .btn,
  .chip,
  .bn-tab,
  .act {
    border: 1px solid ButtonText;
  }

  .bn-tab[aria-current="page"],
  .tabs a[aria-current="page"] {
    outline: 2px solid Highlight;
  }

  .progress > span,
  .poll-bar {
    background: Highlight;
  }
}

/* ==== themes/dark.css ==== */
/* Ocean dark is the default: tokens.css already defines it. This file only tunes dark-specific details. */
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .post,
:root[data-theme="dark"] .widget {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%);
}

:root[data-theme="dark"] .bn-track {
  background: rgba(13, 27, 42, 0.92);
}

:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .sheet,
:root[data-theme="dark"] .menu-panel {
  background-image: linear-gradient(180deg, rgba(67, 197, 232, 0.04), transparent 30%);
}

:root[data-theme="dark"] .input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #0B1826 inset;
}

/* ==== themes/light.css ==== */
/* Light theme. Ocean identity stays: pale sea-glass surfaces, deep navy text, the same cyan accent. */
:root[data-theme="light"] {
  --bg: #EEF4FA;
  --bg-2: #FFFFFF;
  --card: #FFFFFF;
  --elevated: #E6EEF6;
  --elevated-2: #D9E5F1;
  --inset: #F3F7FB;
  --text-primary: #0D1B2A;
  --text-secondary: #4A5E72;
  --text-faint: #7A8DA0;
  --text: #0D1B2A;
  --muted: #4A5E72;
  --faint: #7A8DA0;
  --link: #15708F;
  --focus: #1A8AAE;
  --on-accent: #04202C;
  --border: rgba(13, 27, 42, 0.1);
  --border-strong: rgba(13, 27, 42, 0.2);
  --scrim: rgba(13, 27, 42, 0.42);
  --glass: rgba(255, 255, 255, 0.86);
  --glass-strong: rgba(255, 255, 255, 0.98);
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, 0.08), 0 2px 8px rgba(13, 27, 42, 0.05);
  --shadow: 0 10px 28px rgba(13, 27, 42, 0.14);
  --shadow-pop: 0 20px 48px rgba(13, 27, 42, 0.22), 0 0 0 1px rgba(13, 27, 42, 0.05);
  --glow: 0 8px 24px rgba(41, 156, 193, 0.2);
  --success: #138A66;
  --danger: #D13C4D;
  --warning: #B7791F;
  --pink: #1A8AAE;
  --pink-soft: #299CC1;
  --purple: #24617B;
  --violet: #299CC1;
  --gradient: linear-gradient(135deg, #299CC1 0%, #43C5E8 100%);
  --gradient-soft: linear-gradient(135deg, rgba(41, 156, 193, 0.14), rgba(67, 197, 232, 0.1));
  color-scheme: light;
}

:root[data-theme="light"] body {
  background: var(--bg);
}

:root[data-theme="light"] ::selection {
  background: rgba(41, 156, 193, 0.3);
}

:root[data-theme="light"] .btn-secondary {
  background: #FFFFFF;
}

:root[data-theme="light"] .btn-secondary:hover {
  background: var(--elevated);
}

:root[data-theme="light"] .btn-ghost:hover,
:root[data-theme="light"] .icon-btn:hover,
:root[data-theme="light"] .act:hover,
:root[data-theme="light"] .side-nav a:hover,
:root[data-theme="light"] .menu-panel a:hover,
:root[data-theme="light"] .menu-panel button:hover,
:root[data-theme="light"] .chat-item:hover,
:root[data-theme="light"] .notif-item:hover,
:root[data-theme="light"] .ticket-row:hover,
:root[data-theme="light"] .admin-group a:hover,
:root[data-theme="light"] .table tbody tr:hover {
  background: rgba(13, 27, 42, 0.05);
}

:root[data-theme="light"] .btn-danger {
  background: rgba(209, 60, 77, 0.1);
}

:root[data-theme="light"] .btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

:root[data-theme="light"] .chip.is-on,
:root[data-theme="light"] .chip[aria-pressed="true"] {
  background: rgba(41, 156, 193, 0.14);
  color: #15708F;
  border-color: #299CC1;
}

:root[data-theme="light"] .tabs a[aria-current="page"],
:root[data-theme="light"] .side-nav a[aria-current="page"],
:root[data-theme="light"] .admin-group a[aria-current="page"] {
  color: #15708F;
}

:root[data-theme="light"] .bn-track {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(13, 27, 42, 0.2);
}

:root[data-theme="light"] .bn-tab[aria-current="page"] {
  color: #1A8AAE;
}

:root[data-theme="light"] .bn-tab::before {
  background: #1A8AAE;
}

:root[data-theme="light"] .bn-create .bn-icon {
  box-shadow: 0 8px 22px rgba(41, 156, 193, 0.45), 0 0 0 5px var(--bg);
}

:root[data-theme="light"] .hashtag,
:root[data-theme="light"] .mention {
  color: #15708F;
}

:root[data-theme="light"] .msg-me .bubble {
  background: linear-gradient(135deg, #1A8AAE, #299CC1);
}

:root[data-theme="light"] .bubble-sender {
  color: #15708F;
}

:root[data-theme="light"] .chat-scroll {
  background:
    radial-gradient(80% 50% at 80% 0%, rgba(41, 156, 193, 0.1), transparent 60%),
    var(--bg);
}

:root[data-theme="light"] .rx {
  box-shadow: 0 0 0 2px var(--card);
}

:root[data-theme="light"] .wallet-hero {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(67, 197, 232, 0.3), transparent 60%),
    linear-gradient(135deg, #E3F1F8, #FFFFFF);
  border-color: rgba(41, 156, 193, 0.35);
}

:root[data-theme="light"] .wallet-stats div {
  background: rgba(255, 255, 255, 0.7);
}

:root[data-theme="light"] .cover-fallback {
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(67, 197, 232, 0.5), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(41, 156, 193, 0.4), transparent 60%),
    linear-gradient(135deg, #CFE6F3, #B7D8EA);
}

:root[data-theme="light"] .photo-tile,
:root[data-theme="light"] .post-photo,
:root[data-theme="light"] .post-media {
  background: #DCE7F1;
}

:root[data-theme="light"] .comments {
  background: rgba(13, 27, 42, 0.03);
}

:root[data-theme="light"] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  background-size: 240px 100%;
  background-repeat: no-repeat;
}

:root[data-theme="light"] .toast.error {
  color: #8E1F2C;
}

:root[data-theme="light"] .status {
  background: rgba(13, 27, 42, 0.08);
}

:root[data-theme="light"] .status-open,
:root[data-theme="light"] .status-pending,
:root[data-theme="light"] .status-under_review,
:root[data-theme="light"] .status-held,
:root[data-theme="light"] .status-high {
  background: rgba(183, 121, 31, 0.14);
}

:root[data-theme="light"] .input[type="datetime-local"],
:root[data-theme="light"] .input[type="date"] {
  color-scheme: light;
}

:root[data-theme="light"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234A5E72' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

:root[data-theme="light"] .bar {
  background: linear-gradient(0deg, #299CC1, #43C5E8);
}

:root[data-theme="light"] .story-viewer,
:root[data-theme="light"] .call-overlay {
  color: #fff;
}

/* ==== responsive/breakpoints.css ==== */
/* Mobile-first breakpoints: 480 (large phones), 720 (tablets), 1024 (laptops), 1280 (wide desktops). */
@media (min-width: 480px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

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

@media (min-width: 720px) {
  .shell-main {
    padding: var(--space-5) var(--space-5) calc(var(--bottombar) + var(--safe-bottom) + var(--space-6));
  }

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

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

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

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

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

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

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

  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cover {
    height: 210px;
  }

  .profile-bar {
    grid-template-columns: auto 1fr auto;
    align-items: end;
  }

  .profile-avatar {
    margin-top: -64px;
  }

  .wallet-hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .listing-view {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }

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

  .composer-backdrop {
    align-items: center;
    padding: var(--space-4);
  }

  .composer {
    border-radius: var(--radius-lg);
  }

  .notif-panel {
    left: auto;
    right: var(--space-4);
    bottom: auto;
    top: calc(var(--topbar) + var(--safe-top) + var(--space-2));
    width: 400px;
    max-height: 72dvh;
    border-bottom: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
  }

  .notif-panel-handle {
    display: none;
  }

  .admin-content {
    padding-inline: var(--space-5);
  }

  .admin-search {
    display: flex;
  }

  .msg {
    max-width: 72%;
  }
}

@media (min-width: 1024px) {
  .brand-short {
    display: none;
  }

  .topbar-search {
    display: flex;
    margin-left: var(--space-3);
  }

  .topbar .nav-actions .icon-btn[href="/search"] {
    display: none;
  }

  .shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    max-width: 1440px;
    margin-inline: auto;
  }

  .sidebar {
    position: sticky;
    top: calc(var(--topbar) + var(--safe-top));
    align-self: start;
    display: block;
    max-height: calc(100dvh - var(--topbar) - var(--safe-top));
    padding: var(--space-4) var(--space-3) var(--space-5);
    overflow-y: auto;
  }

  .shell-main {
    padding-bottom: var(--space-7);
  }

  .shell:has(.rail-right) {
    grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--rail);
  }

  .rail-right {
    position: sticky;
    top: calc(var(--topbar) + var(--safe-top));
    align-self: start;
    display: block;
    max-height: calc(100dvh - var(--topbar) - var(--safe-top));
    padding: var(--space-5) var(--space-4) var(--space-5) 0;
    overflow-y: auto;
  }

  /* Desktop navigation: the sidebar replaces the floating tab bar */
  .bottom-nav {
    display: none;
  }

  /* .toast-region placement for wide screens lives in components/toasts.css */

  .sticky-save {
    bottom: var(--space-4);
  }

  .chat-layout {
    grid-template-columns: var(--chat-list) minmax(0, 1fr);
    height: calc(100dvh - var(--topbar) - var(--safe-top));
  }

  .chat-layout.has-active .chat-list,
  .chat-layout:not(.has-active) .chat-empty {
    display: flex;
  }

  .chat-layout:not(.has-active) .chat-empty {
    display: grid;
  }

  .chat-back {
    display: none;
  }

  .sheet {
    bottom: var(--space-5);
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border-strong);
  }

  .admin-shell {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: auto;
    width: auto;
    height: 100dvh;
    transform: none;
  }

  .admin-scrim,
  .admin-menu-button {
    display: none !important;
  }

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

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

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

@media (min-width: 1280px) {
  :root {
    --sidebar: 268px;
    --rail: 360px;
  }

  .post-body {
    font-size: 1.1rem;
  }

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

@media (max-width: 1023px) {
  .desktop-only {
    display: none !important;
  }
}

@media (max-width: 719px) {
  .post-actions .act span {
    display: none;
  }

  .post-actions .act-react span {
    display: inline;
  }

  .people-strip {
    grid-auto-columns: 132px;
  }

  .profile-actions .btn {
    flex: 1 1 auto;
  }

  .tabs a {
    padding-inline: var(--space-3);
  }

  .modal {
    padding: var(--space-4);
  }

  .modal-actions .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 380px) {
  .bn-label {
    font-size: 0.6rem;
  }

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

  .wallet-main strong {
    font-size: 2rem;
  }
}

@media (hover: none) {
  .msg-tools {
    opacity: 1;
  }

  .photo-tools {
    opacity: 1;
  }

  .react-wrap:hover .react-picker {
    opacity: 0;
    visibility: hidden;
  }

  .react-wrap.is-open .react-picker {
    opacity: 1;
    visibility: visible;
  }
}

@media (orientation: landscape) and (max-height: 480px) {
  .bottom-nav {
    padding-bottom: var(--safe-bottom);
  }

  .bn-track {
    height: 52px;
  }

  .bn-create .bn-icon {
    margin-top: -12px;
    width: 44px;
    height: 44px;
  }

  .bn-label {
    display: none;
  }
}

@media print {
  .site-header,
  .sidebar,
  .bottom-nav,
  .toast-region,
  .composer-backdrop,
  .rail-right {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

