:root {
  --bg: #08111f;
  --panel: #111c2f;
  --panel-2: #17243a;
  --text: #f4f7fb;
  --muted: #98a6ba;
  --accent: #4ee1a0;
  --accent-dark: #183c31;
  --danger: #ff6b6b;
  --warning: #ffd166;
  --border: rgba(255,255,255,.09);
  --shadow: 0 20px 45px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(78,225,160,.12), transparent 35%),
    linear-gradient(160deg, rgba(8, 17, 31, .72) 0%, rgba(11, 21, 38, .68) 100%),
    url("../assets/jeba-cycling-scenery.jpg") center / cover fixed no-repeat;
  background-color: #08111f;
  transition: background-color .5s ease, color .5s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: rgba(3, 8, 16, .7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .4s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 12%, rgba(255, 202, 137, .24), transparent 34%),
    linear-gradient(180deg, rgba(5, 16, 37, .05), rgba(1, 7, 22, .68));
  opacity: .08;
  animation: scenery-day-cycle 10s ease-in-out infinite alternate;
}

body.workout-active {
  overflow: hidden;
}

body.workout-active::before {
  opacity: 1;
}

body.workout-active .app {
  z-index: 6;
}

button, input, select { font: inherit; }

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 16px 120px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

.brand-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.brand-title {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 0;
}

.brand-wordmark {
  display: block;
  width: clamp(80px, 15vw, 112px);
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-version {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 1px;
}

.brand p {
  max-width: min(42vw, 320px);
  overflow: hidden;
  color: var(--muted);
  margin: 5px 0 0;
  font-size: .95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sound-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.sound-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-toggle[aria-pressed="true"] .sound-off-line {
  display: none;
}

.sound-toggle[aria-pressed="false"] {
  color: var(--muted);
}

.sound-toggle[aria-pressed="false"] .sound-on-wave {
  display: none;
}

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

.theme-toggle {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.header-account-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(117, 185, 255, .62);
  background: rgba(61, 137, 211, .24);
  color: #f5faff;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .16);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.header-account-button[data-signed-in="true"] {
  border-color: rgba(148, 163, 184, .58);
  background: rgba(71, 85, 105, .52);
  color: #f8fafc;
}

.header-account-button:hover {
  border-color: rgba(148, 204, 255, .88);
  background: rgba(61, 137, 211, .36);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .22);
}

.header-account-button:active {
  transform: translateY(1px);
}

.header-account-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.onboarding-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.onboarding-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.onboarding-panel {
  position: relative;
  width: min(100%, 610px);
  max-height: min(860px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(117, 185, 255, .18);
  border-radius: 24px;
  background: #101d30;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .48);
}

.onboarding-topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px 8px;
}

.onboarding-progress-copy {
  color: #91a7bd;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.onboarding-skip,
.onboarding-skip-question {
  border: 0;
  background: transparent;
  color: #b6c7d9;
  font-weight: 750;
  cursor: pointer;
}

.onboarding-skip {
  min-height: 36px;
  padding: 6px 4px 6px 12px;
}

.onboarding-progress-track {
  height: 4px;
  margin: 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}

.onboarding-progress-track span {
  display: block;
  width: 14.285%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #75b9ff, #4ee1a0);
  transition: width .28s ease;
}

.onboarding-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 28px 12px;
  overscroll-behavior: contain;
}

.onboarding-step {
  animation: onboarding-step-in .24s ease both;
}

.onboarding-step h2 {
  margin: 5px 0 8px;
  color: #f4f7fb;
  font-size: clamp(1.65rem, 5vw, 2.2rem);
  letter-spacing: -.035em;
}

.onboarding-step > p:not(.onboarding-eyebrow):not(.onboarding-recommendation) {
  max-width: 510px;
  margin: 0 0 22px;
  color: #a5b5c7;
  line-height: 1.6;
}

.onboarding-eyebrow {
  margin: 0;
  color: #75b9ff;
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.onboarding-welcome {
  padding-top: 8px;
  text-align: center;
}

.onboarding-welcome img {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 19px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .28);
}

.onboarding-welcome > p:not(.onboarding-eyebrow) {
  margin-inline: auto;
}

.onboarding-welcome label {
  width: min(100%, 390px);
  margin: 24px auto 8px;
  color: #d9e6f3;
  text-align: left;
}

.onboarding-welcome input {
  width: min(100%, 390px);
  min-height: 54px;
  margin: 0;
  font-size: 1rem;
}

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

.onboarding-options button {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(143, 197, 255, .16);
  border-radius: 13px;
  background: rgba(5, 17, 31, .36);
  color: #dceafa;
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.onboarding-options button:hover {
  border-color: rgba(117, 185, 255, .45);
  transform: translateY(-1px);
}

.onboarding-options button[aria-pressed="true"] {
  border-color: #75b9ff;
  background: rgba(75, 144, 218, .2);
  box-shadow: inset 0 0 0 1px rgba(117, 185, 255, .18);
}

.onboarding-options button > span {
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  font-size: 1.05rem;
}

.onboarding-options button strong {
  font-size: .88rem;
  line-height: 1.3;
}

.onboarding-options-compact button {
  min-height: 60px;
}

.onboarding-note {
  display: block;
  margin-top: 15px;
  color: #8193a7;
  line-height: 1.45;
}

.onboarding-skip-question {
  display: block;
  margin: 16px auto 0;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.onboarding-complete {
  padding-top: 5px;
  text-align: center;
}

.onboarding-complete-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(78, 225, 160, .15);
  color: #69e6ad;
  font-size: 1.8rem;
  font-weight: 900;
}

.onboarding-complete > p:not(.onboarding-eyebrow) {
  margin-inline: auto;
}

.onboarding-summary {
  width: min(100%, 470px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px auto 16px;
}

.onboarding-summary div {
  padding: 13px 8px;
  border: 1px solid rgba(143, 197, 255, .12);
  border-radius: 12px;
  background: rgba(5, 17, 31, .32);
}

.onboarding-summary small,
.onboarding-summary strong {
  display: block;
}

.onboarding-summary small {
  margin-bottom: 5px;
  color: #879caf;
  font-size: .68rem;
}

.onboarding-summary strong {
  color: #dbe9f6;
  font-size: .78rem;
  line-height: 1.3;
}

.onboarding-recommendation {
  margin: 0;
  color: #9fb4c8;
  font-size: .82rem;
}

.onboarding-status {
  min-height: 20px;
  margin: 0;
  padding: 0 28px;
  color: #ff9eaa;
  font-size: .78rem;
  text-align: center;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px 24px;
}

.onboarding-back,
.onboarding-next,
.onboarding-start,
.onboarding-custom {
  min-height: 48px;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
}

.onboarding-back {
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: #b8c7d7;
}

.onboarding-next,
.onboarding-start {
  flex: 1;
  border: 1px solid #75b9ff;
  background: #75b9ff;
  color: #071b30;
}

.onboarding-next:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.onboarding-finish-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
}

.onboarding-custom {
  border: 1px solid rgba(117, 185, 255, .28);
  background: rgba(117, 185, 255, .1);
  color: #d8eaff;
}

body.onboarding-open {
  overflow: hidden;
}

@keyframes onboarding-step-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: rgba(17,28,47,.94);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.workout-card {
  padding: 22px;
  text-align: center;
  overflow: hidden;
  position: relative;
  transition:
    border-radius .4s ease,
    box-shadow .4s ease,
    background .4s ease;
}

.workout-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 0%, transparent));
  transition: background .2s ease;
}

.selected-workout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(117, 185, 255, .2);
  border-radius: 14px;
  background: rgba(7, 18, 31, .34);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.selected-workout-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 185, 255, .16);
  border-radius: 12px;
  background: rgba(117, 185, 255, .08);
  font-size: 1.15rem;
}

.selected-workout-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.selected-workout-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.selected-workout-name {
  display: block;
  color: #d9ecff;
  font-size: .98rem;
  font-weight: 800;
}

.selected-workout-details {
  display: block;
  margin-top: 3px;
  color: #9db2c9;
  font-size: .76rem;
  font-weight: 700;
}

.selected-workout-plan {
  display: block;
  margin-top: 7px;
  color: #c1d2e4;
  font-size: .76rem;
  line-height: 1.42;
}

.selected-workout.is-ride-active .selected-workout-plan {
  display: none;
}

.selected-workout-arrow {
  flex: 0 0 auto;
  color: #8fc5ff;
  font-size: 1.2rem;
}

.selected-workout:hover {
  border-color: rgba(117, 185, 255, .38);
  background: rgba(35, 72, 109, .28);
}

.selected-workout:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.focus-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.focus-toggle:hover {
  border-color: var(--accent);
}

.focus-toggle[hidden] {
  display: none;
}

.exit-focus-toggle {
  display: none;
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(8, 17, 31, .78);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.phase-label {
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
}

.instruction {
  margin: 0;
  font-size: clamp(2rem, 9vw, 4.4rem);
  letter-spacing: -.06em;
  line-height: 1;
}

.round-callout {
  width: max-content;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--text);
  font-size: clamp(.8rem, 2.8vw, 1rem);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: border-color .2s ease, background .2s ease;
}

.timer {
  margin: 18px 0 10px;
  font-size: clamp(4.8rem, 22vw, 9rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.07em;
  line-height: .9;
  font-weight: 800;
  transition: color .2s ease, text-shadow .2s ease, opacity .2s ease;
}

.workout-card.is-paused .timer {
  opacity: .5;
}

.workout-card.is-paused .phase-label {
  opacity: .65;
}

.subtext {
  color: var(--muted);
  min-height: 24px;
  margin: 0 0 20px;
}

.progress-track {
  height: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 12px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: inherit;
  transition: width .25s linear, background .2s ease;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 22px;
}

.stat {
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  margin-bottom: 4px;
}

.stat strong { font-size: 1rem; }

.stat-round {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.stat-round strong {
  color: var(--accent);
  font-size: 1.1rem;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 16px;
  padding: 15px 14px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .12s ease, opacity .12s ease;
}

.btn-icon {
  flex: 0 0 auto;
  font-size: 1.05em;
  line-height: 1;
}

.ride-focus-row {
  display: block;
  margin-top: 10px;
}

.focus-toggle.ride-focus-toggle {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 14px;
  border-color: rgba(143, 197, 255, .28);
  border-radius: 16px;
  background:
    linear-gradient(120deg, rgba(143, 197, 255, .13), rgba(123, 113, 232, .08)),
    rgba(255, 255, 255, .035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 8px 22px rgba(4, 12, 23, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .12s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.focus-toggle.ride-focus-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, .12), transparent 38%);
}

.focus-toggle.ride-focus-toggle:hover {
  border-color: rgba(143, 197, 255, .48);
  background:
    linear-gradient(120deg, rgba(143, 197, 255, .18), rgba(123, 113, 232, .12)),
    rgba(255, 255, 255, .05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 10px 26px rgba(4, 12, 23, .2);
}

.focus-toggle.ride-focus-toggle:active {
  transform: scale(.985);
}

.focus-toggle.ride-focus-toggle .btn-icon {
  color: #a9d3ff;
  filter: drop-shadow(0 0 7px rgba(117, 185, 255, .42));
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #07140f;
}

.btn-primary.is-resume {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.btn-secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.setup-card {
  position: relative;
  padding: 22px;
  margin-top: 24px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(31, 54, 84, .98), rgba(17, 35, 59, .98));
  border-color: rgba(121, 172, 226, .28);
  border-radius: 18px;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.setup-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #75b9ff, rgba(117, 185, 255, 0));
}

.setup-section-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px;
  border: 1px solid rgba(143, 197, 255, .12);
  border-radius: 13px;
  background: rgba(3, 14, 27, .3);
}

.setup-section-tab {
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9eb5cd;
  font: inherit;
  font-size: .86rem;
  font-weight: 760;
  cursor: pointer;
}

.setup-section-tab > span {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  place-items: center;
  border-radius: 6px;
  background: rgba(143, 197, 255, .08);
  font-size: .76rem;
}

.setup-section-tab.active {
  background: linear-gradient(135deg, rgba(85, 161, 235, .25), rgba(117, 113, 232, .2));
  color: #e3f1ff;
  box-shadow: inset 0 0 0 1px rgba(143, 197, 255, .16);
}

.setup-section-tab:focus-visible {
  outline: 3px solid rgba(117, 185, 255, .22);
  outline-offset: 2px;
}

.setup-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.app-view > .setup-toggle {
  cursor: default;
}

.accordion-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 197, 255, .22);
  border-radius: 12px;
  background: rgba(5, 17, 31, .28);
  color: #8fc5ff;
}

.accordion-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.setup-heading {
  display: block;
  font-size: 1.15rem;
  font-weight: 750;
  color: #d9ecff;
}

.setup-intro {
  display: block;
  color: #a9bfd8;
  margin-top: 4px;
  font-size: .92rem;
}

.setup-content {
  max-height: 900px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease;
}

.setup-content-inner {
  padding-top: 18px;
}

.guide-card {
  position: relative;
  margin-top: 14px;
  padding: 20px 22px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(26, 48, 76, .98), rgba(15, 31, 52, .98));
  border-color: rgba(121, 172, 226, .24);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, .15),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}

.guide-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #75b9ff, rgba(117, 185, 255, 0));
}

.guide-card .accordion-icon {
  color: #8fc5ff;
  border-color: rgba(143, 197, 255, .22);
  background: rgba(5, 17, 31, .28);
}

.guide-card .setup-heading {
  color: #d9ecff;
}

.guide-card .setup-intro {
  color: #a9bfd8;
}

.guide-card .setup-content {
  max-height: none;
  overflow: visible;
}

.feed-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-color: rgba(255, 180, 84, .2);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 180, 84, .1), transparent 34%),
    linear-gradient(145deg, rgba(30, 32, 36, .98), rgba(18, 20, 23, .98));
}

.feed-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #ffb454, #f17f58 55%, rgba(241, 127, 88, 0));
}

.feed-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feed-heading-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 180, 84, .25);
  border-radius: 14px;
  background: rgba(255, 180, 84, .1);
  color: #ffc778;
}

.feed-heading-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feed-eyebrow {
  margin: 0 0 4px;
  color: #ffc778;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.feed-heading h2 {
  margin: 0;
  color: #f7f7f5;
  font-size: 1.45rem;
}

.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 13px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #e9eaeb;
  font-size: .86rem;
  font-weight: 750;
}

.feed-refresh-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 180, 84, .22);
  border-radius: 11px;
  background: rgba(255, 180, 84, .08);
  color: #ffc778;
  font: inherit;
  font-size: .79rem;
  font-weight: 750;
  cursor: pointer;
}

.feed-refresh-button.is-loading span:first-child {
  animation: feed-spin .8s linear infinite;
}

.feed-refresh-button:disabled {
  cursor: wait;
  opacity: .62;
}

.feed-status {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: 16px;
  color: #aeb2b8;
  text-align: center;
  line-height: 1.5;
}

.feed-status[data-state="error"] {
  border-color: rgba(245, 133, 133, .25);
  color: #f0a2a2;
}

.feed-status-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(255, 199, 120, .25);
  border-top-color: #ffc778;
  border-radius: 50%;
  animation: feed-spin .8s linear infinite;
}

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

.feed-list {
  display: grid;
  gap: 14px;
}

.feed-post {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 17px;
  background: rgba(255, 255, 255, .035);
}

.feed-post.has-image {
  grid-template-columns: minmax(125px, 34%) 1fr;
}

.feed-post-image-link {
  display: block;
  min-height: 190px;
  overflow: hidden;
  background: #25282c;
}

.feed-post-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  background: #25282c;
  transition: transform .25s ease, opacity .2s ease;
}

.feed-post-image-link:hover .feed-post-image {
  opacity: .92;
  transform: scale(1.025);
}

.feed-post-image-link:focus-visible {
  outline: 3px solid rgba(255, 180, 84, .42);
  outline-offset: -3px;
}

.feed-post-body {
  min-width: 0;
  padding: 18px;
}

.feed-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #959ba2;
  font-size: .72rem;
}

.feed-post-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 180, 84, .1);
  color: #ffc778;
  font-weight: 800;
}

.feed-post h3 {
  margin: 12px 0 7px;
  color: #f6f6f4;
  font-size: 1.08rem;
  line-height: 1.3;
}

.feed-post p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #b1b5ba;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.feed-post-link {
  display: inline-flex;
  margin-top: 14px;
  color: #ffc778;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}

.feed-post-link::after {
  content: " →";
  margin-left: 4px;
}

.feed-cache-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 180, 84, .08);
  color: #c8b18f;
  font-size: .8rem;
  line-height: 1.45;
}

.guide-safety {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #9da2a9;
  font-size: .8rem;
  line-height: 1.5;
}

.guide-journey {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(143, 197, 255, .12);
  border-radius: 14px;
  background: rgba(5, 17, 31, .4);
}

.guide-journey-step {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.guide-journey-step > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.guide-journey-step strong {
  color: #d9ecff;
  font-size: .82rem;
}

.guide-journey-step small {
  overflow: hidden;
  color: #92aac3;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-journey-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #75b9ff;
  color: #071728;
  font-size: .75rem;
  font-weight: 850;
}

.guide-journey-arrow {
  color: #6f91b2;
  font-size: .9rem;
}

.guide-accordions {
  display: grid;
  gap: 10px;
}

.guide-accordion {
  overflow: hidden;
  border: 1px solid rgba(143, 197, 255, .12);
  border-radius: 12px;
  background: rgba(8, 23, 40, .52);
}

.guide-accordion.is-animating {
  will-change: height;
}

.guide-accordion summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  color: #d9ecff;
  font-weight: 780;
  cursor: pointer;
  list-style: none;
}

.guide-accordion summary::-webkit-details-marker {
  display: none;
}

.guide-accordion summary::after {
  content: "⌄";
  margin-left: auto;
  color: #8fc5ff;
  font-size: 1.1rem;
  transition: transform .2s ease;
}

.guide-accordion[open] summary::after {
  transform: rotate(180deg);
}

.guide-accordion-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 185, 255, .24);
  border-radius: 10px;
  background: rgba(117, 185, 255, .1);
  color: #9acbff;
  font-size: .9rem;
  font-weight: 850;
}

.guide-accordion-content {
  padding: 0 15px 15px 60px;
  color: #b7cce2;
  font-size: .86rem;
  line-height: 1.55;
}

.guide-accordion-content.is-revealing {
  animation: guide-content-in .28s ease both;
}

@keyframes guide-content-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.guide-accordion-content p {
  margin: 0;
}

.guide-accordion-content p + p,
.guide-accordion-content ul,
.guide-accordion-content dl {
  margin-top: 10px;
}

.guide-accordion-content ul {
  margin-bottom: 0;
  padding-left: 18px;
}

.guide-accordion-content li + li {
  margin-top: 6px;
}

.guide-accordion-content dl {
  margin-bottom: 0;
}

.guide-accordion-content dt {
  color: #f5f5f3;
  font-weight: 760;
}

.guide-accordion-content dd {
  margin: 2px 0 8px;
}

.app-view[hidden] {
  display: none;
}

.app-view.setup-card,
.app-view.guide-card,
.app-view.feed-card,
.app-view.rides-card,
.app-view.account-card {
  margin-top: 0;
}

.app-view.guide-card[data-app-view="setup"] {
  margin-top: 14px;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 520px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 7px;
  transform: translateX(-50%);
  border: 1px solid rgba(143, 197, 255, .18);
  border-radius: 20px;
  background: rgba(10, 20, 34, .9);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: visible;
}

.bottom-nav-button {
  position: relative;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #879bb2;
  font: inherit;
  font-size: .72rem;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.feed-notification-dot {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: calc(50% - 20px);
  width: 9px;
  height: 9px;
  border: 2px solid rgba(10, 20, 34, .96);
  border-radius: 50%;
  background: #ff4f5f;
  box-shadow: 0 0 0 2px rgba(255, 79, 95, .14);
}

.feed-notification-dot[hidden] {
  display: none;
}

.bottom-nav-button.has-unread-feed svg {
  color: #d8e8f8;
}

.bottom-nav-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.bottom-nav-button-primary {
  min-height: 68px;
  margin-top: -15px;
  border: 1px solid rgba(143, 166, 190, .2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(139, 160, 184, .14), rgba(75, 94, 116, .1)),
    rgba(13, 25, 40, .96);
  color: #9aaec3;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .3),
    0 0 0 4px rgba(10, 20, 34, .88);
  transform: translateY(-2px);
}

.bottom-nav-button-primary svg {
  width: 25px;
  height: 25px;
}

.bottom-nav-button-primary:hover {
  border-color: rgba(164, 185, 207, .34);
  color: #c1d1e1;
  transform: translateY(-4px);
}

.bottom-nav-button[data-nav-view="ride"][aria-current="page"] {
  background: linear-gradient(145deg, #3ccf91, #208c66);
  color: #fff;
  box-shadow:
    0 12px 28px rgba(18, 105, 75, .4),
    0 0 0 4px rgba(10, 20, 34, .9);
}

.bottom-nav-button[data-nav-view="setup"][aria-current="page"] {
  background: rgba(117, 185, 255, .14);
  color: #8fc5ff;
}

.bottom-nav-button[data-nav-view="feed"][aria-current="page"] {
  background: rgba(255, 180, 84, .14);
  color: #ffc778;
}

.bottom-nav-button[data-nav-view="activity"][aria-current="page"] {
  background: rgba(73, 202, 218, .14);
  color: #7ce4ef;
}

.bottom-nav-button[data-nav-view="account"][aria-current="page"] {
  background: rgba(184, 140, 255, .14);
  color: #c8a7ff;
}

.bottom-nav-button:focus-visible {
  outline: 3px solid rgba(78, 225, 160, .24);
  outline-offset: 1px;
}

.bottom-nav-button:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.account-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(200, 167, 255, .2);
  background:
    radial-gradient(circle at 100% 0, rgba(145, 90, 230, .17), transparent 34%),
    linear-gradient(145deg, rgba(17, 28, 46, .97), rgba(12, 21, 36, .97));
}

.account-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, #8f6bda, #c8a7ff, #71a8ff);
}

.account-heading {
  margin-bottom: 22px;
  text-align: left;
}

.account-heading h2,
.account-signed-in h3,
.account-form h3 {
  margin: 0;
}

.account-heading p:last-child,
.account-form > p,
.account-signed-in > p {
  color: var(--muted);
}

.account-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(2, 12, 24, .32);
}

.account-mode-tab {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.account-mode-tab.active {
  background: rgba(167, 119, 235, .16);
  color: #e7d8ff;
  box-shadow: inset 0 0 0 1px rgba(200, 167, 255, .18);
}

.social-auth {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.social-auth[hidden] {
  display: none;
}

.google-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 11px 16px;
  border: 1px solid rgba(24, 39, 56, .16);
  border-radius: 12px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.google-auth-button:hover {
  background: #f8fafc;
}

.google-auth-button:focus-visible {
  outline: 3px solid rgba(185, 151, 238, .3);
  outline-offset: 2px;
}

.google-auth-button:disabled {
  cursor: wait;
  opacity: .68;
}

.google-auth-button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: rgba(189, 206, 224, .16);
  content: "";
}

.account-form {
  display: grid;
  gap: 10px;
}

.account-form[hidden],
.account-mode-tabs[hidden] {
  display: none;
}

.account-form label {
  margin-top: 4px;
  color: #e9f2fc;
  font-weight: 720;
}

.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(200, 167, 255, .22);
  border-radius: 12px;
  background: rgba(3, 13, 26, .4);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.account-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus {
  border-color: #b997ee;
  outline: 3px solid rgba(185, 151, 238, .16);
}

.feedback-character-count {
  margin-top: -6px;
  color: var(--muted);
  font-size: .76rem;
  text-align: right;
}

.feedback-contact-check {
  display: grid !important;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--text) !important;
  font-size: .9rem;
  line-height: 1.45;
}

.feedback-contact-check input {
  width: 20px !important;
  min-height: 20px !important;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #9d79df;
}

.legal-check {
  display: grid !important;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  margin: 4px 0 0 !important;
  color: var(--text) !important;
  font-size: .9rem;
  font-weight: 620 !important;
  line-height: 1.45;
}

.legal-check input {
  width: 20px !important;
  min-height: 20px !important;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #9d79df;
}

.legal-check a,
.account-legal-note a,
.policy-links a,
.guest-privacy-control a {
  color: #c8a7ff;
  font-weight: 760;
}

.account-legal-note {
  margin: 3px 0 4px !important;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.account-field-note {
  margin: -2px 0 5px;
  font-size: .86rem;
}

.account-primary-button,
.account-secondary-button,
.account-link-button,
.account-back-button {
  min-height: 48px;
  border-radius: 12px;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.account-primary-button {
  margin-top: 6px;
  border: 0;
  background: linear-gradient(135deg, #8f6bda, #6f9ff0);
  color: #fff;
  box-shadow: 0 10px 24px rgba(93, 80, 180, .24);
}

.account-secondary-button {
  width: 100%;
  border: 1px solid rgba(200, 167, 255, .22);
  background: rgba(156, 105, 231, .1);
  color: #e7d8ff;
}

.account-link-button,
.account-back-button {
  border: 0;
  background: transparent;
  color: #c8a7ff;
}

.account-back-button {
  width: max-content;
  min-height: 36px;
  padding: 0;
}

.account-primary-button:disabled,
.account-secondary-button:disabled,
.account-form input:disabled {
  cursor: wait;
  opacity: .58;
}

.account-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
}

.account-status[data-type="error"] {
  color: #ff9eaa;
}

.account-status[data-type="success"] {
  color: #80e8b6;
}

.account-unavailable {
  padding: 14px;
  border: 1px solid rgba(255, 180, 84, .25);
  border-radius: 12px;
  background: rgba(255, 180, 84, .09);
  color: #ffd39b;
}

.account-signed-in {
  text-align: left;
}

.privacy-setting,
.guest-privacy-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid rgba(200, 167, 255, .16);
  border-radius: 14px;
  background: rgba(5, 16, 29, .24);
}

.privacy-setting strong,
.guest-privacy-control strong {
  color: var(--text);
}

.privacy-setting p,
.guest-privacy-control p,
.privacy-choice-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.45;
}

.privacy-switch {
  position: relative;
  width: 52px;
  height: 30px;
  display: block !important;
  flex: 0 0 52px;
  margin: 0 !important;
}

.privacy-switch input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  min-height: 0 !important;
  opacity: 0;
}

.privacy-switch > span[aria-hidden] {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(200, 167, 255, .25);
  border-radius: 999px;
  background: rgba(140, 150, 165, .28);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.privacy-switch > span[aria-hidden]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #edf3fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}

.privacy-switch input:checked + span {
  border-color: rgba(156, 105, 231, .7);
  background: linear-gradient(135deg, #8f6bda, #6f9ff0);
}

.privacy-switch input:checked + span::after {
  transform: translateX(22px);
}

.privacy-switch input:focus-visible + span {
  outline: 3px solid rgba(185, 151, 238, .26);
  outline-offset: 2px;
}

.policy-links {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.privacy-save-status,
.legal-modal-status {
  min-height: 22px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.privacy-save-status[data-type="error"],
.legal-modal-status[data-type="error"] {
  color: #ff9eaa;
}

.privacy-save-status[data-type="success"] {
  color: #80e8b6;
}

.guest-privacy-control {
  margin-top: 18px;
}

.guest-privacy-control[hidden] {
  display: none;
}

.guest-privacy-control > a {
  grid-column: 1 / -1;
  font-size: .8rem;
}

.legal-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.legal-modal[hidden] {
  display: none;
}

.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 16, .78);
  backdrop-filter: blur(12px);
}

.legal-modal-panel {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(200, 167, 255, .25);
  border-radius: 22px;
  background: #101c2d;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

.legal-modal-panel h2 {
  margin: 12px 0 8px;
}

.legal-modal-panel > p {
  color: var(--muted);
  line-height: 1.55;
}

.legal-modal-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #8f6bda, #6f9ff0);
  color: white;
  font-size: 1.25rem;
  font-weight: 850;
}

.legal-modal-icon.safety {
  background: linear-gradient(145deg, #e59a39, #d46b42);
}

.legal-modal-actions {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 10px;
  margin-top: 8px;
}

.legal-modal-actions .account-primary-button,
#acceptCurrentTerms {
  width: 100%;
  min-height: 50px;
}

body.legal-modal-open {
  overflow: hidden;
}

body[data-theme="light"] .legal-modal-panel {
  border-color: rgba(79, 59, 125, .18);
  background: #f7f4fb;
  color: #172233;
}

body[data-theme="light"] .legal-check {
  color: #263449 !important;
}

body[data-theme="light"] .legal-check a,
body[data-theme="light"] .account-legal-note a,
body[data-theme="light"] .policy-links a,
body[data-theme="light"] .guest-privacy-control a {
  color: #61449c;
}

.account-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: 0 0 64px;
  margin: 0;
  border: 1px solid rgba(200, 167, 255, .28);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(143, 107, 218, .34), rgba(113, 168, 255, .24));
  color: #f0e8ff;
  font-size: 1.6rem;
  font-weight: 850;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.account-identity > div:last-child {
  min-width: 0;
}

.account-identity h3 {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity p {
  max-width: 100%;
  margin: 3px 0 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: .85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-tier {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid rgba(200, 167, 255, .18);
  border-radius: 999px;
  background: rgba(156, 105, 231, .09);
  color: #d9c4fb;
  font-size: .68rem;
  font-weight: 780;
}

.account-summary-list {
  margin: 0 0 14px;
}

.account-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  border: 1px solid rgba(200, 167, 255, .12);
  border-radius: 12px;
  background: rgba(156, 105, 231, .055);
}

.account-summary-list dt {
  color: var(--muted);
  font-size: .78rem;
}

.account-summary-list dd {
  margin: 0;
  color: var(--text);
  font-size: .82rem;
  font-weight: 760;
}

.account-settings-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.account-settings-list button {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(200, 167, 255, .15);
  border-radius: 13px;
  background: rgba(5, 16, 29, .24);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.account-settings-list button:hover {
  border-color: rgba(200, 167, 255, .28);
  background: rgba(156, 105, 231, .09);
}

.account-settings-list button > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-settings-list strong,
.account-settings-list small {
  display: block;
}

.account-settings-list small {
  color: var(--muted);
  font-size: .74rem;
}

.account-settings-list button > span:last-child {
  color: #c8a7ff;
  font-size: 1.35rem;
}

.account-panel .account-back-button {
  margin-bottom: 6px;
}

.account-form input[data-always-disabled] {
  cursor: default;
  opacity: .72;
}

.rides-card {
  position: relative;
  min-height: 420px;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(124, 228, 239, .2);
  background:
    radial-gradient(circle at 100% 0, rgba(73, 202, 218, .14), transparent 34%),
    linear-gradient(145deg, rgba(17, 28, 46, .97), rgba(12, 21, 36, .97));
}

.rides-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, #3ba9bb, #7ce4ef, #71a8ff);
}

.ride-summary {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 4px 0 26px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(124, 228, 239, .2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 0, rgba(113, 168, 255, .18), transparent 34%),
    linear-gradient(145deg, rgba(26, 68, 88, .72), rgba(10, 31, 49, .82));
  box-shadow: 0 16px 38px rgba(2, 13, 24, .18);
}

.ride-summary-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ride-summary-heading > div {
  min-width: 0;
}

.ride-summary-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 228, 239, .26);
  border-radius: 13px;
  background: rgba(124, 228, 239, .1);
  color: #9af1f7;
}

.ride-summary-icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.ride-summary-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ride-summary-title-row h2 {
  margin: 0;
  color: #effeff;
  font-size: clamp(1.18rem, 4vw, 1.48rem);
}

.ride-summary-heading p {
  margin: 3px 0 0;
  color: #a8c9d1;
  font-size: .84rem;
}

.ride-summary-preview-badge {
  padding: 4px 8px;
  border: 1px solid rgba(207, 219, 226, .2);
  border-radius: 999px;
  background: rgba(207, 219, 226, .09);
  color: #c9d6db;
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ride-summary-content {
  display: grid;
  gap: 16px;
}

.ride-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.ride-summary-metric {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px 11px;
  border: 1px solid rgba(124, 228, 239, .13);
  border-radius: 13px;
  background: rgba(3, 18, 31, .28);
}

.ride-summary-metric span {
  color: #9fbfc7;
  font-size: .67rem;
  font-weight: 720;
}

.ride-summary-metric strong {
  color: #f2feff;
  font-size: clamp(.9rem, 2.7vw, 1.12rem);
  line-height: 1.2;
}

.ride-summary-trend {
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid #7ce4ef;
  border-radius: 4px 11px 11px 4px;
  background: rgba(124, 228, 239, .07);
  color: #cae9ed;
  font-size: .8rem;
  line-height: 1.45;
}

.ride-summary.is-preview .ride-summary-content {
  filter: grayscale(.8);
  opacity: .5;
}

.rides-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.rides-heading h2 {
  margin: 0 0 4px;
}

.rides-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

.rides-refresh-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(124, 228, 239, .2);
  border-radius: 11px;
  background: rgba(73, 202, 218, .09);
  color: #a8f1f7;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.rides-refresh-button:disabled {
  cursor: wait;
  opacity: .5;
}

.guest-account-cta-card,
.rides-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 30px 18px;
  border: 1px dashed rgba(124, 228, 239, .22);
  border-radius: 16px;
  background: rgba(73, 202, 218, .06);
  color: var(--muted);
  text-align: center;
}

.guest-account-cta-card strong,
.rides-empty strong {
  color: var(--text);
  font-size: 1.05rem;
}

.guest-account-cta-card .account-primary-button {
  width: min(100%, 260px);
  padding: 10px 16px;
}

.rides-empty-icon {
  font-size: 2rem;
}

.rides-list {
  display: grid;
  gap: 16px;
  max-height: min(62vh, 590px);
  padding-right: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(124, 228, 239, .32) transparent;
  scroll-behavior: smooth;
}

.ride-date-group {
  display: grid;
  gap: 8px;
}

.previous-rides-button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(124, 228, 239, .18);
  border-radius: 14px;
  background: rgba(73, 202, 218, .08);
  color: #dffcff;
  font: inherit;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.previous-rides-button:hover {
  border-color: rgba(124, 228, 239, .3);
  background: rgba(73, 202, 218, .13);
  transform: translateY(-1px);
}

.previous-rides-button > span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(124, 228, 239, .07);
  color: #8cebf2;
  font-size: 1rem;
}

.previous-rides-button strong {
  font-size: .82rem;
}

.previous-rides-button-arrow {
  margin-left: auto;
  color: #7ce4ef;
  font-size: 1.3rem;
  transition: transform .2s ease;
}

.previous-rides-button[aria-expanded="true"] .previous-rides-button-arrow {
  transform: rotate(90deg);
}

.ride-date-heading {
  position: sticky;
  z-index: 2;
  top: 0;
  margin: 0;
  padding: 7px 4px 6px;
  color: #9debf2;
  background: linear-gradient(180deg, rgba(14, 27, 43, .98) 72%, rgba(14, 27, 43, 0));
  font-size: .76rem;
  font-weight: 820;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.ride-date-group.is-current-week > .ride-date-heading {
  padding-left: 10px;
  border-left: 3px solid #7ce4ef;
  border-radius: 3px;
}

.ride-date-list {
  display: grid;
  gap: 9px;
}

.ride-row {
  border: 1px solid rgba(124, 228, 239, .16);
  border-radius: 14px;
  background: rgba(4, 16, 29, .34);
  overflow: clip;
}

.ride-row summary {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.ride-row summary::-webkit-details-marker {
  display: none;
}

.ride-row-summary {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ride-row-name {
  color: #dffcff;
  font-size: .98rem;
}

.ride-row-completed,
.ride-row-overview {
  color: var(--muted);
  font-size: .78rem;
}

.ride-row-arrow {
  color: #7ce4ef;
  font-size: 1.35rem;
  transition: transform .22s ease;
}

.ride-row[open] .ride-row-arrow {
  transform: rotate(90deg);
}

.ride-row-content {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(124, 228, 239, .11);
  animation: ride-details-in .22s ease both;
}

.ride-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0;
}

.ride-detail-grid div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ride-detail-grid span {
  color: var(--muted);
  font-size: .72rem;
}

.ride-detail-grid strong {
  color: var(--text);
  font-size: .86rem;
}

.ride-delete-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 107, 107, .22);
  border-radius: 10px;
  background: rgba(255, 107, 107, .08);
  color: #ffabb2;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.ride-delete-button:disabled {
  cursor: wait;
  opacity: .5;
}

.rides-status,
.ride-save-status {
  min-height: 22px;
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
}

.rides-status {
  margin: 14px 0 0;
}

.ride-save-status {
  margin: 12px 0 0;
}

.rides-status[data-type="success"],
.ride-save-status[data-type="success"] {
  color: #80e8b6;
}

.rides-status[data-type="error"],
.ride-save-status[data-type="error"] {
  color: #ff9eaa;
}

@keyframes ride-details-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.preset {
  position: relative;
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 1px solid rgba(143, 197, 255, .2);
  background: rgba(5, 17, 31, .28);
  color: #d9ecff;
  border-radius: 10px;
  padding: 14px 10px;
  cursor: pointer;
}

.preset-icon {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
  filter: saturate(.9);
}

.preset-label {
  display: block;
  font-size: .9rem;
  font-weight: 750;
}

.preset-duration {
  color: #91aac2;
  font-size: .7rem;
  font-weight: 700;
}

.preset.active {
  border-color: #75b9ff;
  background: rgba(80, 157, 238, .2);
  box-shadow:
    inset 0 0 0 1px rgba(117, 185, 255, .2),
    0 0 0 2px rgba(117, 185, 255, .1);
}

.preset.active::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 7px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #75b9ff;
  color: #09203a;
  font-size: .68rem;
  font-weight: 900;
}

.preset.coming-soon,
.preset.coming-soon:disabled {
  border-color: rgba(148, 163, 184, .14);
  background: rgba(71, 85, 105, .12);
  color: rgba(203, 213, 225, .48);
  cursor: not-allowed;
  box-shadow: none;
}

.setup-lock-notice {
  margin: -2px 0 18px;
}

.guest-custom-preview {
  position: relative;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 13px;
  background: rgba(8, 20, 34, .3);
  opacity: .68;
}

.guest-custom-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(
      to bottom,
      rgba(8, 17, 29, .02) 0%,
      rgba(8, 17, 29, .08) 58%,
      rgba(8, 17, 29, .34) 100%
    );
  pointer-events: none;
}

.guest-custom-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.guest-custom-preview-heading h3 {
  margin: 0;
  color: #c8d5e3;
  font-size: .91rem;
}

.guest-custom-preview-heading p {
  margin: 3px 0 0;
  color: #8699ad;
  font-size: .72rem;
  line-height: 1.4;
}

.guest-preview-lock {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 9px;
  background: rgba(148, 163, 184, .1);
  filter: grayscale(1);
}

.guest-preview-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 10px;
  background: rgba(71, 85, 105, .09);
  color: #aab8c7;
}

.guest-preview-mode span:first-child {
  display: grid;
  gap: 2px;
}

.guest-preview-mode strong {
  font-size: .76rem;
}

.guest-preview-mode small {
  color: #7f91a4;
  font-size: .67rem;
}

.guest-preview-switch {
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-radius: 999px;
  background: rgba(117, 185, 255, .35);
  padding: 3px;
}

.guest-preview-switch span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #aebdcb;
}

.guest-preview-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.guest-preview-fields > .guest-preview-field:nth-child(n + 3) {
  display: none;
}

.guest-preview-field {
  min-width: 0;
}

.guest-preview-field label {
  display: block;
  margin: 0 0 5px;
  color: #8ea0b3;
  font-size: .69rem;
  font-weight: 750;
}

.guest-preview-field > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.guest-preview-field input,
.guest-preview-field button {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, .13);
  background: rgba(71, 85, 105, .11);
  color: #8f9faf;
  font: inherit;
  font-size: .72rem;
  text-align: center;
  -webkit-text-fill-color: #8f9faf;
  opacity: 1;
  margin: 0;
  padding: 0;
}

.guest-preview-field button:first-child {
  border-radius: 8px 0 0 8px;
}

.guest-preview-field button:last-child {
  border-radius: 0 8px 8px 0;
}

.guest-preview-field input {
  border-right: 0;
  border-left: 0;
}

.guest-preview-name {
  grid-column: 1 / -1;
}

.guest-preview-name input {
  width: 100%;
  border-radius: 8px;
  text-align: left;
  padding: 0 11px;
}

.account-settings-list .account-danger-link strong {
  color: #ff9eaa;
}

.account-delete-panel {
  gap: 14px;
}

.account-danger-notice {
  border: 1px solid rgba(255, 101, 120, .22);
  border-radius: 12px;
  background: rgba(120, 29, 44, .15);
  color: #ffc3ca;
  padding: 14px;
  line-height: 1.5;
}

.account-danger-notice p {
  margin: 5px 0 0;
  color: #dcaab1;
  font-size: .84rem;
}

.account-delete-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.account-delete-check input {
  width: 20px !important;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  accent-color: #d8465c;
}

.account-delete-button {
  width: 100%;
  border: 1px solid #e45a6e;
  border-radius: 10px;
  background: #bd3449;
  color: #fff;
  padding: 12px 14px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.account-delete-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.my-workouts {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid rgba(143, 197, 255, .15);
  border-radius: 13px;
  background: rgba(5, 16, 29, .27);
}

.add-custom-workout-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 11px;
  border: 1px solid rgba(117, 185, 255, .32);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(66, 139, 210, .2), rgba(110, 96, 208, .15));
  color: #d9ecff;
  font: inherit;
  font-size: .84rem;
  font-weight: 850;
  cursor: pointer;
}

.add-custom-workout-button > span:first-child {
  font-size: 1.18rem;
  line-height: 1;
}

.add-custom-workout-button:hover {
  border-color: rgba(117, 185, 255, .52);
  background: linear-gradient(135deg, rgba(66, 139, 210, .29), rgba(110, 96, 208, .22));
}

.add-custom-workout-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.my-workouts-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.my-workouts-heading h3,
.custom-workout-editor-heading h3 {
  margin: 0;
  color: #d9ecff;
  font-size: .92rem;
}

.my-workouts-heading p,
.custom-workout-editor-heading p {
  margin: 3px 0 0;
  color: #91abc7;
  font-size: .73rem;
}

.my-workouts-heading > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(117, 185, 255, .1);
  color: #a9d3ff;
  font-size: .68rem;
  font-weight: 800;
}

.my-workouts-list {
  display: grid;
  gap: 8px;
}

.my-workout-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(143, 197, 255, .13);
  border-radius: 10px;
  background: rgba(13, 31, 51, .52);
}

.my-workout-item.is-selected {
  border-color: rgba(117, 185, 255, .46);
  background: linear-gradient(135deg, rgba(80, 157, 238, .17), rgba(123, 113, 232, .1));
  box-shadow: inset 3px 0 0 #75b9ff;
}

.my-workout-item.is-selected .my-workout-use {
  border-color: rgba(117, 185, 255, .38);
  background: rgba(117, 185, 255, .2);
  color: #e9f5ff;
}

.my-workout-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.my-workout-copy strong {
  overflow: hidden;
  color: #d9ecff;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-workout-copy span {
  overflow: hidden;
  color: #91abc7;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-workout-actions {
  display: grid;
  grid-template-columns: minmax(70px, 1.45fr) minmax(52px, 1fr) 38px;
  gap: 5px;
}

.my-workout-actions button,
.custom-editor-close {
  min-height: 36px;
  border: 1px solid rgba(143, 197, 255, .16);
  border-radius: 8px;
  background: rgba(117, 185, 255, .08);
  color: #bcdcff;
  font: inherit;
  font-size: .76rem;
  font-weight: 780;
  cursor: pointer;
}

.my-workout-actions button {
  padding: 7px 9px;
}

.my-workout-actions .my-workout-use {
  min-height: 42px;
  padding-inline: 14px;
  border-color: rgba(117, 185, 255, .34);
  background: linear-gradient(135deg, rgba(77, 159, 234, .34), rgba(123, 113, 232, .24));
  color: #f2f8ff;
  font-size: .84rem;
  font-weight: 850;
}

.my-workout-actions .my-workout-delete {
  width: 38px;
  padding: 0;
  border-color: rgba(255, 107, 107, .17);
  background: rgba(255, 107, 107, .06);
  color: #ffabb2;
  font-size: 1.1rem;
}

.my-workouts-empty {
  margin: 0;
  padding: 11px;
  border: 1px dashed rgba(143, 197, 255, .14);
  border-radius: 9px;
  color: #91abc7;
  font-size: .75rem;
  text-align: center;
}

.custom-workout-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.custom-workout-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 8, 17, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.custom-workout-panel {
  position: relative;
  width: min(100%, 680px);
  max-height: min(90vh, 820px);
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid rgba(117, 185, 255, .24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(123, 113, 232, .15), transparent 34%),
    linear-gradient(150deg, #12243a, #0b182a);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .48);
  scrollbar-color: rgba(117, 185, 255, .3) transparent;
}

.custom-workout-panel-handle {
  display: none;
}

body.custom-modal-open {
  overflow: hidden;
}

.custom-workout-editor {
  display: grid;
  gap: 0;
}

.custom-workout-editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.custom-editor-close {
  width: 38px;
  flex: 0 0 38px;
  padding: 0;
  font-size: 1.25rem;
}

.custom-workout-editor > input {
  min-height: 48px;
  font-size: 1rem;
}

.custom-workout-editor .mode-control {
  margin-top: 18px;
}

.custom-workout-editor .summary {
  margin-top: 18px;
}

.custom-workout-footer {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 10px;
  margin-top: 14px;
}

.custom-workout-cancel {
  min-height: 46px;
  border: 1px solid rgba(143, 197, 255, .17);
  border-radius: 10px;
  background: rgba(143, 197, 255, .06);
  color: #b9cee3;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.custom-workout-save {
  width: 100%;
  min-height: 46px;
  margin-top: 0;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #4d9fea, #7b71e8);
  color: #fff;
  font: inherit;
  font-weight: 820;
  cursor: pointer;
}

.custom-workout-save:disabled,
.custom-workout-cancel:disabled,
.my-workout-actions button:disabled,
.custom-editor-close:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.custom-workout-status {
  min-height: 20px;
  margin: 9px 0 0;
  color: #91abc7;
  font-size: .76rem;
  text-align: center;
}

.custom-workout-status[data-type="success"] {
  color: #80e8b6;
}

.custom-workout-status[data-type="error"] {
  color: #ff9eaa;
}

.mode-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 15px;
  border: 1px solid rgba(143, 197, 255, .16);
  border-radius: 11px;
  background: rgba(5, 16, 29, .34);
  cursor: pointer;
}

.mode-copy strong,
.mode-copy span {
  display: block;
}

.mode-copy strong {
  color: #d9ecff;
  font-size: .9rem;
}

.mode-copy span {
  margin-top: 3px;
  color: #91abc7;
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.35;
}

.mode-switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 27px;
}

.mode-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.mode-switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(143, 197, 255, .24);
  border-radius: 999px;
  background: rgba(71, 85, 105, .55);
  transition: background .2s ease, border-color .2s ease;
}

.mode-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #d9ecff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
  transition: transform .2s ease;
}

.mode-switch input:checked + .mode-switch-track {
  border-color: #75b9ff;
  background: rgba(80, 157, 238, .72);
}

.mode-switch input:checked + .mode-switch-track::after {
  transform: translateX(21px);
  background: #fff;
}

.mode-switch input:focus-visible + .mode-switch-track {
  outline: 3px solid rgba(117, 185, 255, .22);
  outline-offset: 2px;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 14px;
}

label {
  display: block;
  color: #b5cbe2;
  font-size: .82rem;
  font-weight: 650;
}

.fields label {
  font-size: .95rem;
  line-height: 1.35;
}

.input-field[hidden] {
  display: none;
}

.stepper {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 8px;
  margin-top: 9px;
}

.stepper-button {
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border: 1px solid rgba(143, 197, 255, .2);
  border-radius: 9px;
  background: rgba(24, 46, 72, .72);
  color: #d9ecff;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.stepper-button:hover {
  border-color: rgba(117, 185, 255, .5);
  background: rgba(42, 78, 116, .8);
}

.stepper-button:focus-visible {
  outline: 3px solid rgba(117, 185, 255, .22);
  outline-offset: 2px;
}

.stepper-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

input {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(5, 16, 29, .68);
  border: 1px solid rgba(143, 197, 255, .2);
  border-radius: 9px;
  outline: none;
}

.fields input {
  min-height: 56px;
  min-width: 0;
  margin-top: 0;
  padding: 14px 16px;
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.fields input::-webkit-inner-spin-button,
.fields input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

input:focus {
  border-color: #75b9ff;
  box-shadow: 0 0 0 3px rgba(117, 185, 255, .12);
}

.validation-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--warning);
  font-size: .84rem;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.summary {
  margin-top: 16px;
  padding: 14px;
  background: rgba(5, 16, 29, .42);
  border: 1px solid rgba(143, 197, 255, .16);
  border-radius: 10px;
  color: #a9bfd8;
  font-size: .9rem;
}

.summary strong { color: #d9ecff; }

.footer-note {
  color: var(--muted);
  text-align: center;
  font-size: .8rem;
  margin-top: 18px;
}

body.workout-active .setup-card,
body.workout-active .guide-card,
body.workout-active .rides-card,
body.workout-active .account-card,
body.workout-active .footer-note,
body.workout-active .bottom-nav {
  opacity: .15;
  filter: blur(10px);
  transform: scale(.97);
  pointer-events: none;
  user-select: none;
  transition: opacity .35s ease, filter .35s ease, transform .35s ease;
}

body.workout-active .workout-card {
  position: fixed;
  z-index: 10;
  top: max(12px, env(safe-area-inset-top));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(calc(100% - 24px), 900px);
  padding:
    max(24px, env(safe-area-inset-top))
    clamp(16px, 5vw, 48px)
    max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 38%),
    rgba(10, 18, 31, .98);
  box-shadow:
    0 35px 90px rgba(0, 0, 0, .55),
    0 0 70px color-mix(in srgb, var(--accent) 16%, transparent);
  transform: translateX(-50%);
  overflow-y: auto;
  animation: enter-focus .45s cubic-bezier(.2, .8, .2, 1) both;
}

body.workout-active .workout-card::before {
  height: 8px;
  box-shadow: 0 0 28px var(--accent);
}

body.workout-active .selected-workout {
  display: none;
}

body.workout-active .ride-focus-row {
  display: none;
}

body.workout-active .topbar {
  display: none;
}

body.workout-active .exit-focus-toggle {
  display: block;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}

body.workout-active .instruction {
  font-size: clamp(2.6rem, 10vw, 6rem);
}

body.workout-active .timer {
  margin: clamp(22px, 5vh, 48px) 0 clamp(16px, 3vh, 28px);
  font-size: clamp(5.5rem, 24vw, 13rem);
  text-shadow: 0 0 42px color-mix(in srgb, var(--accent) 22%, transparent);
}

@keyframes enter-focus {
  from {
    opacity: .65;
    transform: translateX(-50%) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes scenery-day-cycle {
  0% {
    opacity: .08;
  }
  45% {
    opacity: .34;
  }
  100% {
    opacity: .92;
  }
}

@keyframes scenery-day-cycle-light {
  0% {
    opacity: .04;
  }
  50% {
    opacity: .18;
  }
  100% {
    opacity: .48;
  }
}

@media (max-width: 560px) {
  body { background-attachment: scroll; }
  .app { padding-top: 16px; padding-bottom: 112px; }
  .topbar {
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .onboarding-modal {
    align-items: end;
    padding: 0;
  }
  .onboarding-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .onboarding-topbar {
    padding:
      calc(10px + env(safe-area-inset-top))
      18px
      8px;
  }
  .onboarding-progress-track { margin-inline: 18px; }
  .onboarding-body { padding: 22px 18px 10px; }
  .onboarding-options { grid-template-columns: 1fr; }
  .onboarding-options-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboarding-options button { min-height: 60px; }
  .onboarding-options-compact button {
    min-height: 66px;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .onboarding-options-compact button > span {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }
  .onboarding-summary { grid-template-columns: 1fr; }
  .onboarding-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
  }
  .onboarding-summary small { margin: 0; }
  .onboarding-actions {
    padding:
      10px
      18px
      calc(16px + env(safe-area-inset-bottom));
  }
  .onboarding-finish-actions { grid-template-columns: 1fr; }
  .brand { gap: 8px; }
  .brand-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }
  .brand-title { gap: 5px; }
  .brand-wordmark { width: 73px; }
  .brand-version { font-size: .56rem; }
  .brand p {
    display: block;
    max-width: 94px;
    margin-top: 2px;
    font-size: .65rem;
  }
  .workout-card, .setup-card { border-radius: 20px; }
  .workout-card { padding: 18px 14px; }
  .guide-card { padding: 18px 15px; }
  .guide-journey {
    gap: 5px;
    padding: 11px 9px;
  }
  .guide-journey-step {
    justify-content: center;
    gap: 6px;
  }
  .guide-journey-number {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
  .guide-journey-step small { display: none; }
  .guide-accordion-content { padding-left: 15px; }
  .account-card, .rides-card { padding: 20px 16px; }
  .ride-summary {
    margin-inline: -2px;
    padding: 17px 14px;
  }
  .ride-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav-button { padding-inline: 4px; font-size: .67rem; }
  .setup-card .setup-content { max-height: 1600px; }
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 8px;
  }
  .fields label {
    min-height: 2.6em;
    font-size: .78rem;
    line-height: 1.3;
  }
  .stepper {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 4px;
    margin-top: 6px;
  }
  .stepper-button {
    min-width: 38px;
    min-height: 46px;
    font-size: 1.3rem;
  }
  .fields input {
    min-width: 0;
    min-height: 46px;
    padding: 10px 4px;
    font-size: 1rem;
  }
  .preset-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .my-workout-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .my-workout-actions {
    grid-template-columns: 1.5fr 1fr 42px;
  }
  .custom-workout-modal {
    align-items: end;
    padding: 0;
  }
  .custom-workout-panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding:
      calc(10px + env(safe-area-inset-top))
      16px
      calc(18px + env(safe-area-inset-bottom));
    scroll-padding-top: 82px;
    scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
  }
  .custom-workout-panel-handle {
    width: 42px;
    height: 4px;
    display: block;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: rgba(185, 206, 227, .3);
  }
  .custom-workout-editor-heading {
    position: sticky;
    z-index: 3;
    top: calc(-10px - env(safe-area-inset-top));
    margin: 0 -16px 16px;
    padding:
      calc(10px + env(safe-area-inset-top))
      16px
      12px;
    background: #102036;
    box-shadow: 0 1px 0 rgba(117, 185, 255, .14);
  }
  .custom-workout-footer {
    position: sticky;
    z-index: 3;
    bottom: calc(-18px - env(safe-area-inset-bottom));
    margin: 16px -16px 0;
    padding:
      12px
      16px
      calc(18px + env(safe-area-inset-bottom));
    background: #0b182a;
    box-shadow: 0 -1px 0 rgba(117, 185, 255, .14);
  }
  .controls { grid-template-columns: 1fr 1.2fr 1fr; }
  .btn { padding: 14px 8px; font-size: .92rem; }
  .topbar-actions {
    flex: 0 0 auto;
    gap: 4px;
  }
  .sound-toggle {
    width: 38px;
    height: 38px;
  }
  .theme-toggle, .focus-toggle, .header-account-button {
    min-width: 0;
    min-height: 38px;
    padding: 8px 9px;
    font-size: .74rem;
  }
  .guide-accordion-content {
    padding-left: 15px;
  }
  body.workout-active .workout-card {
    top: max(6px, env(safe-area-inset-top));
    bottom: max(6px, env(safe-area-inset-bottom));
    width: calc(100% - 12px);
    border-radius: 24px;
  }

  body.workout-active .stats {
    margin: 12px 0 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .workout-card,
  .setup-content,
  body.workout-active .setup-card,
  body.workout-active .guide-card,
  body.workout-active .rides-card,
  body.workout-active .account-card,
  body.workout-active .bottom-nav,
  body.workout-active .footer-note {
    transition: none;
  }

  body.workout-active .workout-card,
  .ride-row-content {
    animation: none;
  }

  body::after {
    animation: none;
    opacity: .28;
  }
}

body[data-theme="light"] {
  --panel: #ffffff;
  --panel-2: #e8eef6;
  --text: #132238;
  --muted: #607089;
  --accent-dark: #d8f4e8;
  --border: rgba(27, 54, 86, .14);
  --shadow: 0 20px 45px rgba(37, 65, 96, .14);
  color-scheme: light;
  background:
    radial-gradient(circle at top right, rgba(39, 184, 126, .14), transparent 35%),
    linear-gradient(160deg, rgba(244, 248, 252, .66) 0%, rgba(231, 238, 247, .7) 100%),
    url("../assets/jeba-cycling-scenery.jpg") center / cover fixed no-repeat;
  background-color: #e7eef7;
}

body[data-theme="light"] .brand-wordmark {
  filter: none;
}

body[data-theme="light"]::before {
  background: rgba(218, 228, 240, .72);
}

body[data-theme="light"]::after {
  animation-name: scenery-day-cycle-light;
}

body[data-theme="light"] .card {
  background: rgba(255, 255, 255, .94);
}

body[data-theme="light"] .workout-card {
  background: rgba(238, 244, 249, .96);
  border-color: rgba(27, 54, 86, .12);
  box-shadow: 0 20px 45px rgba(37, 65, 96, .11);
}

body[data-theme="light"] .selected-workout {
  border-color: rgba(36, 112, 184, .17);
  background: rgba(255, 255, 255, .48);
}

body[data-theme="light"] .selected-workout-icon {
  border-color: rgba(36, 112, 184, .15);
  background: rgba(36, 112, 184, .07);
}

body[data-theme="light"] .selected-workout-name {
  color: #173b62;
}

body[data-theme="light"] .selected-workout-details {
  color: #5e748a;
}

body[data-theme="light"] .selected-workout-plan {
  color: #415f7c;
}

body[data-theme="light"] .sound-toggle,
body[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 5px 16px rgba(37, 65, 96, .08);
}

body[data-theme="light"] .header-account-button {
  border-color: #5683ad;
  background: #e2edf8;
  color: #173b62;
  box-shadow: 0 5px 16px rgba(37, 65, 96, .16);
}

body[data-theme="light"] .header-account-button[data-signed-in="true"] {
  border-color: #718096;
  background: #e3e8ef;
  color: #263449;
}

body[data-theme="light"] .header-account-button:hover {
  border-color: #366b9e;
  background: #d3e5f5;
  box-shadow: 0 7px 20px rgba(37, 65, 96, .2);
}

body[data-theme="light"] .onboarding-panel {
  border-color: rgba(50, 91, 132, .16);
  background: #f6f3ed;
}

body[data-theme="light"] .onboarding-step h2 {
  color: #17283a;
}

body[data-theme="light"] .onboarding-step > p:not(.onboarding-eyebrow):not(.onboarding-recommendation),
body[data-theme="light"] .onboarding-note,
body[data-theme="light"] .onboarding-recommendation {
  color: #617386;
}

body[data-theme="light"] .onboarding-progress-copy,
body[data-theme="light"] .onboarding-skip,
body[data-theme="light"] .onboarding-skip-question {
  color: #52677d;
}

body[data-theme="light"] .onboarding-options button,
body[data-theme="light"] .onboarding-summary div {
  border-color: rgba(50, 91, 132, .15);
  background: rgba(255, 255, 255, .68);
  color: #24384d;
}

body[data-theme="light"] .onboarding-options button[aria-pressed="true"] {
  border-color: #397fc4;
  background: rgba(69, 139, 209, .13);
}

body[data-theme="light"] .onboarding-summary strong {
  color: #24384d;
}

body[data-theme="light"] .onboarding-welcome label {
  color: #344a60;
}

body[data-theme="light"] .focus-toggle {
  background: rgba(255, 255, 255, .82);
}

body[data-theme="light"] .ride-focus-toggle {
  border-color: rgba(36, 112, 184, .2);
  background:
    linear-gradient(120deg, rgba(98, 169, 235, .12), rgba(123, 113, 232, .07)),
    rgba(255, 255, 255, .7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 8px 20px rgba(37, 65, 96, .09);
}

body[data-theme="light"] .ride-focus-toggle .btn-icon {
  color: #286da9;
}

body[data-theme="light"] .exit-focus-toggle {
  background: rgba(255, 255, 255, .88);
}

body[data-theme="light"] .stat {
  background: rgba(34, 67, 105, .035);
}

body[data-theme="light"] .progress-track {
  background: rgba(23, 59, 98, .16);
  box-shadow: inset 0 1px 3px rgba(23, 59, 98, .12);
}

body[data-theme="light"] .progress-bar {
  box-shadow:
    0 0 0 1px rgba(23, 59, 98, .12),
    0 2px 7px color-mix(in srgb, var(--accent) 34%, transparent);
}

body[data-theme="light"] .setup-card {
  background:
    linear-gradient(145deg, rgba(224, 238, 253, .98), rgba(205, 225, 247, .98));
  border-color: rgba(51, 112, 176, .24);
}

body[data-theme="light"] .guide-card {
  background:
    linear-gradient(145deg, rgba(224, 238, 253, .98), rgba(211, 229, 248, .98));
  border-color: rgba(51, 112, 176, .22);
}

body[data-theme="light"] .setup-section-tabs {
  border-color: rgba(50, 80, 111, .12);
  background: rgba(47, 65, 84, .06);
}

body[data-theme="light"] .setup-section-tab {
  color: #5b7085;
}

body[data-theme="light"] .setup-section-tab.active {
  background: linear-gradient(135deg, rgba(67, 137, 207, .14), rgba(100, 82, 190, .12));
  color: #315d87;
  box-shadow: inset 0 0 0 1px rgba(63, 120, 177, .12);
}

body[data-theme="light"] .guide-card .setup-heading {
  color: #25292e;
}

body[data-theme="light"] .guide-card .accordion-icon {
  color: #246fae;
  background: rgba(255, 255, 255, .45);
  border-color: rgba(51, 112, 176, .22);
}

body[data-theme="light"] .guide-card .setup-intro,
body[data-theme="light"] .guide-safety,
body[data-theme="light"] .guide-accordion-content {
  color: #626870;
}

body[data-theme="light"] .guide-accordion {
  border-color: rgba(51, 112, 176, .13);
  background: rgba(255, 255, 255, .78);
}

body[data-theme="light"] .guide-accordion summary,
body[data-theme="light"] .guide-accordion-content dt {
  color: #292d32;
}

body[data-theme="light"] .guide-accordion-icon {
  border-color: rgba(36, 112, 184, .2);
  background: rgba(36, 112, 184, .08);
  color: #246fae;
}

body[data-theme="light"] .guide-journey {
  border-color: rgba(51, 112, 176, .12);
  background: rgba(255, 255, 255, .72);
}

body[data-theme="light"] .guide-journey-step strong {
  color: #292d32;
}

body[data-theme="light"] .guide-journey-step small {
  color: #737981;
}

body[data-theme="light"] .guide-journey-arrow {
  color: #7896b3;
}

body[data-theme="light"] .guide-safety {
  border-color: rgba(51, 112, 176, .12);
}

body[data-theme="light"] .bottom-nav {
  border-color: rgba(36, 80, 122, .14);
  background: rgba(246, 250, 253, .92);
  box-shadow: 0 14px 32px rgba(31, 62, 91, .18);
}

body[data-theme="light"] .bottom-nav-button {
  color: #64788d;
}

body[data-theme="light"] .bottom-nav-button[data-nav-view="ride"][aria-current="page"] {
  border-color: rgba(21, 134, 91, .28);
  background: linear-gradient(145deg, #35c789, #1f8a64);
  color: #fff;
  box-shadow:
    0 11px 24px rgba(26, 117, 84, .25),
    0 0 0 4px rgba(246, 250, 253, .94);
}

body[data-theme="light"] .bottom-nav-button-primary:not([aria-current="page"]) {
  border-color: rgba(76, 101, 126, .18);
  background:
    linear-gradient(145deg, rgba(113, 135, 158, .1), rgba(72, 95, 119, .06)),
    rgba(248, 251, 253, .98);
  color: #61768b;
  box-shadow:
    0 9px 21px rgba(49, 70, 91, .13),
    0 0 0 4px rgba(246, 250, 253, .94);
}

body[data-theme="light"] .bottom-nav-button[data-nav-view="setup"][aria-current="page"] {
  background: rgba(36, 112, 184, .11);
  color: #246fae;
}

body[data-theme="light"] .bottom-nav-button[data-nav-view="feed"][aria-current="page"] {
  background: rgba(190, 112, 21, .12);
  color: #a25e12;
}

body[data-theme="light"] .feed-notification-dot {
  border-color: rgba(244, 248, 252, .98);
}

body[data-theme="light"] .feed-card {
  border-color: rgba(190, 112, 21, .18);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 180, 84, .13), transparent 34%),
    #f7f5f1;
}

body[data-theme="light"] .feed-heading h2,
body[data-theme="light"] .feed-toolbar,
body[data-theme="light"] .feed-post h3 {
  color: #292d32;
}

body[data-theme="light"] .feed-status,
body[data-theme="light"] .feed-post p {
  color: #626870;
}

body[data-theme="light"] .feed-heading-icon,
body[data-theme="light"] .feed-refresh-button {
  border-color: rgba(190, 112, 21, .2);
  background: rgba(190, 112, 21, .08);
  color: #95530c;
}

body[data-theme="light"] .feed-toolbar {
  border-top-color: rgba(41, 48, 55, .1);
}

body[data-theme="light"] .feed-status {
  border-color: rgba(41, 48, 55, .16);
}

body[data-theme="light"] .feed-post {
  border-color: rgba(41, 48, 55, .1);
  background: #fff;
}

body[data-theme="light"] .feed-post-meta {
  color: #737981;
}

body[data-theme="light"] .feed-post-meta span,
body[data-theme="light"] .feed-cache-note {
  background: rgba(190, 112, 21, .08);
  color: #8d4d09;
}

body[data-theme="light"] .feed-post-link {
  color: #95530c;
}

body[data-theme="light"] .bottom-nav-button[data-nav-view="activity"][aria-current="page"] {
  background: rgba(23, 132, 145, .11);
  color: #167783;
}

body[data-theme="light"] .bottom-nav-button[data-nav-view="account"][aria-current="page"] {
  background: rgba(111, 70, 180, .11);
  color: #7042a8;
}

body[data-theme="light"] .account-card {
  border-color: rgba(111, 70, 180, .15);
  background:
    radial-gradient(circle at 100% 0, rgba(145, 90, 230, .09), transparent 34%),
    linear-gradient(145deg, rgba(246, 246, 252, .96), rgba(235, 241, 248, .97));
}

body[data-theme="light"] .account-mode-tabs {
  background: rgba(47, 65, 84, .06);
}

body[data-theme="light"] .account-mode-tab.active {
  background: rgba(111, 70, 180, .1);
  color: #5d358e;
  box-shadow: inset 0 0 0 1px rgba(111, 70, 180, .1);
}

body[data-theme="light"] .google-auth-button {
  border-color: rgba(36, 61, 86, .18);
  box-shadow: 0 8px 18px rgba(37, 57, 78, .09);
}

body[data-theme="light"] .auth-divider::before,
body[data-theme="light"] .auth-divider::after {
  background: rgba(47, 65, 84, .15);
}

body[data-theme="light"] .account-form label {
  color: #243d56;
}

body[data-theme="light"] .account-form input {
  border-color: rgba(64, 81, 101, .18);
  background: rgba(255, 255, 255, .65);
  color: #18324b;
}

body[data-theme="light"] .account-form select,
body[data-theme="light"] .account-form textarea {
  border-color: rgba(82, 59, 132, .18);
  background: #fff;
  color: #1c293b;
}

body[data-theme="light"] .account-link-button,
body[data-theme="light"] .account-back-button {
  color: #7042a8;
}

body[data-theme="light"] .account-secondary-button {
  border-color: rgba(111, 70, 180, .17);
  background: rgba(111, 70, 180, .07);
  color: #603593;
}

body[data-theme="light"] .account-status[data-type="error"] {
  color: #a3293d;
}

body[data-theme="light"] .account-status[data-type="success"] {
  color: #14704d;
}

body[data-theme="light"] .account-tier,
body[data-theme="light"] .account-summary-list div {
  border-color: rgba(111, 70, 180, .12);
  background: rgba(111, 70, 180, .05);
}

body[data-theme="light"] .account-tier {
  color: #603593;
}

body[data-theme="light"] .account-settings-list button {
  border-color: rgba(64, 81, 101, .13);
  background: rgba(255, 255, 255, .48);
  color: #18324b;
}

body[data-theme="light"] .account-settings-list button:hover {
  border-color: rgba(111, 70, 180, .2);
  background: rgba(111, 70, 180, .06);
}

body[data-theme="light"] .account-settings-list button > span:last-child {
  color: #7042a8;
}

body[data-theme="light"] .rides-card {
  border-color: rgba(23, 132, 145, .16);
  background:
    radial-gradient(circle at 100% 0, rgba(73, 202, 218, .1), transparent 34%),
    linear-gradient(145deg, rgba(242, 250, 251, .97), rgba(231, 241, 247, .97));
}

body[data-theme="light"] .rides-refresh-button {
  border-color: rgba(23, 132, 145, .16);
  background: rgba(23, 132, 145, .07);
  color: #146b75;
}

body[data-theme="light"] .ride-summary {
  border-color: rgba(23, 132, 145, .17);
  background:
    radial-gradient(circle at 95% 0, rgba(79, 137, 207, .13), transparent 34%),
    linear-gradient(145deg, rgba(219, 242, 244, .92), rgba(222, 233, 245, .94));
  box-shadow: 0 14px 34px rgba(42, 83, 102, .1);
}

body[data-theme="light"] .ride-summary-icon {
  border-color: rgba(23, 132, 145, .18);
  background: rgba(23, 132, 145, .08);
  color: #147481;
}

body[data-theme="light"] .ride-summary-title-row h2 {
  color: #174a55;
}

body[data-theme="light"] .ride-summary-heading p,
body[data-theme="light"] .ride-summary-metric span {
  color: #58727b;
}

body[data-theme="light"] .ride-summary-preview-badge {
  border-color: rgba(71, 92, 104, .17);
  background: rgba(71, 92, 104, .07);
  color: #58666d;
}

body[data-theme="light"] .ride-summary-metric {
  border-color: rgba(23, 132, 145, .12);
  background: rgba(255, 255, 255, .48);
}

body[data-theme="light"] .ride-summary-metric strong {
  color: #173f49;
}

body[data-theme="light"] .ride-summary-trend {
  border-left-color: #178491;
  background: rgba(23, 132, 145, .065);
  color: #315e68;
}

body[data-theme="light"] .guest-account-cta-card,
body[data-theme="light"] .rides-empty {
  border-color: rgba(23, 132, 145, .2);
  background: rgba(23, 132, 145, .045);
}

body[data-theme="light"] .ride-row {
  border-color: rgba(23, 132, 145, .14);
  background: rgba(255, 255, 255, .58);
}

body[data-theme="light"] .ride-date-heading {
  color: #167783;
  background: linear-gradient(180deg, rgba(238, 247, 249, .98) 72%, rgba(238, 247, 249, 0));
}

body[data-theme="light"] .previous-rides-button {
  border-color: rgba(23, 132, 145, .16);
  background: rgba(23, 132, 145, .07);
  color: #174a55;
}

body[data-theme="light"] .previous-rides-button:hover {
  border-color: rgba(23, 132, 145, .25);
  background: rgba(23, 132, 145, .11);
}

body[data-theme="light"] .previous-rides-button > span:first-child,
body[data-theme="light"] .previous-rides-button-arrow {
  color: #147481;
}

body[data-theme="light"] .ride-row-name {
  color: #174a55;
}

body[data-theme="light"] .ride-row-arrow {
  color: #167783;
}

body[data-theme="light"] .ride-delete-button {
  border-color: rgba(163, 41, 61, .16);
  background: rgba(163, 41, 61, .055);
  color: #a3293d;
}

body[data-theme="light"] .rides-status[data-type="success"],
body[data-theme="light"] .ride-save-status[data-type="success"] {
  color: #14704d;
}

body[data-theme="light"] .rides-status[data-type="error"],
body[data-theme="light"] .ride-save-status[data-type="error"] {
  color: #a3293d;
}

body[data-theme="light"] .setup-heading,
body[data-theme="light"] .summary strong {
  color: #173b62;
}

body[data-theme="light"] .accordion-icon {
  color: #285f98;
  background: rgba(255, 255, 255, .48);
  border-color: rgba(51, 112, 176, .2);
}

body[data-theme="light"] .setup-intro,
body[data-theme="light"] .summary {
  color: #526e8d;
}

body[data-theme="light"] .preset {
  color: #234f7d;
  background: rgba(255, 255, 255, .46);
  border-color: rgba(51, 112, 176, .2);
}

body[data-theme="light"] .my-workouts {
  border-color: rgba(42, 92, 148, .14);
  background: rgba(255, 255, 255, .34);
  color: #536c86;
}

body[data-theme="light"] .guest-custom-preview {
  border-color: rgba(76, 91, 108, .2);
  background: rgba(233, 237, 242, .72);
}

body[data-theme="light"] .guest-custom-preview::after {
  background:
    linear-gradient(
      to bottom,
      rgba(226, 232, 240, .02) 0%,
      rgba(226, 232, 240, .1) 58%,
      rgba(226, 232, 240, .42) 100%
    );
}

body[data-theme="light"] .guest-custom-preview-heading h3,
body[data-theme="light"] .guest-preview-mode strong {
  color: #48596b;
}

body[data-theme="light"] .guest-custom-preview-heading p,
body[data-theme="light"] .guest-preview-mode small,
body[data-theme="light"] .guest-preview-field label {
  color: #667789;
}

body[data-theme="light"] .guest-preview-mode,
body[data-theme="light"] .guest-preview-field input,
body[data-theme="light"] .guest-preview-field button {
  border-color: rgba(76, 91, 108, .18);
  background: rgba(210, 218, 227, .72);
  color: #526273;
  -webkit-text-fill-color: #526273;
}

@media (max-width: 360px) {
  .guest-preview-fields {
    grid-template-columns: 1fr;
  }
}

body[data-theme="light"] .account-danger-notice {
  border-color: rgba(163, 41, 61, .2);
  background: #fff3f4;
  color: #8d2335;
}

body[data-theme="light"] .account-danger-notice p {
  color: #854d57;
}

body[data-theme="light"] .my-workouts-heading h3,
body[data-theme="light"] .custom-workout-editor-heading h3,
body[data-theme="light"] .my-workout-copy strong {
  color: #173b62;
}

body[data-theme="light"] .my-workout-item {
  border-color: rgba(42, 92, 148, .12);
  background: rgba(255, 255, 255, .48);
}

body[data-theme="light"] .my-workout-item.is-selected {
  border-color: rgba(42, 92, 148, .28);
  background: linear-gradient(135deg, rgba(68, 139, 207, .12), rgba(123, 113, 232, .07));
}

body[data-theme="light"] .my-workout-actions .my-workout-use {
  border-color: #337fca;
  background: linear-gradient(135deg, #337fca, #6963ce);
  color: #fff;
}

body[data-theme="light"] .add-custom-workout-button {
  border-color: rgba(42, 92, 148, .25);
  background: linear-gradient(135deg, rgba(68, 139, 207, .13), rgba(123, 113, 232, .09));
  color: #234f7d;
}

body[data-theme="light"] .my-workout-actions .my-workout-edit {
  border-color: rgba(42, 92, 148, .24);
  background: #fff;
  color: #285f98;
}

body[data-theme="light"] .my-workout-actions .my-workout-delete {
  border-color: rgba(163, 41, 61, .2);
  background: #fff3f4;
  color: #a3293d;
}

body[data-theme="light"] .my-workout-copy span,
body[data-theme="light"] .my-workouts-heading p,
body[data-theme="light"] .custom-workout-editor-heading p,
body[data-theme="light"] .my-workouts-empty {
  color: #647a91;
}

body[data-theme="light"] .preset.coming-soon,
body[data-theme="light"] .preset.coming-soon:disabled {
  color: #56677a;
  background: rgba(226, 232, 240, .72);
  border-color: rgba(86, 103, 122, .25);
  opacity: 1;
}

body[data-theme="light"] .mode-control {
  background: rgba(255, 255, 255, .5);
  border-color: rgba(51, 112, 176, .18);
}

body[data-theme="light"] .mode-copy strong {
  color: #173b62;
}

body[data-theme="light"] .mode-copy span {
  color: #526e8d;
}

body[data-theme="light"] .mode-switch-track {
  background: rgba(148, 163, 184, .62);
  border-color: rgba(71, 85, 105, .2);
}

body[data-theme="light"] label {
  color: #405f80;
}

body[data-theme="light"] input,
body[data-theme="light"] .summary {
  color: #17304d;
  background: rgba(255, 255, 255, .62);
  border-color: rgba(51, 112, 176, .2);
}

body[data-theme="light"] .stepper-button {
  color: #163d68;
  background: rgba(222, 234, 246, .9);
  border-color: rgba(76, 109, 145, .22);
}

body[data-theme="light"] .stepper-button:hover {
  background: rgba(205, 224, 243, .96);
  border-color: rgba(51, 127, 202, .45);
}

body[data-theme="light"] .validation-message {
  color: #713b00;
}

body[data-theme="light"] .validation-message:not(:empty) {
  padding: 9px 11px;
  border: 1px solid rgba(171, 91, 0, .2);
  border-radius: 8px;
  background: rgba(255, 239, 204, .72);
}

body[data-theme="light"] .preset.active {
  border-color: #337fca;
  background: rgba(51, 127, 202, .14);
}

body[data-theme="light"] .custom-workout-panel {
  border-color: rgba(42, 92, 148, .22);
  background:
    radial-gradient(circle at 100% 0, rgba(123, 113, 232, .1), transparent 34%),
    linear-gradient(150deg, #f8fbfe, #eaf1f7);
  color: #17304d;
}

body[data-theme="light"] .custom-workout-panel input,
body[data-theme="light"] .custom-workout-panel .mode-control,
body[data-theme="light"] .custom-workout-panel .summary {
  background: #fff;
}

body[data-theme="light"] .custom-workout-panel .stepper-button {
  background: #dce9f5;
}

body[data-theme="light"] .custom-workout-panel .custom-workout-cancel,
body[data-theme="light"] .custom-workout-panel .custom-editor-close {
  border-color: rgba(42, 92, 148, .22);
  background: #fff;
  color: #285f98;
}

@media (max-width: 560px) {
  body[data-theme="light"] .custom-workout-editor-heading {
    background: #f8fbfe;
  }

  body[data-theme="light"] .custom-workout-footer {
    background: #eaf1f7;
  }
}

body[data-theme="light"].workout-active .workout-card {
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 40%),
    rgba(232, 240, 247, .98);
}

@media (max-width: 560px) {
  .feed-card {
    padding: 20px 16px;
  }

  .feed-post.has-image {
    grid-template-columns: 1fr;
  }

  .feed-post-image {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .feed-post-image-link {
    min-height: 0;
  }

  .feed-post-body {
    padding: 16px;
  }
}
