/* ==========================================================================
   Buxino — design system
   Mode terang (default) & mode gelap, layout terinspirasi Instagram.
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #fafafa;
  --bg-2: #f5f5f5;
  --panel: #ffffff;
  --panel-2: #f7f7f8;
  --panel-3: #efeff1;

  --line: #dbdbdb;
  --line-strong: #c4c4c4;

  --text: #0f1419;
  --muted: #536471;
  --faint: #8b98a5;

  --brand: #0095f6;
  --brand-strong: #0077cc;
  --brand-soft: rgba(0, 149, 246, 0.1);
  --pink: #ed4956;
  --green: #1a9c62;
  --amber: #c2410c;
  --danger: #ed4956;
  --link: #0077cc;

  --icon: #262626;
  --card: #ffffff;
  --hover: rgba(15, 20, 25, 0.05);
  --active: rgba(15, 20, 25, 0.09);
  --chip: #efefef;
  --media-bg: #f0f0f0;
  --scrim: rgba(0, 0, 0, 0.72);
  --nav-bg: rgba(255, 255, 255, 0.94);
  --avatar-ring: #ffffff;
  --skeleton: linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%);
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.06);
  --shadow: 0 18px 48px rgba(15, 20, 25, 0.14);
  --ring: 0 0 0 3px rgba(0, 149, 246, 0.28);
}

html[data-theme='dark'] {
  color-scheme: dark;

  --bg: #000000;
  --bg-2: #0a0a0a;
  --panel: #121212;
  --panel-2: #1c1c1c;
  --panel-3: #262626;

  --line: #262626;
  --line-strong: #363636;

  --text: #f5f5f5;
  --muted: #a8a8a8;
  --faint: #7f7f7f;

  --brand: #0095f6;
  --brand-strong: #4cb5f9;
  --brand-soft: rgba(0, 149, 246, 0.12);
  --pink: #ff3040;
  --green: #3fc67f;
  --amber: #f59e0b;
  --danger: #ff5c5c;
  --link: #4cb5f9;

  --icon: #f5f5f5;
  --card: #121212;
  --hover: rgba(255, 255, 255, 0.06);
  --active: rgba(255, 255, 255, 0.1);
  --chip: #262626;
  --media-bg: #050505;
  --scrim: rgba(0, 0, 0, 0.82);
  --nav-bg: rgba(0, 0, 0, 0.92);
  --avatar-ring: #000000;
  --skeleton: linear-gradient(90deg, #1a1a1a 25%, #242424 37%, #1a1a1a 63%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(0, 149, 246, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

button {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

input,
textarea,
select {
  font: inherit;
  color: var(--text);
}

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

::selection {
  background: rgba(0, 149, 246, 0.22);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.ico {
  width: 22px;
  height: 22px;
  flex: none;
  display: block;
}

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

.small {
  font-size: 12.5px;
}

.center {
  text-align: center;
}

.pad {
  padding: 18px;
}

.pad-sm {
  padding: 10px 4px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.noscript {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

/* -------------------------------------------------------------------- logo */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 55%, #6228d7 100%);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(238, 42, 123, 0.28);
}

.logo-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.92;
}

.logo-word {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1;
}

.logo-lg .logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 26px;
}

.logo-lg .logo-word {
  font-size: 32px;
}

/* ----------------------------------------------------------------- avatars */

.avatar {
  --size: 38px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  font-weight: 700;
  font-size: calc(var(--size) * 0.36);
  color: hsl(var(--av-h, 220deg) 42% 30%);
  background: linear-gradient(
    140deg,
    hsl(var(--av-h, 220deg) 78% 90%),
    hsl(var(--av-h, 220deg) 62% 78%)
  );
  box-shadow: inset 0 0 0 1px rgba(15, 20, 25, 0.06);
}

html[data-theme='dark'] .avatar {
  color: hsl(var(--av-h, 220deg) 40% 22%);
}

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

.avatar-xs { --size: 28px; }
.avatar-sm { --size: 34px; }
.avatar-md { --size: 42px; }
.avatar-lg { --size: 64px; }
.avatar-xl { --size: 92px; }

.avatar-link {
  display: inline-flex;
  border-radius: 50%;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.btn .ico {
  width: 18px;
  height: 18px;
}

.btn:hover {
  filter: brightness(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  filter: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--brand-strong);
  filter: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--hover);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-small {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn-block {
  width: 100%;
  height: 44px;
  border-radius: 11px;
  font-size: 14px;
}

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

.btn-follow {
  height: 32px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 12.5px;
}

.btn-follow:hover {
  background: var(--hover);
}

.btn-follow.is-following {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--icon);
  cursor: pointer;
  flex: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--hover);
}

.icon-btn.ghost {
  background: transparent;
}

.icon-btn.xs {
  width: 26px;
  height: 26px;
}

.icon-btn.xs .ico {
  width: 15px;
  height: 15px;
}

.icon-btn.accent {
  color: var(--brand);
}

.tone-danger {
  color: var(--danger);
}

/* ------------------------------------------------------------------ inputs */

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

.field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

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

.field input:focus,
.field textarea:focus {
  border-color: var(--line-strong);
  background: var(--panel);
}

.form-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(237, 73, 86, 0.09);
  border: 1px solid rgba(237, 73, 86, 0.24);
  color: var(--danger);
  font-size: 12.5px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

/* --------------------------------------------------------------- boot/fatal */

.boot,
.fatal {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg);
  text-align: center;
}

.boot p {
  color: var(--muted);
  font-size: 12.5px;
}

.boot-bar {
  width: 170px;
  height: 3px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.boot-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f9ce34, #ee2a7b, #6228d7);
  animation: bootbar 1.2s ease-in-out infinite;
}

.fatal .empty-ico {
  width: 64px;
  height: 64px;
}

.fatal h1 {
  font-size: 22px;
  font-weight: 800;
}

.fatal p {
  color: var(--muted);
  font-size: 13.5px;
}

/* -------------------------------------------------------------------- auth */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  min-height: 100dvh;
  background: var(--bg);
}

.auth-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at 86% 84%, rgba(98, 40, 215, 0.55), transparent 55%),
    linear-gradient(150deg, #f7c948 0%, #ef5468 46%, #9b3bd4 100%);
  color: #fff;
}

.auth-hero::after {
  content: '';
  position: absolute;
  inset: auto -60px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
}

.brand-static {
  display: inline-flex;
  margin-bottom: 26px;
}

.brand-static .logo-word {
  color: #fff;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.hero-pill .ico {
  width: 15px;
  height: 15px;
}

.auth-hero h1 {
  margin-top: 20px;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: #fff;
}

.grad-text {
  color: #ffe9a3;
}

.hero-sub {
  margin-top: 18px;
  max-width: 430px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.6;
}

.hero-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.point-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  flex: none;
}

.point-ico .ico {
  width: 19px;
  height: 19px;
}

.hero-points b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}

.hero-points small {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.hero-preview {
  position: relative;
  height: 120px;
  margin-top: 30px;
}

.mini-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #fff;
  color: #0f1419;
  box-shadow: 0 18px 40px rgba(30, 10, 50, 0.25);
  font-size: 11.5px;
}

.mini-card b {
  display: block;
  font-size: 12px;
}

.mini-card span {
  color: #667085;
  font-size: 10.5px;
}

.mini-card p {
  margin-top: 3px;
  font-size: 11.5px;
  color: #0f1419;
}

.mini-a {
  left: 0;
  top: 0;
  width: 250px;
  transform: rotate(-2deg);
}

.mini-b {
  right: 4px;
  top: 52px;
  width: 210px;
  transform: rotate(2.5deg);
}

.mini-av {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(140deg, hsl(var(--av-h) 78% 90%), hsl(var(--av-h) 62% 78%));
  color: hsl(var(--av-h) 42% 30%);
  font-weight: 800;
  font-size: 11px;
}

.mini-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: #ed4956;
  font-weight: 700;
}

.mini-like .ico {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px 28px;
}

.auth-card {
  width: min(404px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 32px 26px;
  box-shadow: var(--shadow-sm);
}

.auth-head h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 20px;
  padding: 4px;
  border-radius: 12px;
  background: var(--panel-3);
}

.auth-tab {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

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

.auth-form .btn {
  margin-top: 4px;
}

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

.auth-note .ico {
  width: 13px;
  height: 13px;
}

.auth-browse {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: none;
  color: var(--link);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.auth-browse:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------- shell */

.mobile-top {
  display: none;
}

.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 640px) 300px;
  justify-content: center;
  gap: 24px;
  max-width: 1230px;
  margin: 0 auto;
  padding: 0 20px 64px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 26px 12px 18px;
}

.sidebar .brand {
  margin: 2px 10px 26px;
}

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

.nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 46px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.nav a:hover {
  background: var(--hover);
}

.nav a.active {
  font-weight: 700;
}

.nav a.active .nav-ico .ico {
  stroke-width: 2.2;
}

.nav-ico {
  display: inline-flex;
}

.nav-ico .ico {
  width: 24px;
  height: 24px;
  color: var(--icon);
}

.badge {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: auto;
  border-radius: 99px;
  background: var(--pink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}

.side-me {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: auto;
  padding: 8px;
  border-radius: 12px;
}

.side-me:hover {
  background: var(--hover);
}

.side-me-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 2px;
  border-radius: 10px;
}

.side-me-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.side-me-info b {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-me-info small {
  color: var(--muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  padding: 24px 0 20px;
  animation: fadeUp 0.3s ease both;
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 0;
}

.rail-card {
  padding: 16px;
}

.rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.rail-head .ico {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.rail-head h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

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

.rail-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rail-user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.rail-user-info b {
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-user-info small {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--link);
  font-size: 12.5px;
  font-weight: 600;
}

.rail-link:hover {
  text-decoration: underline;
}

.rail-appdl {
  border: 0;
  color: #fff;
  background:
    radial-gradient(120% 120% at 100% -20%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(150deg, #0095f6 0%, #0077cc 50%, #004d73 100%);
  box-shadow: 0 14px 32px rgba(0, 77, 115, 0.22);
}

.rail-appdl-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.rail-appdl-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 25, 40, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.rail-appdl-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rail-appdl-copy b {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.rail-appdl-copy small {
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
}

.rail-appdl-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  color: #0a2434;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 25, 40, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rail-appdl-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 25, 40, 0.3);
}

.rail-appdl-cta:active {
  transform: none;
}

.rail-appdl-cta svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.chips span {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--chip);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.mobile-nav {
  display: none;
}

/* -------------------------------------------------------------- guest shell */

.guest-shell {
  max-width: 1010px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.guest-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 2px;
  margin-bottom: 8px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.guest-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.guest-layout {
  display: grid;
  grid-template-columns: minmax(0, 620px) 300px;
  justify-content: center;
  gap: 30px;
  align-items: start;
}

.guest-layout .main {
  max-width: 620px;
  width: 100%;
}

.guest-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.guest-cta b {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.guest-cta span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ----------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.topbar h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.topbar-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 99px;
  background: rgba(26, 156, 98, 0.12);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700;
  flex: none;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.page-head h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-head p {
  color: var(--muted);
  font-size: 12.5px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 4px 10px;
}

.section-head h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-loading {
  display: grid;
  place-items: center;
  padding: 80px 0;
}

/* -------------------------------------------------------------- segmented */

.segmented {
  display: flex;
  gap: 4px;
  margin: 6px 0 16px;
  border-bottom: 1px solid var(--line);
}

.seg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.seg .ico {
  width: 17px;
  height: 17px;
}

.seg:hover {
  color: var(--text);
}

.seg.active {
  color: var(--text);
  border-color: var(--text);
  font-weight: 700;
}

/* --------------------------------------------------------------- composer */

.composer {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

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

.composer textarea {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  outline: none;
  max-height: 220px;
}

.composer-preview {
  position: relative;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--media-bg);
  border: 1px solid var(--line);
}

.composer-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.preview-x {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--scrim);
  color: #fff;
}

.preview-x:hover {
  background: rgba(0, 0, 0, 0.85);
}

.composer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.attach-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.attach-btn .ico {
  width: 20px;
  height: 20px;
}

.char-count {
  margin-left: auto;
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------- feed */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feed-sentinel {
  height: 1px;
}

.feed-foot {
  padding: 20px 0 8px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

.foot-loading,
.foot-done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.new-posts {
  position: sticky;
  top: 10px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 auto 14px;
  padding: 9px 16px;
  border: 0;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.new-posts .ico {
  width: 15px;
  height: 15px;
}

/* -------------------------------------------------------------------- post */

.post {
  overflow: hidden;
  border-radius: 14px;
  animation: fadeUp 0.25s ease both;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
}

.post-who {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.post-name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-name:hover {
  text-decoration: underline;
}

.post-sub {
  color: var(--muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--media-bg);
  cursor: zoom-in;
}

.post-media img {
  display: block;
  width: 100%;
  max-height: min(74vh, 680px);
  object-fit: cover;
}

.post-info {
  padding: 8px 14px 12px;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 -6px 2px;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.action:hover {
  background: var(--hover);
}

.action .ico {
  width: 23px;
  height: 23px;
}

.action .count {
  min-width: 10px;
  font-variant-numeric: tabular-nums;
}

.action.liked {
  color: var(--pink);
}

.action.active {
  background: var(--hover);
}

.action.liked .ico {
  fill: currentColor;
  stroke: currentColor;
}

.action.pop .ico {
  animation: pop 0.32s ease;
}

.post-body {
  margin-top: 2px;
  font-size: 13.8px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.post-body .post-caption-name {
  font-weight: 700;
  margin-right: 5px;
}

.post-body .post-caption-name:hover {
  text-decoration: underline;
}

.post-time {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.post-body .hashtag,
.post-body .mention,
.comment-body .hashtag,
.comment-body .mention {
  color: var(--link);
  font-weight: 600;
}

.post-body .hashtag:hover,
.post-body .mention:hover,
.comment-body .hashtag:hover,
.comment-body .mention:hover {
  text-decoration: underline;
}

.post.removing {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.single-post .post {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- comments */

.comments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.comments-empty {
  color: var(--faint);
  font-size: 12.5px;
  padding: 6px 0;
}

.comments-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  padding: 8px 0;
}

.comment {
  display: flex;
  gap: 9px;
  padding: 5px 0;
}

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

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-name {
  font-size: 12.5px;
  font-weight: 700;
}

.comment-name:hover {
  text-decoration: underline;
}

.comment-time {
  color: var(--faint);
  font-size: 10.5px;
}

.comment-head .icon-btn {
  margin-left: auto;
}

.comment-body {
  margin-top: 1px;
  font-size: 13.2px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.comment-form {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.comment-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 13.2px;
  outline: none;
}

.comment-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

/* ----------------------------------------------------------------- profile */

.profile {
  padding: 0;
  margin-bottom: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
}

.profile-cover {
  height: 96px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(130% 170% at 12% -20%, rgba(0, 149, 246, 0.3), transparent 58%),
    radial-gradient(120% 160% at 88% -30%, rgba(237, 73, 86, 0.22), transparent 56%),
    linear-gradient(135deg, var(--panel-2), var(--panel-3));
}

html[data-theme='dark'] .profile-cover {
  background:
    radial-gradient(130% 170% at 12% -20%, rgba(0, 149, 246, 0.24), transparent 58%),
    radial-gradient(120% 160% at 88% -30%, rgba(237, 73, 86, 0.18), transparent 56%),
    linear-gradient(135deg, #101010, #1a1a1a);
}

.profile-cover.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}

.profile-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 0 24px 22px;
}

.profile-avatar-col {
  display: flex;
  margin-top: -48px;
}

.profile-ring {
  display: inline-flex;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #f9ce34, #ee2a7b, #6228d7, #0ea5e9, #f9ce34);
  box-shadow: 0 0 0 4px var(--panel);
}

.profile-ring .avatar {
  border: 2px solid var(--panel);
}

.profile-meta {
  min-width: 0;
  padding-top: 14px;
}

.profile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-id {
  min-width: 0;
}

.profile-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.profile-handle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pstat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
}

.pstat b {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

button.pstat {
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button.pstat:hover {
  background: var(--panel-3);
  border-color: var(--line-strong);
  color: var(--text);
}

.profile-bio {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.joined {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 11.5px;
}

.joined .ico {
  width: 13px;
  height: 13px;
}

.profile-tabs {
  position: sticky;
  top: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 0 4px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.ptab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 12px 14px 13px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ptab.active {
  color: var(--text);
  border-color: var(--text);
}

.ptab .ico {
  width: 16px;
  height: 16px;
}

.ptab-count {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.profile-more {
  display: flex;
  justify-content: center;
  padding: 14px 0 4px;
}

/* ----------------------------------------------------------- notifications */

.notif-list {
  overflow: hidden;
}

.notif-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.15s ease;
}

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

.notif-row:hover {
  background: var(--hover);
}

.notif-row.unread {
  background: var(--brand-soft);
}

.notif-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: none;
}

.notif-ico .ico {
  width: 18px;
  height: 18px;
}

.tone-pink {
  background: rgba(237, 73, 86, 0.12);
  color: #d92639;
}

.tone-cyan {
  background: rgba(0, 149, 246, 0.12);
  color: #0077cc;
}

.tone-green {
  background: rgba(26, 156, 98, 0.13);
  color: #14804f;
}

.tone-violet {
  background: rgba(98, 40, 215, 0.12);
  color: #6d3bd1;
}

html[data-theme='dark'] .tone-pink { color: #ff7d88; }
html[data-theme='dark'] .tone-cyan { color: #6cc4fa; }
html[data-theme='dark'] .tone-green { color: #57d59a; }
html[data-theme='dark'] .tone-violet { color: #a98af8; }

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

.notif-text {
  font-size: 13.2px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notif-text b {
  font-weight: 700;
}

.notif-time {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
}

.notif-thumb {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

/* ------------------------------------------------------------------ search */

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 15px;
  margin-bottom: 16px;
  color: var(--muted);
}

.search-box .ico {
  width: 18px;
  height: 18px;
  flex: none;
}

.search-box input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  outline: none;
}

.user-list {
  overflow: hidden;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

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

.user-row-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.user-row-name {
  font-size: 13.5px;
  font-weight: 700;
}

.user-row-name:hover {
  text-decoration: underline;
}

.user-row-handle {
  color: var(--muted);
  font-size: 12px;
}

.user-row-bio {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.user-row-meta {
  margin-top: 2px;
  color: var(--faint);
  font-size: 11.5px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 99px;
  background: var(--chip);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.tag-chip:hover {
  background: var(--active);
}

.tag-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-direction: column;
}

.tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.tag-row:last-of-type {
  border-bottom: 0;
}

.tag-name {
  font-size: 13px;
  font-weight: 700;
}

.tag-name:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------------- chat */

.chat-layout {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  height: calc(100dvh - 150px);
  min-height: 480px;
  overflow: hidden;
  border-radius: 16px;
}

.chat-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
}

.chat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--muted);
}

.chat-search .ico {
  width: 16px;
  height: 16px;
}

.chat-search input {
  flex: 1;
  min-width: 0;
  padding: 3px 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  outline: none;
}

.chat-results {
  max-height: 240px;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
}

.chat-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
}

.chat-result:hover {
  background: var(--hover);
}

.chat-result-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-result-main b {
  font-size: 12.5px;
  font-weight: 700;
}

.chat-result-main small {
  color: var(--muted);
  font-size: 11.5px;
}

.conv-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.conv {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
}

.conv:hover {
  background: var(--hover);
}

.conv.active {
  background: var(--panel-3);
}

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

.conv-top,
.conv-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conv-name {
  font-size: 13.2px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-time {
  color: var(--faint);
  font-size: 10.5px;
  flex: none;
}

.conv-preview {
  color: var(--muted);
  font-size: 12.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-unread {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  flex: none;
}

.conv-unread.hidden {
  display: none;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.chat-placeholder .ico {
  width: 46px;
  height: 46px;
  color: var(--faint);
  margin-bottom: 4px;
}

.chat-placeholder h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.chat-placeholder p {
  font-size: 12.5px;
  max-width: 240px;
}

.thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.thread-who {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.thread-who b {
  display: block;
  font-size: 13.2px;
  font-weight: 700;
}

.thread-who small {
  color: var(--muted);
  font-size: 11px;
}

.thread-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  flex: none;
}

.back-chat {
  display: none;
}

.thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
}

.thread-empty {
  margin: auto;
  color: var(--faint);
  font-size: 12.5px;
  text-align: center;
}

.load-older {
  align-self: center;
  margin-bottom: 4px;
}

.msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 78%;
}

.msg-me {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-peer {
  align-self: flex-start;
}

.bubble {
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.msg-me .bubble {
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.msg-peer .bubble {
  background: var(--panel-3);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.msg time {
  padding: 0 4px;
  color: var(--faint);
  font-size: 9.5px;
}

.typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 18px 0;
  color: var(--muted);
  font-size: 11px;
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
}

.typing-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite;
}

.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

.dm-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.dm-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--panel-2);
  font-size: 13.5px;
  outline: none;
}

.dm-form input:focus {
  border-color: var(--line-strong);
  background: var(--panel);
}

.dm-form .btn-icon {
  border-radius: 50%;
  height: 40px;
  width: 40px;
  padding: 0;
}

/* ------------------------------------------------------------------- modal */

#modal-root {
  display: none;
}

#modal-root.open {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.modal {
  position: relative;
  width: min(440px, 100%);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: popIn 0.18s ease;
}

.modal-wide {
  width: min(900px, 100%);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.modal-wide .modal-x {
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}

.modal-wide .modal-x:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

.modal-title {
  padding-right: 30px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-text {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.modal-list {
  margin-top: 12px;
  max-height: 55vh;
  overflow-y: auto;
}

.lightbox {
  display: grid;
  place-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
  object-fit: contain;
}

.edit-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.edit-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.edit-header-preview {
  flex: 1;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(130% 170% at 12% -20%, rgba(0, 149, 246, 0.3), transparent 58%),
    linear-gradient(135deg, var(--panel-2), var(--panel-3));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.turnstile-slot {
  min-height: 66px;
  display: flex;
  justify-content: center;
}

.auth-closed {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--danger);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------------ toasts */

.toasts {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-ico {
  display: inline-flex;
  flex: none;
}

.toast-ico .ico {
  width: 17px;
  height: 17px;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

.toast-success {
  background: var(--green);
  color: #fff;
}

html[data-theme='dark'] .toast-success {
  color: #06231a;
}

.toast-notif {
  background: var(--brand);
  color: #fff;
}

/* ------------------------------------------------------- empty & skeletons */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 46px 20px;
  text-align: center;
}

.empty-ico {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--muted);
}

.empty-ico .ico {
  width: 26px;
  height: 26px;
}

.empty-state h3 {
  font-size: 15.5px;
  font-weight: 700;
}

.empty-state p {
  max-width: 300px;
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.55;
}

.sk {
  display: block;
  border-radius: 8px;
  background: var(--skeleton);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sk-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
}

.sk-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sk-line {
  height: 9px;
  border-radius: 99px;
}

.sk-line.w25 { width: 25%; }
.sk-line.w30 { width: 30%; }
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w80 { width: 80%; }
.sk-line.w100 { width: 100%; }

.sk-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.sk-pill {
  width: 52px;
  height: 22px;
  border-radius: 99px;
}

.skeleton-post {
  padding: 16px;
  border-radius: 14px;
}

.sk-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  margin-bottom: 18px;
}

.sk-avatar-lg {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  flex: none;
}

.sk-profile-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.sk-banner {
  display: none;
}

/* ----------------------------------------------------------------- spinner */

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
}

.spinner.sm {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1160px) {
  .shell {
    grid-template-columns: 236px minmax(0, 640px);
  }

  .rail {
    display: none;
  }

  .guest-layout {
    grid-template-columns: minmax(0, 640px);
  }

  .guest-layout .rail {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 14px;
  }

  .mobile-top {
    position: sticky;
    top: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 16px;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }

  .mobile-top .logo-word {
    font-size: 21px;
  }

  .mobile-top .logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 17px;
  }

  .mobile-top-actions {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .shell {
    display: block;
    max-width: 700px;
    padding: 0 0 88px;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 14px 0;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .topbar-sub {
    font-size: 12px;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }

  .mobile-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 0;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 500;
  }

  .mobile-nav a.active {
    color: var(--text);
    font-weight: 700;
  }

  .mobile-nav .ico {
    width: 24px;
    height: 24px;
  }

  .mobile-nav .badge {
    position: absolute;
    top: 0;
    right: calc(50% - 18px);
    margin: 0;
    min-width: 15px;
    height: 15px;
    font-size: 9px;
  }

  .post {
    border-radius: 14px;
  }

  .feed-list {
    gap: 12px;
  }

  .post-media img {
    max-height: 68vh;
  }

  .profile {
    border-radius: 14px;
  }

  .profile-inner {
    gap: 16px;
    padding: 0 18px 18px;
  }

  .profile-tabs {
    position: static;
  }

  .avatar-xl {
    --size: 76px;
  }

  .profile-name {
    font-size: 19px;
  }

  .profile-title-row {
    align-items: flex-start;
  }

  .profile-actions {
    width: 100%;
  }

  .chat-layout {
    grid-template-columns: 1fr;
    height: calc(100dvh - 215px);
    min-height: 380px;
  }

  .chat-layout.has-thread .chat-side {
    display: none;
  }

  .chat-layout:not(.has-thread) .chat-panel {
    display: none;
  }

  .back-chat {
    display: inline-grid;
  }

  body.in-thread .mobile-top,
  body.in-thread .mobile-nav,
  body.in-thread .topbar {
    display: none;
  }

  body.in-thread .main {
    padding: 0;
  }

  body.in-thread .chat-layout {
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .toasts {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

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

  .auth-hero {
    display: none;
  }

  .auth-panel {
    min-height: 100dvh;
    padding: 28px 18px;
  }

  .auth-card {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 10px 6px;
  }

  .guest-shell {
    padding: 0 14px 60px;
  }

  .guest-top {
    padding: 10px 0;
  }

  .guest-cta {
    padding: 14px;
  }

  .guest-cta .btn {
    flex: none;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 14px 12px 0;
  }

  .post-head {
    padding: 11px 12px 9px;
  }

  .post-info {
    padding: 7px 12px 11px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .topbar-sub {
    max-width: 70%;
  }

  .profile-cover {
    height: 78px;
  }

  .profile-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding: 0 16px 18px;
    text-align: center;
  }

  .profile-avatar-col {
    margin-top: -54px;
  }

  .profile-meta {
    width: 100%;
    padding-top: 10px;
  }

  .profile-title-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .profile-actions {
    width: auto;
    justify-content: center;
  }

  .profile-stats {
    justify-content: center;
    gap: 8px;
  }

  .joined {
    justify-content: center;
    display: flex;
  }

  .composer {
    padding: 12px;
  }

  .composer .avatar-md {
    --size: 36px;
  }

  .attach-btn span {
    display: none;
  }

  .guest-top .logo-word {
    font-size: 20px;
  }

  .guest-actions .btn {
    height: 34px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .notif-thumb {
    display: none;
  }

  .modal {
    padding: 20px;
    border-radius: 16px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 90vh;
    border-radius: 18px 18px 0 0;
  }

  .modal-wide {
    border-radius: 0;
    max-height: 100vh;
  }
}

@media (max-width: 380px) {
  .guest-actions .btn-ghost {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------- keyframes */

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

@keyframes bootbar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}

/* ----------------------------------------------------------------- admin */

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.role-pill .ico {
  width: 15px;
  height: 15px;
}

.role-pill.role-admin {
  color: var(--link);
  border-color: color-mix(in srgb, var(--link) 45%, var(--line));
}

.role-pill.role-super_admin {
  color: #b7791f;
  border-color: color-mix(in srgb, #b7791f 45%, var(--line));
}

html[data-theme='dark'] .role-pill.role-super_admin {
  color: #f6c453;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.chip-danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  border-radius: 50%;
  background: #0095f6;
  color: #fff;
  vertical-align: -2px;
  flex: none;
}

.verified-badge .ico {
  width: 10px;
  height: 10px;
  stroke-width: 3.2;
}

.admin-body {
  min-width: 0;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  background: transparent;
  border: 0;
}

.admin-menu[hidden] {
  display: none;
}

.admin-menu-title {
  margin: 0 12px 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.admin-tab .ico {
  width: 17px;
  height: 17px;
}

.admin-tab:hover {
  background: var(--hover);
  color: var(--text);
}

.admin-tab.active {
  background: var(--accent-soft, var(--panel-3));
  border-color: color-mix(in srgb, var(--link) 40%, var(--line));
  color: var(--link);
  font-weight: 700;
}

.admin-page .admin-menu .admin-tab {
  width: 100%;
  min-height: 44px;
}

.admin-page .admin-menu .admin-tab .ico {
  width: 20px;
  height: 20px;
}

.verify-action.on {
  color: var(--link);
  border-color: color-mix(in srgb, var(--link) 45%, var(--line));
}

@media (max-width: 900px) {
  .admin-tab {
    padding: 8px 12px;
  }
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
}

.admin-stat span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-stat b {
  font-size: 1.7rem;
  line-height: 1.1;
}

.admin-stat small {
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.admin-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.promo-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.promo-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-stat b {
  font-size: 1.5rem;
}

.promo-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.promo-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.promo-product-row:last-of-type {
  border-bottom: 0;
}

.promo-product-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.promo-product-info small {
  color: var(--muted);
  font-size: 0.78rem;
}

.promo-row .admin-row-meta {
  flex-wrap: wrap;
}

.promo-audit-row {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.promo-audit-row p {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .promo-product-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .promo-product-info {
    grid-column: 1 / -1;
  }
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.admin-list {
  display: flex;
  flex-direction: column;
}

.admin-list > .empty-state {
  padding: 26px 18px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

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

.admin-row.is-disabled {
  opacity: 0.62;
}

.admin-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-row-main b {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-main small,
.admin-row-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-row-meta small {
  font-size: 0.76rem;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.select-mini {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.8rem;
  max-width: 130px;
}

.select-mini:disabled {
  opacity: 0.5;
}

.admin-user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.admin-user-mini:last-child {
  border-bottom: 0;
}

.admin-user-mini > span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-user-mini b {
  font-size: 0.9rem;
}

.admin-user-mini small,
.admin-user-mini time {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-user-mini:hover {
  background: var(--panel-2);
}

.admin-thumb {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

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

.admin-thumb.empty .ico {
  width: 20px;
  height: 20px;
}

.admin-conv-pair {
  display: inline-flex;
  flex: none;
}

.admin-conv-pair .avatar + .avatar {
  margin-left: -12px;
  box-shadow: 0 0 0 2px var(--panel);
}

.admin-post > .icon-btn {
  flex: none;
}

.admin-settings-read {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 14px;
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.admin-settings-read dt {
  color: var(--muted);
  font-weight: 600;
}

.admin-settings-read dd {
  margin: 0;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--link);
}

@media (max-width: 720px) {
  .admin-row {
    flex-wrap: wrap;
  }

  .admin-row-meta {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .admin-row-actions {
    order: 4;
    width: 100%;
    justify-content: flex-start;
  }

  .admin-post .admin-row-main {
    flex-basis: calc(100% - 64px);
  }
}

/* ------------------------------------------------------- admin page layout */

.admin-page .shell {
  grid-template-columns: 236px minmax(0, 1fr);
  max-width: 1180px;
}

.admin-page .rail {
  display: none;
}

.admin-page .sidebar .nav {
  display: none;
}

.admin-page .sidebar {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-page .sidebar .admin-menu {
  margin-top: -4px;
  margin-bottom: 18px;
}

@media (max-width: 900px) {
  .admin-page .shell {
    display: block;
    max-width: 700px;
    padding: 10px 12px 88px;
  }

  .admin-page .sidebar {
    display: flex;
    position: static;
    height: auto;
    padding: 0 0 12px;
  }

  .admin-page .main {
    padding: 0;
  }

  .admin-page .sidebar .brand,
  .admin-page .sidebar .side-me {
    display: none;
  }

  .admin-page .admin-menu {
    width: 100%;
    padding: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .admin-page .admin-menu .admin-tab {
    min-height: 40px;
  }
}

/* ------------------------------------------------------------ media carousel */

.post-media.carousel {
  position: relative;
  overflow: hidden;
  cursor: default;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: var(--media-bg);
}

.carousel-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.carousel-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s ease;
  cursor: pointer;
  z-index: 2;
}

.carousel-arrow .ico {
  width: 18px;
  height: 18px;
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

.carousel:hover .carousel-arrow,
.carousel-arrow:focus-visible {
  opacity: 1;
}

.carousel-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  z-index: 2;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 900px) {
  .carousel-arrow {
    display: none;
  }
}

/* -------------------------------------------------------- composer previews */

.composer-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 4px;
}

.composer-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--media-bg);
  aspect-ratio: 1 / 1;
}

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

.composer-thumb .preview-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.composer-thumb .preview-x .ico {
  width: 12px;
  height: 12px;
}

.composer-thumb-cover {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

/* ------------------------------------------------------------ google login */

.auth-google {
  display: grid;
  gap: 14px;
  margin-bottom: 4px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

.btn-google:hover {
  background: var(--panel-2);
}

.google-g {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 12px;
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* -------------------------------------------------------- admin settings */

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

.settings-sub {
  margin-top: 8px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

/* --------------------------------------------------- icon / storage / logs */

.icon-setting {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2, var(--hover));
}

.icon-setting-preview {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
  background: var(--panel);
}

.icon-setting-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.icon-setting-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.icon-setting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chip-ok {
  color: #1a7f37;
  border-color: color-mix(in srgb, #1a7f37 45%, var(--line));
}

html[data-theme='dark'] .chip-ok {
  color: #4ade80;
}

.storage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.storage-head h2 {
  margin: 0;
}

.storage-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.storage-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.storage-stats span {
  color: var(--muted);
  font-size: 0.76rem;
}

.storage-stats b {
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.storage-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-panel-note {
  margin: 10px 18px 0;
  font-size: 0.82rem;
}

.log-row {
  align-items: flex-start;
}

.log-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--hover);
  color: var(--muted);
  flex: none;
}

.log-avatar .ico {
  width: 17px;
  height: 17px;
}

.log-row .log-detail {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.45;
}

.log-row .icon-btn {
  flex: none;
}

/* --------------------------------------------------------------- lightbox */

.modal-backdrop.lightbox-backdrop {
  place-items: center;
  align-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: min(82vh, calc(100dvh - 128px));
  border-radius: 10px;
  object-fit: contain;
  background: #000;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-backdrop .modal-x {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lightbox-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-arrow .ico {
  width: 20px;
  height: 20px;
}

.lightbox-arrow.prev {
  left: 8px;
}

.lightbox-arrow.next {
  right: 8px;
}

.lightbox-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.lightbox-backdrop .modal {
  width: min(900px, 100%);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 560px) {
  .modal-backdrop.lightbox-backdrop {
    align-items: center;
    padding: 12px;
  }

  .lightbox img {
    max-height: calc(100dvh - 132px);
  }

  .lightbox-arrow {
    width: 36px;
    height: 36px;
  }

  .lightbox-arrow.prev {
    left: 4px;
  }

  .lightbox-arrow.next {
    right: 4px;
  }
}

/* ------------------------------------------------------------ nearby/page */

.nearby-intro p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.nearby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nearby-actions .ico {
  width: 17px;
  height: 17px;
}

.nearby-status {
  margin: 10px 0 0;
  font-size: 12px;
}

.nearby-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 2px 8px;
}

.nearby-head h2 {
  font-size: 15px;
  font-weight: 700;
}

.nearby-head .muted {
  font-size: 12px;
}

.nearby-list {
  overflow: hidden;
}

.nearby-row .distance-pill {
  margin-left: auto;
}

.distance-pill {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.page-content {
  line-height: 1.7;
}

.page-content-title {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-content p {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.page-content p:last-child {
  margin-bottom: 0;
}

.page-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
}

.page-link {
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-link:hover {
  background: var(--hover);
}

/* ------------------------------------------------------- notif/dm actions */

.notif-request {
  align-items: flex-start;
}

.notif-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
  margin-left: auto;
}

.notif-actions .btn {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msg-del {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--faint);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.msg-del .ico {
  width: 12px;
  height: 12px;
}

.msg-me:hover .msg-del,
.msg-del:focus-visible {
  opacity: 1;
}

.msg-del:hover {
  color: var(--danger);
  background: var(--hover);
}

@media (hover: none) {
  .msg-del {
    opacity: 0.55;
  }
}

.btn-follow.is-pending {
  color: var(--muted);
  border-style: dashed;
  background: transparent;
}

@media (max-width: 900px) {
  .mobile-nav {
    grid-template-columns: repeat(5, 1fr);
  }

  .mobile-nav a {
    font-size: 9px;
  }

  .mobile-nav .ico {
    width: 22px;
    height: 22px;
  }
}

/* --------------------------------------------------- mobile top & drawer */

.mobile-top-left {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.mobile-bell {
  position: relative;
}

.mobile-bell .badge {
  position: absolute;
  top: -1px;
  right: -1px;
  margin: 0;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  font-size: 9px;
}

.drawer-backdrop,
.mobile-drawer {
  display: none;
}

.thread-del {
  flex: none;
}

@media (max-width: 900px) {
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 64;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 65;
    width: min(84vw, 320px);
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
    background: var(--panel);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 0.24s ease, visibility 0.24s;
  }

  .mobile-drawer.open {
    transform: none;
    visibility: visible;
  }

  body.drawer-open {
    overflow: hidden;
  }

  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 4px 10px;
    border-bottom: 1px solid var(--line);
  }

  .drawer-head .brand {
    margin: 0;
  }

  .drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
  }

  .drawer-link,
  .drawer-group > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }

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

  .drawer-link:hover,
  .drawer-group > summary:hover {
    background: var(--hover);
  }

  .drawer-link.active,
  .drawer-link.is-sub.active {
    background: var(--hover);
    color: var(--text);
  }

  .drawer-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .drawer-chev {
    display: inline-flex;
    color: var(--faint);
    transition: transform 0.2s ease;
  }

  .drawer-group[open] .drawer-chev {
    transform: rotate(90deg);
  }

  .drawer-sub {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 2px 0 6px 22px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
  }

  .drawer-link.is-sub {
    min-height: 38px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
  }

  .drawer-link .badge {
    margin-left: auto;
  }

  .drawer-empty {
    padding: 12px;
    color: var(--muted);
    font-size: 13px;
  }

  .drawer-foot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .drawer-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    min-width: 0;
  }

  .drawer-user:hover {
    background: var(--hover);
  }

  .drawer-user span {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .drawer-user b {
    font-size: 13.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .drawer-user small {
    color: var(--muted);
    font-size: 11.5px;
  }

  .drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
  }
}

/* ------------------------------------------------------- admin menu editor */

.menu-panel {
  overflow: visible;
}

.menu-save-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.menu-add-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.menu-add-bar .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu-add-bar .ico {
  width: 15px;
  height: 15px;
}

.menu-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px;
}

.menu-editor-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  overflow: hidden;
}

.menu-editor-row.is-hidden,
.menu-editor-child.is-hidden {
  opacity: 0.55;
}

.menu-editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.menu-grip {
  display: inline-flex;
  color: var(--faint);
  cursor: grab;
  flex: none;
}

.menu-grip .ico {
  width: 18px;
  height: 18px;
}

.menu-editor-ico {
  display: inline-flex;
  color: var(--text);
  flex: none;
}

.menu-editor-ico .ico {
  width: 20px;
  height: 20px;
}

.menu-editor-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.menu-editor-main b {
  font-size: 13.5px;
}

.menu-editor-main small {
  color: var(--muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-editor-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: wrap;
  flex: none;
}

.menu-visible {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}

.menu-down .ico {
  transform: rotate(180deg);
}

.menu-editor-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px 10px 42px;
}

.menu-editor-child {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--panel);
}

.menu-editor-child .menu-editor-main b {
  font-size: 12.5px;
}

.menu-empty {
  margin: 2px 0 2px 8px;
  color: var(--faint);
  font-size: 12px;
}

.menu-help {
  margin: 0;
  padding: 0 18px 16px;
}

.menu-editor-row.dragging,
.menu-editor-child.dragging {
  opacity: 0.4;
}

.menu-editor-row.drop-before {
  box-shadow: inset 0 3px 0 var(--brand);
}

.menu-editor-row.drop-after {
  box-shadow: inset 0 -3px 0 var(--brand);
}

.menu-editor-row.drop-into {
  outline: 2px dashed var(--brand);
  outline-offset: -2px;
}

.menu-editor-child.drop-before {
  box-shadow: inset 0 2px 0 var(--brand);
}

.menu-editor-child.drop-after {
  box-shadow: inset 0 -2px 0 var(--brand);
}

@media (max-width: 560px) {
  .menu-editor-head {
    flex-wrap: wrap;
  }

  .menu-editor-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .menu-editor-child {
    flex-wrap: wrap;
  }

  .menu-editor-child .menu-editor-tools {
    width: 100%;
    justify-content: flex-start;
    padding-left: 26px;
  }

  .menu-editor-main b,
  .menu-editor-main small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu-editor-children {
    padding-left: 24px;
  }

  .menu-visible span {
    display: none;
  }
}

/* --------------------------------------------------------------------
   Iklan geo (promosi postingan bertarget wilayah)
   -------------------------------------------------------------------- */

.post-owner-actions { display: flex; align-items: center; gap: 2px; }

.sponsored { position: relative; }
.sponsored-label {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px 6px; color: var(--faint);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
}
.sponsored-label .ico { width: 14px; height: 14px; color: var(--brand); }
.sponsored .post { border-color: var(--line-strong); }

.promo-topbar { display: flex; align-items: center; gap: 12px; }
.promo-topbar .grow { flex: 1; min-width: 0; }
.promo-topbar h1 { font-size: 20px; }
.promo-topbar small { display: block; }

.promo-hero {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; margin-bottom: 16px; overflow: hidden;
  background: linear-gradient(135deg, rgba(0,149,246,0.12), rgba(0,149,246,0.02) 55%, transparent);
  border: 1px solid var(--line);
}
.promo-hero-main { display: flex; flex-direction: column; gap: 2px; }
.promo-hero-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.promo-hero-balance { font-size: 30px; line-height: 1.1; }
.promo-hero-balance small { font-size: 14px; font-weight: 600; color: var(--muted); }
.promo-hero-sub { font-size: 13px; color: var(--muted); }
.promo-hero-ico { color: var(--brand); opacity: 0.5; }
.promo-hero-ico .ico { width: 54px; height: 54px; }
.promo-notice { margin-bottom: 16px; color: var(--muted); }

.promo-section { margin-bottom: 20px; }
.promo-section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.promo-section-head h2 { font-size: 16px; }
.promo-section-head span { font-size: 12px; }

.promo-campaign-list { display: flex; flex-direction: column; gap: 10px; }
.promo-campaign { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.promo-campaign-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.promo-campaign-head b { display: block; font-size: 15px; }
.promo-campaign-head small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.promo-metrics { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.promo-metrics b { color: var(--text); }
.promo-campaign .btn { align-self: flex-start; }

.promo-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--chip); color: var(--muted); white-space: nowrap; }
.promo-pill-active { background: rgba(26,156,98,0.14); color: var(--green); }
.promo-pill-scheduled { background: var(--brand-soft); color: var(--brand-strong); }
.promo-pill-canceled, .promo-pill-expired { background: rgba(237,73,86,0.12); color: var(--danger); }

.promo-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.promo-post-pick { display: flex; flex-direction: column; gap: 6px; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .18s ease, border-color .18s ease; }
.promo-post-pick:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.promo-post-thumb { aspect-ratio: 1; background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.promo-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.promo-post-text { padding: 10px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.promo-post-pick > span { padding: 0 10px 10px; font-size: 12px; font-weight: 700; color: var(--brand-strong); }

.promo-preview { display: flex; gap: 14px; padding: 14px; margin-bottom: 14px; align-items: center; }
.promo-preview-media { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; }
.promo-preview-body { min-width: 0; }
.promo-preview-body p { margin: 4px 0 0; font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.promo-card { padding: 18px; margin-bottom: 14px; }
.promo-step-title { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 14px; }
.promo-step-title span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; }

.promo-kind-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.promo-kind {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .16s ease;
}
.promo-kind .ico { width: 20px; height: 20px; }
.promo-kind:hover { border-color: var(--line-strong); color: var(--text); }
.promo-kind.active { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); box-shadow: var(--shadow-sm); }

.promo-fields { display: flex; flex-direction: column; gap: 10px; }
.promo-picker-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.promo-picker { min-height: 42px; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 14px; }
.promo-picker select { border: 0; background: transparent; width: 100%; padding: 4px 0; font-size: 14px; color: var(--text); }
.promo-picker select:focus { outline: none; }
.field-label { font-size: 12px; font-weight: 700; color: var(--muted); }

.promo-city-results { display: flex; flex-direction: column; gap: 6px; }
.promo-city-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; text-align: left; font-size: 14px; }
.promo-city-item .ico { width: 16px; height: 16px; color: var(--brand); }
.promo-city-item span { display: flex; flex-direction: column; }
.promo-city-item small { color: var(--muted); font-size: 11px; }
.promo-city-item:hover, .promo-city-item.active { border-color: var(--brand); background: var(--brand-soft); }

.promo-radius-row { display: flex; align-items: center; gap: 14px; }
.promo-radius-row input[type='range'] { flex: 1; accent-color: var(--brand); }
.promo-radius-value { font-weight: 700; min-width: 64px; text-align: right; }
.promo-radius-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.promo-radius-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.promo-map { height: 260px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.promo-map .leaflet-container { font: inherit; background: var(--panel-2); }

.promo-days { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.promo-days b { font-size: 20px; min-width: 74px; text-align: center; }
.promo-days .icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; font-size: 18px; line-height: 1; }
.promo-days .icon-btn:disabled { opacity: 0.4; }

.promo-quote { display: flex; flex-direction: column; gap: 14px; }
.promo-quote-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.promo-quote-main > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.promo-quote-main small { color: var(--muted); font-size: 12px; }
.promo-quote-price { text-align: right; }
.promo-quote-price b { font-size: 26px; }
.promo-quote-price span { font-size: 13px; color: var(--muted); margin-left: 2px; }
.promo-quote-price small { display: block; }
.promo-quote-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.promo-quote-foot .btn { min-width: 190px; }

@media (max-width: 640px) {
  .promo-kind-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-picker-row { grid-template-columns: 1fr; }
  .promo-hero { padding: 18px; }
  .promo-hero-balance { font-size: 26px; }
  .promo-quote-foot .btn { width: 100%; }
  .promo-map { height: 220px; }
}

/* -------------------------------------------------- app download announcement */

.appdl {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.appdl.show {
  opacity: 1;
}

.appdl-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 20, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.appdl-card {
  position: relative;
  width: min(400px, 100%);
  padding: 32px 26px 22px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(120% 90% at 88% -12%, rgba(255, 255, 255, 0.24), transparent 56%),
    radial-gradient(96% 84% at -4% 112%, rgba(0, 42, 66, 0.6), transparent 62%),
    linear-gradient(155deg, #0095f6 0%, #0077cc 46%, #004d73 100%);
  box-shadow: 0 30px 80px rgba(0, 42, 66, 0.45);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.appdl.show .appdl-card {
  transform: none;
}

.appdl-card:focus {
  outline: none;
}

.appdl-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  pointer-events: none;
}

.appdl-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(6, 30, 46, 0.32);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}

.appdl-x:hover {
  background: rgba(6, 30, 46, 0.5);
}

.appdl-x .ico {
  width: 16px;
  height: 16px;
}

.appdl-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin: 2px auto 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 25, 40, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.appdl-eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.appdl-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.appdl-text {
  max-width: 302px;
  margin: 8px auto 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.appdl-cta {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 8px 22px 8px 16px;
  border-radius: 14px;
  background: #fff;
  color: #0a2434;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 25, 40, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.appdl-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 25, 40, 0.34);
}

.appdl-cta:active {
  transform: none;
}

.appdl-cta svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.appdl-cta span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}

.appdl-cta small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #436078;
}

.appdl-cta b {
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.appdl-later {
  display: block;
  margin: 12px auto 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.appdl-later:hover {
  color: #fff;
}

@media (max-width: 520px) {
  .appdl {
    place-items: end center;
    padding: 0;
  }

  .appdl-card {
    width: 100%;
    padding: 30px 22px calc(16px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
    transform: translateY(30px);
  }

  .appdl.show .appdl-card {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .appdl,
  .appdl-card {
    transition: none;
  }
}
