/* Sprint — design tokens (как Flutter AppColors + PlatformSizes) */
:root {
  --primary: #015eea;
  --primary-dark: #0147b8;
  --primary-variant: #00c0fa;
  --accent-orange: #ff9800;
  --accent-orange-soft: rgba(255, 152, 0, 0.12);
  --accent-green: #388e3c;
  --surface: #f0f4f8;
  --surface-variant: #e8eef2;
  --surface-elevated: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --border: rgba(26, 29, 33, 0.08);
  --border-strong: rgba(26, 29, 33, 0.12);
  --text-primary: #1a1d21;
  --text-secondary: #4a4c52;
  --text-tertiary: #6a6c72;
  --text-muted: #8a8c92;
  --like: #e53935;
  --radius-card: 14px;
  --radius-ui: 28px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(26, 29, 33, 0.05);
  --shadow: 0 4px 24px -4px rgba(26, 29, 33, 0.1);
  --shadow-lg: 0 20px 50px -12px rgba(1, 94, 234, 0.18);
  --shadow-card: 0 4px 20px rgba(26, 29, 33, 0.04), 0 1px 6px rgba(26, 29, 33, 0.02);
  --shadow-header: 0 4px 12px rgba(26, 29, 33, 0.12);
  --shadow-nav: 0 -4px 20px rgba(26, 29, 33, 0.06);
  --shadow-fab: 0 8px 20px rgba(1, 94, 234, 0.35), 0 4px 12px rgba(26, 29, 33, 0.08);
  --gradient-brand: linear-gradient(135deg, #015eea 0%, #00c0fa 100%);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(0, 192, 250, 0.2), transparent),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(255, 152, 0, 0.1), transparent);
  --app-header-height: 76px;
  --bottom-nav-height: 72px;
  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

.page-landing main { overflow-x: hidden; }

/* ——— Header ——— */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem clamp(1rem, 4vw, 2.5rem);
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.landing-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}
.landing-logo-img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(1, 94, 234, 0.2);
}

.landing-header nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.landing-header nav > a:not(.btn) {
  padding: 0.5rem 0.875rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  text-decoration: none;
}
.landing-header nav > a:not(.btn):hover {
  background: rgba(1, 94, 234, 0.08);
  color: var(--primary);
  text-decoration: none;
}

.landing-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  background: var(--surface-elevated);
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-ui);
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

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

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(1, 94, 234, 0.35);
}
.btn-primary:hover {
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(1, 94, 234, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface-elevated);
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  background: rgba(1, 94, 234, 0.04);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }

.btn-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  transition: background var(--transition), color var(--transition);
}
.btn-link:hover { background: rgba(15, 23, 42, 0.06); color: var(--text-primary); }
.btn-link.danger { color: #ef4444; }
.btn-link.danger:hover { background: #fef2f2; }

/* ——— Hero / Landing ——— */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem clamp(1.25rem, 5vw, 3rem);
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero::before {
  width: 400px;
  height: 400px;
  background: rgba(1, 94, 234, 0.2);
  top: -100px;
  right: -80px;
}
.hero::after {
  width: 300px;
  height: 300px;
  background: rgba(255, 152, 0, 0.15);
  bottom: -60px;
  left: -60px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: center;
}
.hero-content-wide { max-width: 760px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(1, 94, 234, 0.1);
  border: 1px solid rgba(1, 94, 234, 0.15);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  text-align: left;
  line-height: 1.7;
}
.hero-lead strong { color: var(--text-primary); font-weight: 600; }

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-section {
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 5vw, 2rem);
}

.landing-section.landing-highlight {
  background: linear-gradient(180deg, rgba(1, 94, 234, 0.04) 0%, rgba(255, 152, 0, 0.06) 100%);
}

.landing-section.landing-web {
  background: var(--surface-elevated);
  border-top: 1px solid var(--border);
}

.landing-inner {
  max-width: 760px;
  margin: 0 auto;
}

.landing-inner h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.landing-inner h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.section-lead {
  color: var(--text-secondary);
  margin: 0 0 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.landing-callout {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.landing-callout::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-green), #34d399);
}
.landing-callout h3 {
  color: var(--accent-green);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.landing-callout p { margin: 0; color: var(--text-secondary); }

.landing-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.landing-list li { margin-bottom: 0.625rem; }

.landing-list-check {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.landing-list-check li {
  padding: 1rem 1.25rem 1rem 3rem;
  position: relative;
  background: var(--surface-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  font-weight: 500;
}
.landing-list-check li::before {
  content: '';
  position: absolute;
  left: 1.125rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: var(--accent-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
  border-radius: 50%;
}

.feature-block {
  margin-bottom: 2.5rem;
  padding: 1.75rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.feature-block h3 {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.feature-block h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.features-3 { margin-top: 0.5rem; }

.feature-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(1, 94, 234, 0.08);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.feature-card h3 {
  margin: 0 0 0.5rem;
  color: var(--text-primary);
  font-size: 1.0625rem;
  font-weight: 700;
}
.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ——— Auth ——— */
.auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--surface);
}

.auth-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 400px;
  border: none;
  box-shadow: var(--shadow-card);
}
.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: var(--radius-ui);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-ui);
}
.auth-heading {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.auth-subheading {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}
.auth-links {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-muted);
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-ui);
  font: inherit;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(1, 94, 234, 0.12);
}

.text-danger { color: #ef4444; font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }

.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
}
.alert-info {
  background: rgba(1, 94, 234, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(1, 94, 234, 0.15);
}
.alert-warning {
  background: var(--accent-orange-soft);
  color: #b45309;
  border: 1px solid rgba(255, 152, 0, 0.25);
}
.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.inline-form { display: inline; }

/* ——— Web app shell (SprintApp в браузере) ——— */
.page-app {
  background: var(--surface);
}

.page-app .landing-footer { display: none; }

.page-app main {
  padding: 0;
}

.web-app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.sprint-logo {
  display: block;
  border-radius: 10px;
  flex-shrink: 0;
}

.web-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.web-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.web-brand:hover { text-decoration: none; }

.web-brand-logo {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(1, 94, 234, 0.2);
}

.web-brand-name {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.web-header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.web-header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.web-header-link:hover {
  background: rgba(1, 94, 234, 0.06);
  color: var(--primary);
  text-decoration: none;
}
.web-header-link.active {
  background: rgba(1, 94, 234, 0.1);
  color: var(--primary);
}

.web-header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.web-header-logout {
  font-size: 0.875rem;
  padding: 0.375rem 0.625rem;
}

.web-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 4px;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--accent-orange);
  color: #fff;
}

.web-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
}

.web-page {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.web-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.web-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.web-page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-filter .form-select {
  min-width: 118px;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: var(--radius-ui);
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text-primary);
}

.page-lead,
.page-intro {
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 56ch;
}

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


.app-record-banner {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(1, 94, 234, 0.06);
  border-radius: var(--radius-card);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.app-record-banner p { margin: 0; }

.web-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--border);
  padding: 0.375rem 0.5rem calc(0.375rem + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-nav);
}

.web-bottom-nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 0.25rem;
  border-radius: var(--radius-ui);
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.web-bottom-nav-item:hover {
  color: var(--primary);
  text-decoration: none;
}
.web-bottom-nav-item.active {
  color: var(--primary);
  background: rgba(1, 94, 234, 0.1);
}
.web-bottom-nav-icon-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.app-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.125rem;
  margin-bottom: 1.25rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  box-shadow: 0 4px 16px rgba(26, 29, 33, 0.06);
  border: 1px solid rgba(26, 29, 33, 0.04);
}
.app-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(1, 94, 234, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}
.app-profile-avatar svg {
  width: 32px;
  height: 32px;
  opacity: 0.85;
}
.app-profile-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.app-profile-city {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.page-toolbar {
  margin-bottom: 1rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-list-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .activity-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.web-page .activity-card-wrap {
  padding: 0;
  margin-bottom: 0;
}

/* Dashboard */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-stat-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  border-top: 4px solid var(--primary);
  transition: box-shadow var(--transition), transform var(--transition);
}
.dash-stat-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  text-decoration: none;
}
.dash-stat-orange { border-top-color: var(--accent-orange); }
.dash-stat-value {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.dash-stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.dash-panel {
  background: var(--surface-elevated);
  border: none;
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.dash-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.dash-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.dash-panel-head a {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Activity table (web lists) */
.activity-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-table-head {
  display: grid;
  grid-template-columns: 100px 90px 1fr 1fr 1fr 1fr 32px;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.activity-table-head + .month-header { margin-top: 1.5rem; }

.activity-row {
  display: grid;
  grid-template-columns: 100px 90px 1fr 1fr 1fr 1fr 32px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.875rem 1rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.activity-row:hover {
  border-color: rgba(1, 94, 234, 0.25);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.activity-row-date { font-weight: 600; }
.activity-row-type {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  width: fit-content;
}
.row-sprint .activity-row-type {
  background: rgba(1, 94, 234, 0.1);
  color: var(--primary);
}
.row-challenge .activity-row-type {
  background: var(--accent-orange-soft);
  color: #c2410c;
}
.activity-row-metric { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.activity-row-owner { color: var(--text-muted); font-size: 0.875rem; }
.activity-row-arrow { color: var(--text-muted); text-align: right; }

.activity-row-wrap,
.activity-card-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.activity-card-wrap {
  padding: 0 1rem;
  margin-bottom: 8px;
}
.activity-row-wrap .activity-row,
.activity-card-wrap .activity-card {
  flex: 1;
  min-width: 0;
}

.activity-like-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 2.25rem;
  padding: 4px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text-muted);
  border-radius: 20px;
  transition: color var(--transition), transform var(--transition);
}
.activity-like-btn:hover {
  color: var(--like);
  transform: scale(1.05);
}
.activity-like-btn.active {
  color: var(--like);
}
.activity-like-btn.active .activity-like-svg {
  fill: var(--like);
}
.activity-like-svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.activity-like-btn.active .activity-like-svg {
  stroke: none;
  fill: var(--like);
}
.activity-like-count {
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-height: 0.875rem;
  color: inherit;
}

/* Экран активности — карта на весь экран, sheet поверх (как в приложении) */
.page-activity-detail .web-page {
  max-width: none;
  margin: 0;
  padding: 0;
  padding-bottom: 0 !important;
}

.page-activity-detail {
  --web-header-height: 57px;
}

.activity-detail-layout {
  position: relative;
  min-height: calc(100dvh - var(--web-header-height));
  overflow: hidden;
}

.activity-detail-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.activity-detail-map .activity-map {
  height: 100%;
  min-height: calc(100dvh - var(--web-header-height));
  margin: 0;
  border-radius: 0;
}

.activity-detail-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  pointer-events: none;
}

.activity-detail-back,
.activity-detail-title,
.activity-detail-toolbar-spacer {
  pointer-events: auto;
}

.activity-detail-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(26, 29, 33, 0.12);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.activity-detail-back:hover {
  background: #fff;
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.activity-detail-title {
  justify-self: center;
  max-width: 100%;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-ui);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(26, 29, 33, 0.12);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-detail-toolbar-spacer {
  width: 48px;
  height: 48px;
}

.page-activity-detail .activity-map .leaflet-top.leaflet-left {
  top: 4.75rem;
  left: auto;
  right: 0.75rem;
}

.map-unavailable,
.map-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
}
.map-loading { color: var(--text-secondary); }

/* Map START / FINISH labels (как MapPolylineView в приложении) */
.leaflet-div-icon.map-track-label {
  background: transparent;
  border: none;
}
.map-track-label span {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--primary);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(26, 29, 33, 0.25);
  white-space: nowrap;
}
.map-track-label--finish span {
  background: var(--text-secondary);
}
.map-track-label--challenge span {
  background: var(--accent-orange);
}

/* Bottom sheet поверх карты */
.activity-detail-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface-elevated);
  border-radius: var(--radius-ui) var(--radius-ui) 0 0;
  box-shadow: 0 -4px 24px rgba(26, 29, 33, 0.12);
  border: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 640px);
  overflow: hidden;
}
.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 12px auto 16px;
  border-radius: 2px;
  background: rgba(74, 76, 82, 0.35);
  flex-shrink: 0;
}
.sheet-peek {
  padding: 0 20px 12px;
  flex-shrink: 0;
}
.sheet-date-block {
  text-align: center;
  margin-bottom: 12px;
}
.sheet-date-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.sheet-time-line {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.activity-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 12px 4px;
  margin-bottom: 4px;
}
.activity-metrics-row.metric-accent-orange .metric-cell-icon {
  color: var(--accent-orange);
}
.activity-metrics-row.metric-accent-primary .metric-cell-icon {
  color: var(--primary);
}
.metric-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.metric-cell-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  margin-bottom: 4px;
}
.metric-cell-value {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.metric-cell-diff {
  font-size: 0.6875rem;
  font-weight: 600;
  margin-top: 2px;
  color: var(--text-secondary);
}
.metric-cell-diff.diff-better { color: #2e7d32; }
.metric-cell-diff.diff-worse { color: #c62828; }
.metric-cell-label {
  margin-top: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}
.sheet-reactions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 8px 0 4px;
}
.sheet-reactions .detail-like-btn {
  flex-direction: row;
  gap: 0;
  padding: 0.25rem;
}
.sheet-reactions .detail-like-btn .activity-like-count {
  display: none;
}
.detail-likers-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem;
}
.detail-likers-count:hover {
  color: var(--primary);
  text-decoration: none;
}
.sheet-peek-action {
  padding: 0.75rem 20px 0;
}
.sheet-section-subtitle {
  margin: -0.25rem 0 0.625rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.sheet-empty-text {
  margin: 0;
  padding: 1rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.sheet-leave-form {
  margin-top: 0.75rem;
}
.sheet-participants-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.75rem 0.25rem 0.25rem;
  margin: 0 -0.25rem;
  scrollbar-width: none;
}
.sheet-participants-strip::-webkit-scrollbar {
  display: none;
}
.participant-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  min-width: 72px;
  max-width: 72px;
  color: inherit;
  text-decoration: none;
}
.participant-avatar-item:hover {
  color: inherit;
  text-decoration: none;
}
.participant-avatar-circle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}
.participant-avatar-item.participant-pending .participant-avatar-circle {
  opacity: 0.55;
}
.participant-pending-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  font-size: 0.625rem;
  line-height: 1;
}
.participant-invite-circle {
  background: rgba(1, 94, 234, 0.12);
  color: var(--primary);
}
.participant-avatar-label {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.participant-invite-item .participant-avatar-label {
  color: var(--primary);
}
.participant-avatar-item.participant-pending .participant-avatar-label {
  color: #e65100;
}
.challenge-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.25rem;
  border-radius: 12px;
  background: rgba(26, 29, 33, 0.03);
}
.challenge-sheet-row {
  display: grid;
  grid-template-columns: 4px 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background var(--transition);
}
.challenge-sheet-row:hover {
  background: rgba(1, 94, 234, 0.04);
  color: inherit;
  text-decoration: none;
}
.challenge-sheet-accent {
  align-self: stretch;
  border-radius: 2px;
  background: var(--accent-orange);
}
.challenge-sheet-main {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.challenge-sheet-time {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.challenge-sheet-distance {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.challenge-sheet-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-end;
}
.challenge-sheet-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
}
.sheet-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 24px;
  border-top: 1px solid var(--border);
}
.sheet-section { margin-bottom: 1.25rem; }
.sheet-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  text-transform: none;
}
.activity-note-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
  margin-bottom: 0.5rem;
}
.activity-note-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--text);
}

.legal-page {
  padding: 2rem 1rem 3rem;
}
.legal-inner {
  max-width: 760px;
  margin: 0 auto;
}
.legal-title {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
}
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.legal-card h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.legal-card p,
.legal-card li {
  line-height: 1.6;
}
.legal-muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sheet-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sheet-user-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.sheet-user-list li:last-child { border-bottom: none; }
.sheet-user-list-actions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.sheet-gpx-btn { margin-top: 0.5rem; }
.activity-detail-alert {
  position: absolute;
  top: 4.5rem;
  left: 1rem;
  right: 1rem;
  z-index: 25;
  margin: 0;
  max-width: 720px;
  margin-inline: auto;
}

.hide-sm { display: block; }

@media (min-width: 901px) {
  .activity-detail-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    align-items: stretch;
  }

  .activity-detail-map {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    min-height: calc(100dvh - var(--web-header-height));
  }

  .activity-detail-map .activity-map {
    min-height: calc(100dvh - var(--web-header-height));
    height: 100%;
  }

  .activity-detail-sheet {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    height: calc(100dvh - var(--web-header-height));
    max-height: none;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 24px rgba(26, 29, 33, 0.06);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-scroll {
    overflow: visible;
    flex: none;
    border-top: none;
    padding-top: 0;
  }

  .activity-detail-alert {
    grid-column: 1 / -1;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: 0.75rem 1rem 0;
  }
}

@media (max-width: 900px) {
  .web-header-nav,
  .web-header-user .web-header-logout {
    display: none;
  }
  .web-header {
    justify-content: space-between;
  }
  .web-page {
    padding-bottom: calc(var(--bottom-nav-height) + 1rem);
  }
  .web-bottom-nav { display: flex; }
  .dash-columns { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr; }
  .activity-list-grid { grid-template-columns: 1fr; }
  .activity-table-head { display: none; }
  .hide-sm { display: none !important; }
  .page-activity-detail {
    --web-header-height: 53px;
  }
  .page-activity-detail .activity-detail-layout {
    min-height: calc(100dvh - var(--web-header-height) - var(--bottom-nav-height));
  }
  .page-activity-detail .activity-detail-map .activity-map {
    min-height: calc(100dvh - var(--web-header-height) - var(--bottom-nav-height));
  }
  .page-activity-detail .activity-detail-sheet {
    bottom: var(--bottom-nav-height);
    max-height: min(68vh, calc(100dvh - var(--web-header-height) - var(--bottom-nav-height) - 4rem));
  }
}

@media (max-width: 600px) {
  .web-page-title { font-size: 1.25rem; }
  .web-page-head { margin-bottom: 1rem; }
}

.month-header {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 1.25rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.activity-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid rgba(26, 29, 33, 0.04);
  box-shadow: var(--shadow-card);
  flex: 1;
  min-width: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}
.activity-card-link:hover .activity-card {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(26, 29, 33, 0.08);
}

.activity-card-link {
  display: flex;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
}
.activity-card-link:hover {
  text-decoration: none;
  color: inherit;
}

.activity-card-accent {
  width: 62px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  color: #fff;
}

.accent-primary .activity-card-accent {
  background: var(--primary);
}
.accent-orange .activity-card-accent {
  background: var(--accent-orange);
}

.activity-stripe-date {
  text-align: center;
  line-height: 1.2;
}
.stripe-day {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
}
.stripe-weekday {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 2px;
}

.activity-card-body {
  padding: 8px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.tag {
  font-size: 0.5625rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(74, 76, 82, 0.12);
  color: var(--text-secondary);
}
.tag-primary {
  background: rgba(1, 94, 234, 0.12);
  color: var(--primary);
}
.tag-orange {
  background: var(--accent-orange-soft);
  color: var(--accent-orange);
}
.tag-owner {
  background: rgba(74, 76, 82, 0.12);
  color: var(--text-secondary);
}

.activity-card-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activity-distance {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.activity-metrics-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.activity-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.metric-icon {
  width: 12px;
  height: 12px;
  opacity: 0.85;
}

.activity-time-line {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  border: 1px dashed var(--border);
  box-shadow: var(--shadow-card);
}
.empty-state p:first-child {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* ——— Activity detail ——— */
.activity-map {
  height: 300px;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.detail-panel {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.metric-box {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.metric-box .label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.metric-box .value {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.detail-time-line {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.detail-reactions-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.detail-like-btn {
  flex-direction: row;
  gap: 6px;
}
.detail-like-btn .activity-like-count {
  font-size: 0.8125rem;
}
.detail-likers-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.owner-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.reactions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1.25rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.reaction-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-full);
  padding: 0.375rem 0.875rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition);
}
.reaction-btn:hover {
  border-color: var(--primary);
  background: rgba(1, 94, 234, 0.06);
}
.reaction-btn.active {
  border-color: var(--primary);
  background: rgba(1, 94, 234, 0.12);
  color: var(--primary);
}

.detail-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.detail-section h4 {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.user-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.user-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.user-list li:last-child { border-bottom: none; }

/* ——— Profile ——— */
.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  box-shadow: 0 4px 16px rgba(26, 29, 33, 0.06);
  border: 1px solid rgba(26, 29, 33, 0.04);
}
.profile-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(1, 94, 234, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-card-avatar svg {
  width: 32px;
  height: 32px;
}
.profile-card-body {
  flex: 1;
  min-width: 0;
}
.profile-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.profile-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
  padding: 0.25rem;
  border-radius: 8px;
  transition: background var(--transition);
}
.profile-card-stat:hover {
  background: rgba(1, 94, 234, 0.05);
  text-decoration: none;
  color: inherit;
}
.profile-card-stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.profile-card-stat-num.accent-orange {
  color: var(--accent-orange);
}
.profile-card-stat-label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.profile-card-meta {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.profile-card-meta-sep {
  margin: 0 0.25rem;
}

.profile-stats-section {
  margin-top: 0.5rem;
}
.profile-stats-heading {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.profile-section-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}
.profile-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  padding: 0.75rem 0.25rem;
  margin-bottom: 0.5rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  border: 1px solid rgba(26, 29, 33, 0.04);
  box-shadow: var(--shadow-sm);
}
.profile-metrics-row .metric-cell-icon {
  color: var(--primary);
}

@media (max-width: 600px) {
  .profile-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-card-stats {
    gap: 0.25rem;
  }
  .profile-card-stat-num {
    font-size: 1.125rem;
  }
}

.profile-heatmap-card {
  padding: 0.75rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  border: 1px solid rgba(26, 29, 33, 0.04);
  box-shadow: var(--shadow-sm);
}
.profile-heatmap-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}
.profile-heatmap-grid {
  min-width: max-content;
}
.profile-heatmap-months {
  display: grid;
  grid-template-columns: repeat(var(--heatmap-cols), 22px);
  gap: 2px;
  margin-left: 26px;
  margin-bottom: 2px;
}
.profile-heatmap-month {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
}
.profile-heatmap-body {
  display: flex;
  gap: 4px;
}
.profile-heatmap-weekdays {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 22px;
  flex-shrink: 0;
}
.profile-heatmap-weekdays span {
  height: 22px;
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.profile-heatmap-cells {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-heatmap-row {
  display: grid;
  grid-template-columns: repeat(var(--heatmap-cols), 22px);
  gap: 2px;
}
.profile-heatmap-cell {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 2px;
  padding: 0;
  background: rgba(26, 29, 33, 0.06);
}
.profile-heatmap-cell.has-data {
  background: rgba(1, 94, 234, calc(var(--heat-intensity, 0.15)));
  cursor: pointer;
}
.profile-heatmap-cell.has-data:hover {
  outline: 1px solid rgba(1, 94, 234, 0.35);
}
.profile-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.profile-heatmap-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.profile-heatmap-legend-swatch.level-0 { background: rgba(26, 29, 33, 0.06); }
.profile-heatmap-legend-swatch.level-1 { background: rgba(1, 94, 234, 0.25); }
.profile-heatmap-legend-swatch.level-2 { background: rgba(1, 94, 234, 0.55); }
.profile-heatmap-legend-swatch.level-3 { background: rgba(1, 94, 234, 0.9); }

.profile-day-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.profile-day-modal[hidden] {
  display: none !important;
}
.profile-day-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 29, 33, 0.35);
}
.profile-day-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  padding: 1.25rem;
  box-shadow: 0 12px 40px rgba(26, 29, 33, 0.18);
}
.profile-day-modal-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}
.profile-day-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.profile-day-chip {
  display: inline-flex;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: rgba(1, 94, 234, 0.1);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
}
.profile-day-chip.accent-orange {
  background: rgba(255, 152, 0, 0.12);
  color: var(--accent-orange);
}
.profile-day-empty {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.profile-menu-wrap {
  position: relative;
}
.profile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  box-shadow: var(--shadow-card);
  padding: 0.375rem;
  z-index: 80;
}
.profile-menu-dropdown[hidden] {
  display: none !important;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.875rem;
  border-radius: calc(var(--radius-ui) - 2px);
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}
.profile-menu-item:hover {
  background: rgba(1, 94, 234, 0.06);
  text-decoration: none;
  color: inherit;
}
.profile-menu-item.danger {
  color: #ef4444;
}
.profile-menu-logout {
  margin: 0;
}

.profile-friend-action {
  margin-bottom: 1.25rem;
}
.btn-friend-action {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-ui);
  font-weight: 600;
  border: none;
}
.btn-friend-action:not(.is-friend) {
  background: var(--primary);
  color: #fff;
}
.btn-friend-action.is-friend {
  background: rgba(1, 94, 234, 0.12);
  color: var(--primary);
  border: 1px solid rgba(1, 94, 234, 0.2);
}

.profile-legal-links {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.profile-legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.profile-legal-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.profile-legal-links span {
  margin: 0 0.375rem;
}

.profile-friends-list {
  margin-top: 0.5rem;
}

.profile-header {
  margin-bottom: 1.5rem;
  text-align: left;
}
.profile-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
}

.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-chip {
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  padding: 1rem 0.75rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(26, 29, 33, 0.04);
  box-shadow: 0 4px 16px rgba(26, 29, 33, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}
.stat-chip.accent-orange .stat-num { color: var(--accent-orange); }
.stat-chip .stat-num { color: var(--primary); }

.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.period-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.375rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  overflow-x: auto;
  box-shadow: 0 2px 12px rgba(26, 29, 33, 0.06);
  border: 1px solid rgba(26, 29, 33, 0.04);
}

.period-tab {
  flex: 1;
  text-align: center;
  padding: 0.625rem 0.75rem;
  border-radius: calc(var(--radius-ui) - 2px);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-tertiary);
  white-space: nowrap;
  transition: all var(--transition);
}
.period-tab:hover {
  color: var(--primary);
  text-decoration: none;
}
.period-tab.active {
  background: var(--primary);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  background: var(--surface-elevated);
  padding: 1rem;
  border-radius: var(--radius-ui);
  border: 1px solid rgba(26, 29, 33, 0.04);
  box-shadow: var(--shadow-sm);
}
.stat-box span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.stat-box strong {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.heatmap-section h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

.heat-cell {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.heat-cell.level-1 {
  background: rgba(1, 94, 234, 0.15);
  color: var(--primary);
  border-color: rgba(1, 94, 234, 0.2);
}
.heat-cell.level-2 {
  background: rgba(1, 94, 234, 0.35);
  color: #fff;
  border-color: transparent;
}
.heat-cell.level-3 {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(1, 94, 234, 0.3);
}

.profile-menu { margin-top: 2rem; }

.menu-item {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(26, 29, 33, 0.04);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.menu-item:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  text-decoration: none;
}
.menu-item.danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}
.menu-item.danger:hover {
  background: #fef2f2;
}

.profile-actions {
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ——— Friends ——— */
.friends-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  margin-bottom: 0.625rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.friend-row:hover {
  box-shadow: var(--shadow-card);
}
.friend-row a {
  font-weight: 600;
  font-size: 1rem;
}

.friends-list-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(26, 29, 33, 0.04);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.friend-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(26, 29, 33, 0.08);
}

.friend-card-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.friend-card-main:hover {
  text-decoration: none;
  color: inherit;
  background: rgba(1, 94, 234, 0.04);
}

.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(1, 94, 234, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.friend-avatar svg {
  width: 22px;
  height: 22px;
}

.friend-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.friend-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}
.friend-city {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.friend-card-action {
  padding-right: 0.5rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font: inherit;
  transition: background var(--transition), color var(--transition);
}
.btn-icon-muted {
  color: var(--text-muted);
}
.btn-icon-muted:hover {
  background: var(--surface-variant);
  color: var(--text-secondary);
}

.search-form {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}
.search-form .form-control {
  flex: 1;
  border-radius: var(--radius-ui);
  padding-left: 1rem;
}
.search-form .btn {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .landing-header nav { gap: 0.75rem; }
  .hero { min-height: 80vh; }
}

/* ——— Admin dashboard ——— */
.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.admin-note {
  margin-bottom: 0.25rem;
}
.admin-section {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.admin-section-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
}
.admin-updated {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.admin-metric-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.admin-metric-wide {
  grid-column: 1 / -1;
}
.admin-metric-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-metric-value {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}
.admin-bar {
  height: 6px;
  background: var(--surface-variant);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.admin-bar-fill {
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.admin-bar-fill.warn { background: var(--accent-orange); }
.admin-bar-fill.danger { background: var(--like); }
.admin-disk-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9375rem;
}
.admin-disk-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.admin-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-service-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--surface-variant);
  color: var(--text-secondary);
}
.admin-service-pill.ok {
  background: rgba(56, 142, 60, 0.12);
  color: var(--accent-green);
}
.admin-service-pill.bad {
  background: rgba(229, 57, 53, 0.1);
  color: var(--like);
}
.admin-health {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.625rem;
}
.admin-health-card {
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}
.admin-health-card.ok { border-left: 3px solid var(--accent-green); }
.admin-health-card.bad { border-left: 3px solid var(--like); }
.admin-logs-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.admin-logs-form .form-control {
  min-width: 120px;
  flex: 1 1 140px;
  border-radius: var(--radius-sm);
}
.admin-logs-form .btn {
  flex: 0 0 auto;
}
.admin-logs-output {
  margin: 0;
  padding: 0.875rem 1rem;
  background: #1a1d21;
  color: #e8eef2;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.admin-subnav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
}
.admin-subnav-link:hover {
  color: var(--primary);
  text-decoration: none;
}
.admin-subnav-link.active {
  background: rgba(1, 94, 234, 0.1);
  color: var(--primary);
  border-color: rgba(1, 94, 234, 0.2);
}

.admin-users-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.admin-users-search .form-control {
  flex: 1;
  min-width: 200px;
}
.admin-users-summary {
  margin: 0 0 1rem;
  font-size: 0.875rem;
}
.admin-users-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
}
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-users-table th,
.admin-users-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-users-table th {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface);
}
.admin-users-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-users-table tbody tr:hover {
  background: rgba(1, 94, 234, 0.03);
}
.admin-users-email {
  word-break: break-all;
  max-width: 220px;
}
.admin-user-status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}
.admin-user-status-active {
  background: rgba(56, 142, 60, 0.12);
  color: var(--accent-green);
}
.admin-user-status-deleted {
  background: rgba(138, 140, 146, 0.15);
  color: var(--text-muted);
}
.admin-user-status-blocked {
  background: rgba(229, 57, 53, 0.12);
  color: var(--like);
}
.admin-pagination {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.tag-rank {
  background: rgba(255, 193, 7, 0.2);
  color: #b8860b;
}
.tag-pending {
  background: var(--accent-orange-soft);
  color: var(--accent-orange);
  margin-left: 6px;
}
.participant-pending {
  display: flex;
  align-items: center;
  gap: 4px;
}
.participant-status {
  font-size: 0.875rem;
}
.menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 5px;
  margin-left: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--accent-orange);
  color: #fff;
}
.invitation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.invitation-card .invitation-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.invitation-date {
  margin: 4px 0 0;
  font-size: 0.8125rem;
}
.invitation-meta {
  margin: 4px 0 0;
  font-size: 0.875rem;
}
.friends-requests-section {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: var(--radius-ui);
  background: var(--surface-elevated, #fff);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}
.friends-tab-selector {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 16px;
  border-radius: var(--radius-ui);
  background: var(--surface-muted, #f4f6f8);
}
.friends-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: calc(var(--radius-ui) - 2px);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.friends-tab:hover {
  color: var(--text-primary, #0f172a);
}
.friends-tab.is-active {
  background: var(--accent-blue, #0ea5e9);
  color: #fff;
}
.friends-requests-empty {
  padding: 28px 12px;
  text-align: center;
}
.friends-requests-empty p {
  margin: 0;
}
.friends-requests-empty .text-muted {
  margin-top: 8px;
  font-size: 0.875rem;
}
.friends-requests-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.friends-requests-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}
.friends-requests-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--accent-orange);
  color: #fff;
}
.friends-request-group + .friends-request-group {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}
.friends-request-group .sheet-section-title {
  margin: 0 0 12px;
}
.friends-list-title {
  margin: 0 0 16px;
  font-size: 1.125rem;
  font-weight: 700;
}
.friends-incoming-section {
  margin-bottom: 24px;
}
.friends-incoming-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.friends-incoming-header .sheet-section-title {
  margin: 0;
}

.notifications-period-label {
  margin: 0 0 12px;
  font-size: 0.875rem;
}
.notifications-period-label-older {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}
.notifications-load-more-wrap {
  margin-top: 16px;
}

.profile-form-page {
  max-width: 520px;
}

.page-activity-share .activity-share-section {
  padding-top: 32px;
  padding-bottom: 48px;
}
.page-activity-share main {
  overflow-x: hidden;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
.page-activity-share .activity-share-map {
  touch-action: pan-y;
}
.activity-share-inner {
  max-width: 560px;
}
.activity-share-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.activity-share-badge.is-sprint {
  background: rgba(1, 94, 234, 0.12);
  color: #015eea;
}
.activity-share-badge.is-challenge {
  background: rgba(255, 138, 61, 0.15);
  color: #e86f1a;
}
.activity-share-title {
  margin: 0 0 8px;
}
.activity-share-lead {
  margin-bottom: 24px;
}
.activity-share-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 16px 12px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.activity-share-date {
  margin: 0 0 4px;
  font-weight: 700;
  text-align: center;
}
.activity-share-time {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
}
.activity-share-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.activity-share-actions {
  flex-direction: column;
  align-items: stretch;
}
.activity-share-hint {
  margin: 20px 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-align: center;
}

.activity-share-map-wrap {
  margin-bottom: 20px;
}
.activity-share-map {
  width: 100%;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.activity-share-map .map-loading,
.activity-share-map .map-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.activity-share-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.legend-line {
  display: inline-block;
  width: 28px;
  height: 0;
  vertical-align: middle;
  margin-right: 6px;
}
.legend-line--sprint {
  border-top: 3px dashed #015eea;
  opacity: 0.75;
}
.legend-line--challenge {
  border-top: 3px solid #ff9800;
}

.profile-form-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-ui);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}

.form-hint {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.delete-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.delete-warning-icon {
  font-size: 1.5rem;
  line-height: 1;
  color: #dc2626;
}

.delete-warning-title {
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
}

.delete-warning-text {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.delete-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.delete-agree input {
  margin-top: 0.2rem;
}

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