:root {
  --bg: #e7f3ff;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --bg-soft: #f4f9ff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-secondary: #94a3b8;
  --text-tertiary: #cbd5e1;
  --line: rgba(51, 144, 236, 0.12);

  --accent: #3390ec;
  --accent-light: rgba(51, 144, 236, 0.1);
  --accent-hover: #2980d4;
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --success-bg: rgba(236, 253, 245, 0.85);
  --success-line: #6ee7b7;

  --gold: #f59e0b;
  --gold-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);

  /* Pro identity. Taken from .home-pro-banner so the subscription page,
     the home widget and every Pro badge share one palette. */
  --pro: #4f46e5;
  --pro-light: rgba(79, 70, 229, 0.1);
  --pro-deep: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --pro-glow: rgba(99, 102, 241, 0.22);

  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 4px 12px rgba(51, 144, 236, 0.06);
  --shadow-md: 0 8px 28px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 44px rgba(51, 144, 236, 0.1);
  --shadow-xl: 0 24px 56px rgba(15, 23, 42, 0.12);

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --max-width: 480px;
  --header-height: 64px;
  --accent-rgb: 51, 144, 236;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}


* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse at 10% -10%, rgba(79, 172, 254, 0.18), transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(0, 242, 254, 0.08), transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(51, 144, 236, 0.06), transparent 50%);
  pointer-events: none;
}

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

/* ═══════════════ Layout Container ═══════════════ */

#main-container {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  padding: 12px 16px 120px;
  /* Increased to 120px to ensure the last card's menu is accessible */
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#results-container {
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  will-change: opacity, transform;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ═══════════════ Skeleton Loaders ═══════════════ */

.skeleton {
  background: var(--bg-soft) !important;
  background-image: linear-gradient(90deg,
      var(--bg-soft) 0%,
      var(--line) 50%,
      var(--bg-soft) 100%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s infinite linear !important;
  border-radius: 8px;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}

.skeleton * {
  visibility: hidden;
}

.skeleton--text {
  height: 1em;
  margin-bottom: 0.5em;
  width: 100%;
}

.skeleton--circle {
  border-radius: 50%;
}

@keyframes pulse {

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

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

/* ═══════════════ Top Bar ═══════════════ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.03);
}

.topbar__inner {
  width: min(var(--max-width), 100%);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 64px;
  /* Strong protection for side buttons */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  /* Important for flex-shrink to work */
}

.brand>div {
  min-width: 0;
  flex-shrink: 1;
}

.brand__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 0;
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.16);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

img.brand__icon {
  padding: 2px;
}

svg.brand__icon {
  box-shadow: none;
}

.back-btn {
  position: absolute;
  left: 2px;
  top: 0;
  bottom: 0;
  width: 56px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 4px;
  background: none;
  color: var(--text);
  border: 0;
  box-shadow: none;
  text-decoration: none;
  z-index: 2;
  cursor: pointer;
  transition: color 0.2s ease;
}

/* No chrome at rest - the header itself is the surface.
   Press and focus show a round halo, never a rectangle. */
.back-btn::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s ease;
}

.back-btn:active {
  color: var(--accent);
}

.back-btn:active::before {
  background: var(--accent-light);
}

.back-btn:active svg {
  transform: scale(0.88);
}

.back-btn:focus-visible {
  outline: none;
}

.back-btn:focus-visible::before {
  box-shadow: 0 0 0 2px var(--accent);
}

.back-btn svg {
  position: relative;
  width: 26px;
  height: 26px;
  stroke-width: 3;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Keep the header title above the back bar. */
.topbar__inner .brand {
  position: relative;
  z-index: 2;
}

.brand:hover .brand__icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__sub.is-typing {
  color: var(--accent) !important;
  font-weight: 700;
  animation: pulse 1.5s infinite ease-in-out;
}

.topbar__action,
#chat-actions {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s ease;
  padding: 6px 12px;
  border-radius: 10px;
  position: absolute;
  right: 12px;
  z-index: 2;
}

.dots-btn-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar__action:hover {
  background: var(--accent-light);
}

.topbar__action:active {
  opacity: 0.6;
  transform: scale(0.96);
}

/* ═══════════════ Hero Section ═══════════════ */

.hero {
  padding: 16px 4px 12px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.12), rgba(0, 242, 254, 0.08));
  color: var(--accent);
  border: 1px solid rgba(51, 144, 236, 0.15);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero h1,
h1 {
  margin: 14px 0 0;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #0f172a;
}

@media (max-width: 480px) {

  .hero h1,
  h1 {
    font-size: 28px;
    letter-spacing: -0.025em;
  }
}

.hero__text,
.subtitle {
  margin: 12px auto 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

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

/* ═══════════════ Section Titles ═══════════════ */

.section__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 24px 0 16px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 16px;
  min-width: 0;
}

.section-title-row .section__title {
  margin: 0;
  min-width: 0;
}

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

.section-toolbar .section-title-row {
  margin: 0;
}

.section-help-btn {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(51, 144, 236, 0.18);
  background: rgba(51, 144, 236, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, background 0.18s ease;
}

.section-help-btn::after {
  content: '';
  position: absolute;
  top: -11px;
  bottom: -11px;
  left: -11px;
  right: -11px;
}

.section-help-btn:active {
  transform: scale(0.92);
  background: rgba(51, 144, 236, 0.16);
}


/* ═══════════════ Grid ═══════════════ */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

/* ═══════════════ Cards ═══════════════ */

.card,
.menu-card,
.form-shell,
.info-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.card:hover,
.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.menu-card {
  min-height: 150px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.menu-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.06), rgba(0, 242, 254, 0.04));
  pointer-events: none;
}

.menu-card__emoji {
  margin-bottom: 12px;
  background: var(--accent-light);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(51, 144, 236, 0.08);
  /* Replaced with current variable */
  border: 1px solid rgba(51, 144, 236, 0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--accent);
}

.menu-card__svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2.25px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-card--compact:nth-child(2n) .menu-card__emoji {
  background: rgba(0, 242, 254, 0.08);
  color: #0088cc;
}

.menu-card#menu-pro .menu-card__emoji {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.menu-card__title {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

.menu-card__text {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.card,
.info-card {
  padding: 20px;
}

.card+.card,
.info-card+.info-card {
  margin-top: 14px;
}

.card h3,
.info-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.card p,
.info-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.card p strong {
  color: var(--text);
  font-weight: 600;
}

/* ═══════════════ Note / Alert ═══════════════ */

.note {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  color: #065f46;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

/* ═══════════════ KPI Row ═══════════════ */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.kpi {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.kpi__value {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent);
}

.kpi__label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-header {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 32px;
  margin-bottom: 12px;
}

.stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  /* Increased gap */
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: calc(100% - 20px);
  /* Expanded width */
  max-width: var(--max-width);
  margin: 0 auto;
}

.stats-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.stats-item__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  /* Reduced gap */
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-height: 24px;
}

/* Create a ghost element on the right to balance the icon's width */
.stats-item__row::after {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.stats-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  stroke-width: 2.5;
  fill: none;
  flex-shrink: 0;
}

.stats-item__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: lowercase;
  white-space: nowrap;
  opacity: 0.8;
}

/* ═══════════════ Buttons ═══════════════ */

.tg-button,
button.tg-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 0 20px;
  background: linear-gradient(135deg, #4facfe 0%, var(--accent) 100%);
  color: #fff;
  font-size: 15px;
  font-family: var(--font-family);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(51, 144, 236, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tg-button::before,
button.tg-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 60%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tg-button:hover::before,
button.tg-button:hover::before {
  opacity: 1;
}

.tg-button:hover,
button.tg-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(51, 144, 236, 0.35);
}

.tg-button:active,
button.tg-button:active {
  transform: scale(0.97) translateY(0);
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.18);
}

/* Danger button */
.tg-button.danger,
button.tg-button.danger {
  background: linear-gradient(135deg, #f87171, var(--danger));
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}

.tg-button.danger:hover,
button.tg-button.danger:hover {
  background: linear-gradient(135deg, #f87171, var(--danger-hover));
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
}

.tg-button.danger:active,
button.tg-button.danger:active {
  background: #dc2626;
  transform: translateY(0) scale(0.97);
}

/* Success/Green button */
.tg-button.success,
button.tg-button.success {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
}

.tg-button.success:hover,
button.tg-button.success:hover {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.35);
}

.tg-button.success:active,
button.tg-button.success:active {
  background: #16a34a;
  transform: translateY(0) scale(0.97);
}

/* Outline button */
.tg-button.outline,
button.tg-button.outline {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent);
  border: 1.5px solid rgba(51, 144, 236, 0.22);
  box-shadow: 0 2px 8px rgba(51, 144, 236, 0.06);
}

.tg-button.outline::before,
button.tg-button.outline::before {
  display: none;
}

.tg-button.outline:hover,
button.tg-button.outline:hover {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(51, 144, 236, 0.12);
}

.tg-button.outline:active,
button.tg-button.outline:active {
  background: #f0f7ff;
  transform: scale(0.97);
}

.tg-button.stars:hover {
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.4);
}

.old-price {
  font-size: 0.82em;
  opacity: 0.75;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  margin-left: 5px;
  font-weight: 400;
  display: inline-block;
  vertical-align: baseline;
}

.tg-button:not(.outline) .old-price {
  color: rgba(255, 255, 255, 0.75);
  text-decoration-color: rgba(255, 255, 255, 0.9);
}

.tg-button.outline .old-price {
  color: var(--text-muted, #94a3b8);
  text-decoration-color: var(--text-muted, #94a3b8);
}

/* Limited/Inactive button */
.tg-button.limited {
  background: #cbd5e1 !important;
  background-image: none !important;
  color: #64748b !important;
  box-shadow: none !important;
  opacity: 0.7;
  cursor: pointer;
}

.tg-button.limited:hover {
  transform: none;
  opacity: 0.8;
}

/* ═══════════════ Form Styles ═══════════════ */

.role-segmented-control {
  display: flex;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(51, 144, 236, 0.04), 0 2px 10px rgba(51, 144, 236, 0.06);
  box-sizing: border-box;
  width: 100%;
}

.role-segment-btn {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 6px;
  min-height: 52px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: var(--text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.role-segment-btn .role-segment-text,
.role-segment-btn span {
  display: block;
  white-space: normal;
  line-height: 1.22;
}

.role-segment-btn:active {
  transform: scale(0.98);
}

.role-segment-btn.active {
  background: #ffffff;
  color: var(--text, #0f172a);
  box-shadow:
    0 4px 14px rgba(51, 144, 236, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Results page: the segment control is page-level navigation, not a primary choice. */
.role-segmented-control--slim {
  border-radius: 12px;
  padding: 3px;
  margin: 8px 16px 10px;
  /* the base class sets width:100%, which would add the side margins on top of it */
  width: auto;
}

.role-segmented-control--slim .role-segment-btn {
  min-height: 38px;
  border-radius: 9px;
  gap: 6px;
  font-size: 12.5px;
}

.role-segmented-control--slim .role-segment-icon {
  width: 16px;
  height: 16px;
}

.role-segment-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  transition: transform 0.25s ease, stroke 0.25s ease;
}

.role-segment-btn.active .role-segment-icon {
  stroke: var(--accent, #3390ec);
  transform: scale(1.06);
}

/* Inactive role buttons in search form with subtle brand colors */
#btn-role-deliver,
.role-segment-btn--deliver,
#btn-role-search,
.role-segment-btn--search {
  color: #0284c7;
}
#btn-role-deliver .role-segment-icon,
#btn-role-deliver .role-segment-icon *,
.role-segment-btn--deliver .role-segment-icon,
.role-segment-btn--deliver .role-segment-icon *,
#btn-role-search .role-segment-icon,
#btn-role-search .role-segment-icon *,
.role-segment-btn--search .role-segment-icon,
.role-segment-btn--search .role-segment-icon * {
  stroke: #0284c7 !important;
}

/* Active role buttons in search form: Blue gradient */
#btn-role-deliver.active,
.role-segment-btn--deliver.active,
#btn-role-search.active,
.role-segment-btn--search.active {
  background: linear-gradient(135deg, #4facfe 0%, #3390ec 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(51, 144, 236, 0.35) !important;
}
#btn-role-deliver.active .role-segment-icon,
#btn-role-deliver.active .role-segment-icon *,
.role-segment-btn--deliver.active .role-segment-icon,
.role-segment-btn--deliver.active .role-segment-icon *,
#btn-role-search.active .role-segment-icon,
#btn-role-search.active .role-segment-icon *,
.role-segment-btn--search.active .role-segment-icon,
.role-segment-btn--search.active .role-segment-icon * {
  stroke: #ffffff !important;
}
#btn-role-deliver.active .role-segment-icon,
.role-segment-btn--deliver.active .role-segment-icon,
#btn-role-search.active .role-segment-icon,
.role-segment-btn--search.active .role-segment-icon {
  transform: scale(1.08);
}
#btn-role-deliver.active .role-segment-text,
.role-segment-btn--deliver.active .role-segment-text,
#btn-role-search.active .role-segment-text,
.role-segment-btn--search.active .role-segment-text {
  color: #ffffff !important;
}

.topbar__inner--has-back {
  justify-content: flex-start;
  padding-left: 64px;
  padding-right: 16px;
}

@media (max-width: 380px) {
  .topbar__inner--has-back {
    padding-left: 60px;
    padding-right: 12px;
  }
  .brand__title {
    font-size: 15px;
  }
  .role-segment-btn {
    font-size: 11.5px;
    padding: 7px 4px;
    gap: 6px;
    min-height: 48px;
  }
  .role-segment-icon {
    width: 17px;
    height: 17px;
  }
}

.form-shell {
  padding: 0 0 12px;
}

.form-section-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 14px;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.section-badge {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(51, 144, 236, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.form-section-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-divider {
  height: 1px;
  background: rgba(51, 144, 236, 0.12);
  margin: 2px 0;
}

.transfer-toggle-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 2px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.transfer-toggle-btn:hover {
  opacity: 0.8;
}

.item-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.item-chip {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.item-chip:hover {
  border-color: rgba(51, 144, 236, 0.3);
}

.item-chip.active {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.16), rgba(51, 144, 236, 0.14));
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(51, 144, 236, 0.14);
}

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

form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding-left: 2px;
  letter-spacing: -0.01em;
}

input[type="text"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 16px;
  /* Set to 16px to prevent iOS auto-zoom on focus */
  font-weight: 500;
  outline: none;
  appearance: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

input:focus,
select:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(51, 144, 236, 0.08), inset 0 0 0 transparent;
}

select {
  background-color: var(--bg-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 40px;
}

small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  padding-left: 2px;
}

.form-actions {
  margin-top: 12px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ═══════════════ Reward Picker ═══════════════ */
.reward-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reward-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reward-chip {
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reward-chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(51, 144, 236, 0.1);
}

.reward-chip:active {
  transform: scale(0.95);
}

.reward-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.reward-input-group input {
  padding-left: 38px !important;
}

.reward-input-group::before {
  content: '€';
  position: absolute;
  left: 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  pointer-events: none;
  transition: color 0.25s ease;
}

.reward-input-group:focus-within::before {
  color: var(--accent);
}

/* ═══════════════ Subscription Components ═══════════════ */

.sub-card {
  background: var(--bg-elevated);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  margin-bottom: 20px;
}

.sub-card--pro {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
  color: white;
  border: none;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.sub-card--pro .sub-card__title,
.sub-card--pro .sub-card__desc,
.sub-card--pro .sub-card__price,
.sub-card--pro .sub-card__features li {
  color: white;
}

.sub-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
}

.sub-card__title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.sub-card__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.9;
}

.sub-card__price {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.sub-card__price span {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.7;
}

.sub-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.sub-card__features li {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.sub-card__features li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Plan Switcher / Buttons */
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 480px) {
  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Modals Restructured for Mobile Keyboard Compatibility */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


.modal-content {
  background: white;
  width: min(92%, 400px);
  padding: 24px;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transform: translateY(24px) scale(0.96);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 24px;
  margin-bottom: 24px;
  /* No max-height or internal overflow-y here */
}

.modal-overlay.is-active .modal-content {
  transform: translateY(0) scale(1);
}

@keyframes modalSlide {
  to {
    transform: translateY(0);
  }
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.modal-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-content--compact {
  text-align: center;
}

.modal-content--compact .modal-title {
  margin: 0 0 10px;
}

.modal-content--compact .modal-text {
  margin: 0 0 22px;
}

.section-info-modal__icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: rgba(51, 144, 236, 0.1);
  color: var(--accent);
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button {
  flex: 1;
}

/* Contact Exchange & Warning Modals (kto_letit_contacts design) */
.sheet {
  position: relative;
  max-width: 360px;
  width: 100%;
  margin: auto;
  z-index: 3;
  background: #fff;
  border-radius: 26px;
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
}

[data-theme="dark"] .sheet,
body.dark-theme .sheet {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.gif {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.sheet h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  color: #0f172a;
}

[data-theme="dark"] .sheet h3,
body.dark-theme .sheet h3 {
  color: #f8fafc;
}

.sheet .lead {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: #475569;
  text-wrap: balance;
}

[data-theme="dark"] .sheet .lead,
body.dark-theme .sheet .lead {
  color: #94a3b8;
}

.btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  box-sizing: border-box;
  padding: 0 16px;
  border-radius: 16px;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-blue {
  background: linear-gradient(135deg, #4facfe, #3390ec);
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.25);
  color: #fff !important;
}

.btn-pro {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
  color: #fff !important;
}

.btn-pro .glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 60%);
  pointer-events: none;
}

.btn-pro .lbl {
  position: relative;
  z-index: 1;
}

.how {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.how:hover {
  color: #3390ec;
}

[data-theme="dark"] .how,
body.dark-theme .how {
  color: #94a3b8;
}

.later {
  display: block;
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #3390ec;
  text-decoration: none;
  cursor: pointer;
}

.later:hover {
  text-decoration: underline;
}

.foot {
  margin: 16px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #64748b;
  text-wrap: balance;
}

.foot a {
  color: #3390ec;
  font-weight: 600;
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

[data-theme="dark"] .foot,
body.dark-theme .foot {
  color: #94a3b8;
}

/* Package Modal (.sheet.pack) */
.sheet.pack {
  padding-top: 20px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  float: left;
  font-size: 15px;
  font-weight: 700;
  color: #3390ec;
  text-decoration: none;
  margin: 0 0 8px -4px;
  cursor: pointer;
}

.sheet.pack h3 {
  clear: both;
}

.pkgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.pkg {
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px;
  text-align: left;
}

.pkg b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pkg-r {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.price {
  position: relative;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.disc {
  font-size: 12px;
  font-weight: 800;
  color: #3390ec;
  background: #fff;
  padding: 4px 8px;
  border-radius: 9px;
}

.pkg.btn-pro {
  min-height: 58px;
}

.pro-l {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.pro-l b {
  font-size: 15px;
  font-weight: 700;
}

.pro-l span {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

/* Explanation Bottom Sheet (.bsheet) */
.bsheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 12px 20px 24px;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.18);
  max-width: 480px;
  margin: 0 auto;
  box-sizing: border-box;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

[data-theme="dark"] .bsheet,
body.dark-theme .bsheet {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.grab {
  display: block;
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #cbd5e1;
  margin: 0 auto 16px;
}

[data-theme="dark"] .grab,
body.dark-theme .grab {
  background: #475569;
}

.bsheet h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  color: #0f172a;
}

[data-theme="dark"] .bsheet h3,
body.dark-theme .bsheet h3 {
  color: #f8fafc;
}

.bs-lead {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #475569;
  text-align: center;
  text-wrap: balance;
}

[data-theme="dark"] .bs-lead,
body.dark-theme .bs-lead {
  color: #94a3b8;
}

.opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 18px;
  background: #f4f9ff;
  border: 1px solid rgba(51, 144, 236, 0.12);
  margin-bottom: 8px;
  text-align: left;
}

[data-theme="dark"] .opt,
body.dark-theme .opt {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.08);
}

.opt-ic {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.opt-ic.blue,
.opt-ic.blue2 {
  background: linear-gradient(135deg, #4facfe, #3390ec);
  box-shadow: 0 3px 12px rgba(51, 144, 236, 0.25);
}

.opt-ic.dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.opt-txt {
  min-width: 0;
  flex: 1;
}

.opt-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.opt-h b {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
}

[data-theme="dark"] .opt-h b,
body.dark-theme .opt-h b {
  color: #f8fafc;
}

.tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  background: #e7f3ff;
  color: #1d6fc4;
}

.tag.free {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.tag.pro {
  background: #1e1b4b;
  color: #fff;
}

.opt p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #475569;
}

[data-theme="dark"] .opt p,
body.dark-theme .opt p {
  color: #94a3b8;
}

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(29, 111, 196, 0.07);
  border: 1px solid rgba(29, 111, 196, 0.16);
  text-align: left;
}

[data-theme="dark"] .note,
body.dark-theme .note {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.note-ic {
  flex-shrink: 0;
  margin-top: 1px;
}

.note p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #334155;
}

.note b {
  color: #0f172a;
}

[data-theme="dark"] .note p,
body.dark-theme .note p {
  color: #94a3b8;
}

[data-theme="dark"] .note b,
body.dark-theme .note b {
  color: #f8fafc;
}

/* Contact Pack Cards (Legacy compatibility) */
.contact-pack-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 20px;
  background: #eef5fe;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid transparent;
  width: 100%;
}

[data-theme="dark"] .contact-pack-card,
body.dark-theme .contact-pack-card {
  background: rgba(51, 144, 236, 0.12);
  border-color: rgba(51, 144, 236, 0.2);
}

.contact-pack-card:hover {
  background: #e1effe;
  transform: translateY(-1px);
}

.contact-pack-card:active {
  transform: scale(0.985);
}

.contact-pack-card__left {
  display: flex;
  align-items: center;
  text-align: left;
}

.contact-pack-card__title {
  font-size: 16px;
  font-weight: 800;
  color: #0d47a1;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .contact-pack-card__title,
body.dark-theme .contact-pack-card__title {
  color: #93c5fd;
}

.contact-pack-card__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-pack-card__badge {
  background: #1a73e8;
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 8px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-pack-card__price {
  font-size: 16.5px;
  font-weight: 800;
  color: #0d47a1;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .contact-pack-card__price,
body.dark-theme .contact-pack-card__price {
  color: #93c5fd;
}

.contact-pack-card--pro {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.contact-pack-card--pro:hover {
  background: #1e293b !important;
}

.contact-pack-card__title--pro {
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
}

.contact-pack-card__sub {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.25;
}

.contact-pack-card__price--pro {
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

/* Flat / Text-only Modal Button */
.modal-btn-link {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #3b82f6 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  cursor: pointer;
  width: 100%;
  text-align: center;
  border-radius: 12px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.modal-btn-link:hover {
  background: rgba(59, 130, 246, 0.08) !important;
}

.modal-btn-link:active {
  opacity: 0.7;
}

[data-theme="dark"] .modal-btn-link,
body.dark-theme .modal-btn-link {
  color: #60a5fa !important;
}

/* Review Items */
.review-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-xs);
}

.review-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.review-item__name {
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}

a.review-item__name:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.review-item__date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.review-item__comment {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  word-wrap: break-word;
}

/* Trip Items */
.trip-item {
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-soft);
  margin-bottom: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  animation: fadeIn 0.4s ease-out;
}

.trip-item:last-child {
  margin-bottom: 0;
}

.trip-item__route {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-item__details {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.trip-item__details strong {
  color: var(--text);
}

/* Status Tags */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.status-badge--active {
  background: #dcfce7;
  color: #15803d;
}

.status-badge--warning {
  background: #fef9c3;
  color: #a16207;
}

/* ═══════════════ End Subscriptions ═══════════════ */

/* ═══════════════ Footer Info ═══════════════ */

.footer-info {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: block;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.text-highlight {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-info:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  color: var(--text);
  border-color: var(--accent-light);
  box-shadow: var(--shadow-sm);
}

.footer-info:hover .text-highlight {
  color: var(--accent-hover);
}

.footer-info:active {
  transform: scale(0.98);
  opacity: 0.8;
}

/* ═══════════════ Tab Bar ═══════════════ */

.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: calc(min(var(--max-width), 100%) - 24px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  overflow: hidden;
  z-index: 100;
}

.tabbar a {
  flex: 1;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s ease;
  white-space: nowrap;
  padding: 3px 0 2px;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  gap: 2px;
}

.tabbar a::after,
.tabbar a.active::after {
  display: none !important;
  content: none !important;
}

.tabbar a.active {
  color: var(--accent);
}

.tabbar a:active,
.tabbar a:hover {
  color: var(--accent);
}

.tabbar-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tabbar a.active .tabbar-icon {
  stroke-width: 2.3;
  color: var(--accent);
}

.tabbar a:active .tabbar-icon {
  transform: scale(1.12);
}

.tabbar-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: inherit;
  transition: color 0.2s ease, font-weight 0.2s ease;
  white-space: nowrap;
  display: block;
}

.tabbar a.active .tabbar-label {
  font-weight: 700;
  color: var(--accent);
}

.bottom-spacer {
  height: 12px;
}

/* ═══════════════ Results System ═══════════════ */

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

.results-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 16px 0;
  padding-bottom: 6px;
  scrollbar-width: none;
}

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

.results-tab {
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  border-radius: 14px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
  font-family: var(--font-family);
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.results-tab:hover {
  border-color: rgba(51, 144, 236, 0.3);
}

.results-tab.is-active {
  background: linear-gradient(135deg, #4facfe, var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(51, 144, 236, 0.3);
}

/* ═══════════════ Match Cards ═══════════════ */



.match-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.match-card__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(51, 144, 236, 0.1);
}

.footer-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.footer-btn.profile-btn {
  background: var(--bg-soft);
  color: var(--accent);
  border: 1px solid rgba(51, 144, 236, 0.15);
}

.footer-btn.message-btn {
  background: linear-gradient(135deg, #4facfe, var(--accent));
  color: #fff;
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.25);
}

.footer-btn:active {
  transform: scale(0.96);
}

.dots-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  color: var(--text-tertiary);
  border: 1px solid rgba(51, 144, 236, 0.1);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.dots-btn:active {
  transform: scale(0.9);
  background: rgba(51, 144, 236, 0.05);
}

.match-action-icon:active {
  transform: scale(0.88);
}

.match-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  /* Clips the red warning line */
  z-index: 1;
  animation: fadeUp 0.4s ease-out backwards;
}

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

.match-card.is-menu-open {
  z-index: 1000;
  overflow: visible;
  /* Allows the action menu to show outside the card */
}

.match-card--reported {
  background: rgba(239, 68, 68, 0.05);
  /* Very subtle red */
  border-color: rgba(239, 68, 68, 0.2);
}

.match-card--reported::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--danger);
  opacity: 0.6;
}

.match-card:active {
  transform: scale(0.985);
  box-shadow: var(--shadow-sm);
}

.match-card__name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-card p strong {
  color: var(--text);
}

/* Premium Badges */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.user-badge:active {
  transform: scale(0.92);
}

.user-badge--rating {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #b45309;
  border: 1px solid #fde68a;
}

.user-badge--trips {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.user-badge--pro {
  background: var(--gold-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Compact Card Layout */
.match-card__location {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-weight: 500;
}

.match-card__bio {
  font-size: 14px;
  color: var(--text);
  margin: 12px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.9;
}

.match-card__separator {
  height: 1px;
  background: var(--line);
  margin: 12px 0;
  opacity: 0.5;
}

.match-card__compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.match-card__detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.match-card__detail-text {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════ Pro Badge ═══════════════ */

.pro-badge {
  color: #fff;
  background: var(--gold-gradient);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-pro-badge {
  background: var(--gold-gradient);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.profile-btn.is-restricted {
  filter: saturate(0.5);
  cursor: pointer;
}

/* ═══════════════ Responsive Grid ═══════════════ */

@media (max-width: 420px) {

  .grid-2,
  .hero__actions,
  .match-card__actions {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════ Account Styles ═══════════════ */

.card-anim {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 1000px;
  opacity: 1;
}

.is-removing {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: none !important;
  overflow: hidden;
}

.account-id {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
  opacity: 0.75;
}

.account-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(51, 144, 236, 0.06));
  color: var(--accent);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.account-kind.kind-search {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.06));
  color: #16a34a;
}

/* ═══════════════ Profile Section ═══════════════ */

.profile-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #4facfe 0%, #3390ec 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(51, 144, 236, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-info h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.profile-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-role-badge {
  background: rgba(51, 144, 236, 0.1);
  color: #3390ec;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

.profile-edit-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 144, 236, 0.08);
  color: var(--accent);
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.profile-edit-btn::after {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: -4px;
  right: -4px;
}

.profile-edit-btn:hover {
  background: rgba(51, 144, 236, 0.18);
  transform: scale(1.05);
}

.profile-edit-btn:active {
  transform: scale(0.95);
}

.readonly-field {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 14px;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-height: 52px;
  display: flex;
  align-items: center;
}

.phone-share-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.stat-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
}

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

.stat-value {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══════════════ Settings Group ═══════════════ */

.settings-group-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(51, 144, 236, 0.08);
  transition: background 0.2s ease;
}

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

.settings-row.clickable {
  cursor: pointer;
}

.settings-row.clickable:hover {
  background: rgba(51, 144, 236, 0.04);
}

.settings-row.clickable:active {
  background: rgba(51, 144, 236, 0.08);
}

.settings-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(51, 144, 236, 0.1);
  color: #3390ec;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-row-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
}

.settings-row-subtitle {
  font-size: 12px;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 1px;
}

.settings-row-val {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Request & Subscription Cards */
.acc-item-card {
  position: relative;
  background: #f4f9ff;
  border: 1px solid rgba(51, 144, 236, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.acc-item-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.acc-item-card.is-menu-open {
  z-index: 100;
}

.acc-req-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.acc-req-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.acc-req-status {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  background: rgba(15, 23, 42, 0.05);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.acc-req-menu-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  border: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, transform 0.15s ease;
}

/* Keeps the tap target at 44px without growing the button. */
.acc-req-menu-btn::after {
  content: '';
  position: absolute;
  inset: -7px;
}

.acc-req-menu-btn:hover {
  background: rgba(51, 144, 236, 0.12);
  color: #1d6fc0;
}

.acc-req-menu-btn:active {
  transform: scale(0.9);
}

.acc-req-notif {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #3f7a52;
}

.acc-req-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.acc-btn-primary {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #2f83d6;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.acc-btn-primary:hover {
  background: #2472bd;
}

.acc-btn-primary:active {
  transform: scale(0.98);
}

.acc-btn-count {
  background: rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 11.5px;
  font-weight: 800;
}

.acc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.acc-tag--trip {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

.acc-status-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.acc-route-title {
  font-weight: 800;
  font-size: 14.5px;
  color: #0f172a;
}

.acc-meta-info {
  margin-top: 4px;
  font-size: 12.5px;
  color: #475569;
}

.acc-btn-edit {
  flex: 1;
  background: rgba(51, 144, 236, 0.1);
  color: #1d6fc0;
  border: none;
  border-radius: 10px;
  padding: 8px 0;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acc-btn-edit:hover {
  background: rgba(51, 144, 236, 0.2);
}

.acc-btn-danger {
  flex: 1;
  background: rgba(239, 68, 68, 0.08);
  color: #c62828;
  border: none;
  border-radius: 10px;
  padding: 8px 0;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acc-btn-danger:hover {
  background: rgba(239, 68, 68, 0.16);
}

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

.acc-section-title {
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.acc-create-btn {
  background: rgba(51, 144, 236, 0.1);
  color: #3390ec;
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acc-create-btn:hover {
  background: rgba(51, 144, 236, 0.2);
  transform: scale(1.02);
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: .3s ease;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked+.slider {
  background: linear-gradient(135deg, #4facfe, var(--accent));
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* ═══════════════ Chat Background ═══════════════ */

.is-chat-page {
  background-color: var(--bg) !important;
}

.is-chat-page .topbar__inner {
  justify-content: flex-start;
  padding-left: 52px;
  padding-right: 140px;
}

.is-chat-page #contact-info {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.is-chat-page .brand__avatar-wrapper {
  flex-shrink: 0 !important;
  min-width: 42px !important;
  width: 42px !important;
  height: 42px !important;
}

.is-chat-page #contact-info > div:not(.brand__avatar-wrapper) {
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.is-chat-page .brand__title {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.is-chat-page .brand__sub {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}


.is-chat-page #chat-actions {
  right: 2px;
  padding: 6px 0px;
}

.is-chat-page .back-btn {
  left: 0;
}

#chat-actions .dots-btn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

#chat-actions .dots-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s ease;
}

#chat-actions .dots-btn:active {
  color: var(--accent);
}

#chat-actions .dots-btn:active::before {
  background: var(--accent-light);
}

#chat-actions .dots-btn:active svg {
  transform: scale(0.88);
}

#chat-actions .dots-btn:focus-visible {
  outline: none;
}

#chat-actions .dots-btn:focus-visible::before {
  box-shadow: 0 0 0 2px var(--accent);
}

#chat-actions .dots-btn svg {
  position: relative;
  width: 26px;
  height: 26px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.is-chat-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 1;
  background-color: #eaf4fe;
  background-image: url('chat-bg@2x.webp?v=3');
  background-image: -webkit-image-set(url('chat-bg.webp?v=3') 1x, url('chat-bg@2x.webp?v=3') 2x);
  background-image: image-set(url('chat-bg.webp?v=3') 1x, url('chat-bg@2x.webp?v=3') 2x);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  pointer-events: none;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

body.dark-theme.is-chat-page::before,
[data-theme="dark"].is-chat-page::before {
  filter: brightness(0.6) contrast(1.05);
}

/* ═══════════════ Responsive ═══════════════ */

@media (max-width: 480px) {
  .hero {
    padding: 20px 8px;
  }

  .card {
    padding: 16px;
    margin-top: 10px;
  }

  .account-kind {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* Same height as the chat header on every page: the bar is exactly
     --header-height, the inner row carries its own side padding. */
  .topbar {
    padding: 0;
  }

  .brand__title {
    font-size: 16px;
  }
}

/* ═══════════════ Chat & Dialogue Styles ═══════════════ */

/* Dialogue Styles Consolidated Below */

/* Chat View */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 12px 120px 12px;
  background-image: none;
  border-radius: 16px;
}

.message-group {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.message-group.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.message-group.received {
  align-self: flex-start;
  align-items: flex-start;
}

.message-bubble {
  padding: 8px 12px 7px 12px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
  max-width: 100%;
}

.message-bubble::after {
  content: "";
  display: block;
  clear: both;
}

.sent .message-bubble {
  background: linear-gradient(135deg, #4facfe, var(--accent));
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 3px 12px rgba(51, 144, 236, 0.2);
}

.received .message-bubble {
  background: white;
  color: var(--text);
  border-bottom-left-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-xs);
}

.message-meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  margin-top: 4px;
  transform: translateY(5px);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.sent .message-meta {
  color: rgba(255, 255, 255, 0.75);
}

.received .message-meta {
  color: var(--text-secondary, #94a3b8);
}

.read-receipt {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  margin-left: 1px;
  letter-spacing: -2px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.sent .read-receipt.is-read {
  color: #ffffff;
  opacity: 1;
}

.received .read-receipt.is-read {
  color: #10b981;
  opacity: 1;
}

/* Image overlay meta for image-only messages */
.is-pure-image .message-bubble {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.message-meta--image-overlay {
  position: absolute;
  bottom: 6px;
  right: 6px;
  margin: 0;
  float: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff !important;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.message-meta--image-overlay span {
  color: #ffffff !important;
}

.message-meta--image-overlay .read-receipt {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 11px;
}

.message-meta--image-overlay .read-receipt.is-read {
  color: #ffffff !important;
}

/* Optimistic & Sending States */
.message-group.is-optimistic .message-bubble {
  opacity: 0.85;
}

.message-group.is-optimistic .read-receipt {
  display: inline-block;
  animation: opt-pulse 1.2s infinite ease-in-out;
}

@keyframes opt-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; }
}

/* Failed Message - Minimalist & Compact */
.message-bubble-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 100%;
}

.sent .message-bubble-wrapper {
  justify-content: flex-end;
}

.received .message-bubble-wrapper {
  justify-content: flex-start;
}

/* Small, crisp red exclamation badge directly adjacent to bubble */
.msg-failed-indicator {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
  margin-bottom: 2px;
  user-select: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.msg-failed-indicator:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.msg-failed-indicator:active {
  transform: scale(0.92);
}

/* Compact status bar directly under bubble */
.msg-failed-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.2;
  user-select: none;
}

.sent .msg-failed-status {
  align-self: flex-end;
  padding-right: 2px;
}

.received .msg-failed-status {
  align-self: flex-start;
  padding-left: 2px;
}

.msg-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s ease;
}

.msg-status-btn.retry-action {
  color: #ef4444;
  font-weight: 600;
}

.msg-status-btn.retry-action:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.msg-status-btn.delete-action {
  color: var(--text-secondary, #94a3b8);
  padding: 1px 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msg-status-btn.delete-action:hover {
  color: #ef4444;
  opacity: 1;
  text-decoration: none;
}

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

.msg-status-dot {
  color: var(--text-secondary, #cbd5e1);
  font-size: 10px;
}

/* Bubble retains completely normal appearance */
.sent.message-group.is-failed .message-bubble {
  background: linear-gradient(135deg, #4facfe, var(--accent)) !important;
  color: white !important;
  box-shadow: 0 3px 12px rgba(51, 144, 236, 0.2) !important;
  border: none !important;
  opacity: 0.95;
}

.received.message-group.is-failed .message-bubble {
  background: white !important;
  color: var(--text) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  box-shadow: var(--shadow-xs) !important;
  opacity: 0.95;
}

.message-group.is-failed .read-receipt {
  display: none !important;
}

.send-btn.is-sending {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

/* Session Expired Overlay */
.session-expired-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
}

/* Chat Date Divider */
/* Chat Date Divider & Badges */
.chat-date-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -2px 0 -2px 0;
  width: 100%;
  pointer-events: none;
  user-select: none;
}

.chat-date-badge,
.floating-date-badge {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.2px;
  user-select: none;
}

/* Dynamic Floating Date Badge on Scroll */
.floating-date-badge {
  position: fixed;
  top: calc(var(--header-height, 64px) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.floating-date-badge.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Chat Input Bar */
.chat-input-wrapper {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max-width), 100%);
  padding: 0 16px;
  z-index: 90;
}

.chat-input-wrapper--bottom {
  bottom: calc(16px + env(safe-area-inset-bottom));
}

.chat-input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  padding: 6px 6px 6px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.06);
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 4px 8px 0; /* Added small right padding for caret */
  font-size: 16px;
  line-height: 1.4;
  font-family: inherit;
  outline: none;
  max-height: 120px;
  resize: none;
  color: var(--text);
  /* Force visible caret on all devices */
  caret-color: var(--accent) !important;
  overflow-y: auto; /* Ensure scrollbar appears if text is long */
}

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, var(--accent));
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(51, 144, 236, 0.25);
  flex-shrink: 0;
}

.send-btn:active {
  transform: scale(0.88);
}

/* Removed redundant modal definitions, consolidated at line 997 */

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.modal-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.modal-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  background: #f8fafc;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  resize: vertical;
  color: var(--text);
  /* Force visible caret */
  caret-color: var(--accent) !important;
  line-height: 1.4;
}

/* Select and input elements using modal-textarea should not be as tall as textareas */
select.modal-textarea,
input.modal-textarea {
  min-height: 48px;
  resize: none;
}

.modal-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.08);
}

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

/* ═══════════════ Action Icon Variants ═══════════════ */

.match-action-icon.yellow {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}

.match-action-icon.orange {
  background: linear-gradient(135deg, #fb923c, #f97316) !important;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.25);
}

.match-action-icon.red {
  background: linear-gradient(135deg, #f87171, #ef4444) !important;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
}

.match-action-icon.blue {
  background: linear-gradient(135deg, #60a5fa, #3b82f6) !important;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25);
}

.match-action-icon.is-blocked {
  background: linear-gradient(135deg, #374151, #111827) !important;
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.25);
}

/* ═══════════════ Plan Cards (PRO Modal) ═══════════════ */

.plan-card {
  cursor: pointer;
  padding: 16px;
  border: 1.5px solid rgba(51, 144, 236, 0.2);
  border-radius: 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.5);
}

.plan-card:hover {
  border-color: var(--accent);
  background: rgba(79, 172, 254, 0.04);
  transform: translateY(-1px);
}

/* ═══════════════ Multi-City Tags ═══════════════ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.city-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(51, 144, 236, 0.15);
  animation: tagIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.city-tag span {
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.city-tag span:hover {
  opacity: 1;
}

@keyframes tagIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ═══════════════ Hidden Inputs ═══════════════ */
.hidden-input {
  display: none;
  margin-top: 10px;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden-input.is-visible {
  display: block;
}

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

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

/* ═══════════════ Block State ═══════════════ */
.match-action-icon.is-blocked {
  background: var(--danger);
  color: #fff;
}

.match-action-icon.is-blocked svg {
  stroke: #fff;
}

/* ═══════════════ Conversations List ═══════════════ */
.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.conversation-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════ Conversations List (Fixed) ═══════════════ */
.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.conversation-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 16px;
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.conversation-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.95);
}

.conversation-card.is-active-menu {
  z-index: 1010 !important;
}

.conversation-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden !important;
}

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

.online-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 15px;
  height: 15px;
  background: #22c55e;
  border: 2.5px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2.5px white, 0 2px 8px rgba(34, 197, 94, 0.5);
  z-index: 10;
}

.brand__avatar-wrapper {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.conversation-info {
  flex: 1;
  min-width: 0;
  /* Critical for ellipsis */
  display: flex;
  flex-direction: column;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  width: 100%;
}

.conversation-name {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.conversation-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  flex-shrink: 0;
}

.conversation-time {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.conversation-last-msg {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dots-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.dots-btn:hover {
  background: rgba(51, 144, 236, 0.08);
}

/* ═══════════════ Discovery Grid (Tabs) ═══════════════ */

.discovery-grid {
  display: flex !important;
  flex-wrap: wrap;
  /* Changed from nowrap to wrap */
  gap: 10px;
  /* Slightly reduced gap for wrapped layout */
  padding: 8px 0 16px;
  margin: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.discovery-grid::-webkit-scrollbar {
  display: none;
}

.discovery-card {
  flex: 1 1 calc(50% - 10px);
  min-width: 140px;
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  /* Slightly reduced gap */
  justify-content: space-between;
  /* Push elements apart if needed */
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.discovery-card.is-full {
  flex: 1 1 100%;
  justify-content: center;
}

.discovery-card:hover {
  transform: translateY(-1px);
  border-color: rgba(51, 144, 236, 0.3);
}


.discovery-card:active {
  transform: scale(0.97);
}

.discovery-card.is-active {
  background: linear-gradient(135deg, #4facfe, var(--accent));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.2);
  transform: scale(0.98);
  /* Slight inward click effect for the active state */
  animation: activePulse 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes activePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.96);
  }

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

.discovery-card__icon {
  font-size: 16px;
  margin: 0;
}

.discovery-card__label {
  flex: 1;
  min-width: 0;
  white-space: normal;
  /* Allow wrapping */
  font-size: 11.5px;
  /* Slightly smaller for 2 lines */
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discovery-card.is-active .discovery-card__label {
  color: #fff;
}

.discovery-card__count {
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  /* Never squeeze the count */
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.discovery-card__count.is-positive {
  color: #10b981;
  /* Success green */
  background: rgba(16, 185, 129, 0.1);
}

.discovery-card.is-active .discovery-card__count {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

/* ═══════════════ Status Cards (Account Page) ═══════════════ */

.status-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
}

.status-card--free {
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-left: 5px solid #94a3b8;
}

.status-card--pro {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.15);
}

.status-card--danger {
  background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(248, 113, 113, 0.2) !important;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2) !important;
}

.status-card--warning {
  background: linear-gradient(135deg, #d97706 0%, #78350f 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(251, 191, 36, 0.2) !important;
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.2) !important;
}

.status-card--warning .status-card__title,
.status-card--warning .status-card__title span,
.status-card--warning .status-card__subtitle:not(#stripe-status-text),
.status-card--warning b {
  color: #fff !important;
}

.status-card--info {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(147, 197, 253, 0.2) !important;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2) !important;
}

.status-card--info .status-card__title,
.status-card--info .status-card__title span,
.status-card--info .status-card__subtitle:not(#stripe-status-text),
.status-card--info b {
  color: #fff !important;
}

/* Safe Deal Status Text Styling */
.status-card__status--active {
  color: #fff !important;
  font-weight: 600;
}

.status-card__status--disabled {
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 600;
}

.status-card__status--warning {
  color: #d97706; /* Dark amber for high contrast on light background */
  font-weight: 700;
}

.status-card--warning .status-card__status--warning {
  color: #fde047 !important; /* Bright yellow for dark background */
}

.status-card__status--info {
  color: #2563eb; /* Dark blue for high contrast on light background */
  font-weight: 700;
}

.status-card--info .status-card__status--info {
  color: #93c5fd !important; /* Light blue for dark background */
}


.status-card--safedeal-promo {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-left: 6px solid #8b5cf6 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.status-card--safedeal {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.2);
}

.status-card--safedeal::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  animation: rotate 20s linear infinite reverse;
  pointer-events: none;
}

.status-card--safedeal .status-card__title,
.status-card--safedeal .status-card__title span,
.status-card--safedeal .status-card__subtitle:not(#stripe-status-text),
.status-card--safedeal b {
  color: #fff !important;
}

.status-card--safedeal #stripe-status-text .status-card__status--active {
  color: #fff !important;
  font-weight: 600;
}

.status-card--safedeal-promo::before {
  display: none !important;
}

.status-card--safedeal-promo .status-card__title {
  color: #1e293b !important;
}

.status-card--safedeal-promo .status-card__subtitle {
  color: #64748b !important;
}

.status-card--pro::before,
.status-card--safedeal-promo::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

.status-card--safedeal-promo .status-card__button {
  background: #8b5cf6 !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
}

.status-card--safedeal-promo .status-card__button:hover {
  background: #7c3aed !important;
  box-shadow: 0 10px 24px rgba(139, 92, 246, 0.5) !important;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.status-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 4px;
}

.status-card__content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.status-card__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* Allow badge to wrap if needed */
  gap: 4px;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.status-card--free .status-card__title {
  color: #1e293b;
}

.status-card--pro .status-card__title {
  color: #f8fafc;
}

.status-card__subtitle {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
  line-height: 1.3;
}

.status-card--free .status-card__subtitle {
  color: #64748b;
}

.status-card--pro .status-card__subtitle {
  color: #94a3b8;
}

.status-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(251, 191, 36, 0.15);
  color: #d97706;
}

.status-card--pro .status-card__badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.status-card__button {
  flex-shrink: 0;
  /* Don't allow button to shrink too much */
  position: relative;
  z-index: 2;
  background: #fbbf24;
  color: #000;
  border: none;
  font-weight: 750;
  font-size: 13px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: auto;
}

.status-card--pro .status-card__button {
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.status-card__button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(251, 191, 36, 0.4);
}

.status-card__button:active {
  transform: translateY(0) scale(0.96);
}

/* ═══════════════ Subscription Plans ═══════════════ */

.plan-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  border-radius: 16px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.plan-card--premium {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.04);
}

.plan-card--premium:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.plan-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan-card__name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.plan-card__price {
  font-size: 13px;
  color: var(--text-muted);
}

.plan-card__tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #d97706;
  background: rgba(251, 191, 36, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

/* ═══════════════ Compact Dashboard (Index) ═══════════════ */

.hero--compact {
  padding: 8px 4px 4px;
}

.hero--compact h1 {
  font-size: 21px;
  margin-top: 4px;
}

.hero--compact .hero__text {
  font-size: 13px;
  margin: 8px auto 20px;
  max-width: 85%;
  opacity: 1;
  text-align: center;
  font-style: italic;
  padding: 8px 16px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  line-height: 1.4;
  color: var(--text);
}

#requests-section,
#subscriptions-section {
  scroll-margin-top: 80px;
}

.section--no-top {
  margin-top: 0;
}

/* Statistics Bar relocated and consolidated above */

.menu-card--compact {
  min-height: 84px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
}

.menu-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-card__emoji {
  font-size: 20px;
  line-height: 1;
}

.menu-card--compact:hover .menu-card__emoji {
  transform: scale(1.2) rotate(-5deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-card--compact .menu-card__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.01em;
  background: linear-gradient(to right, var(--text), #475569);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu-card__desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
  padding-left: 28px;
  /* Offset to align with title text under the emoji */
}

@media (max-width: 380px) {
  .hero--compact h1 {
    font-size: 22px;
  }

  .menu-card--compact {
    padding: 12px;
  }

  .menu-card--compact .menu-card__title {
    font-size: 16px;
  }
}

/* ═══════════════ Polishing (Wow Factor) ═══════════════ */

.hero--compact .hero__badge {
  animation: float 3s ease-in-out infinite;
  background: rgba(51, 144, 236, 0.1);
  backdrop-filter: blur(4px);
}

.menu-card--compact {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-card--compact:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.9);
}

.menu-card--compact .menu-card__title {
  background: linear-gradient(to right, var(--text), #475569);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#main-container {
  /* Ensure a smoother entrance for the whole page */
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════ History Lists ═══════════════ */

.history-list {
  max-height: 60vh;
  overflow-y: auto;
  margin: 10px -10px 0;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}

.history-list::-webkit-scrollbar {
  display: none;
}

.history-item {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  animation: fadeUp 0.3s ease-out backwards;
}

.history-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}

.history-item__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-item__kind {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.history-item__kind.kind-search {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

.history-item__status {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.history-item__status--active {
  color: #059669;
  background: #ecfdf5;
}

.history-item__status--passed {
  color: #dc2626;
  background: #fef2f2;
  opacity: 0.8;
}

.history-item__date {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.history-item__route {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 2px 0;
}

.history-item__details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.history-item__detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-item__separator {
  width: 4px;
  height: 4px;
  background: var(--line);
  border-radius: 50%;
}

.history-item--rating {
  border-left: 4px solid var(--gold);
}

.history-item__user {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.history-item__comment {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
  margin: 8px 0;
  background: rgba(245, 158, 11, 0.05);
  padding: 8px 12px;
  border-radius: 12px;
}

.history-item__route-small {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
  font-weight: 500;
}

/* ═══════════════ Action Dropdown Menu ═══════════════ */

.action-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: -4px;
  min-width: 230px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: 20px;
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.22),
    0 8px 24px rgba(15, 23, 42, 0.06);
  z-index: 1000;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

/* Arrow */
.action-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 1);
  border-top: 1px solid rgba(255, 255, 255, 1);
  transform: rotate(45deg);
  border-radius: 3px 0 0 0;
  z-index: -1;
}

.action-menu.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  line-height: 1.2;
}

.action-menu-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.action-menu-item.destructive {
  color: #ff3b30 !important;
  /* System red for visibility */
}

.action-menu-item.destructive.is-blocked {
  color: #2b8a3e !important;
  /* System green back to normal */
}

.action-menu-item.destructive:hover {
  background: rgba(239, 68, 68, 0.08);
}

.action-menu-item.success {
  color: #10b981;
}

.action-menu-item.success:hover {
  background: rgba(16, 185, 129, 0.08);
}

.action-menu-item svg {
  width: 20px;
  height: 20px;
  opacity: 0.9;
  stroke-width: 2.5;
}

/* Ensure parents don't clip the menu */
.dots-btn-wrapper {
  position: relative;
  display: inline-flex;
  z-index: inherit;
}

/* ═══════════════ Unread Badges ═══════════════ */
.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: normal;
  margin-left: 6px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }

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

.tabbar-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  z-index: 10;
  pointer-events: none;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.warning-badge {
  background: linear-gradient(135deg, #facc15, #eab308) !important;
  color: #000 !important;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.45) !important;
}

.menu-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.4);
  z-index: 10;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ═══════════════ Picker Modal (Autocomplete) ═══════════════ */

.picker-modal {
  z-index: 2000 !important;
  display: flex !important;
  align-items: flex-end;
  padding: 0;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

.picker-content {
  width: 100%;
  max-width: var(--max-width);
  height: calc(100dvh - 20px);
  margin: 0 auto;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.picker-modal.is-active .picker-content {
  transform: translateY(0);
}

.picker-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
}

.picker-search {
  flex: 1;
  height: 48px;
  border: none;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--text);
  outline: none;
}

.picker-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 40px;
  -webkit-overflow-scrolling: touch;
}

.picker-item {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
}

.picker-item:active {
  background: var(--accent-light);
  color: var(--accent);
}

.picker-item:last-child {
  border-bottom: none;
}

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

/* ═══════════════ Entrance Animations ═══════════════ */

.fade-in {
  animation: fadeInEffect 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInEffect {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

.stagger-3 {
  animation-delay: 0.3s;
}

.stagger-4 {
  animation-delay: 0.4s;
}

.stagger-5 {
  animation-delay: 0.5s;
}

/* ═══════════════ Sorting Chips ═══════════════ */

.sort-container {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sort-container::-webkit-scrollbar {
  display: none;
}

.sort-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.sort-chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-alpha);
  transform: translateY(-1px);
}

.sort-chip:active {
  transform: scale(0.96);
}

/* ═══════════════ Notification Badges ═══════════════ */
.badge-notify {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
  z-index: 5;
  pointer-events: none;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
  z-index: 5;
  pointer-events: none;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

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

/* ═══════════════ Radical Stability & Smart Button ═══════════════ */

.input-trigger {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  display: flex !important;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.input-trigger:empty::before {
  content: attr(data-placeholder);
  color: var(--text-secondary);
  font-weight: 400;
}

.input-trigger:active {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.picker-modal {
  z-index: 3000 !important;
  height: 100dvh !important;
  align-items: flex-start !important;
  /* Top-aligned for stability */
  transition: opacity 0.2s ease-out;
  opacity: 0;
  pointer-events: none;
}

.picker-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.picker-content {
  height: 100% !important;
  border-radius: 0 !important;
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease-out;
  opacity: 0;
}

.picker-modal.is-active .picker-content {
  transform: translateY(0);
  opacity: 1;
}

.scroll-lock {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

.publish-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease !important;
}

.publish-btn:disabled,
.publish-btn.is-disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none;
  box-shadow: none !important;
  filter: grayscale(15%);
}

.publish-btn:not(:disabled):not(.is-disabled),
.publish-btn.is-visible:not(:disabled) {
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto;
  box-shadow: 0 6px 20px rgba(51, 144, 236, 0.28) !important;
  filter: none;
}

/* ═══════════════ Limit Banner ═══════════════ */

.limit-banner {
  background: rgba(var(--accent-rgb, 51, 144, 236), 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(var(--accent-rgb, 51, 144, 236), 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  animation: fadeDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.limit-banner__content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.limit-banner__icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

#limit-banner-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.limit-banner__btn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
  color: #fff !important;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.limit-banner__btn:active {
  transform: scale(0.96);
}

.limit-banner__btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(51, 144, 236, 0.15);
}

/* ═══════════════ Success Celebration Page ═══════════════ */

.success-body {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: var(--bg);
}

.celebration-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(51, 144, 236, 0.05) 100%);
  z-index: 0;
  pointer-events: none;
}

.success-card {
  position: relative;
  z-index: 10;
  max-width: 400px;
  width: 100%;
  padding: 48px 32px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 100px rgba(15, 23, 42, 0.4);
  color: #fff;
  animation: revealCard 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes revealCard {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(40px);
  }

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

.pro-badge-container {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 32px;
}

.pro-badge-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle at center, rgba(51, 144, 236, 0.5), transparent 70%);
  animation: badgeGlow 2.5s infinite ease-in-out;
  z-index: -1;
}

@keyframes badgeGlow {

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

  50% {
    transform: scale(1.4);
    opacity: 0.7;
  }
}

.pro-badge-logo {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
  background: #fff;
  padding: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  animation: badgePop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: scale(0);
}

@keyframes badgePop {
  0% {
    transform: scale(0) rotate(-15deg);
  }

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

.success-hero {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #3390ec 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: slideDown 0.6s ease-out both;
  animation-delay: 0.4s;
}

.success-message {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  animation: slideDown 0.6s ease-out both;
  animation-delay: 0.6s;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Confetti Implementation */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  top: -20px;
  opacity: 0;
  animation: confettiFall var(--duration) var(--delay) linear infinite;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}


/* ═══════════════ Global Premium Spinner ═══════════════ */

.fts-spinner {
  width: 38px;
  height: 38px;
  border: 3.5px solid rgba(51, 144, 236, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  -webkit-animation: rotate 0.85s linear infinite;
  animation: rotate 0.85s linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: inline-block;
  vertical-align: middle;
}

/* ═══════════════ Global Premium Spinner ═══════════════ */

.fts-spinner {
  width: 38px;
  height: 38px;
  border: 3.5px solid rgba(51, 144, 236, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  -webkit-animation: ftsSpinnerRotate 0.85s linear infinite;
  animation: ftsSpinnerRotate 0.85s linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: inline-block;
  vertical-align: middle;
}

@keyframes ftsSpinnerRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes ftsSpinnerRotate {
  0% {
    -webkit-transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
  }
}

/* ═══════════════ Custom Checkbox Grid ═══════════════ */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  display: none !important;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2.25px solid rgba(51, 144, 236, 0.3);
  border-radius: 5px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
  flex-shrink: 0;
  box-sizing: border-box;
}

.checkbox-item:hover {
  border-color: rgba(51, 144, 236, 0.3);
  background: #ffffff;
}

.checkbox-item.active {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 2px 8px rgba(51, 144, 236, 0.08);
}

.checkbox-item.active .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-item.active .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 7.5px;
  border: solid white;
  border-width: 0 1.75px 1.75px 0;
  transform: rotate(45deg);
}

.checkbox-item:has(input[type="checkbox"]:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 2px 8px rgba(51, 144, 236, 0.08);
}

.checkbox-item:has(input[type="checkbox"]:checked) .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-item:has(input[type="checkbox"]:checked) .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 7.5px;
  border: solid white;
  border-width: 0 1.75px 1.75px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

/* Specific styling for subscription kind select to prevent text truncation */
#sub-kind {
  font-size: 14px !important;
  padding-left: 12px !important;
  padding-right: 32px !important;
  background-position: right 12px center !important;
}

/* Past Due Subscription Styling */
.sub-card--danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.sub-card--danger .sub-card__title,
.sub-card--danger .sub-card__desc,
.sub-card--danger .sub-card__price {
  color: white;
}

.sub-card__badge.badge-danger {
  background: #fef2f2;
  color: #ef4444;
}

.tg-button.btn-retry,
a.tg-button.btn-retry {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.28);
}

.tg-button.btn-retry:hover,
a.tg-button.btn-retry:hover {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.35);
  transform: translateY(-2px);
}

/* ========== Anniversary Banner Modal ========== */
.anniversary-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  animation: anniv-fade-in 0.4s ease forwards;
  padding: 16px;
  overflow-y: auto;
}

.anniversary-overlay.closing {
  animation: anniv-fade-out 0.35s ease forwards;
}

@keyframes anniv-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes anniv-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.anniversary-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(165deg, #1a1040 0%, #0f0a2e 40%, #0a0620 100%);
  border-radius: var(--radius-xl);
  padding: 32px 24px 28px;
  text-align: center;
  color: #fff;
  overflow: hidden;
  box-shadow:
    0 0 80px rgba(139, 92, 246, 0.3),
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.85) translateY(30px);
  animation: anniv-modal-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

.anniversary-overlay.closing .anniversary-modal {
  animation: anniv-modal-out 0.3s ease forwards;
}

@keyframes anniv-modal-in {
  from { transform: scale(0.85) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes anniv-modal-out {
  from { transform: scale(1) translateY(0); opacity: 1; }
  to { transform: scale(0.9) translateY(20px); opacity: 0; }
}

/* Decorative glow orbs */
.anniversary-modal::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 70%);
  pointer-events: none;
}

.anniversary-modal::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
  pointer-events: none;
}

.anniv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
  line-height: 1;
}

.anniv-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: rotate(90deg);
}

.anniv-emoji {
  font-size: 56px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  animation: anniv-bounce 2s ease-in-out infinite;
}

@keyframes anniv-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.anniv-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #c4b5fd;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.anniv-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.anniv-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 24px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.anniv-promo-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  transition: all 0.25s;
}

.anniv-promo-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
}

.anniv-promo-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.anniv-promo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.anniv-promo-code {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.anniv-promo-copy {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.anniv-promo-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.anniv-promo-copy.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.anniv-promo-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
  line-height: 1.4;
}

.anniv-deadline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 16px 0 20px;
  position: relative;
  z-index: 1;
}

.anniv-deadline strong {
  color: #fbbf24;
}

.anniv-cta {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.anniv-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.anniv-cta:active {
  transform: translateY(0);
}

/* Confetti particles */
.anniv-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.anniv-confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: anniv-confetti-fall linear forwards;
}

@keyframes anniv-confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(-20px) rotate(0deg) scale(1);
  }
  80% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(450px) rotate(720deg) scale(0.3);
  }
}

/* ═══════════════ Home Page Redesign v2.1 ═══════════════ */

.topbar__inner--home {
  width: min(var(--max-width), 100%);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 16px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-btn,
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md, 16px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  color: var(--text, #0f172a);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

.lang-btn {
  min-width: 46px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lang-btn__code {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text, #0f172a);
  line-height: 1;
}

.help-btn {
  width: 40px;
  padding: 0;
}

.help-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text, #0f172a);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: block;
}

.lang-btn:hover,
.help-btn:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.lang-btn:active,
.help-btn:active {
  transform: scale(0.95);
  background: #f8fafc;
}

.lang-btn.open {
  box-shadow: 0 0 0 2px var(--accent, #3390ec), 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Language Selection Modal */
.lang-dropdown-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lang-dropdown-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.lang-dropdown-modal {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px) scale(0.96);
  width: calc(min(var(--max-width), 100%) - 32px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.lang-dropdown-modal.active {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.lang-modal-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  padding: 0 6px;
  letter-spacing: -0.01em;
}

.lang-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
  border: 1px solid transparent;
  user-select: none;
}

.lang-option:hover {
  background: rgba(51, 144, 236, 0.08);
}

.lang-option:active {
  transform: scale(0.98);
}

.lang-option.active {
  background: rgba(51, 144, 236, 0.12);
  border-color: rgba(51, 144, 236, 0.2);
  color: #3390ec;
  font-weight: 700;
}

.lang-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-option-flag {
  font-size: 20px;
  line-height: 1;
}

.lang-check-icon {
  width: 18px;
  height: 18px;
  stroke: #3390ec;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Hero */
.home-hero {
  text-align: center;
  padding: 6px 8px 22px;
}

.home-hero__text {
  margin: 0 auto;
  max-width: 320px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #475569;
  font-weight: 500;
}

/* Primary Actions 2-Column Grid */
.home-primary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
  align-items: stretch;
}

.home-primary-card {
  border-radius: 20px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}

.home-primary-card:hover {
  transform: translateY(-2px);
}

.home-primary-card:active {
  transform: scale(0.97);
}

.home-primary-card--deliver {
  background: linear-gradient(135deg, #4facfe 0%, #3390ec 100%);
  box-shadow: 0 10px 28px rgba(51, 144, 236, 0.28);
}

.home-primary-card--deliver:hover {
  box-shadow: 0 14px 34px rgba(51, 144, 236, 0.4);
}

.home-primary-card--search {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.28);
}

.home-primary-card--search:hover {
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.4);
}

.home-primary-card__header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.home-primary-card__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.home-primary-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-primary-card__title {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.home-primary-card__desc {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11.5px;
  margin-top: 0;
  line-height: 1.35;
  font-weight: 500;
}

/* Secondary 6-Cards Grid */
.home-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
  align-items: stretch;
}

.home-menu-item {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 10px 14px;
  min-height: 56px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  position: relative;
}

.home-menu-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.home-menu-item:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.65);
}

.home-menu-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(51, 144, 236, 0.1);
  color: #3390ec;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.home-menu-item:hover .home-menu-item__icon {
  transform: scale(1.06);
}

.home-menu-item__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-menu-item__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.home-menu-item__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* Pro Banner */
@keyframes pro-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.home-pro-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  margin-bottom: 24px;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.home-pro-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.home-pro-banner:active {
  transform: scale(0.98);
}

.home-pro-banner__glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 60%);
  animation: pro-rotate 20s linear infinite;
  pointer-events: none;
}

.home-pro-banner__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.home-pro-banner__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.home-pro-banner__icon svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-pro-banner__text {
  min-width: 0;
}

.home-pro-banner__title {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.home-pro-banner__desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  margin-top: 3px;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}

.home-pro-banner__arrow {
  position: relative;
  z-index: 1;
  color: #ffffff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.home-pro-banner__arrow svg {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Community Stats */
.home-stats-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.home-stats-header__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: stats-pulse 2.4s ease-out infinite;
}

@keyframes stats-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.home-stats-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 144, 236, 0.12);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  margin-bottom: 20px;
}

/* Hero row - the headline metric */
.home-stats-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid rgba(51, 144, 236, 0.14);
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.12) 0%, rgba(51, 144, 236, 0.05) 100%);
}

.home-stats-hero__glow {
  position: absolute;
  top: -80%;
  left: -30%;
  width: 160%;
  height: 260%;
  background: radial-gradient(circle at 30% 50%, rgba(51, 144, 236, 0.28) 0%, transparent 55%);
  pointer-events: none;
  animation: stats-drift 16s ease-in-out infinite alternate;
}

@keyframes stats-drift {
  0% {
    transform: translateX(-6%) scale(1);
  }
  100% {
    transform: translateX(14%) scale(1.15);
  }
}

.home-stats-hero__icon {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3390ec 0%, #1d7cd8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.3);
}

.home-stats-hero__icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-stats-hero__body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.home-stats-hero__val {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-stats-hero__lbl {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tile grid - one tile per metric, tinted by its own accent */
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-stats-tile {
  --c: 51, 144, 236;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(var(--c), 0.07);
  border: 1px solid rgba(var(--c), 0.14);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  animation: stats-tile-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.home-stats-tile--wide {
  grid-column: 1 / -1;
}

.home-stats-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--c), 0.2);
}

@keyframes stats-tile-in {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.home-stats-tile__icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(var(--c), 0.16);
  color: rgb(var(--c));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-stats-tile__icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-stats-tile__body {
  min-width: 0;
}

.home-stats-tile__val {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-stats-tile__lbl {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading placeholders keep the final layout so the card never jumps */
.home-stats-skel-hero {
  height: 64px;
  border-radius: 16px;
  margin-bottom: 10px;
}

.home-stats-skel-tile {
  height: 50px;
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .home-stats-header__pulse,
  .home-stats-hero__glow,
  .home-stats-tile {
    animation: none;
  }
}

/* Support Help Button */
.home-support-btn {
  display: block;
  text-align: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.home-support-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #3390ec;
  transform: translateY(-1px);
}

.home-support-btn:active {
  transform: scale(0.98);
}

/* ═══════════════ Support the project ═══════════════ */

/* Neutral card so it never competes with the Pro banner above it - the warm
   accent lives only in the icon. Two rows: the avatars and their count take
   the right column across both, so the title never fights them for width. */
.home-donate-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "icon title arrow"
    "icon desc  arrow";
  column-gap: 12px;
  row-gap: 1px;
  align-items: center;
  width: 100%;
  margin: -10px 0 24px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.home-donate-card--social {
  grid-template-areas:
    "icon title faces"
    "icon desc  faces";
}

.home-donate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-donate-card:active {
  transform: scale(0.98);
}

.home-donate-card__icon {
  grid-area: icon;
  align-self: center;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.12);
  color: #c07d0c;
}

.home-donate-card__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-donate-card__title {
  grid-area: title;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}

.home-donate-card__desc {
  grid-area: desc;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.home-donate-card__arrow {
  grid-area: arrow;
  align-self: center;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.home-donate-card--social .home-donate-card__arrow {
  display: none;
}

.home-donate-card__arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.home-donate-card__faces {
  grid-area: faces;
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  justify-self: end;
}

.home-donate-card__avatars {
  display: flex;
  align-items: center;
}

.home-donate-card__avatars img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  margin-left: -9px;
  object-fit: cover;
  background: var(--accent-light);
}

.home-donate-card__avatars img:first-child {
  margin-left: 0;
}

.home-donate-card__more {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #a8560a;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── The donation window ────────────────────────── */

.donate-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.donate-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.donate-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 2001;
  width: min(100%, var(--max-width));
  transform: translate(-50%, 100%);
  background: #f7fbff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.donate-sheet.is-active {
  transform: translate(-50%, 0);
}

.donate-sheet__handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  margin: 2px auto 6px;
}

.donate-sheet__title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.donate-sheet__text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 4px;
}

.donate-amount {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e3ebf4;
  background: #fff;
  border-radius: 15px;
  padding: 14px 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.donate-amount:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(239, 143, 10, 0.16);
}

.donate-amount input,
.donate-amount input:focus {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: unset !important;
  height: auto !important;
  font-family: inherit;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  padding: 0 !important;
}

.donate-amount input::placeholder {
  color: var(--text-tertiary);
}

.donate-amount__cur {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.donate-hint {
  font-size: 12px;
  color: var(--text-secondary);
  padding-left: 6px;
  margin-top: -6px;
}

.donate-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 15px;
  padding: 11px 13px;
}

.donate-opt__ava {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
  background: var(--accent-light);
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.donate-opt.is-off .donate-opt__ava {
  filter: grayscale(1);
  opacity: 0.45;
}

.donate-opt__title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.donate-opt__sub {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 1px;
}

.donate-submit {
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #2b1806;
  background: linear-gradient(135deg, #f8ab24, #ef8f0a);
  box-shadow: 0 6px 16px rgba(239, 143, 10, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.donate-submit:active {
  transform: scale(0.985);
}

.donate-submit:disabled {
  background: #eef2f7;
  color: #a8b4c4;
  box-shadow: none;
  cursor: default;
}

.donate-note {
  font-size: 11.5px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

/* Social proof row: sits above the amount, where the decision happens. */
.donate-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e8eef6;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.donate-proof:active {
  transform: scale(0.99);
}

.donate-proof__faces {
  display: flex;
  align-items: center;
  flex: none;
}

.donate-proof__face {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin-left: -8px;
  border: 2px solid #ffffff;
  background: var(--accent-light);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.donate-proof__faces > *:first-child {
  margin-left: 0;
}

.donate-proof__face--letter {
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
}

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

.donate-proof__text {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  min-width: 0;
}

.donate-proof__chev {
  width: 15px;
  height: 15px;
  margin-left: auto;
  flex: none;
  stroke: var(--text-tertiary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* The amount and its currency read as one figure in the middle of the field. */
.donate-amount {
  justify-content: center;
  gap: 10px;
  padding: 18px 14px;
}

.donate-amount input {
  flex: none;
  width: 1.4ch;
  min-width: 1.4ch;
  max-width: 100%;
  text-align: right;
  font-size: 34px;
}

.donate-amount__cur {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ═══════════════ Redesigned Results Page Styles ═══════════════ */

.results-page-wrapper {
  min-height: 100vh;
  background: linear-gradient(180deg, #eaf4ff 0%, #dbeeff 100%);
  font-family: var(--font-family);
  /* tabbar: 58px tall, 12px above the safe area */
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.results-main-container {
  width: min(480px, 100%);
  margin: 0 auto;
}

/* Header: the shared .topbar component (see "Top Bar" above). */

/* One technical line ("kind + date") - never wrap it. */
#results-subtitle {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Summary Card: Regular In-Flow Element (Scrolls with page) */
.results-summary-wrap {
  padding: 12px 16px 4px;
  box-sizing: border-box;
  width: 100%;
}

.results-summary-eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  color: #3390ec;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 2px;
}

.results-summary-card {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.1), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(51, 144, 236, 0.16);
  border-radius: 18px;
  padding: 12px 14px;
  margin-top: 6px;
  box-shadow: 0 2px 10px rgba(51, 144, 236, 0.04);
  box-sizing: border-box;
  width: 100%;
}

.results-summary-badge {
  display: inline-block;
  background: rgba(51, 144, 236, 0.15);
  color: #3390ec;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  margin-bottom: 6px;
}

.results-summary-route {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 4px;
}

.results-summary-meta {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.results-summary-meta strong,
.results-summary-meta span.highlight {
  font-weight: 700;
  color: #0f172a;
}

/* Discovery Filter Grid: Sticky at top: 60px */
.results-filters-group {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: rgba(234, 244, 255, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 8px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
}

#discovery-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.filter-grid-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.filter-grid-top--single {
  grid-template-columns: 1fr;
}

/* The filter names are full phrases, so they get two columns and two lines.
   A single scrolling row was tried and dropped: it hid three filters of five. */
.filter-grid-2x2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

#discovery-grid::-webkit-scrollbar {
  display: none;
}

.filter-chip-btn {
  border: none;
  cursor: pointer;
  border-radius: 11px;
  padding: 6px 9px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  user-select: none;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.filter-chip-btn:active {
  transform: scale(0.97);
}

.filter-chip-btn--direct {
  width: 100%;
  min-height: 42px;
}

.filter-chip-btn--direct.is-active {
  background: linear-gradient(135deg, #4facfe, #3390ec);
  color: #fff;
  box-shadow: 0 4px 14px rgba(51, 144, 236, 0.3);
}

.filter-chip-btn--direct:not(.is-active) {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #0f172a;
  box-shadow: none;
}

.filter-chip-btn--direct.is-active svg {
  stroke: #fff;
}

.filter-chip-btn--direct:not(.is-active) svg {
  stroke: #3390ec;
}

.filter-chip-btn--secondary {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #0f172a;
  min-height: 42px;
}

/* A filter with no matches leads to an empty screen: it stays visible but inert. */
.filter-chip-btn.is-empty {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

.filter-chip-btn.is-empty:active {
  transform: none;
}

.channel-matches-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  width: 100%;
}

.channel-matches-divider__line {
  flex: 1;
  height: 1px;
  background: var(--border-color, rgba(148, 163, 184, 0.25));
}

.channel-matches-divider__text {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.filter-chip-btn--secondary.is-active {
  background: linear-gradient(135deg, #4facfe, #3390ec);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(51, 144, 236, 0.3);
}

.filter-chip-btn--secondary.is-active svg {
  stroke: #fff;
}

.filter-chip-btn--secondary:not(.is-active) svg {
  stroke: #3390ec;
}

.filter-chip-icon {
  font-size: 13.5px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-chip-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.filter-chip-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.filter-chip-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  min-width: 19px;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.filter-chip-btn.is-active .filter-chip-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.filter-chip-btn:not(.is-active) .filter-chip-badge {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

/* Match Cards Redesigned */
.results-cards-list {
  padding: 12px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-card-modern {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.match-card-modern.is-menu-open {
  z-index: 100;
}

.match-card-modern--reported {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(254, 242, 242, 0.85);
}

.match-card-modern__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.match-card-modern__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.match-card-modern__avatar-wrap--pro {
  padding: 2.5px;
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #6366f1 100%);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.match-card-modern__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  user-select: none;
  overflow: hidden;
  position: relative;
}

.match-card-modern__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.match-card-modern__avatar--pro {
  border: 1.5px solid #fff;
}

.match-card-modern__pro-crown-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 4.5px;
  border-radius: 5px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.match-card-modern__avatar-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.match-card-modern__avatar-badge--safe {
  background: #16a34a;
}

.match-card-modern__avatar-badge--suspended {
  background: #94a3b8;
}

.match-card-modern__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.match-card-modern__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.match-card-modern__name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-word;
  white-space: normal;
}

.match-card-modern__report-icon {
  cursor: pointer;
  flex-shrink: 0;
  font-size: 13.5px;
  line-height: 1;
}

.match-card-modern__pro-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.match-card-modern__flag {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  user-select: none;
}

.user-trust-badge,
.match-card-modern__intel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  padding: 3px 8px;
  vertical-align: middle;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  user-select: none;
  border: none;
  text-decoration: none;
}

.user-trust-badge:active,
.match-card-modern__intel-badge:active {
  transform: scale(0.95);
}

/* Account age badge: «с 2018» (soft blue) */
.user-trust-badge--year,
.user-trust-badge--soft-blue {
  background: #e6f2ff;
  color: #1a73e8;
  border: 1px solid rgba(26, 115, 232, 0.22);
}
.user-trust-badge--year:hover,
.user-trust-badge--soft-blue:hover {
  background: #d9ecff;
}

/* Account age badge: «новый аккаунт», created in the last 6 months (soft amber) */
.user-trust-badge--new,
.user-trust-badge--amber {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.user-trust-badge--new:hover,
.user-trust-badge--amber:hover {
  background: #fde68a;
}

.match-card-modern__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 1px;
}

.match-card-modern__type-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.3;
  flex-shrink: 0;
}

.match-card-modern__type-badge--trip {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.match-card-modern__type-badge--request {
  background: rgba(51, 144, 236, 0.12);
  color: #1d4ed8;
}

.match-card-modern__meta-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  line-height: 1.3;
}

.match-card-modern__meta-stat:active {
  transform: scale(0.92);
  opacity: 0.8;
}

.match-card-modern__meta-icon {
  font-size: 11px;
}

.match-card-modern__rating {
  color: #b45309;
}

/* Someone with no reviews and no trips yet: state it, don't show them as zeros. */
.match-card-modern__newbie {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  background: rgba(148, 163, 184, 0.16);
  padding: 2px 8px;
  border-radius: 6px;
}

.match-card-modern__trips {
  color: #2563eb;
}

.match-card-modern__route-date {
  font-size: 12.5px;
  color: #475569;
  margin-top: 2px;
  font-weight: 500;
  line-height: 1.35;
}

.match-card-modern__bio {
  font-size: 12px;
  color: #475569;
  margin-top: 5px;
  line-height: 1.45;
  /* overflow clips at the padding edge, which let the top of the clamped-away
     third line show through the bottom padding; clip at the content edge instead. */
  box-sizing: content-box;
  max-height: 2.9em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: clip;
  overflow-clip-margin: content-box;
  background: rgba(148, 163, 184, 0.08);
  padding: 5px 8px;
  border-radius: 8px;
  border-left: 2.5px solid rgba(51, 144, 236, 0.5);
  word-break: break-word;
}

.match-card-modern__bio.is-expanded {
  display: block;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.match-card-modern__bio-more {
  align-self: flex-end;
  margin-top: 2px;
  padding: 1px 2px;
  background: none;
  border: none;
  color: #1d6fc0;
  font-family: var(--font-family);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

/* 44px tap target without changing the layout */
.match-card-modern__bio-more::after {
  content: '';
  position: absolute;
  inset: -8px -12px;
}

.match-card-modern__bio-more:active {
  opacity: 0.7;
}

body.dark-theme .match-card-modern__bio-more {
  color: #38bdf8;
}

.match-card-modern__dots-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-self: flex-start;
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
  border: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, transform 0.15s ease;
}

.match-card-modern__dots-btn::after {
  content: '';
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: -6px;
  right: -6px;
}

.match-card-modern__dots-btn:hover {
  background: rgba(51, 144, 236, 0.12);
  color: #3390ec;
}

.match-card-modern__dots-btn:active {
  transform: scale(0.9);
}

.match-card-modern__bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.match-card-modern__tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.match-card-modern__price {
  font-size: 12.5px;
  color: #0f172a;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.06);
  padding: 3px 8px;
  border-radius: 8px;
}

.match-card-modern__tag {
  background: rgba(51, 144, 236, 0.08);
  color: #1d6fc0;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
}

.match-card-modern__actions-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.match-card-modern__btn-tg {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: rgba(51, 144, 236, 0.1);
  color: #1d6fc0;
  border: none;
  border-radius: 11px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-family);
  transition: background 0.15s ease, transform 0.15s ease;
}

.match-card-modern__btn-tg:hover {
  background: rgba(51, 144, 236, 0.16);
}

.match-card-modern__btn-tg:active {
  transform: scale(0.96);
}

.match-card-modern__btn-tg.is-restricted {
  opacity: 0.95;
}

.match-card-modern__btn-tg-lock {
  stroke: var(--danger, #ef4444) !important;
  color: var(--danger, #ef4444) !important;
  flex-shrink: 0;
}

.match-card-modern__btn-contact {
  background: #2f83d6;
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}

.match-card-modern__btn-contact:hover {
  background: #2980d4;
}

.match-card-modern__btn-contact:active {
  transform: scale(0.96);
}

/* Bottom Action Buttons */
.results-bottom-actions-wrap {
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.results-btn-track {
  width: 100%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #4facfe, #3390ec);
  color: #fff;
  border-radius: 16px;
  padding: 15px 0;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-family);
  box-shadow: 0 8px 20px rgba(51, 144, 236, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.results-btn-track:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.2);
}

.results-btn-new {
  width: 100%;
  border: 1px solid rgba(51, 144, 236, 0.25);
  cursor: pointer;
  background: #fff;
  color: #3390ec;
  border-radius: 16px;
  padding: 15px 0;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-family);
  transition: background 0.15s ease, transform 0.15s ease;
}

.results-btn-new:hover {
  background: rgba(51, 144, 236, 0.04);
}

.results-btn-new:active {
  transform: scale(0.98);
}

/* Request Form & Modal Subscription Toggle */
.form-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-card, #ffffff);
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-color, #e2e8f0);
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-toggle-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.form-toggle-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.35;
}

.form-toggle-desc {
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  line-height: 1.3;
}

body.dark-theme .form-toggle-row {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .form-toggle-title {
  color: #f8fafc;
}

body.dark-theme .form-toggle-desc {
  color: #94a3b8;
}

/* Request Card Notification Badge */
.acc-status-badge--notif {
  position: relative;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
  cursor: default;
  user-select: none;
}

.acc-status-badge--notif svg {
  width: 13px;
  height: 13px;
  transform-origin: top center;
  animation: bell-ring 3.5s ease-in-out infinite;
}

/* Subtle live pulse dot */
.notif-pulse-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  animation: notif-dot-pulse 2.2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes bell-ring {
  0%, 65%, 100% {
    transform: rotate(0);
  }
  70% {
    transform: rotate(14deg);
  }
  75% {
    transform: rotate(-12deg);
  }
  80% {
    transform: rotate(8deg);
  }
  85% {
    transform: rotate(-4deg);
  }
  90% {
    transform: rotate(0);
  }
}

@keyframes notif-dot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

body.dark-theme .acc-status-badge--notif {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

body.dark-theme .notif-pulse-dot {
  background: #34d399;
  animation-name: notif-dot-pulse-dark;
}

@keyframes notif-dot-pulse-dark {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  }
  70% {
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

/* Requests Count Badge on Segment Button */
#requests-count-badge {
  background: rgba(51, 144, 236, 0.12) !important;
  color: #3390ec !important;
  border: 1px solid rgba(51, 144, 236, 0.25) !important;
  border-radius: 12px;
  font-weight: 700;
  font-size: 11.5px;
  padding: 1px 7px;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
  vertical-align: middle;
}

body.dark-theme #requests-count-badge {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #818cf8 !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
}

/* Matches Badge - Warm Amber-Orange matching tabbar badge tone */
#matches-badge {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #d97706 !important;
  border: 1px solid rgba(217, 119, 6, 0.5) !important;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.dark-theme #matches-badge {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
}


/* ═══════════════ Motion & Feedback (ui.js companion) ═══════════════ */

/* ─── 1. Button loading / success ─── */

.tg-button .btn-label,
button.tg-button .btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tg-button.is-busy .btn-label,
.tg-button.is-done .btn-label {
  opacity: 0;
  transform: translateY(-6px);
}

.btn-spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.tg-button.is-busy .btn-spinner {
  opacity: 1;
  transform: scale(1);
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  to { transform: scale(1) rotate(360deg); }
}

.btn-tick {
  position: absolute;
  width: 22px;
  height: 22px;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.btn-tick svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tg-button.is-done,
button.tg-button.is-done {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.28);
}

.tg-button.is-done .btn-tick { opacity: 1; transform: scale(1); }

.tg-button:disabled,
button.tg-button:disabled { cursor: default; }

/* Disabled normally means "not available yet"; busy and done are states we
   are actively showing, so they keep full contrast. */
.tg-button:disabled:not(.is-busy):not(.is-done),
button.tg-button:disabled:not(.is-busy):not(.is-done) { opacity: 0.6; }

/* ─── 2. Toasts ─── */

.ui-toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: calc(min(var(--max-width), 100%) - 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}

.ui-toasts--above-tabbar { bottom: calc(86px + env(safe-area-inset-bottom)); }
.ui-toasts--above-composer { bottom: calc(92px + env(safe-area-inset-bottom)); }

.ui-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  cursor: pointer;
}

.ui-toast.is-shown { opacity: 1; transform: translateY(0) scale(1); }

.ui-toast__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent);
}

.ui-toast--success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 10px 25px rgba(22, 101, 52, 0.38);
  border: 1px solid rgba(134, 239, 172, 0.35);
  color: #fff;
}

.ui-toast--success .ui-toast__icon {
  background: #ffffff;
}

.ui-toast--success .ui-toast__icon svg {
  stroke: #15803d;
}

.ui-toast--error .ui-toast__icon { background: var(--danger); }

.ui-toast__icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-toast__text { flex: 1; min-width: 0; word-break: break-word; }

/* ─── 3. Cross-document page transitions ─── */

@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.26s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* The tab bar is shared by every page - hold it still while the page under
   it changes, instead of cross-fading it with everything else. */
.tabbar { view-transition-name: tabbar; }

/* ─── 4. Tab bar indicator ─── */

/* One name, carried by whichever tab is active. Across a navigation the two
   snapshots share it, so the dot travels instead of blinking on. */
.tabbar a.active::after {
  display: none !important;
  content: none !important;
}

.tabbar a.active .tabbar-icon {
  transform: none;
}

/* press feedback still wins while the finger is down */
.tabbar a:active .tabbar-icon { transform: scale(1.18); }

::view-transition-group(tab-indicator) {
  animation-duration: 0.42s;
  animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── 5. Field errors ─── */

.form-group.is-invalid > select,
.form-group.is-invalid > input,
.form-group.is-invalid > textarea,
.form-group.is-invalid > .input-trigger,
.form-group.is-invalid > .tag-list {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.13);
  animation: field-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.form-group.is-invalid > label { color: var(--danger); }

@keyframes field-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--danger);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
}

.form-group.is-invalid > .field-error { max-height: 44px; opacity: 1; }

.field-error svg {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ─── 6. Chat message entrance ─── */

/* Only messages explicitly marked on arrival animate: history paged in above
   the viewport must not move while the user is reading. */
.message-group.is-entering {
  animation: bubble-in 0.36s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── 7. Skeleton hand-off ─── */

/* Applied by UI.skeleton() to whatever element it is handed, so the fade
   never depends on the element being listed here by id. */
.ui-fading {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

/* .match-card already animates with fadeUp; --i turns a list into a cascade.
   Unstamped cards keep --i: 0 and behave exactly as before. */
.match-card { animation-delay: calc(var(--i, 0) * 70ms); }

/* ─── Reduced motion ─── */

/* The app ships ~40 keyframe animations; this is the single opt-out that
   covers all of them, including everything added above. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ─── Typing indicator ───
   The recipient's typing state already reaches the page over the websocket
   and shows as text in the header. This puts it where the reply will
   actually appear, at the foot of the thread. */

.typing-bubble {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 12px 14px;
  background: #fff;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-md);
  animation: bubble-in 0.36s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.typing-bubble span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: typing-dot 1.3s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) { animation-delay: 0.18s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.36s; }

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 480px) {
  .back-btn,
  .is-chat-page .back-btn {
    left: 0;
  }
}

/* ==========================================================================
   Parser Match Card (External Channel Requests)

   The app has no dark-mode switch yet; the overrides below follow the
   `body.dark-theme` convention already used in this file so they light up with
   the rest of the UI when one lands.
   ========================================================================== */
:root {
  --parser-accent: #0369a1;
  --parser-accent-strong: #075985;
  --parser-accent-soft: rgba(2, 132, 199, 0.08);
}

.match-card-parser {
  border-left: 3.5px solid var(--parser-accent) !important;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.06) 0%, rgba(2, 132, 199, 0.01) 100%), rgba(255, 255, 255, 0.88);
  position: relative;
}

body.dark-theme .match-card-parser {
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.12) 0%, rgba(2, 132, 199, 0.04) 100%), rgba(30, 41, 59, 0.9);
}

/* Author avatar with Telegram blue gradient */
.parser-card__avatar {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(34, 158, 217, 0.35);
  overflow: hidden;
  padding: 0;
}

.parser-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.parser-card__avatar-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #229ED9;
  border: 1.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

body.dark-theme .parser-card__avatar-badge {
  border-color: #1e293b;
}

.parser-card__title-row {
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  align-items: baseline;
}

.parser-card__username {
  font-size: 13px;
  font-weight: 500;
  color: #0284c7;
  opacity: 0.85;
  white-space: nowrap;
}

body.dark-theme .parser-card__username {
  color: #7dd3fc;
}

.parser-card__meta-row {
  gap: 6px;
  margin-top: 3px;
  min-width: 0;
  align-items: center;
}

.parser-card__channel-source {
  font-size: 11.5px;
  color: #64748b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark-theme .parser-card__channel-source {
  color: #94a3b8;
}

.parser-card__snippet {
  margin-top: 7px;
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(2, 132, 199, 0.05);
  border-left: 2.5px solid var(--parser-accent);
  font-size: 12.5px;
  line-height: 1.45;
  color: #334155;
  font-style: italic;
  word-break: break-word;
  box-sizing: content-box;
  max-height: 2.9em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: clip;
  overflow-clip-margin: content-box;
}

.parser-card__snippet.is-expanded {
  display: block;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

body.dark-theme .parser-card__snippet {
  background: rgba(0, 0, 0, 0.25);
  color: #cbd5e1;
}

.parser-card__quote {
  color: var(--parser-accent);
  font-weight: 700;
  font-size: 13px;
  margin: 0 2px;
}

body.dark-theme .parser-card__quote {
  color: #7dd3fc;
}

/* Both actions share one row; the post link narrows before the primary one. */
.parser-card__actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.parser-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--parser-accent) 0%, var(--parser-accent-strong) 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 3px 10px rgba(3, 105, 161, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.parser-card__btn > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parser-card__btn svg {
  flex: 0 0 auto;
  fill: #ffffff;
}

.parser-card__btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(3, 105, 161, 0.4);
}

.parser-card__btn:active {
  transform: scale(0.98);
}

.parser-card__btn--contact,
.parser-card__btn--post {
  width: 100%;
  flex: 1 1 100%;
}

/* The two actions stay side by side at every width; only their padding and
   gap give way so both labels still fit on the narrowest phones. The badge,
   however, would eat the channel name down to a couple of letters, so the
   title row is the one that wraps. */
@media (max-width: 360px) {
  .parser-card__actions {
    gap: 6px;
  }

  .parser-card__btn {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 12.5px;
    gap: 5px;
  }

  .parser-card__btn--contact {
    min-width: 95px;
    flex: 0 0 auto;
  }

  .parser-card__btn--post {
    flex: 1 1 auto;
  }

  .parser-card__title-row {
    flex-wrap: wrap;
  }

  .parser-card__channel-name {
    flex: 1 1 100%;
  }
}

/* ═══════════════ Route Two-Window City Autocomplete ═══════════════ */

.form-section-card {
  position: relative;
}

.form-section-card:nth-child(1) { z-index: 35; }
.form-section-card:nth-child(2) { z-index: 25; }
.form-section-card:nth-child(3) { z-index: 15; }
.form-section-card:nth-child(4) { z-index: 5; }

.form-section-card:focus-within,
.form-section-card:has(.route-dropdown:not([style*="display: none"])) {
  z-index: 100 !important;
}

.route-two-windows-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 10;
}

.route-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 5;
}

.route-field-group:focus-within,
.route-field-group:has(.route-dropdown:not([style*="display: none"])) {
  z-index: 25;
}

.route-field-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding-left: 2px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-soft, #f8fafc);
  border: 1.5px solid rgba(51, 144, 236, 0.12);
  border-radius: var(--radius-md, 14px);
  min-height: 52px;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.route-input-wrapper:focus-within {
  border-color: var(--accent, #3390ec);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(51, 144, 236, 0.08), inset 0 0 0 transparent;
}

.route-input-icon {
  display: none;
}

.route-city-input {
  flex: 1;
  height: 52px;
  border: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  padding: 0 36px 0 16px;
  outline: none;
}

.route-city-input::placeholder {
  color: var(--subtext);
  opacity: 0.7;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
}

.route-clear-btn {
  position: absolute;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--line, #e2e8f0);
  border: none;
  color: var(--subtext);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s ease;
  z-index: 5;
}

.route-clear-btn:hover {
  background: var(--accent-light, rgba(51, 144, 236, 0.15));
  color: var(--accent, #3390ec);
}

/* Swap Button Divider */
.route-swap-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 34px;
  margin: 12px 0;
  z-index: 6;
}

.route-swap-line {
  position: absolute;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--line, #e2e8f0);
}

.route-swap-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  color: var(--accent, #3390ec);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.route-swap-btn:hover {
  background: var(--accent-light, rgba(51, 144, 236, 0.1));
  border-color: var(--accent, #3390ec);
  transform: scale(1.08);
}

.route-swap-btn:active {
  transform: scale(0.92) rotate(180deg);
}

/* Route Autocomplete Dropdown */
.route-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-md, 14px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1050;
  padding: 6px 0;
  -webkit-overflow-scrolling: touch;
  animation: routeDropIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.route-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.route-dropdown-item:hover,
.route-dropdown-item.is-active {
  background: var(--accent-light, rgba(51, 144, 236, 0.08));
}

.route-dropdown-flag {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.route-dropdown-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.route-dropdown-city {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.route-dropdown-country {
  font-size: 12px;
  color: var(--subtext);
  margin-top: 2px;
  line-height: 1.2;
}

.route-highlight {
  background: transparent;
  color: var(--accent, #3390ec);
  font-weight: 700;
}

.route-dropdown-empty {
  padding: 18px 14px;
  text-align: center;
  color: var(--subtext);
  font-size: 14px;
}

/* ═══════════════ Account check sheet (js/account_check.js) ═══════════════ */
#account-check-modal .bsheet {
  max-height: 88vh;
  overflow-y: auto;
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}

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

.acc-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
}

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

.acc-top-txt {
  min-width: 0;
}

.acc-cap {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #64748b;
}

.acc-name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.acc-spam {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.acc-spam-ic {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #e11d48);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-spam b {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.3;
  color: #b91c1c;
}

.acc-spam span:not(.acc-spam-ic) {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: #7f1d1d;
}

.acc-box {
  border-radius: 20px;
  background: #f4f9ff;
  border: 1px solid rgba(51, 144, 236, 0.12);
  padding: 2px 16px;
}

.acc-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.acc-row:last-child {
  border-bottom: none;
}

.acc-row-ic {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #e7f3ff;
  color: #3390ec;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-row-ic svg {
  width: 20px;
  height: 20px;
}

.acc-row-txt {
  min-width: 0;
}

.acc-row-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #64748b;
}

.acc-row-value {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #0f172a;
}

.acc-row-hint {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #64748b;
}

.acc-photo-gallery {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.acc-photo-gallery::-webkit-scrollbar {
  display: none;
}

.acc-photo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.acc-photo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid rgba(51, 144, 236, 0.2);
  background: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.acc-photo-date {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.acc-state {
  padding: 28px 8px;
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  color: #64748b;
}

.acc-foot {
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
  text-align: center;
  text-wrap: balance;
}

.acc-foot a {
  color: #3390ec;
  font-weight: 700;
  text-decoration: none;
}

#account-check-modal .btn {
  width: 100%;
  min-height: 52px;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

[data-theme="dark"] .acc-name,
body.dark-theme .acc-name,
[data-theme="dark"] .acc-row-value,
body.dark-theme .acc-row-value {
  color: #f8fafc;
}

[data-theme="dark"] .acc-cap,
body.dark-theme .acc-cap,
[data-theme="dark"] .acc-row-label,
body.dark-theme .acc-row-label,
[data-theme="dark"] .acc-row-hint,
body.dark-theme .acc-row-hint,
[data-theme="dark"] .acc-foot,
body.dark-theme .acc-foot,
[data-theme="dark"] .acc-state,
body.dark-theme .acc-state {
  color: #94a3b8;
}

[data-theme="dark"] .acc-photo-thumb,
body.dark-theme .acc-photo-thumb {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .acc-photo-date,
body.dark-theme .acc-photo-date {
  color: #94a3b8;
}

[data-theme="dark"] .acc-box,
body.dark-theme .acc-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .acc-row,
body.dark-theme .acc-row {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .acc-row-ic,
body.dark-theme .acc-row-ic {
  background: rgba(51, 144, 236, 0.16);
  color: #7cc0ff;
}

[data-theme="dark"] .acc-spam,
body.dark-theme .acc-spam {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .acc-spam b,
body.dark-theme .acc-spam b {
  color: #fca5a5;
}

[data-theme="dark"] .acc-spam span:not(.acc-spam-ic),
body.dark-theme .acc-spam span:not(.acc-spam-ic) {
  color: #fecaca;
}
