:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --ink: #101418;
  --muted: #66706b;
  --line: rgba(16, 20, 24, 0.12);
  --panel: rgba(255, 255, 255, 0.86);
  --accent: #00a86b;
  --accent-dark: #007a54;
  --warm: #ffb84d;
  --blue: #2867d6;
  --shadow: 0 22px 80px rgba(16, 20, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
}

.landing {
  min-height: 100vh;
}

.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 48px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 64px;
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.7);
}

.hero-media {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #dfe8df;
}

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

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.feature-band article {
  min-height: 150px;
  padding: 28px;
  background: #fff;
}

.feature-band strong,
.feature-band span {
  display: block;
}

.feature-band strong {
  font-size: 22px;
}

.feature-band span {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.surface {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 168, 107, 0.12), transparent 46%),
    linear-gradient(315deg, rgba(40, 103, 214, 0.11), transparent 42%),
    var(--bg);
}

.profile-shell,
.referral-shell,
.form-shell {
  align-content: center;
}

.profile-card,
.state-card {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 20px;
  align-items: center;
  padding: 26px;
}

.avatar {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 42px;
  font-weight: 800;
}

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

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.stats-grid article {
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.state-card {
  padding: 28px;
  text-align: center;
}

.state-card.error,
.status.error {
  color: #b42318;
}

.referral-card h1,
.form-card h1 {
  font-size: 42px;
}

.code {
  display: inline-flex;
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #eef6ef;
  font-weight: 800;
}

.form-card {
  text-align: left;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #eef6ef;
}

.status.success {
  color: var(--accent-dark);
}

.link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--accent-dark);
  font-weight: 750;
}

.live-share-shell {
  min-height: 100vh;
  padding: 36px 24px;
  color: var(--live-text);
  background:
    radial-gradient(circle at 15% 18%, rgba(15, 199, 95, 0.13), transparent 34%),
    radial-gradient(circle at 88% 76%, rgba(52, 107, 176, 0.1), transparent 38%),
    var(--live-bg);
  --live-bg: #020403;
  --live-surface: #080b0c;
  --live-panel: rgba(11, 14, 15, 0.98);
  --live-card: #101416;
  --live-card-soft: rgba(17, 22, 24, 0.9);
  --live-border: rgba(255, 255, 255, 0.08);
  --live-text: #f7fbf8;
  --live-muted: #8d9892;
  --live-faint: #5e6964;
  --live-green: #14d76c;
  --live-green-strong: #06b957;
  --live-error: #ff6b5f;
  --live-warning: #efbd58;
  --live-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.live-share-shell[data-live-theme="light"] {
  --live-bg: #f3f7f4;
  --live-surface: #ffffff;
  --live-panel: rgba(255, 255, 255, 0.98);
  --live-card: #ffffff;
  --live-card-soft: #f0f6f2;
  --live-border: rgba(20, 35, 29, 0.12);
  --live-text: #111916;
  --live-muted: #5f6c66;
  --live-faint: #7a8780;
  --live-green: #0fbf60;
  --live-green-strong: #07994b;
  --live-error: #b42318;
  --live-warning: #8a5a00;
  --live-shadow: 0 26px 70px rgba(15, 36, 27, 0.16);
}

.live-share-shell,
.live-share-shell * {
  box-sizing: border-box;
}

.live-panel {
  width: min(1180px, 100%);
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 18px;
  margin: 0 auto;
}

.live-map-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  background: var(--live-surface);
  box-shadow: var(--live-shadow);
}

.live-map-stage {
  position: relative;
  overflow: hidden;
  height: clamp(520px, 54vw, 640px);
  min-height: 0;
  color: rgba(255, 255, 255, 0.08);
  background: var(--live-surface);
}

.live-share-shell[data-live-theme="light"] .live-map-stage {
  color: rgba(16, 47, 34, 0.08);
}

.live-map-provider {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #06100d;
}

.live-map-provider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: background 160ms ease;
}

.live-share-shell[data-live-theme="light"] .live-map-provider {
  background: #eaf2ec;
}

.live-share-shell[data-live-theme="dark"] .live-map-provider.provider-yandex::after {
  background: rgba(0, 0, 0, 0.42);
}

.live-map-stage.map-provider-ready .live-map {
  opacity: 0;
}

.live-map-stage.map-provider-loading .live-map {
  opacity: 0;
}

.live-map-loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 28px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(20, 215, 108, 0.12), transparent 34%),
    rgba(4, 7, 6, 0.36);
  opacity: 0;
  transition: opacity 180ms ease;
}

.live-map-stage.map-provider-loading .live-map-loader {
  opacity: 1;
}

.live-map-loader[hidden] {
  display: none;
}

.live-map-loader-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--live-text);
  background: rgba(10, 16, 15, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  font-size: 14px;
  font-weight: 850;
}

.live-map-loader-mark {
  position: relative;
  width: 26px;
  height: 26px;
  flex: none;
  border: 2px solid rgba(20, 215, 108, 0.22);
  border-top-color: var(--live-green);
  border-radius: 999px;
  animation: map-loader-spin 820ms linear infinite;
}

.live-map-loader-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background: var(--live-green);
  box-shadow: 0 0 18px rgba(20, 215, 108, 0.78);
}

.live-share-shell[data-live-theme="light"] .live-map-loader {
  background:
    radial-gradient(circle at 50% 42%, rgba(20, 215, 108, 0.16), transparent 34%),
    rgba(244, 249, 246, 0.38);
}

.live-share-shell[data-live-theme="light"] .live-map-loader-card {
  border-color: rgba(20, 35, 29, 0.1);
  color: #111916;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 60px rgba(20, 35, 29, 0.16);
}

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

.live-map-top {
  position: absolute;
  z-index: 3;
  top: 28px;
  right: 32px;
  left: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.live-status-line {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--live-text);
  font-size: 26px;
  font-weight: 850;
  line-height: 1;
  pointer-events: auto;
  text-transform: uppercase;
}

.live-dot {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 999px;
  background: #ff3347;
  box-shadow: 0 0 20px rgba(255, 51, 71, 0.48);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  font: inherit;
  line-height: 1;
}

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

.live-badge.warning {
  color: var(--live-warning);
}

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

.live-badge.error {
  color: var(--live-error);
}

.live-status-line.muted .live-dot {
  background: var(--live-muted);
  box-shadow: 0 0 18px rgba(130, 143, 136, 0.36);
}

.run-history-shell .live-dot {
  background: var(--live-green);
  box-shadow: 0 0 20px rgba(20, 215, 108, 0.48);
}

.live-status-line.warning .live-dot {
  background: var(--live-warning);
  box-shadow: 0 0 20px rgba(239, 189, 88, 0.38);
}

.live-status-line.error .live-dot {
  background: var(--live-error);
  box-shadow: 0 0 20px rgba(255, 107, 95, 0.42);
}

.live-theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--live-border);
  border-radius: 999px;
  color: var(--live-text);
  background: rgba(255, 255, 255, 0.09);
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.live-share-shell[data-live-theme="light"] .live-theme-toggle {
  background: rgba(255, 255, 255, 0.82);
}

.live-theme-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("/assets/icons/sun.svg") center / contain no-repeat;
  -webkit-mask: url("/assets/icons/sun.svg") center / contain no-repeat;
}

.live-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 640px;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.live-map-base {
  fill: #06100d;
}

.live-share-shell[data-live-theme="light"] .live-map-base {
  fill: #eaf2ec;
}

.live-map-grid {
  opacity: 0.84;
}

.live-city-lines path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.055);
  stroke-linecap: round;
  stroke-width: 8;
}

.live-share-shell[data-live-theme="light"] .live-city-lines path {
  stroke: rgba(17, 49, 36, 0.08);
}

.live-map-shade {
  color: rgba(0, 0, 0, 0.68);
  opacity: 0.9;
}

.live-share-shell[data-live-theme="light"] .live-map-shade {
  color: rgba(255, 255, 255, 0.52);
  opacity: 0.72;
}

.live-route-shadow {
  stroke: rgba(0, 0, 0, 0.52);
}

.live-route-glow {
  stroke: var(--live-green);
  opacity: 0.22;
  filter: drop-shadow(0 0 18px rgba(20, 215, 108, 0.86));
}

.live-route-line {
  stroke: var(--live-green);
  filter: drop-shadow(0 0 12px rgba(20, 215, 108, 0.88));
}

.live-marker-start {
  fill: #f8fff9;
  stroke: var(--live-green);
  stroke-width: 7;
  filter: drop-shadow(0 0 13px rgba(20, 215, 108, 0.82));
}

.live-marker-glow {
  fill: rgba(255, 51, 71, 0.18);
  filter: drop-shadow(0 0 22px rgba(255, 51, 71, 0.82));
  transform-box: fill-box;
  transform-origin: center;
  animation: live-marker-pulse 1.45s ease-in-out infinite;
}

.live-marker-current {
  fill: #f8fff9;
  stroke: #ff3347;
  stroke-width: 8;
  filter: drop-shadow(0 0 18px rgba(255, 51, 71, 0.88));
  transform-box: fill-box;
  transform-origin: center;
  animation: live-marker-dot-pulse 1.45s ease-in-out infinite;
}

.live-marker-current.muted {
  stroke: var(--live-muted);
  stroke-width: 7;
  filter: drop-shadow(0 0 12px rgba(130, 143, 136, 0.54));
  animation: none;
}

@keyframes live-marker-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.76);
  }
  72% {
    opacity: 0;
    transform: scale(1.42);
  }
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes live-marker-dot-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.live-distance-label-bg {
  fill: #f8fff9;
  stroke: rgba(17, 25, 22, 0.18);
  stroke-width: 1;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.32));
}

.live-distance-label-text {
  fill: #111916;
  font-size: 14px;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: middle;
}

.live-state-card.muted {
  color: var(--live-muted);
}

.live-map-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--live-muted);
  background: rgba(4, 7, 6, 0.72);
  font-weight: 800;
  text-align: center;
}

.live-share-shell[data-live-theme="light"] .live-map-empty {
  background: rgba(245, 249, 246, 0.76);
}

.live-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 32px 28px;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  background: var(--live-panel);
  box-shadow: var(--live-shadow);
}

.live-heading {
  display: block;
}

.live-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--live-text);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-heading h1 {
  margin: 0;
  color: var(--live-text);
  font-size: 27px;
  line-height: 1.05;
}

.live-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--live-green);
  font-weight: 750;
}

.live-runner {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  background: var(--live-card-soft);
}

.live-avatar {
  width: 52px;
  height: 52px;
  background: var(--live-green);
  color: #04190d;
  font-size: 20px;
}

.live-runner h2 {
  margin: 0;
  overflow: hidden;
  color: var(--live-text);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-runner .link {
  margin-top: 5px;
  color: var(--live-green);
  font-size: 13px;
}

.live-stats {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  background: var(--live-card);
}

.live-stats article {
  min-height: 84px;
  padding: 18px 20px;
  border-top: 1px solid var(--live-border);
  background: var(--live-card);
}

.live-stats article:first-child {
  border-top: 0;
}

.live-stats span {
  display: block;
  color: var(--live-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.live-stats strong {
  display: block;
  margin-top: 7px;
  color: var(--live-text);
  font-size: 25px;
  line-height: 1.15;
}

.live-state-card {
  min-height: 52px;
  padding: 14px;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  color: var(--live-muted);
  background: var(--live-card-soft);
  font-weight: 750;
  line-height: 1.4;
}

.live-state-card.success {
  display: none;
  color: var(--live-green);
}

.live-state-card.warning {
  color: var(--live-warning);
}

.live-state-card.error {
  color: var(--live-error);
}

.live-note {
  margin: 0;
  color: var(--live-muted);
  font-size: 13px;
  line-height: 1.45;
}

.run-history-shell {
  padding-bottom: 56px;
}

.run-history-shell .live-panel {
  min-height: auto;
}

.history-route-segment.dashed {
  stroke-dasharray: 18 16;
}

.history-break-point {
  fill: #f8fff9;
  stroke: var(--live-muted);
  stroke-width: 4;
  opacity: 0.9;
}

.history-map-hidden .live-map,
.history-map-hidden .live-map-provider {
  display: none;
}

.history-map-hidden .live-map-empty {
  background: var(--live-card);
}

.history-detail-panel {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.44fr);
  gap: 18px;
  margin: 18px auto 0;
}

.history-section {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  background: var(--live-panel);
  box-shadow: var(--live-shadow);
}

.history-section h2 {
  margin: 0 0 18px;
  color: var(--live-text);
  font-size: 21px;
  line-height: 1.1;
}

.history-table-wrap {
  overflow-x: auto;
}

.history-splits-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.history-splits-table th,
.history-splits-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--live-border);
  color: var(--live-text);
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}

.history-splits-table th {
  color: var(--live-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.history-splits-table tr:last-child td {
  border-bottom: 0;
}

.history-charts-content {
  display: grid;
  gap: 14px;
}

.history-chart {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  background: var(--live-card);
}

.history-chart h3 {
  margin: 0 0 10px;
  color: var(--live-text);
  font-size: 14px;
}

.history-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.history-chart-grid {
  fill: none;
  stroke: var(--live-border);
  stroke-width: 1;
}

.history-chart-line {
  fill: none;
  stroke: var(--live-green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 10px rgba(20, 215, 108, 0.42));
}

.history-chart p {
  margin: 8px 0 0;
  color: var(--live-muted);
  font-size: 12px;
}

.history-retry-state {
  display: grid;
  gap: 12px;
}

.history-retry-button {
  width: fit-content;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--live-border);
  border-radius: 8px;
  color: var(--live-text);
  background: var(--live-card);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.live-share-shell.live-unavailable .live-panel {
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
  align-content: center;
}

.live-share-shell.live-unavailable .live-sidebar {
  min-height: 220px;
  justify-content: center;
}

.live-share-shell.live-unavailable .live-heading,
.live-share-shell.live-unavailable .live-note {
  display: none;
}

.live-share-shell.live-unavailable .live-state-card {
  display: block;
}

@media (max-width: 900px) {
  .live-share-shell {
    padding: 18px;
  }

  .live-panel {
    width: min(430px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .live-map-card {
    min-height: 0;
  }

  .live-map-stage {
    height: auto;
    min-height: 0;
    aspect-ratio: 0.92;
  }

  .live-map-top {
    top: 18px;
    right: 16px;
    left: 16px;
  }

  .live-status-line {
    font-size: 22px;
  }

  .live-dot {
    width: 13px;
    height: 13px;
  }

  .live-theme-toggle {
    width: 34px;
    height: 34px;
  }

  .live-map {
    min-height: 0;
  }

  .live-sidebar {
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .live-sidebar .live-heading {
    display: none;
  }

  .live-note {
    display: none;
  }

  .live-runner {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 12px;
  }

  .live-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .live-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--live-border);
    background: var(--live-border);
  }

  .live-stats article {
    min-height: 94px;
    padding: 18px 16px;
    border-top: 0;
  }

  .history-detail-panel {
    width: min(430px, 100%);
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .history-section {
    padding: 18px;
  }

}

@media (max-width: 360px) {
  .live-stats strong {
    font-size: 22px;
  }
}

.legal-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 34px 20px 72px;
}

.legal-locales {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.legal-locale {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #303a35;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  background: #fff;
}

.legal-locale.active {
  border-color: rgba(19, 117, 89, 0.32);
  color: var(--accent-dark);
  background: rgba(19, 117, 89, 0.08);
}

.legal-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 8px;
  color: #7a271a;
  background: #fff2ea;
  font-weight: 750;
}

.legal-doc {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.legal-doc h1 {
  font-size: 44px;
}

.legal-doc h2 {
  margin-top: 32px;
}

.legal-doc p,
.legal-doc li {
  color: #303a35;
  line-height: 1.65;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 26px;
  }

  h1 {
    font-size: 46px;
  }

  .lead {
    font-size: 18px;
  }

  .feature-band,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

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

  .legal-doc {
    padding: 22px;
  }

  .legal-doc h1 {
    font-size: 34px;
  }
}

.live-workout-shell {
  min-height: 100vh;
  padding: 0 32px 36px;
  background:
    radial-gradient(circle at 10% 8%, rgba(20, 215, 108, 0.1), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(55, 92, 115, 0.16), transparent 34%),
    #070b0e;
}

.live-workout-shell[data-live-theme="light"] {
  background:
    radial-gradient(circle at 10% 8%, rgba(20, 215, 108, 0.12), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(68, 125, 142, 0.1), transparent 34%),
    #f3f7f4;
}

.workout-topbar,
.workout-titlebar,
.live-workout-shell .live-panel {
  width: min(1680px, 100%);
  margin: 0 auto;
}

.workout-topbar {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 62px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-workout-shell[data-live-theme="light"] .workout-topbar {
  border-bottom-color: rgba(20, 35, 29, 0.1);
}

.workout-logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.workout-logo img {
  width: 118px;
  height: 24px;
  display: block;
}

.workout-nav {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 54px;
}

.workout-nav a {
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: #a7afb0;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

.live-workout-shell[data-live-theme="light"] .workout-nav a {
  color: #68756e;
}

.live-workout-shell[data-live-theme="light"] .workout-nav a.active {
  border-color: var(--live-green);
  color: var(--live-green);
}

.workout-nav a.active {
  border-color: var(--live-green);
  color: var(--live-green);
}

.workout-titlebar {
  padding: 22px 0 18px;
}

.workout-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #a8b0b2;
  font-size: 15px;
  text-decoration: none;
}

.live-workout-shell[data-live-theme="light"] .workout-back,
.live-workout-shell[data-live-theme="light"] .workout-titlebar #live-subtitle {
  color: #64716a;
}

.workout-back::before {
  content: "←";
  font-size: 18px;
  line-height: 1;
}

.workout-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.workout-title-row > div {
  min-width: 0;
}

.workout-title-row h1 {
  margin: 0;
  color: var(--live-text);
  font-size: clamp(30px, 2.3vw, 38px);
  line-height: 1.04;
}

.workout-titlebar .live-status-line {
  display: inline-flex;
  margin-top: 10px;
  gap: 9px;
  color: var(--live-green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.workout-titlebar .live-dot {
  width: 9px;
  height: 9px;
  background: var(--live-green);
  box-shadow: 0 0 16px rgba(20, 215, 108, 0.5);
}

.workout-titlebar #live-subtitle {
  margin: 8px 0 0;
  color: #a8b0b2;
  font-size: 15px;
}

.live-workout-shell .live-panel {
  min-height: 0;
  display: block;
}

.live-workout-shell .live-map-card {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: none;
}

.live-workout-shell[data-live-theme="light"] .live-map-card {
  border-color: rgba(20, 35, 29, 0.12);
}

.live-workout-shell .live-map-stage {
  height: clamp(560px, 41vw, 700px);
}

.live-workout-shell .live-map-provider::after {
  background:
    linear-gradient(180deg, rgba(7, 11, 14, 0.52), rgba(7, 11, 14, 0.16) 42%, rgba(7, 11, 14, 0.38)),
    rgba(0, 0, 0, 0.18);
}

.live-workout-shell[data-live-theme="light"] .live-map-provider::after {
  background:
    linear-gradient(180deg, rgba(244, 249, 246, 0.34), rgba(244, 249, 246, 0.04) 42%, rgba(244, 249, 246, 0.28)),
    rgba(255, 255, 255, 0.06);
}

.live-workout-shell .workout-theme-toggle {
  position: static;
  z-index: 1;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(12, 17, 19, 0.72);
  backdrop-filter: blur(16px);
}

.workout-topbar .workout-theme-toggle {
  margin-top: 0;
  margin-left: auto;
}

.live-workout-shell[data-live-theme="light"] .workout-theme-toggle {
  border-color: rgba(11, 28, 20, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.live-workout-shell .live-map-runner {
  position: absolute;
  z-index: 5;
  top: 22px;
  right: 22px;
  width: min(292px, calc(100% - 44px));
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 14px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 19, 0.86);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.live-workout-shell .live-map-runner.live-runner-inline {
  position: relative;
  z-index: 1;
  top: auto;
  right: auto;
  width: 100%;
  margin-bottom: 12px;
}

.live-workout-shell[data-live-theme="light"] .live-map-runner {
  border-color: rgba(20, 35, 29, 0.12);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 60px rgba(20, 35, 29, 0.14);
}

.live-workout-shell .live-avatar {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.live-workout-shell .live-avatar img {
  display: block;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
}

.live-workout-shell .live-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.live-workout-shell[data-live-theme="light"] .live-stats {
  border-color: rgba(20, 35, 29, 0.12);
  background: rgba(20, 35, 29, 0.08);
}

.live-workout-shell .live-stats article {
  position: relative;
  min-height: 102px;
  padding: 24px 70px 22px 22px;
  border: 0;
  background:
    radial-gradient(circle at 88% 50%, rgba(20, 215, 108, 0.08), transparent 30%),
    rgba(16, 22, 26, 0.94);
}

.live-workout-shell[data-live-theme="light"] .live-stats article {
  background:
    radial-gradient(circle at 88% 50%, rgba(15, 191, 96, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.96);
}

.live-workout-shell .live-stats article::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(20, 215, 108, 0.1);
  transform: translateY(-50%);
}

.live-workout-shell .live-stats article::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 33px;
  width: 20px;
  height: 20px;
  background: var(--live-green);
  transform: translateY(-50%);
  mask: var(--metric-icon) center / contain no-repeat;
  -webkit-mask: var(--metric-icon) center / contain no-repeat;
}

.metric-distance { --metric-icon: url("/assets/icons/measure.svg"); }
.metric-duration { --metric-icon: url("/assets/icons/timer.svg"); }
.metric-pace { --metric-icon: url("/assets/icons/run.svg"); }
.metric-moving { --metric-icon: url("/assets/icons/time.svg"); }
.metric-best-pace { --metric-icon: url("/assets/icons/lighting.svg"); }
.metric-heart,
.metric-heart-max { --metric-icon: url("/assets/icons/heart.svg"); }
.metric-elevation { --metric-icon: url("/assets/icons/elevation.svg"); }
.metric-calories { --metric-icon: url("/assets/icons/fire.svg"); }
.metric-cadence { --metric-icon: url("/assets/icons/steps.svg"); }

.live-workout-shell .live-stats span {
  color: var(--live-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.live-workout-shell .live-stats strong {
  margin-top: 12px;
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 850;
  letter-spacing: 0;
}

.live-workout-shell .live-state-card {
  margin-top: 16px;
}

.workout-tabs {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(14, 20, 24, 0.94);
}

.live-workout-shell[data-live-theme="light"] .workout-tabs {
  border-color: rgba(20, 35, 29, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.workout-tab-list {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-workout-shell[data-live-theme="light"] .workout-tab-list {
  border-bottom-color: rgba(20, 35, 29, 0.1);
}

.workout-tab {
  min-height: 56px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--live-muted);
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 760;
  cursor: pointer;
  white-space: nowrap;
}

.workout-tab.active {
  border-color: var(--live-green);
  color: var(--live-green);
}

.workout-tab-panels {
  min-height: 220px;
}

.workout-tab-panel {
  display: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workout-tab-panel.active {
  display: block;
}

.workout-empty-state {
  margin: 0;
  color: var(--live-muted);
  font-weight: 720;
}

.live-workout-shell .history-detail-panel {
  width: 100%;
  display: block;
  margin: 14px 0 0;
}

.live-workout-shell .history-section {
  padding: 26px 28px;
}

.live-workout-shell .history-section h2 {
  color: var(--live-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-workout-shell .history-splits-table {
  min-width: 620px;
}

.live-workout-shell .history-chart {
  background: rgba(10, 15, 18, 0.74);
}

.live-workout-shell[data-live-theme="light"] .history-chart {
  background: rgba(244, 249, 246, 0.86);
}

.live-workout-shell.live-unavailable .live-panel {
  width: min(720px, 100%);
}

@media (max-width: 900px) {
  .live-workout-shell {
    padding: 0 16px 24px;
  }

  .workout-topbar {
    height: 58px;
    gap: 26px;
  }

  .workout-logo img {
    width: 104px;
    height: auto;
  }

  .workout-nav {
    gap: 22px;
  }

  .workout-nav a {
    font-size: 13px;
  }

  .workout-titlebar {
    padding: 18px 0 14px;
  }

  .live-workout-shell .live-map-stage {
    aspect-ratio: auto;
    height: clamp(420px, 112vw, 620px);
  }

  .live-workout-shell .live-map-runner {
    top: 14px;
    right: 14px;
    width: min(282px, calc(100% - 28px));
  }

  .live-workout-shell .live-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-workout-shell .live-stats article {
    min-height: 112px;
    padding: 18px 60px 18px 18px;
  }

  .live-workout-shell .live-stats article::before {
    right: 18px;
    width: 36px;
    height: 36px;
  }

  .live-workout-shell .live-stats article::after {
    right: 27px;
    width: 18px;
    height: 18px;
  }

  .workout-tab-list {
    gap: 22px;
    padding: 0 18px;
  }

  .live-workout-shell .history-section {
    padding: 20px 18px;
  }
}

@media (max-width: 520px) {
  .workout-title-row h1 {
    font-size: 28px;
  }

  .live-workout-shell .live-map-runner {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 10px;
  }

  .live-workout-shell .live-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .live-workout-shell .live-stats strong {
    font-size: 22px;
  }
}
