@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');.hamburger-button {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-content: center;
  gap: 0.28rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-surface-raised);
  cursor: pointer;
}

.hamburger-line {
  display: block;
  width: 1.05rem;
  height: 2px;
  border-radius: 99px;
  background: var(--color-primary-soft);
  transition: background 180ms ease;
}

.hamburger-button:hover {
  border-color: rgba(249, 115, 22, 0.55);
  background: var(--color-primary-subtle);
}

.hamburger-button:hover .hamburger-line {
  background: var(--color-text);
}

.hamburger-button:focus-visible,
.hamburger-close:focus-visible,
.hamburger-link:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.hamburger-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 6, 23, 0.62);
  cursor: pointer;
  animation: hamburger-fade-in 180ms ease-out;
}

.hamburger-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 201;
  width: 18.5rem;
  max-width: 88vw;
  height: 100vh;
  padding: 1rem 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--color-border);
  background: rgba(17, 24, 39, 0.985);
  box-shadow: 1rem 0 2.5rem rgba(2, 6, 23, 0.36);
  scrollbar-color: rgba(249, 115, 22, 0.42) transparent;
  scrollbar-width: thin;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 220ms ease-out, visibility 220ms;
}

.hamburger-drawer-open {
  transform: translateX(0);
  visibility: visible;
}

.hamburger-drawer::-webkit-scrollbar {
  width: 0.45rem;
}

.hamburger-drawer::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(249, 115, 22, 0.42);
}

.hamburger-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 0.65rem;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.hamburger-close:hover {
  color: var(--color-text);
  border-color: rgba(249, 115, 22, 0.5);
  background: var(--color-primary-subtle);
}

.hamburger-section {
  margin-bottom: 1.25rem;
  padding: 0 0.85rem;
}

.hamburger-section:first-of-type {
  margin-top: 3.45rem;
}

.hamburger-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hamburger-list li {
  margin-bottom: 0.18rem;
}

.hamburger-sub-item {
  padding-left: 0.45rem;
}

.hamburger-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  opacity: 0.72;
}

.hamburger-icon-section {
  width: 1.05rem;
  height: 1.05rem;
}

.hamburger-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.68rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.hamburger-link:hover {
  border-color: var(--color-border-subtle);
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.hamburger-link-active {
  border-color: rgba(249, 115, 22, 0.34);
  background: var(--color-primary-subtle);
  color: var(--color-primary-soft);
}

.hamburger-link-active .hamburger-icon {
  opacity: 1;
}

.hamburger-link.hamburger-link-main {
  margin: 0.15rem 0 0.35rem;
  padding: 0.65rem 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--color-border-subtle);
  border-radius: 0;
  color: var(--color-primary-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hamburger-link.hamburger-link-main:hover,
.hamburger-link.hamburger-link-main.hamburger-link-active {
  border-color: var(--color-border-subtle);
  background: transparent;
  color: var(--color-primary-soft);
}

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

@media (min-width: 1400px) {
  .hamburger-button,
  .hamburger-close {
    display: none;
  }

  .hamburger-drawer {
    z-index: 99;
    width: 18.5rem;
    max-width: 18.5rem;
    box-shadow: none;
    transform: translateX(0);
    visibility: visible;
  }

  .hamburger-section:first-of-type {
    margin-top: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hamburger-overlay,
  .hamburger-drawer {
    animation: none;
    transition: none;
  }
}
.nutrients-mini-bar {
  background: rgba(17, 24, 39, 0.92);
  border-top: 1px solid var(--color-border);
  padding: 0.35rem 0;
}

.nutrients-mini-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.nutrients-mini-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.nutrients-mini-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 1.8rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.nutrients-mini-bar-track {
  position: relative;
  width: 3rem;
  height: 5px;
  background: var(--color-surface-raised);
  border-radius: 3px;
  overflow: visible;
}

.nutrients-mini-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s, background-color 0.2s;
}

.nutrients-mini-min-marker {
  position: absolute;
  top: -1px;
  transform: translateX(-50%);
  width: 2px;
  height: 7px;
  background: var(--color-primary);
  border-radius: 1px;
  pointer-events: none;
}

.nutrients-mini-remaining {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: fit-content;
  text-align: right;
  flex-shrink: 0;
}

.nutrients-mini-remaining:empty {
  display: none;
}

@media (max-width: 768px) {
  .nutrients-mini-bar-inner {
    padding: 0 1rem;
    gap: 0.4rem 0.6rem;
  }

  .nutrients-mini-bar-track {
    width: 2.5rem;
  }

  .nutrients-mini-label {
    width: 1.6rem;
    font-size: 0.6rem;
  }
}
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-background) 90%, transparent);
  backdrop-filter: blur(18px);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1280px;
  min-height: 4.75rem;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.header-hamburger-slot {
  display: none;
  width: 2.75rem;
  flex: 0 0 2.75rem;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.header-brand-copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1;
}

.header-brand-copy strong {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.header-brand-copy span {
  color: var(--color-text-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-left: auto;
  padding: 0.25rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: 0.8rem;
  background: var(--color-surface-raised);
}

.header-nav-placeholder {
  visibility: hidden;
  min-width: 10rem;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.55rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.header-nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.header-nav-link.header-nav-link-active {
  color: var(--color-primary-soft);
  background: var(--color-primary-subtle);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.header-nav-link-icon {
  width: 2.25rem;
  padding: 0.45rem;
}

.header-nav-link-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.header-nav-link:focus-visible,
.header-brand:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

@media (max-width: 1399px) {
  .header-hamburger-slot {
    display: block;
  }
}

@media (max-width: 820px) {
  .header-content {
    gap: 0.7rem;
    padding-inline: 1rem;
  }

  .header-brand-copy {
    display: grid;
    gap: 0.04rem;
  }

  .header-brand-copy strong {
    display: block;
    font-size: 0.78rem;
  }

  .header-brand-copy span {
    display: block;
    color: var(--color-text);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
  }

  .header-shared-only .header-nav-placeholder {
    display: none;
  }

  .header-nav-link {
    padding-inline: 0.65rem;
  }
}

@media (max-width: 700px) {
  .header-content {
    min-height: 4.25rem;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem;
  }

  .header-hamburger-slot {
    width: 2.4rem;
    flex-basis: 2.4rem;
  }

  .header-brand-copy span {
    font-size: 0.58rem;
  }

  .header-brand-copy strong {
    font-size: 0.72rem;
  }

  .header-nav {
    gap: 0.1rem;
    padding: 0.2rem;
  }

  .header-nav-link {
    min-height: 2rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
  }

  .header-nav-link-icon {
    display: none;
  }

}

@media (max-width: 440px) {
  .header-content {
    gap: 0.35rem;
    padding-inline: 0.5rem;
  }

  .header-brand-copy span {
    font-size: 0.56rem;
  }

  .header-brand-copy strong {
    font-size: 0.7rem;
  }

  .header-nav-link {
    padding-inline: 0.38rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 350px) {
  .header-nav-link {
    display: none;
  }

  .header-nav-link.header-nav-link-active {
    display: inline-flex;
  }

  .header-nav:not(:has(.header-nav-link-active)) {
    display: none;
  }
}
.footer {
  background: var(--color-surface);
  box-shadow: none;
  padding: 1.1rem 0;
  margin-top: auto;
  border-top: 1px solid var(--color-border);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-right {
  display: flex;
  align-items: center;
}

.privacy-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.privacy-link:hover {
  color: var(--color-primary);
}

.garmin-logo {
  height: 52px;
  width: auto;
  opacity: 0.82;
  transition: opacity 0.2s;
}

.garmin-logo:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .garmin-logo {
    height: 45px;
  }
}
/* Daily Triangle – inspired by „Generovat pomocí AI“ card: border, bg, glow */

.longevity-triangle-container {
  width: 100%;
  padding: 1.5rem;
  margin-top: 1rem;
  border-radius: 16px;
  background-color: rgba(20, 25, 35, 0.6);
  border: 2px solid rgba(255, 140, 0, 0.4);
  position: relative;
  overflow: hidden;
  animation: triangleContainerReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  box-shadow:
    0 8px 32px rgba(255, 140, 0, 0.25),
    0 0 0 1px rgba(255, 140, 0, 0.08);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.longevity-triangle-container:hover {
  border-color: rgba(255, 140, 0, 0.6);
  box-shadow:
    0 12px 40px rgba(255, 140, 0, 0.3),
    0 0 0 1px rgba(255, 140, 0, 0.12);
}

/* Subtle red/orange tint (kept light to match card look) */
.longevity-triangle-container::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    ellipse 70% 60% at 50% 48%,
    rgba(255, 140, 0, 0.04) 0%,
    rgba(255, 140, 0, 0.02) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.longevity-triangle-container .triangle-heading {
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #ff8c00 0%, #ffc247 50%, #ff8c00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff8c00;
  position: relative;
  z-index: 1;
  animation: headingReveal 0.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.longevity-triangle-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
  position: relative;
  z-index: 1;
  animation: wrapperReveal 1s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.longevity-triangle-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
}

/* Outer triangle – gradient stroke, one-time draw, subtle cool glow */
.triangle-outline {
  stroke: url(#triangleOuterStrokeGradient);
  stroke-width: 2.5;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  fill: none;
  animation: outlineDraw 1.2s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0.85;
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 140, 0, 0.2));
}

/* Inner triangle – heartbeat pulse at user's resting HR (--heartbeat-duration from profile), gentle glow on pump */
.triangle-inner {
  transform-origin: 100px 112px;
  animation:
    innerTriangleReveal 1s 0.6s cubic-bezier(0.22, 1, 0.36, 1) both,
    innerTriangleHeartbeat var(--heartbeat-duration, 1s) 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.2));
}

@keyframes innerTriangleHeartbeat {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.2));
  }
  14% {
    transform: scale(1.028);
    filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.45)) drop-shadow(0 0 30px rgba(255, 140, 0, 0.2));
  }
  28% {
    transform: scale(1.008);
    filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.25));
  }
  42% {
    transform: scale(1.022);
    filter: drop-shadow(0 0 18px rgba(255, 140, 0, 0.4)) drop-shadow(0 0 28px rgba(255, 140, 0, 0.15));
  }
  56% {
    transform: scale(1.01);
    filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.25));
  }
  70%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.2));
  }
}

/* Side lines – gradient strokes */
.triangle-side {
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  stroke-width: 3;
  animation: sideDraw 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0.85;
}

.triangle-side-sport { animation-delay: 0.7s; }
.triangle-side-diet { animation-delay: 0.9s; }
.triangle-side-sleep { animation-delay: 1.1s; }

.triangle-label {
  opacity: 0;
  animation: labelPop 0.5s ease-out forwards;
  pointer-events: none;
  user-select: none;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.triangle-label-sleep { animation-delay: 1.2s; fill: #fff; }
.triangle-label-sport { animation-delay: 1.3s; fill: #fff; }
.triangle-label-diet { animation-delay: 1.4s; fill: #fff; }

/* Corner effect: only on orange elements, no impact on dark background – clipped + blend */
.triangle-corner-effect-wrapper {
  mix-blend-mode: lighten;
  pointer-events: none;
}

.triangle-corner-effect {
  pointer-events: none;
  opacity: 0;
  animation: cornerReveal 1s 0.8s ease-out forwards, cornerLightBreathe 6s ease-in-out infinite;
}

/* Out-of-phase delays so intensity varies in a natural, non-synced way */
.triangle-corner-top { animation-delay: 0.8s, 0s; }
.triangle-corner-right { animation-delay: 0.8s, 2.1s; }
.triangle-corner-left { animation-delay: 0.8s, 4.2s; }

@keyframes cornerLightBreathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; }
}

/* Score badge – system palette */
.triangle-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.6rem 1.25rem;
  margin-top: 1rem;
  border-radius: 999px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.2) 0%, rgba(255, 194, 71, 0.15) 50%, rgba(255, 140, 0, 0.2) 100%);
  border: 1px solid rgba(255, 140, 0, 0.35);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
  animation: scoreBadgeReveal 0.9s 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.triangle-score-badge.high {
  animation: scoreBadgeReveal 0.9s 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.longevity-summary {
  position: relative;
  z-index: 1;
  animation: summaryReveal 0.6s 1.4s ease-out both;
}

.longevity-evaluation {
  position: relative;
  z-index: 1;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
  text-align: left;
}

.longevity-evaluation-title {
  margin: 0 0 0.75rem;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.longevity-evaluation-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ——— Keyframes ——— */
@keyframes triangleContainerReveal {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes headingReveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wrapperReveal {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes outlineDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes innerTriangleReveal {
  from {
    opacity: 0;
    transform: scale(0.25);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes sideDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes cornerReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes labelPop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scoreBadgeReveal {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.triangle-data-note {
  margin: 0.6rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
}

/* Keep the triangle informative rather than decorative. */
.longevity-triangle-container {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  animation: none;
}

.longevity-triangle-container:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-card);
}

.longevity-triangle-container::before {
  display: none;
}

.longevity-triangle-container .triangle-heading {
  color: var(--color-text);
  letter-spacing: 0;
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: none;
}

.longevity-triangle-wrapper,
.longevity-summary,
.triangle-score-badge,
.triangle-score-badge.high,
.triangle-label,
.triangle-corner-effect {
  animation: none;
}

.longevity-triangle-svg,
.triangle-outline,
.triangle-inner {
  filter: none;
}

.triangle-inner {
  animation: none;
}

.triangle-score-badge {
  color: var(--color-text);
  background: var(--color-primary-subtle);
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: none;
  text-shadow: none;
}

@media (max-width: 768px) {
  .longevity-triangle-svg {
    max-width: 280px;
  }
  .triangle-label {
    font-size: 10px;
  }
  .triangle-score-badge {
    font-size: 1.25rem;
    min-width: 3.5rem;
    padding: 0.45rem 1rem;
  }
}
.how-it-works {
  width: 100%;
  padding: 2rem;
  background: #0a0e1a;
  min-height: 100vh;
}

.how-it-works--embedded {
  min-height: auto;
  padding: 0;
  background: transparent;
}

.how-it-works--embedded .hiw-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.hiw-container {
  max-width: 800px;
  margin: 0 auto;
}

.hiw-title {
  color: var(--color-text);
  margin-bottom: 0.75rem;
  font-size: 1.8rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-align: center;
}

.hiw-tagline {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* --- Progress bar --- */
.hiw-progress {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.hiw-progress-line {
  position: absolute;
  top: 16px;
  left: 24px;
  right: 24px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  z-index: 0;
}

.hiw-progress-line-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8c00, #ffc247);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.hiw-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1;
  padding: 0;
  min-width: 0;
  flex: 1;
}

.hiw-progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #141923;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #8899aa;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.hiw-progress-dot svg {
  width: 16px;
  height: 16px;
}

.hiw-progress-step--active .hiw-progress-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.hiw-progress-step--done .hiw-progress-dot {
  background: rgba(34, 197, 94, 0.14);
  border-color: var(--color-success);
  color: var(--color-success);
}

.hiw-progress-label {
  font-size: 0.65rem;
  color: #667788;
  text-align: center;
  line-height: 1.3;
  max-width: 80px;
  transition: color 0.3s;
}

.hiw-progress-step--active .hiw-progress-label {
  color: #ff8c00;
  font-weight: 600;
}

.hiw-progress-step--done .hiw-progress-label {
  color: #b0b0b0;
}

/* --- Step card --- */
.hiw-step-card {
  background: var(--color-surface-raised);
  border-radius: 0.9rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hiw-step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 140, 0, 0.15);
  background: rgba(255, 140, 0, 0.04);
}

.hiw-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.15), rgba(255, 194, 71, 0.1));
  border: 1px solid rgba(255, 140, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ff8c00;
}

.hiw-step-icon svg {
  width: 24px;
  height: 24px;
}

.hiw-step-number {
  font-size: 0.75rem;
  color: #8899aa;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.hiw-step-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.hiw-step-body {
  padding: 2rem;
  color: #d0d0d0;
  line-height: 1.7;
}

.hiw-step-lead {
  font-size: 1.05rem;
  color: #e8e8e8;
  margin-bottom: 1.5rem;
}

.hiw-step-lead strong {
  color: #ffc247;
}

/* --- Features grid --- */
.hiw-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hiw-feature {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hiw-feature-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #ff8c00;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.hiw-feature-icon svg {
  width: 100%;
  height: 100%;
}

.hiw-feature strong {
  color: #ffffff;
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.hiw-feature p {
  color: #8899aa;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

/* --- Info boxes --- */
.hiw-info-box {
  background: rgba(255, 140, 0, 0.06);
  border: 1px solid rgba(255, 140, 0, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.hiw-info-box strong {
  color: #ff8c00;
  display: block;
  margin-bottom: 0.5rem;
}

.hiw-info-box p {
  margin: 0;
  color: #b0b0b0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.hiw-info-box--blue {
  background: rgba(77, 148, 255, 0.06);
  border-color: rgba(77, 148, 255, 0.2);
}

.hiw-info-box--blue strong {
  color: #4d94ff;
}

.hiw-info-box--sources {
  background: rgba(255, 194, 71, 0.06);
  border-color: rgba(255, 194, 71, 0.2);
}

.hiw-info-box--sources strong {
  color: #ffc247;
}

/* --- Triangle preview in wizard step --- */
.hiw-triangle-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hiw-triangle-preview .longevity-triangle-container {
  max-width: 320px;
}

/* --- Pillars (triangle) --- */
.hiw-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hiw-pillar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.hiw-pillar-icon {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff8c00;
  opacity: 0.7;
}

.hiw-pillar-icon svg {
  width: 28px;
  height: 28px;
}

.hiw-pillar h4 {
  color: #ff8c00;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.hiw-pillar p {
  color: #8899aa;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

.hiw-readiness-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem;
  color: #b0b0b0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.hiw-readiness-box strong {
  color: #ffc247;
}

.hiw-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.hiw-badge-ready {
  background: rgba(40, 167, 69, 0.15);
  color: #6cff8d;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.hiw-badge-caution {
  background: rgba(255, 194, 71, 0.15);
  color: #ffc247;
  border: 1px solid rgba(255, 194, 71, 0.3);
}

.hiw-badge-recovery {
  background: rgba(77, 148, 255, 0.15);
  color: #4d94ff;
  border: 1px solid rgba(77, 148, 255, 0.3);
}

/* --- Two columns --- */
.hiw-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hiw-col-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem;
}

.hiw-col-card h4 {
  color: #ffffff;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hiw-col-card h4 svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #ff8c00;
  opacity: 0.7;
}

.hiw-col-card p {
  color: #8899aa;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.hiw-col-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hiw-col-card ul li {
  color: #b0b0b0;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.4;
}

.hiw-col-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff8c00;
}

/* --- Export items --- */
.hiw-export-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hiw-export-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hiw-export-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #ff8c00;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.hiw-export-icon svg {
  width: 100%;
  height: 100%;
}

.hiw-export-item strong {
  color: #ffffff;
  display: block;
  margin-bottom: 0.25rem;
}

.hiw-export-item p {
  color: #8899aa;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.hiw-step-note {
  color: #8899aa;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

/* --- Navigation --- */
.hiw-step-nav {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255, 140, 0, 0.15);
  background: rgba(255, 140, 0, 0.02);
}

.hiw-nav-btn {
  white-space: nowrap;
}

.hiw-nav-btn svg {
  width: 18px;
  height: 18px;
}

/* --- Footer --- */
.hiw-footer {
  margin-top: 2rem;
  text-align: center;
}

.back-link {
  color: #ff8c00;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.back-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff8c00;
  transition: width 0.3s;
}

.back-link:hover {
  color: #ff8c00;
}

.back-link:hover::after {
  width: 100%;
}

/* --- Garmin CTA (last step) --- */
.hiw-garmin-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.hiw-garmin-status--connected {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.hiw-garmin-check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(40, 167, 69, 0.2);
  color: #6cff8d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hiw-garmin-status strong {
  color: #6cff8d;
  display: block;
  margin-bottom: 0.25rem;
}

.hiw-garmin-status p {
  color: #b0b0b0;
  font-size: 0.9rem;
  margin: 0;
}

.hiw-garmin-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.hiw-garmin-cta-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hiw-garmin-cta-btn {
  width: auto;
  text-decoration: none;
  text-align: center;
}

.hiw-garmin-powered {
  font-size: 0.8rem;
  color: #667788;
  font-style: italic;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .how-it-works {
    padding: 1rem;
  }

  .hiw-title {
    font-size: 1.8rem;
  }

  .hiw-tagline {
    font-size: 0.95rem;
  }

  .hiw-progress-label {
    display: none;
  }

  .hiw-progress-dot {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .hiw-step-header {
    padding: 1rem 1.25rem;
  }

  .hiw-step-icon {
    width: 40px;
    height: 40px;
  }

  .hiw-step-icon svg {
    width: 20px;
    height: 20px;
  }

  .hiw-step-title {
    font-size: 1.2rem;
  }

  .hiw-step-body {
    padding: 1.25rem;
  }

  .hiw-features {
    grid-template-columns: 1fr;
  }

  .hiw-pillars {
    grid-template-columns: 1fr;
  }

  .hiw-two-cols {
    grid-template-columns: 1fr;
  }

  .hiw-step-nav {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .hiw-step-header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .hiw-step-body {
    padding: 1rem;
  }

  .hiw-step-nav {
    padding: 0.75rem 1rem;
  }

  .hiw-nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* Shared product language for the explanatory flow. */
.how-it-works {
  background: var(--color-background);
}

.hiw-progress-line {
  height: 1px;
  background: var(--color-border);
}

.hiw-progress-line-fill {
  background: var(--color-primary);
}

.hiw-progress-dot {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hiw-progress-step:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

.hiw-progress-label,
.hiw-progress-step--done .hiw-progress-label,
.hiw-garmin-powered {
  color: var(--color-text-muted);
}

.hiw-progress-step--active .hiw-progress-label {
  color: var(--color-primary);
}

.hiw-step-header,
.hiw-step-nav {
  border-color: var(--color-border);
  background: var(--color-surface);
}

.hiw-step-icon {
  background: var(--color-primary-subtle);
  border-color: rgba(249, 115, 22, 0.26);
  border-radius: 0.65rem;
  color: var(--color-primary);
}

.hiw-step-number {
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.hiw-step-title,
.hiw-feature strong,
.hiw-col-card h4,
.hiw-export-item strong {
  color: var(--color-text);
}

.hiw-step-body,
.hiw-step-lead {
  color: var(--color-text-secondary);
}

.hiw-step-lead strong,
.hiw-info-box strong,
.hiw-pillar h4,
.hiw-readiness-box strong {
  color: var(--color-primary);
}

.hiw-feature,
.hiw-pillar,
.hiw-readiness-box,
.hiw-col-card,
.hiw-export-item,
.hiw-step-note {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.65rem;
}

.hiw-feature-icon,
.hiw-pillar-icon,
.hiw-col-card h4 svg,
.hiw-export-icon {
  color: var(--color-primary);
  opacity: 1;
}

.hiw-feature p,
.hiw-pillar p,
.hiw-col-card p,
.hiw-export-item p,
.hiw-step-note,
.hiw-readiness-box,
.hiw-garmin-status p {
  color: var(--color-text-muted);
}

.hiw-info-box {
  background: var(--color-primary-subtle);
  border-color: rgba(249, 115, 22, 0.26);
  border-radius: 0.65rem;
}

.hiw-info-box p,
.hiw-col-card ul li {
  color: var(--color-text-secondary);
}

.hiw-garmin-status--connected {
  background: var(--color-success-subtle);
  border-color: rgba(34, 197, 94, 0.3);
}

.hiw-garmin-check,
.hiw-garmin-status strong {
  color: var(--color-success);
}

.hiw-garmin-check {
  background: var(--color-success-subtle);
}
.pwa-install-prompt {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 0.75rem;
  background: var(--color-primary-subtle);
  color: var(--color-text);
}

.pwa-install-prompt strong { display: block; font-size: 1rem; }
.pwa-install-prompt p { margin: 0.3rem 0 0; color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.45; }
.pwa-install-actions { display: flex; flex-shrink: 0; align-items: center; gap: 0.75rem; }
.pwa-install-actions .btn { padding: 0.55rem 0.85rem; }
.pwa-install-dismiss { border: 0; background: transparent; color: var(--color-text-muted); cursor: pointer; font: inherit; font-size: 0.85rem; padding: 0.4rem; }
.pwa-install-dismiss:hover, .pwa-install-dismiss:focus-visible { color: var(--color-primary); }
.pwa-install-dismiss:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 0.25rem; }

@media (max-width: 600px) {
  .pwa-install-prompt { align-items: flex-start; flex-direction: column; }
  .pwa-install-actions { width: 100%; justify-content: flex-end; }
}
.garmin-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 900px;
}

.garmin-landing .card {
  width: 100%;
  max-width: 900px;
}

.garmin-landing-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 900px;
}

.garmin-landing-preview-text {
  font-size: 1.1rem;
  color: var(--color-text);
  font-weight: 600;
  text-align: center;
  margin: 0;
}

.garmin-tagline {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
}

.garmin-usp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.garmin-usp-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.garmin-usp-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  opacity: 0.85;
  margin-top: 0.15rem;
}

.garmin-connect-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-text);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  letter-spacing: -0.025em;
}

.garmin-connect-icon {
  width: 1.2em;
  height: 1.2em;
  flex: 0 0 auto;
}

.garmin-connect-heading .garmin-connect-icon {
  color: #3e8fcb;
}

@media (max-width: 600px) {
  .garmin-usp-grid {
    grid-template-columns: 1fr;
  }
}

.garmin-error {
  padding: 0.75rem 1rem;
  background: rgba(255, 77, 77, 0.15);
  border: 1px solid rgba(255, 77, 77, 0.4);
  border-left: 4px solid #ff4d4d;
  border-radius: 8px;
  color: #ff6b6b;
  margin-bottom: 1rem;
  font-weight: 500;
}

.garmin-connected {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 2rem;
  min-height: 2rem;
}

.garmin-connected .btn {
  position: absolute;
  top: 0;
  right: 0;
  text-transform: none;
  letter-spacing: normal;
}

.garmin-status {
  color: var(--color-success);
  font-weight: 600;
  margin: 0;
  font-size: 0.9rem;
}

.garmin-disconnected {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.garmin-disconnected p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.garmin-connect-btn {
  padding: 0.75rem 1.5rem;
  background: #3e8fcb;
  color: white;
  border: none;
  border: 1px solid #3e8fcb;
  border-radius: 0.65rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  align-self: flex-start;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: none;
}

.garmin-connect-btn:hover:not(:disabled) {
  background: #2f7fb8;
  border-color: #2f7fb8;
  box-shadow: none;
}

.garmin-connect-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.training-plan-form {
  width: 100%;
}

.form-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.5rem;
  box-sizing: border-box;
}

.training-plan-form .fp-readiness-no-plan-hint,
.fp-readiness-no-plan-hint {
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: #8899aa;
  background: rgba(136, 153, 170, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(136, 153, 170, 0.2);
  line-height: 1.4;
}

.garmin-migration-notice {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.55rem;
  line-height: 1.4;
}

.garmin-migration-notice strong {
  color: var(--color-text);
  font-size: 0.78rem;
}

.garmin-migration-notice a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.garmin-migration-notice a:hover {
  color: var(--color-text);
}

.card {
  background: linear-gradient(145deg, rgba(31, 41, 55, 0.92), rgba(24, 33, 48, 0.88));
  backdrop-filter: blur(12px);
  border-radius: 1.1rem;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-card);
  max-width: 100%;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--color-border);
  box-sizing: border-box;
}

.card h2 {
  color: var(--color-text);
  margin-bottom: 0.8rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.card h2::after,
.form-section-title::after {
  display: none;
}

.training-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.training-choice-card {
  width: 100%;
  padding: 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.28);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  min-height: 10.5rem;
}

.training-choice-card:hover,
.training-choice-card:focus-visible {
  background: rgba(55, 65, 81, 0.48);
  border-color: rgba(249, 115, 22, 0.58);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.18);
  outline: none;
}

.training-choice-icon {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.8rem;
  place-items: center;
  border: 1px solid rgba(249, 115, 22, 0.32);
  border-radius: 0.7rem;
  background: var(--color-primary-subtle);
  color: var(--color-primary-soft);
}

.training-choice-icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.training-choice-card h3 {
  margin: 0 0 0.75rem;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.3;
}

.training-choice-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Shared section title styling (card h2, Settings, etc.) */
.form-section-title {
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.form-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #ff8c00, #ffc247);
  border-radius: 2px;
}

/* Physiology fields: label - value side by side, one row per field, responsive */
.physiology-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.physiology-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.physiology-row > label {
  flex: 0 0 14rem;
  width: 14rem;
  min-width: 14rem;
  font-size: 0.9rem;
  color: #b0b0b0;
  margin: 0;
  white-space: nowrap;
}

.physiology-field-label {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.physiology-field-label span {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
}

.physiology-help-text {
  display: block;
  margin-top: 0.25rem;
  color: #8495a8;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.physiology-help-link {
  display: inline-block;
  margin-left: 0.35rem;
  color: #ffc247;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.physiology-help-link:hover,
.physiology-help-link:focus-visible {
  color: #ffdd95;
  text-decoration: underline;
}

.physiology-section-intro {
  margin: 0.45rem 0 0;
  max-width: 54rem;
  color: #9fb0c4;
  font-size: 0.9rem;
  line-height: 1.5;
}

.physiology-section-intro strong {
  color: #ffc247;
}

.physiology-row .physiology-input-wrap {
  flex: 1 1 12rem;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.physiology-row .physiology-input-wrap input,
.physiology-row .physiology-input-wrap select,
.physiology-row .physiology-input-wrap .btn {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.physiology-row .physiology-input-wrap input[type="checkbox"] {
  width: auto;
  min-width: auto;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent, #ff8c00);
}

.form-group .physiology-row > label {
  color: #b0b0b0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0.55rem 0 0;
  text-transform: uppercase;
  white-space: normal;
}

.physiology-row--threshold {
  align-items: stretch;
}

.physiology-row .physiology-threshold-wrap {
  flex: 1 1 24rem;
  min-width: min(100%, 24rem);
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 140, 0, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.physiology-threshold-explainer {
  margin: 0;
  color: #9fb0c4;
  font-size: 0.82rem;
  line-height: 1.45;
}

.physiology-threshold-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  align-items: end;
}

.physiology-threshold-field {
  min-width: 0;
}

.form-group .physiology-threshold-label {
  display: block;
  margin: 0 0 0.25rem;
  color: #8899aa;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}

.physiology-row .physiology-threshold-wrap .physiology-detect-button {
  width: auto;
  min-width: 0;
  align-self: flex-start;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.2;
}

.physiology-threshold-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.physiology-threshold-meta-item {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 140, 0, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.physiology-threshold-meta-item span,
.physiology-threshold-meta-item small {
  display: block;
  color: #8899aa;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: uppercase;
}

.physiology-threshold-meta-item strong {
  display: block;
  margin-top: 0.2rem;
  color: #e8e8e8;
  font-size: 0.92rem;
  line-height: 1.3;
}

.physiology-threshold-meta-item small {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  text-transform: none;
}

.form-group .physiology-checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.1rem 0 0;
  color: #d6dde8;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
  cursor: pointer;
}

.physiology-status-message {
  display: block;
  margin-top: 0.1rem;
  color: #b0b0b0;
  font-size: 0.82rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .physiology-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .physiology-row > label {
    flex: none;
    width: auto;
    min-width: 0;
  }
  .physiology-row .physiology-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .physiology-row .physiology-threshold-wrap {
    padding: 0.65rem;
  }

  .physiology-threshold-fields {
    grid-template-columns: 1fr;
  }

  .physiology-threshold-meta {
    grid-template-columns: 1fr;
  }
}

/* Legacy grids – kept for any other usage */
.physiology-inline-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.physiology-inline-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.physiology-inline-grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.physiology-inline-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .physiology-inline-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .physiology-inline-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .physiology-inline-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .physiology-inline-grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  .physiology-inline-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .physiology-inline-grid-5 {
    grid-template-columns: 1fr;
  }
  .physiology-inline-grid-6 {
    grid-template-columns: 1fr;
  }
}

.card .card-collapsible-header {
  position: relative;
  margin-bottom: 0;
}

.card--saved-trainings {
  padding: 1rem 1.25rem;
}

.card--training-plans-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

.card--training-plans-link:hover {
  box-shadow: 0 12px 40px rgba(255, 140, 0, 0.3), 0 0 0 1px rgba(255, 140, 0, 0.3);
  border-color: rgba(255, 140, 0, 0.4);
}

.card .card-collapsible-header .expand-indicator {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #ff8c00;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  min-height: 1.5rem;
  z-index: 2;
  flex-shrink: 0;
}

.activity-history-details {
  margin-top: 1rem;
  border: 1px solid #444;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1a1a1a;
}

.activity-history-details > summary {
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background-color: #2a2a2a;
  border-bottom: 1px solid transparent;
}

.activity-history-details[open] > summary {
  border-bottom: 2px solid #444;
}

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

.previous-training-feedback-field--missing-history {
  padding: 1rem;
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 12px;
  background: rgba(255, 193, 7, 0.08);
}

.saved-trainings-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  max-height: min(400px, 60vh);
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem 1rem;
}

.training-plan-form .saved-training-card {
  display: block;
  padding: 1.75rem 2.25rem;
  border: 1px solid rgba(255, 140, 0, 0.2);
  border-radius: 16px;
  text-decoration: none;
  color: #ffffff;
  background-color: rgba(20, 25, 35, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 140, 0, 0.1);
  transition: all 0.3s;
  position: relative;
  box-sizing: border-box;
  line-height: 1.5;
}

.saved-training-card:hover {
  box-shadow: 0 12px 40px rgba(255, 140, 0, 0.3), 0 0 0 1px rgba(255, 140, 0, 0.3);
  transform: translateY(-4px);
  border-color: rgba(255, 140, 0, 0.4);
}

.saved-training-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ff8c00 0%, #ffc247 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
  word-break: break-word;
}

.saved-training-card-date {
  font-size: 0.875rem;
  color: #b0b0b0;
  line-height: 1.4;
}

.form-description {
  color: #b0b0b0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.format-example {
  background: rgba(255, 140, 0, 0.1);
  border-left: 4px solid #ff8c00;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: #e0e0e0;
  border: 1px solid rgba(255, 140, 0, 0.2);
}

.format-example div {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.format-example div:last-child {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.textarea-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid rgba(255, 140, 0, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: all 0.3s;
  background: rgba(10, 14, 26, 0.6);
  color: #ffffff;
  line-height: 1.6;
  box-sizing: border-box;
}

.textarea-input::placeholder {
  color: #666;
}

.textarea-input:focus {
  outline: none;
  border-color: #ff8c00;
  box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.2), 0 0 20px rgba(255, 140, 0, 0.1);
  background: rgba(10, 14, 26, 0.8);
}

/* Plan scope: radios + optional date/days (match form-group + textarea-input look) */
.plan-scope-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.plan-scope-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #e8e8e8;
  font-size: 1rem;
  font-weight: 500;
}

.plan-scope-options input[type="radio"] {
  accent-color: #ff8c00;
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.plan-scope-range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.plan-scope-range-row .form-group {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.plan-scope-range-row .form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: #b0b0b0;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-scope-range-row .textarea-input {
  min-width: 10rem;
  width: auto;
}

.plan-scope-range-row .textarea-input[type="number"] {
  max-width: 5rem;
}

.plan-scope-range-row .plan-scope-days-unit {
  color: #b0b0b0;
  font-size: 0.95rem;
  font-weight: 500;
}

.training-goal-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.training-goal-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: flex-start;
  min-height: 5rem;
  padding: 0.8rem 0.9rem;
  border: 2px solid rgba(255, 140, 0, 0.2);
  border-radius: 8px;
  background: rgba(20, 25, 35, 0.6);
  color: #ffffff;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.training-goal-option--active {
  border-color: rgba(255, 140, 0, 0.65);
  background: rgba(255, 140, 0, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.08);
}

.training-goal-option input[type="radio"],
.race-distance-option input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: #ff8c00;
  cursor: pointer;
}

.training-goal-option strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.25;
}

.training-goal-option small {
  display: block;
  margin-top: 0.25rem;
  color: #aab5c0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.race-prep-panel {
  margin: 0.25rem 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 140, 0, 0.22);
  border-radius: 8px;
  background: rgba(10, 14, 26, 0.34);
}

.race-distance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.6rem;
}

.race-distance-option {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  column-gap: 0.65rem;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.55rem 0.7rem;
  border: 2px solid rgba(255, 140, 0, 0.2);
  border-radius: 8px;
  background: rgba(20, 25, 35, 0.58);
  color: #f6f6f6;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.race-distance-option input[type="radio"] {
  margin: 0;
  justify-self: center;
}

.race-distance-option span {
  display: block;
  min-width: 0;
  line-height: 1.2;
}

.race-distance-option--active {
  border-color: rgba(255, 140, 0, 0.65);
  background: rgba(255, 140, 0, 0.12);
}

.race-custom-distance-input {
  max-width: 12rem;
  margin-top: 0.75rem;
}

.race-date-row {
  align-items: flex-end;
}

@media (max-width: 640px) {
  .training-goal-options,
  .race-distance-grid {
    grid-template-columns: 1fr;
  }

  .race-prep-panel {
    padding: 0.8rem;
  }

  .race-custom-distance-input,
  .race-date-row .date-picker-wrapper,
  .race-date-row .textarea-input {
    width: 100%;
    max-width: none;
  }
}

.date-picker-wrapper {
  width: 100%;
}

.day-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.physiology-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 56px auto;
  gap: 0.25rem 1rem;
}

.physiology-grid > div:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.physiology-grid > div:nth-child(2) {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.physiology-grid > div:nth-child(3) {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.physiology-grid > div:nth-child(4) {
  grid-column: 4;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.physiology-grid label {
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  margin-bottom: 0.25rem;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .physiology-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, auto);
  }
  
  .physiology-grid > div {
    grid-column: 1 !important;
  }
  
  .physiology-grid > div:nth-child(1) {
    grid-row: 1 / 3;
  }
  
  .physiology-grid > div:nth-child(2) {
    grid-row: 3 / 5;
  }
  
  .physiology-grid > div:nth-child(3) {
    grid-row: 5 / 7;
  }
  
  .physiology-grid > div:nth-child(4) {
    grid-row: 7 / 9;
  }
}

/* Weekend row - sobota a neděle na vlastním řádku */
.day-times-grid .day-time-item:nth-child(6) {
  grid-column: 1 / 3;
}

.day-times-grid .day-time-item:nth-child(7) {
  grid-column: 3 / 5;
}

@media (max-width: 768px) {
  .day-times-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .day-times-grid .day-time-item:nth-child(6),
  .day-times-grid .day-time-item:nth-child(7) {
    grid-column: span 1;
  }
}

.day-time-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.day-time-item label {
  font-weight: 600;
  color: #ff8c00;
  font-size: 0.9rem;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-hint {
  display: block;
  margin-top: 0.75rem;
  color: #888;
  font-size: 0.875rem;
}

.error-message {
  background: rgba(255, 77, 77, 0.2);
  color: #ff9999;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 2px solid rgba(255, 77, 77, 0.4);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(255, 77, 77, 0.2);
}

.success-message {
  background: rgba(40, 167, 69, 0.2);
  color: #6cff8d;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 2px solid rgba(40, 167, 69, 0.4);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(40, 167, 69, 0.2);
}

.schedule-container {
  width: 100%;
  padding-top: 2rem;
  scroll-margin-top: 90px; /* Reserve space for sticky header when scrolling into view */
}

/* Plan view range toolbar: same look as TrainingPlansCalendar Od/Do (CustomDatePicker) */
.plan-view-range-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.plan-view-range-toolbar .tpc-plan-date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #e8e8e8;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-view-range-toolbar .date-picker-wrapper {
  min-width: 11rem;
}

.schedule-top-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.schedule-top-buttons .training-action-button {
  flex: 0 1 auto;
  min-height: 2.55rem;
  min-width: 0;
  padding: 0.55rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-top-buttons .training-action-button--plans {
  background: var(--color-surface-hover);
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.schedule-top-buttons .training-action-button--create {
  box-shadow: var(--btn-primary-shadow);
}

@media (max-width: 700px) {
  .schedule-top-buttons {
    width: 100%;
  }

  .schedule-top-buttons .training-action-button {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 340px) {
  .schedule-top-buttons {
    flex-direction: column;
  }
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 2rem;
}

.schedule-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .form-container {
    padding: 0.25rem;
  }

  .card {
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
  }

  .card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    word-break: break-word;
    line-height: 1.3;
  }

  .form-description {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .format-example {
    padding: 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  .form-group {
    margin-bottom: 0.5rem;
  }

  .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .textarea-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .day-times-grid {
    gap: 1rem;
  }

  .day-time-item label {
    font-size: 0.85rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .btn-secondary {
    min-width: auto;
  }

  .schedule-header {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
  }

  .schedule-footer {
    flex-direction: column;
    padding: 0 1rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }

  .schedule-footer .btn-secondary {
    width: 100%;
  }
}

.delete-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.delete-confirm-dialog {
  position: relative;
  background: rgba(20, 25, 35, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: min(500px, calc(100vw - 2rem));
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border: 1px solid rgba(220, 53, 69, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(220, 53, 69, 0.2);
  z-index: 1001;
  margin: auto;
}

.delete-confirm-dialog h3 {
  color: #ffffff;
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.delete-confirm-dialog p {
  color: #b0b0b0;
  margin: 0 0 2rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

.delete-confirm-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-right: 0.5rem;
}

.delete-confirm-buttons .btn {
  text-transform: none;
  padding: 0.875rem 1.75rem;
}

.delete-confirm-buttons .btn.btn-primary,
.delete-confirm-buttons .btn.btn-danger {
  width: 200px;
}

.delete-confirm-buttons .btn.btn-primary {
  color: var(--btn-primary-color);
}

.delete-confirm-buttons .btn.btn-secondary {
  color: #ffb347;
}

@media (max-width: 768px) {
  .delete-confirm-dialog {
    padding: 1.5rem;
  }

  .delete-confirm-dialog h3 {
    font-size: 1.25rem;
  }

  .delete-confirm-dialog p {
    font-size: 0.9rem;
  }

  .delete-confirm-buttons {
    flex-direction: column-reverse;
  }

  .delete-confirm-buttons .btn,
  .delete-confirm-buttons .btn.btn-primary,
  .delete-confirm-buttons .btn.btn-danger,
  .delete-confirm-buttons button {
    width: 100%;
  }
}

/* Chat message bubble – full width for response, single scroll in chat container */
.chat-message-bubble {
  width: 100%;
}
.chat-message-bubble .detail-content,
.chat-message-bubble .markdown-content {
  min-width: 0;
  width: 100%;
  max-width: none;
}

/* Markdown content styles for training plan explanation */
.markdown-content {
  color: #e0e0e0;
  line-height: 1.7;
  font-size: 0.95rem;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  color: #ffb347;
  font-weight: 600;
  line-height: 1.3;
}

.markdown-content h1 {
  font-size: 1.6rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.markdown-content h1:first-child {
  margin-top: 0;
}

.markdown-content h2 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.markdown-content h2:first-child {
  margin-top: 0;
}

.markdown-content h3 {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 1);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.markdown-content h3:first-child {
  margin-top: 0;
}

.markdown-content h4 {
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.markdown-content h4:first-child {
  margin-top: 0;
}

.markdown-content h5 {
  font-size: 1rem;
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
}

.markdown-content h6 {
  font-size: 0.95rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.markdown-content p {
  margin-bottom: 0.1rem;
  margin-top: 0;
  padding: 0;
  color: #e0e0e0;
  line-height: 1.4;
  white-space: pre-wrap;
}

.markdown-content p:first-child {
  margin-top: 0;
}

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

.markdown-content p + p {
  margin-top: 0.1rem;
}

/* Remove spacing for empty paragraphs */
.markdown-content p:empty {
  display: none;
  margin: 0;
  padding: 0;
  height: 0;
  line-height: 0;
}

/* Remove empty <br> tags */
.markdown-content br:empty {
  display: none;
}

/* Remove multiple consecutive <br> tags - keep only one */
.markdown-content br + br {
  display: none;
}

/* Remove spacing for paragraphs that only contain whitespace or are very short */
.markdown-content p:only-child {
  margin: 0;
}

.markdown-content strong {
  color: #ffb347;
  font-weight: 600;
}

.markdown-content em {
  font-style: italic;
  color: #ff8c00;
}

.markdown-content ul,
.markdown-content ol {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
  margin-top: 0.35rem;
  color: #e0e0e0;
  padding-left: 1.25rem;
  list-style-position: outside;
}

.markdown-content ol {
  list-style-type: decimal;
}

.markdown-content ul {
  list-style-type: disc;
}

.markdown-content ul:first-child,
.markdown-content ol:first-child {
  margin-top: 0;
}

.markdown-content ul:last-child,
.markdown-content ol:last-child {
  margin-bottom: 0;
}

/* Reduce spacing between ul/ol and p elements */
.markdown-content ul + p,
.markdown-content ol + p,
.markdown-content p + ul,
.markdown-content p + ol {
  margin-top: 0.25rem;
}

/* Reduce spacing between headings and lists */
.markdown-content h1 + ul,
.markdown-content h1 + ol,
.markdown-content h2 + ul,
.markdown-content h2 + ol,
.markdown-content h3 + ul,
.markdown-content h3 + ol,
.markdown-content h4 + ul,
.markdown-content h4 + ol,
.markdown-content h5 + ul,
.markdown-content h5 + ol,
.markdown-content h6 + ul,
.markdown-content h6 + ol {
  margin-top: 0.25rem;
}

.markdown-content li {
  margin: 0 0 0.4rem 0;
  padding: 0 0 0 0.25rem;
  margin-left: 0;
  color: #e0e0e0;
  line-height: 1.5;
  display: list-item;
}

.markdown-content li:first-child {
  margin-top: 0;
}

.markdown-content li:last-child {
  margin-bottom: 0;
}

.markdown-content hr {
  border: none;
  border-top: 2px solid rgba(255, 140, 0, 0.3);
  margin: 2rem 0;
  height: 0;
}

.markdown-content hr:first-child {
  margin-top: 0;
}

.markdown-content hr:last-child {
  margin-bottom: 0;
}

.markdown-content pre {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.markdown-content pre code {
  font-family: inherit;
  font-size: 0.9em;
  background: none;
  padding: 0;
}

/* Markdown and headings responsive */
@media (max-width: 768px) {
  .markdown-content h1 {
    font-size: 1.25rem;
  }

  .markdown-content h2 {
    font-size: 1.1rem;
  }

  .daily-recommendations-content h1 {
    font-size: 1.25rem;
  }

  .daily-recommendations-content h2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .markdown-content h1 {
    font-size: 1.1rem;
  }

  .markdown-content h2 {
    font-size: 1rem;
  }

  .daily-recommendations-content h1 {
    font-size: 1.1rem;
  }

  .daily-recommendations-content h2 {
    font-size: 1rem;
  }
}

/* Draft action buttons: side by side on desktop, stacked on mobile, same width */
.draft-action-buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}
.draft-action-buttons .btn {
  flex: 1;
  min-width: 0;
}
@media (max-width: 768px) {
  .draft-action-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Garmin activities table responsive styles */
@media (max-width: 768px) {
  .training-plan-form table {
    font-size: 0.8rem;
  }

  .training-plan-form table th,
  .training-plan-form table td {
    padding: 0.5rem 0.4rem;
  }

  .training-plan-form table th {
    font-size: 0.75rem;
  }

  .training-plan-form table td {
    font-size: 0.8rem;
  }

  .training-plan-form table img {
    height: 16px !important;
  }

  .training-plan-form .device-cell {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.25rem !important;
  }
}

/* Day evaluation content – wrap text, keep bullets inside (used inside .daily-recommendations-content) */
.day-evaluation-content {
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: visible;
  max-width: 100%;
  box-sizing: border-box;
}

.day-evaluation-content p {
  margin: 0.5rem 0 0.75rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.day-evaluation-content ul,
.day-evaluation-content ol {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.5rem;
  list-style-position: outside;
  overflow-wrap: break-word;
  word-break: break-word;
}

.day-evaluation-content li {
  margin: 0.25rem 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.day-evaluation-content h2,
.day-evaluation-content h3,
.day-evaluation-content h4 {
  margin: 1rem 0 0.5rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Daily recommendations info box above day card (collapsible like day-card) */
.daily-recommendations-box {
  margin-bottom: 1rem;
  padding: 0;
  background: rgba(255, 140, 0, 0.08);
  border: 1px solid rgba(255, 140, 0, 0.25);
  border-radius: 10px;
  overflow: visible;
}

.daily-recommendations-box--coach {
  margin-top: 1rem;
  border-color: var(--color-border);
  border-radius: 0.9rem;
  background: var(--color-surface-raised);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.16);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.daily-recommendations-box--coach:hover,
.daily-recommendations-box--coach:focus-within {
  border-color: rgba(249, 115, 22, 0.3);
}

.daily-recommendations-primary-action-summary {
  margin: 0.18rem 0 0;
  color: #d9e8df;
  font-size: 0.86rem;
}

.daily-recommendations-primary-action-summary strong {
  color: #8de0a5;
}

.daily-recommendations-primary-action {
  margin: 0.75rem 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(108, 255, 141, 0.28);
  border-radius: 10px;
  background: rgba(40, 167, 69, 0.1);
}

.daily-recommendations-primary-action strong {
  color: #8de0a5;
}

.daily-recommendations-primary-action-kicker {
  display: block;
  margin-bottom: 0.25rem;
  color: #9eacb8;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.daily-recommendations-primary-action > strong + span {
  margin-left: 0.45rem;
  color: #b0b0b0;
}

.daily-recommendations-primary-action p {
  margin: 0.35rem 0 0;
  color: #d2dbe3;
  line-height: 1.45;
}

.fp-readiness-coach-slot .daily-recommendations-box--coach {
  margin: 1rem 0 0;
  border-color: var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.28);
  box-shadow: none;
}

.fp-readiness-coach-slot .daily-recommendations-box--coach:hover,
.fp-readiness-coach-slot .daily-recommendations-box--coach:focus-within {
  border-color: rgba(249, 115, 22, 0.28);
  background: rgba(15, 23, 42, 0.38);
}

/* Plan-day: in-card body links match paragraph font size (privacy-link defaults to 0.9rem) */
#plan-day .card .privacy-link {
  font-size: 1rem;
  font-weight: inherit;
}

.plan-day-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.55rem;
  margin-bottom: 1rem;
  width: 100%;
}

#plan-day .plan-day-actions .plan-day-action {
  flex: 1 1 11rem;
  width: auto;
  min-width: 11rem;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}

@media (max-width: 380px) {
  #plan-day .plan-day-actions {
    flex-direction: column;
  }

  #plan-day .plan-day-actions .plan-day-action {
    width: 100%;
    min-width: 0;
  }
}

/* Plan-day: force day-evaluation box to full width so it matches Aktuální doporučení visually */
#plan-day .plan-day-evaluation-wrapper .daily-recommendations-box {
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.daily-recommendations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  position: sticky;
  top: var(--header-height, 0px);
  z-index: 10;
  background: rgba(15, 18, 28, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 10px 10px 0 0;
  min-height: 3rem;
  user-select: none;
}

.daily-recommendations-header--coach {
  align-items: center;
  gap: 0.75rem;
  position: static;
  top: auto;
  z-index: auto;
  min-height: 3.35rem;
  padding: 0.78rem 0.9rem;
  border-radius: 0.9rem;
  background: transparent;
  backdrop-filter: none;
  transition: background 160ms ease;
}

.fp-readiness-coach-slot .daily-recommendations-header--coach {
  min-height: 3.2rem;
  padding: 0.72rem 0.78rem;
}

.daily-recommendations-box--coach.expanded .daily-recommendations-header--coach {
  border-bottom: 1px solid var(--color-border-subtle);
  border-radius: 0.9rem 0.9rem 0 0;
}

.daily-recommendations-header:hover {
  background: rgba(255, 140, 0, 0.06);
}

.daily-recommendations-header--coach:hover,
.fp-readiness-coach-slot .daily-recommendations-header--coach:hover {
  background: var(--color-surface-hover);
}

.daily-recommendations-header--coach:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: -2px;
}

.daily-recommendations-heading {
  display: grid;
  min-width: 0;
  gap: 0;
}

.daily-recommendations-title {
  margin: 0;
  color: #ff8c00;
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}

.daily-recommendations-heading .daily-recommendations-title {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: initial;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.25;
}

.daily-recommendations-box--coach .daily-recommendations-heading .daily-recommendations-title {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 800;
}

.daily-recommendations-title-time {
  color: #8899aa;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.fp-readiness-coach-slot .daily-recommendations-heading .daily-recommendations-title {
  padding-left: 0;
  color: var(--color-text);
  font-weight: 800;
  letter-spacing: 0;
}

.fp-readiness-coach-slot .daily-recommendations-heading .daily-recommendations-title::before {
  display: none;
}

.daily-recommendations-header-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0.3rem 0.22rem 0.3rem 0.45rem;
  border: 0;
  border-radius: 0.5rem;
  color: var(--color-text-muted);
  background: transparent;
  box-shadow: none;
}

.fp-readiness-coach-slot .daily-recommendations-header-action {
  color: var(--color-text-muted);
  background: transparent;
}

.fp-readiness-coach-slot .daily-recommendations-header-action--expanded {
  color: var(--color-text);
}

.daily-recommendations-action-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.daily-recommendations-expand-indicator {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #ff8c00;
  font-size: 1.2rem;
  font-weight: bold;
  flex-shrink: 0;
}

.daily-recommendations-header-action .daily-recommendations-expand-indicator {
  position: static;
  transform: none;
  color: currentColor;
  font-size: 0.78rem;
  line-height: 1;
}

.daily-recommendations-box.expanded .daily-recommendations-content {
  padding: 0.5rem 1.25rem 1.25rem 1.25rem;
}

.fp-readiness-coach-slot .daily-recommendations-box.expanded .daily-recommendations-content {
  padding: 0.85rem 0.78rem 0.9rem;
}

.daily-recommendations-box--coach.expanded .daily-recommendations-content {
  padding: 0.9rem;
}

.daily-recommendations-box.expanded .daily-recommendations-loading,
.daily-recommendations-box.expanded .daily-recommendations-error {
  padding: 0.5rem 1.25rem 1.25rem 1.25rem;
}

.fp-readiness-coach-slot .daily-recommendations-box.expanded .daily-recommendations-loading,
.fp-readiness-coach-slot .daily-recommendations-box.expanded .daily-recommendations-error {
  padding: 0 0.9rem 0.95rem;
}

.daily-recommendations-box.expanded .daily-recommendations-loading,
.daily-recommendations-box.expanded .daily-recommendations-error {
  margin: 0;
  padding-top: 0.5rem;
}

.daily-recommendations-loading {
  margin: 0;
  color: #b0b0b0;
  font-size: 0.95rem;
}

.daily-recommendations-error {
  margin: 0;
  color: rgba(255, 77, 77, 0.95);
  font-size: 0.95rem;
}

.daily-recommendations-time {
  font-size: 0.8rem;
  color: #b0b0b0;
  margin-bottom: 0.5rem;
}

.daily-recommendations-empty {
  color: var(--color-text-secondary);
  margin: 0;
  font-weight: 600;
  line-height: 1.45;
}

.daily-recommendations-content {
  color: #ffffff;
  line-height: 1.7;
  font-size: 0.95rem;
}

.daily-recommendations-action {
  margin-top: 0.75rem;
}

.daily-recommendations-box--coach .daily-recommendations-action {
  width: auto;
  min-height: 2.5rem;
  margin-top: 0.7rem;
  padding: 0.52rem 0.82rem;
  font-size: 0.88rem;
  box-shadow: none;
}

.daily-recommendations-content--empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem 1rem;
}

.daily-recommendations-content--empty .daily-recommendations-action {
  margin-top: 0;
}

.daily-recommendations-content--empty .daily-recommendations-notifications {
  grid-column: 1 / -1;
}

.daily-recommendation-focus-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 140, 0, 0.18), transparent 34rem),
    rgba(3, 6, 12, 0.82);
  backdrop-filter: blur(14px);
}

.daily-recommendation-focus-panel {
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border: 1px solid rgba(255, 194, 71, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(25, 31, 44, 0.98), rgba(10, 14, 26, 0.98)),
    #0a0e1a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.daily-recommendation-focus-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem 0.8rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(10px);
}

.daily-recommendation-focus-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  gap: 0.55rem;
}

.daily-recommendation-focus-kicker {
  color: #ffc247;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-recommendation-focus-time {
  color: #9aa8b8;
  font-size: 0.82rem;
  font-weight: 650;
}

.daily-recommendation-focus-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #ffe2b6;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.daily-recommendation-focus-close:hover,
.daily-recommendation-focus-close:focus-visible {
  border-color: rgba(255, 194, 71, 0.55);
  background: rgba(255, 140, 0, 0.16);
  outline: none;
}

.daily-recommendation-focus-hero {
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1.1rem, 3vw, 2.2rem) 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.daily-recommendation-focus-hero h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.daily-recommendation-focus-preview {
  max-width: 68ch;
  margin: 0.75rem 0 0;
  color: #e8eef7;
  font-size: 1.02rem;
  line-height: 1.65;
}

.daily-recommendation-focus-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.daily-recommendation-focus-slot {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(255, 194, 71, 0.18);
  border-radius: 8px;
  background: rgba(255, 140, 0, 0.08);
}

.daily-recommendation-focus-slot-time {
  color: #ffc247;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.daily-recommendation-focus-slot-label {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f5f7fb;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.daily-recommendation-focus-body {
  padding: 1rem clamp(1.1rem, 3vw, 2.2rem) 1.35rem;
  color: #f5f7fb;
  font-size: 1rem;
  line-height: 1.72;
  scroll-margin-top: 4rem;
}

.daily-recommendation-focus-body:focus {
  outline: none;
}

.daily-recommendation-focus-body .detail-content {
  max-width: 74ch;
}

.daily-recommendation-focus-body .detail-content h1,
.daily-recommendation-focus-body .detail-content h2,
.daily-recommendation-focus-body .detail-content h3,
.daily-recommendation-focus-body .detail-content h4 {
  color: #ffb347;
}

.daily-recommendation-focus-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.95rem clamp(1.1rem, 3vw, 2.2rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(10px);
}

.daily-recommendation-focus-actions .btn {
  flex: 0 0 auto;
  min-width: 9rem;
}

.daily-recommendation-focus-notifications {
  padding: 0 clamp(1.1rem, 3vw, 2.2rem) 1rem;
}

.daily-recommendation-focus-notifications:empty {
  display: none;
}

@media (max-width: 520px) {
  .fp-readiness-coach-slot .daily-recommendations-header--coach {
    align-items: center;
    padding: 0.78rem;
  }

  .daily-recommendations-header-action {
    padding: 0.32rem 0.48rem;
  }

  .daily-recommendations-action-label {
    font-size: 0.72rem;
    letter-spacing: 0;
  }

  .daily-recommendations-content--empty {
    grid-template-columns: 1fr;
  }

  .daily-recommendations-content--empty .daily-recommendations-action {
    justify-self: start;
  }

  .daily-recommendations-content--empty .daily-recommendations-notifications {
    grid-column: 1;
  }

  .daily-recommendation-focus-overlay {
    align-items: stretch;
    padding: 0;
  }

  .daily-recommendation-focus-panel {
    max-height: 100vh;
    border-radius: 0;
  }

  .daily-recommendation-focus-topbar {
    padding: 0.7rem 0.8rem 0.7rem 1rem;
  }

  .daily-recommendation-focus-slots {
    grid-template-columns: 1fr;
  }

  .daily-recommendation-focus-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .daily-recommendation-focus-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

.daily-recommendations-notifications {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--color-border-subtle);
}

.daily-recommendations-notifications .btn {
  width: 100%;
}

.daily-recommendations-box--coach .daily-recommendations-notifications .btn {
  width: auto;
  max-width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.86rem;
}

.daily-recommendations-notification-message {
  margin: 0 0 0.5rem;
  color: rgb(255, 107, 107);
  font-size: 0.9rem;
}

.daily-recommendations-notification-message--success {
  color: rgb(40, 167, 69);
}

.daily-recommendations-notification-note {
  margin: 0 0 0.5rem;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

.daily-recommendations-notification-note--muted {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.daily-recommendations-content h1,
.daily-recommendations-content h2,
.daily-recommendations-content h3,
.daily-recommendations-content h4 {
  color: #ff8c00;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.daily-recommendations-content p {
  margin: 0.5rem 0;
}

.daily-recommendations-content ul,
.daily-recommendations-content ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.daily-recommendations-content li {
  margin: 0.25rem 0;
}

.no-plan-structured-suggestion {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(255, 140, 0, 0.34);
  border-radius: 8px;
  background: rgba(255, 140, 0, 0.06);
}

.no-plan-structured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.no-plan-structured-header h3 {
  margin: 0.15rem 0 0;
  color: #ffffff;
  font-size: 1.08rem;
  line-height: 1.3;
}

.no-plan-structured-kicker {
  display: block;
  color: #ffb347;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.no-plan-structured-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.no-plan-structured-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255, 194, 71, 0.35);
  border-radius: 999px;
  color: #ffe0ad;
  background: rgba(255, 194, 71, 0.08);
  font-weight: 700;
  font-size: 0.85rem;
}

.no-plan-structured-copy,
.no-plan-structured-loading {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.no-plan-structured-loading {
  margin-bottom: 0;
}

.no-plan-structured-timeline {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.5rem;
}

.no-plan-structured-segment {
  min-height: 4.75rem;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(255, 140, 0, 0.75);
  border-radius: 8px;
  background: rgba(10, 14, 26, 0.44);
}

.no-plan-structured-segment span,
.no-plan-structured-segment strong,
.no-plan-structured-segment small {
  display: block;
}

.no-plan-structured-segment span {
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.25;
}

.no-plan-structured-segment strong {
  margin-top: 0.35rem;
  color: #ffb347;
  font-size: 0.98rem;
}

.no-plan-structured-segment small {
  margin-top: 0.15rem;
  color: #9fb0c2;
  font-size: 0.78rem;
}

.no-plan-structured-segment--low_aerobic {
  border-left-color: var(--fp-low, #4caf7d);
}

.no-plan-structured-segment--high_aerobic {
  border-left-color: var(--fp-high, #ff9f43);
}

.no-plan-structured-segment--anaerobic {
  border-left-color: var(--fp-ana, #ff6d00);
}

.no-plan-structured-segment--more {
  border-left-color: rgba(255, 255, 255, 0.35);
}

.no-plan-structured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.no-plan-structured-actions .btn {
  flex: 1 1 13rem;
}

.no-plan-structured-dismissed,
.no-plan-structured-error {
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .no-plan-structured-header {
    flex-direction: column;
  }

  .no-plan-structured-stats {
    justify-content: flex-start;
  }

  .no-plan-structured-actions .btn {
    flex-basis: 100%;
  }
}

/* Loading overlay when fetching training by UUID */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem;
}

.loading-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 140, 0, 0.2);
  border-top-color: #ff8c00;
  border-radius: 50%;
  animation: loading-spinner-rotate 0.8s linear infinite;
}

@keyframes loading-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay-text {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.loading-overlay-hint {
  margin: 0;
  font-size: 0.95rem;
  color: #b0b0b0;
}
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.main-content {
  flex: 1;
  padding: 0;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.app--admin {
  padding-left: 0;
}

.main-content--admin {
  max-width: none;
}

/* Shared page axis for the four primary application routes. */
.main-content .page-content-shell {
  box-sizing: border-box;
  width: 100%;
  padding: 2rem;
}

.training-plan-form.page-content-shell--today > .form-container {
  padding-inline: 0;
}

/* Shared card navigation for settings anchors and nutrient entry tabs. */
.section-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.section-navigation-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  min-height: 4rem;
  padding: 0.7rem 0.8rem;
  color: var(--color-text);
  text-align: left;
  text-decoration: none;
  border: 1px solid var(--color-border-subtle);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--color-surface-raised) 88%, transparent);
  cursor: pointer;
  font: inherit;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.section-navigation-item:hover {
  border-color: color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}

.section-navigation-item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  outline-offset: 2px;
}

.section-navigation-item > svg,
.section-navigation-icon {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--color-primary);
}

.section-navigation-icon {
  display: grid;
  place-items: center;
  line-height: 0;
}

.section-navigation-icon svg {
  width: 100%;
  height: 100%;
}

.section-navigation-copy {
  display: grid;
  min-width: 0;
}

.section-navigation-copy strong {
  font-size: 0.85rem;
  font-weight: 750;
}

.section-navigation-copy small {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(249, 115, 22, 0.16);
  border-bottom: 1px solid rgba(249, 115, 22, 0.45);
  color: #ffedd5;
  backdrop-filter: blur(10px);
}

.admin-impersonation-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-impersonation-banner span {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-impersonation-banner code {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff1df;
}

@media (min-width: 1400px) {
  .app {
    padding-left: 296px;
  }

  .app.app--admin {
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .section-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .main-content {
    width: 100%;
  }

  .main-content .page-content-shell {
    padding: 1rem;
  }

  .admin-impersonation-banner-content {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .section-navigation {
    gap: 0.5rem;
  }

  .section-navigation-item {
    min-height: 3.5rem;
    padding: 0.55rem;
  }

  .section-navigation-item > svg,
  .section-navigation-icon {
    width: 1rem;
    height: 1rem;
  }
}

@keyframes async-jobs-spin {
  to {
    transform: rotate(360deg);
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-size: 0.94rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
  text-align: center;
  line-height: 1.25;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  border: 1px solid var(--btn-primary-border);
  box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--btn-primary-hover-bg);
  border-color: var(--btn-primary-hover-border);
  color: var(--btn-primary-hover-color);
  box-shadow: var(--btn-primary-hover-shadow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--color-surface-raised);
  color: var(--color-text);
  border-color: var(--color-border);
  min-width: 0;
  flex-shrink: 0;
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.2);
}

.training-action-button {
  min-height: 2.45rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
}

.btn-quiet {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  box-shadow: none;
}

.btn-quiet:hover:not(:disabled) {
  background: rgba(136, 153, 170, 0.14);
  border-color: rgba(136, 153, 170, 0.42);
  color: #ffffff;
}

.btn-danger {
  background: rgba(220, 53, 69, 0.14);
  border: 1px solid rgba(220, 53, 69, 0.45);
  color: #ff8585;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(220, 53, 69, 0.22);
  border-color: rgba(220, 53, 69, 0.65);
}

.btn-garmin {
  width: 100%;
  background: #3e8fcb;
  color: white;
  font-weight: 700;
  box-shadow: none;
  border-color: #3e8fcb;
}

.btn.btn-garmin-upload {
  width: 100%;
  background: rgba(109, 207, 246, 0.08);
  color: #9bdcf4;
  font-weight: 600;
  padding: 0.75rem 1.2rem;
  box-shadow: none;
  border: 1px solid rgba(109, 207, 246, 0.38);
}

.btn-garmin:hover:not(:disabled) {
  background: #2f7fb8;
  border-color: #2f7fb8;
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.2);
}

.btn.btn-garmin-upload:hover:not(:disabled) {
  background: rgba(109, 207, 246, 0.14);
  border-color: rgba(109, 207, 246, 0.58);
  box-shadow: 0 3px 12px rgba(109, 207, 246, 0.16);
}

.btn-garmin.uploaded {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4);
}

.btn.btn-garmin-upload.uploaded {
  background: rgba(40, 167, 69, 0.12);
  border-color: rgba(40, 167, 69, 0.42);
  color: #7bd995;
  box-shadow: none;
}

.btn-garmin.uploaded:hover:not(:disabled) {
  background: linear-gradient(135deg, #218838 0%, #1c7430 100%);
  box-shadow: 0 6px 30px rgba(40, 167, 69, 0.6);
}

.btn.btn-garmin-upload.uploaded:hover:not(:disabled) {
  background: rgba(40, 167, 69, 0.18);
  border-color: rgba(40, 167, 69, 0.62);
  box-shadow: 0 3px 12px rgba(40, 167, 69, 0.16);
}

.btn-pulse {
  animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 140, 0, 0);
  }
}


:root {
  --header-height: 0px;
  --color-background: #111827;
  --color-surface: #182130;
  --color-surface-raised: rgba(24, 33, 48, 0.78);
  --color-surface-hover: rgba(55, 65, 81, 0.62);
  --color-text: #f8fafc;
  --color-text-muted: #aebdce;
  --color-text-secondary: #cbd5e1;
  --color-primary: #f97316;
  --color-primary-soft: #ffd19f;
  --color-primary-subtle: rgba(249, 115, 22, 0.14);
  --color-success: #22c55e;
  --color-success-subtle: rgba(34, 197, 94, 0.14);
  --color-border: rgba(148, 163, 184, 0.22);
  --color-border-subtle: rgba(148, 163, 184, 0.15);
  --color-border-strong: rgba(148, 163, 184, 0.38);
  --color-focus-ring: #fbbf24;
  --shadow-card: 0 14px 36px rgba(2, 6, 23, 0.24);
  --btn-primary-bg: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  --btn-primary-hover-bg: linear-gradient(135deg, #fdba74 0%, #fb923c 100%);
  --btn-primary-color: #111827;
  --btn-primary-hover-color: #111827;
  --btn-primary-border: rgba(251, 146, 60, 0.8);
  --btn-primary-hover-border: #fdba74;
  --btn-primary-shadow: 0 8px 18px rgba(249, 115, 22, 0.2);
  --btn-primary-hover-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
}

html {
  scrollbar-gutter: stable;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-background);
  background-image: 
    radial-gradient(900px circle at 8% -10%, rgba(249, 115, 22, 0.12), transparent 54%),
    radial-gradient(720px circle at 100% 10%, rgba(34, 197, 94, 0.055), transparent 52%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--color-text);
  line-height: 1.5;
}

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

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

code {
  font-family: 'Courier New', monospace;
}
