/* Progressão Eterna 2.0 — Layout Responsivo & Ergonomia Mobile */
@media (min-width: 821px) {
  .desktop-sidebar { display: flex; }
  .mobile-topbar, .mobile-bottom-nav { display: none; }
  main { margin-left: var(--sidebar); }
  body.workout-active main { margin-left: 0; }
  body:not(.workout-active):has(.active-workout-dock.is-visible) main { padding-bottom: 12rem; }
}

@media (min-width: 821px) and (max-width: 1120px) {
  .home-layout, .two-column { grid-template-columns: 1fr; }
  .home-aside { grid-template-columns: 1fr 1fr; }
  .training-block-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-list { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  html { scrollbar-gutter: auto; }
  .desktop-sidebar { display: none; }

  .mobile-topbar {
    position: sticky; top: 0; z-index: 35;
    display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 10px;
    padding: max(8px, env(safe-area-inset-top)) 16px 8px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-glass); backdrop-filter: blur(22px);
  }
  .mobile-topbar .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 0.72rem; }
  .mobile-topbar #mobile-page-title { font-size: 0.96rem; font-weight: 740; }

  .mobile-topbar { display: none !important; }
  main {
    min-height: 100dvh;
    margin: 0;
    padding: max(20px, calc(12px + env(safe-area-inset-top))) 15px calc(var(--nav-height) + 36px + env(safe-area-inset-bottom));
  }
  body:not(.workout-active):has(.active-workout-dock.is-visible) main {
    padding-bottom: calc(var(--nav-height) + 11.5rem + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed; inset: auto 0 0 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
    min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    padding: 7px 8px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface-glass); backdrop-filter: blur(24px);
  }
  .mobile-bottom-nav .nav-button {
    min-width: 0; min-height: 56px; padding: 6px 2px;
    flex-direction: column; justify-content: center; gap: 4px;
    border-radius: 14px; font-size: 0.66rem; font-weight: 640; line-height: 1.15;
  }
  .mobile-bottom-nav .nav-button svg { width: 21px; height: 21px; }
  .mobile-bottom-nav .nav-button[aria-current="page"] {
    background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line);
  }

  .page-header { margin-bottom: 18px; }
  .page-header .eyebrow { display: none; }
  .page-title { font-size: 1.65rem; }
  .page-copy { font-size: 0.88rem; }

  .home-layout, .two-column, .home-aside { grid-template-columns: 1fr; gap: 14px; }
  .home-hero, .hero-card { padding: 22px 20px; border-radius: 22px; }
  .home-hero h1 { font-size: clamp(1.85rem, 7.2vw, 2.35rem); margin: 10px 0 12px; }
  .home-hero .actions { display: grid; grid-template-columns: 1fr; }
  .home-hero .actions .button { width: 100%; }

  .install-invite { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .install-invite .actions { display: grid; grid-template-columns: 1fr 1fr; }

  .training-block-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .training-block-content { padding: 12px; }
  .training-block-content strong { font-size: 0.9rem; }
  .training-block-detail { font-size: 0.72rem; margin: 4px 0 10px; }

  .catalog-list { grid-template-columns: 1fr; gap: 10px; }
  .catalog-summary { grid-template-columns: 96px minmax(0, 1fr) 38px; gap: 11px; padding: 10px; }
  .catalog-media-button { width: 96px; border-radius: 10px; }
  .catalog-copy { min-height: 62px; }
  .catalog-copy strong { font-size: 0.86rem; }
  .catalog-copy span { font-size: 0.72rem; }

  .form-grid, .frequency-choice, .data-actions, .core-actions { grid-template-columns: 1fr; }
  .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .active-workout-dock {
    left: 12px; right: 12px; width: auto;
    bottom: calc(var(--nav-height) + 12px + env(safe-area-inset-bottom));
  }

  /* Workout Screen Mobile */
  .workout-screen { padding: max(10px, env(safe-area-inset-top)) 12px max(96px, calc(82px + env(safe-area-inset-bottom))); }
  .workout-top { gap: 6px; }
  .workout-home-link { padding: 0 10px; font-size: 0.78rem; }
  .session-time { padding: 6px 10px; font-size: 0.7rem; }
  .session-time > span { display: none; }
  .session-pause { padding: 8px 10px; font-size: 0.76rem; }

  .exercise-card, .rest-card, .intro-card, .summary-card { padding: 18px 16px; border-radius: 22px; }
  .workout-layout { grid-template-columns: 1fr; gap: 14px; }
  .workout-media { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 12px; align-items: center; }
  .workout-media > .exercise-media-button, .workout-media > .exercise-media-missing { grid-row: 1 / 3; margin: 0; border-radius: 14px; }
  .workout-media > .main-cue { grid-column: 2; align-self: end; margin: 0; font-size: 0.8rem; line-height: 1.45; }
  .workout-media > .button { grid-column: 2; align-self: start; justify-content: flex-start; padding: 4px 0; min-height: 36px; font-size: 0.78rem; }

  /* Mobile Bottom Sheet Modals */
  .overlay { align-items: end; padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
  .dialog {
    position: relative; width: 100%; max-height: 88dvh;
    padding: 26px 18px max(20px, env(safe-area-inset-bottom));
    border-radius: 26px 26px 20px 20px;
    animation: pe-sheet-up 0.28s var(--ease) both;
  }
  .dialog::before {
    position: absolute; top: 10px; left: 50%; width: 42px; height: 4px;
    border-radius: 99px; background: var(--line-strong); transform: translateX(-50%); content: "";
  }
  .video-overlay { padding: 0; }
  .video-dialog { border-radius: 24px 24px 0 0; max-height: 90dvh; }
  .video-dialog::before { display: none; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
  .dialog-actions .button { width: 100%; }

  .toast {
    left: 14px; right: 14px; max-width: none; text-align: center;
    bottom: calc(var(--nav-height) + 14px + env(safe-area-inset-bottom));
  }
  body.workout-active .toast { bottom: max(18px, env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .training-block-grid { grid-template-columns: 1fr; }
  .spotify-pill-label { display: none; }
  .workout-media { grid-template-columns: 92px minmax(0, 1fr); }
}

:root[data-reduce-motion="true"] *, :root[data-reduce-motion="true"] *::before, :root[data-reduce-motion="true"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
@media (forced-colors: active) {
  .button, .calendar-day, .filter-chips button, .nav-button[aria-current="page"] { border: 1px solid ButtonText; }
}
@media print {
  .desktop-sidebar, .mobile-topbar, .mobile-bottom-nav, .active-workout-dock, .spotify-widget-root { display: none !important; }
  main { margin: 0; padding: 20px; }
}


/* ==========================================================================
   SHAPE EM CASA 2.0 · COMPONENTES ESPECÍFICOS (CAPA HERO, TREINOS A/B,
   EXERCÍCIOS COM PROPORÇÃO EXATA 4:3 / 16:9 & FICHAS PRONTAS)
   ========================================================================== */

/* Home Hero with Refined 4:5 Portrait Cover Card (never stretched or cropped!) */
.shape-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 24px;
  align-items: center;
}
.shape-hero-copy {
  min-width: 0;
}
.shape-hero-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  background: #0d0e12;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(244, 208, 63, 0.14);
}
.shape-hero-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}
.shape-hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -28px 42px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
@media (max-width: 980px) {
  .shape-hero-grid {
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 18px;
  }
}
@media (max-width: 640px) {
  .shape-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .shape-hero-poster {
    max-width: 210px;
    margin: 2px auto 0;
  }
}

/* Home A/B Routine Cards (16:9 exact framing using framing-2026-10-08 workout frames) */
.shape-ab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.shape-ab-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0d0e12;
  color: #f5f7fb;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-sm);
}
.shape-ab-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}
.shape-ab-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.shape-ab-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 0.42s var(--ease);
}
.shape-ab-card:hover .shape-ab-bg img {
  transform: scale(1.04);
}
.shape-ab-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(95deg, rgba(8, 9, 12, 0.90) 0%, rgba(8, 9, 12, 0.56) 52%, rgba(8, 9, 12, 0.18) 100%);
}
.shape-ab-letter {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(244, 208, 63, 0.22);
  border: 1px solid rgba(244, 208, 63, 0.46);
  color: #f4d03f;
  font-size: 15px;
  font-weight: 850;
  margin-bottom: 10px;
}
.shape-ab-card h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 780;
  color: #ffffff;
}
.shape-ab-card p {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(245, 247, 251, 0.86);
}
.shape-ab-card .shape-ab-tag {
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 680;
  color: #f4d03f;
}
@media (max-width: 720px) {
  .shape-ab-grid {
    grid-template-columns: 1fr;
  }
}

/* Routine Exercise List (ENTIRE row clickable + exact 4:3 pre-framed thumbnail, zero distortion!) */
.shape-routine-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.shape-routine-row {
  width: 100%;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.shape-routine-row:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  background: color-mix(in srgb, var(--surface-soft) 84%, var(--accent-soft));
  box-shadow: var(--shadow-sm);
}
.shape-routine-thumb {
  position: relative;
  width: 108px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0e12;
  flex-shrink: 0;
}
.shape-routine-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 0.34s var(--ease);
}
.shape-routine-row:hover .shape-routine-thumb img {
  transform: scale(1.05);
}
.shape-thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.22);
}
.shape-thumb-play span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 12, 0.80);
  border: 1px solid rgba(244, 208, 63, 0.6);
  color: #f4d03f;
  transition: transform 0.2s var(--ease-spring), background-color 0.2s ease, color 0.2s ease;
}
.shape-thumb-play svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.shape-routine-row:hover .shape-thumb-play span {
  transform: scale(1.12);
  background: var(--accent-solid);
  color: #141108;
}
.shape-routine-copy {
  min-width: 0;
}
.shape-routine-copy strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 740;
  margin-bottom: 3px;
}
.shape-routine-copy span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.45;
}
.shape-routine-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 720;
  white-space: nowrap;
}
.shape-routine-pill svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
@media (max-width: 600px) {
  .shape-routine-row {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 10px 11px;
  }
  .shape-routine-thumb {
    width: 88px;
  }
  .shape-routine-pill span {
    display: none;
  }
  .shape-routine-pill {
    padding: 9px;
    border-radius: 50%;
  }
}

/* Exercises Catalog Grid (exact 4:3 real frames, crisp natural studio lighting!) */
.shape-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.shape-ex-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  overflow: hidden;
  box-shadow: var(--shadow-sm), var(--inset-top);
  cursor: pointer;
}
.shape-ex-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md), var(--inset-top);
}
.shape-ex-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0d0e12;
}
.shape-ex-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 0.36s var(--ease);
}
.shape-ex-card:hover .shape-ex-photo img {
  transform: scale(1.04);
}
/* Natural colors on ALL exercise images; ONLY subtle shadow lift on the 2 darkest frames so nothing looks washed out! */
:is(.shape-ex-photo, .shape-routine-thumb, .shape-workout-photo, .shape-ab-bg):is(
  [data-exercise="agachamento-bulgaro"],
  [data-exercise="biceps-porta-tornozelo"],
  [data-exercise="biceps-resistencia"],
  [data-exercise="biceps-lento"]
) img {
  filter: brightness(1.09) contrast(0.95);
}
.shape-ex-body {
  padding: 13px 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shape-ex-body strong {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}
.shape-ex-body span {
  font-size: 0.72rem;
  color: var(--text-faint);
  display: block;
  margin-top: 2px;
}
.shape-ex-play {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
}
.shape-ex-play svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
@media (max-width: 520px) {
  .shape-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .shape-ex-body {
    padding: 10px 11px 12px;
  }
  .shape-ex-body strong {
    font-size: 0.84rem;
  }
  .shape-ex-play {
    display: none;
  }
}

/* Workout Media Slot (exact 16:9 workout frame, zero stretching!) */
.shape-workout-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #0d0e12;
  cursor: pointer;
}
.shape-workout-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.shape-workout-play {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.84);
  border: 1px solid rgba(244, 208, 63, 0.45);
  color: #f5f7fb;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.shape-workout-play svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #f4d03f;
  stroke-width: 2.2;
}

/* Angle Tabs inside Exercise Video Modal */
.angle-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.angle-tabs button {
  min-height: 38px;
  padding: 7px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 660;
}
.angle-tabs button[aria-pressed="true"] {
  border-color: var(--accent-solid);
  background: var(--accent-solid);
  color: #141108;
  font-weight: 740;
}

/* Fichas Prontas / Document Reader */
.pdf-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.pdf-row-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.pdf-row-btn:hover {
  transform: translateY(-1.5px);
  border-color: var(--accent-line);
  background: color-mix(in srgb, var(--surface-soft) 84%, var(--accent-soft));
}
.pdf-thumb {
  width: 42px;
  height: 54px;
  flex: 0 0 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  place-items: center;
}
.pdf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pdf-row-copy {
  flex: 1;
  min-width: 0;
}
.pdf-row-copy strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}
.pdf-row-copy small {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--text-soft);
}
.pdf-row-btn > svg {
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

.document-pages {
  display: grid;
  gap: 14px;
  max-height: 68dvh;
  overflow-y: auto;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.document-pages figure {
  margin: 0;
  display: grid;
  gap: 6px;
}
.document-pages figcaption {
  font-size: 0.76rem;
  color: var(--text-soft);
  text-align: center;
}
.document-pages img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #ffffff;
}

.lesson-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.lesson-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-solid);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 620;
  text-decoration: none;
}
.lesson-link:hover {
  border-color: var(--accent-line);
  border-left-color: var(--accent-solid);
  background: color-mix(in srgb, var(--surface-soft) 84%, var(--accent-soft));
}
.lesson-link svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Prepare Targets Grid inside Start Workout Modal */
.prepare-targets-list {
  display: grid;
  gap: 10px;
  max-height: 46dvh;
  overflow-y: auto;
  padding-right: 4px;
  margin: 14px 0;
}
.prepare-ex-row {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: grid;
  gap: 10px;
}
.prepare-ex-row strong {
  font-size: 0.9rem;
  font-weight: 720;
}
.prepare-ex-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.prepare-ex-inputs label {
  display: grid;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--text-soft);
}
.prepare-ex-inputs input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

/* Dual Per-Side Stepper Grid */
.dual-steppers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 520px) {
  .dual-steppers {
    grid-template-columns: 1fr;
  }
}

/* End Workout Choice Sheet */
.end-choice-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 12px;
}
.end-choice-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}
.end-choice-btn:hover {
  border-color: var(--accent-line);
}
.end-choice-btn.is-save {
  border-color: color-mix(in srgb, var(--success) 44%, var(--line));
  background: linear-gradient(135deg, var(--success-soft), var(--surface-soft));
}
.end-choice-btn.is-discard {
  border-color: color-mix(in srgb, var(--danger) 44%, var(--line));
  background: linear-gradient(135deg, var(--danger-soft), var(--surface-soft));
}
.end-choice-ico {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--accent);
}
.end-choice-btn.is-save .end-choice-ico { color: var(--success); }
.end-choice-btn.is-discard .end-choice-ico { color: var(--danger); }
.end-choice-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.end-choice-copy strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 740;
}
.end-choice-copy span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-soft);
  line-height: 1.42;
}

/* Install Step List inside Install Guide Modal */
.install-steps-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}
.install-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.install-step-num {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-solid);
  color: #141108;
  font-size: 0.82rem;
  font-weight: 850;
}
.install-step-item strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}
.install-step-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.45;
}

/* Active Workout Topbar End Pill */
.workout-end-btn {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 740;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.workout-end-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Utility classes (zero inline styles for strict CSP!) */
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.sp-mini-icon-btn { width: 38px !important; height: 38px !important; min-height: 38px !important; flex-basis: 38px !important; }
.sp-chip-pick { background: transparent; padding: 0; font: inherit; color: inherit; border: 0; }
.sound-test-row { display: flex; align-items: center; gap: 8px; }
.sound-test-btn { min-height: 36px !important; padding: 6px 12px !important; font-size: 0.76rem !important; }
.legend-dot-done { background: var(--success); }
.legend-dot-partial { background: var(--warning); }
.legend-dot-planned { background: var(--accent); }
.legend-dot-rest { background: var(--line-strong); }
.week-segments-3 { --frequency: 3; }
.storage-error-banner {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 450;
  width: min(520px, calc(100% - 28px));
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--danger);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.storage-error-banner[hidden] { display: none !important; }
.login-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: #000;
  border: 1px solid rgba(244, 208, 63, 0.28);
  flex-shrink: 0;
}



/* ==========================================================================
   SHAPE EM CASA 2.1 · POLIMENTO COMPLETO DESKTOP & MOBILE
   ========================================================================== */

/* 1. Semantic 3-Tier Level Color System (OLED Dark + Studio Light) */
:root {
  --lvl-ini: #15803d;
  --lvl-ini-soft: rgba(22, 163, 74, 0.14);
  --lvl-ini-line: rgba(22, 163, 74, 0.42);
  --lvl-int: #b45309;
  --lvl-int-soft: rgba(245, 158, 11, 0.15);
  --lvl-int-line: rgba(217, 119, 6, 0.44);
  --lvl-ava: #dc2626;
  --lvl-ava-soft: rgba(239, 68, 68, 0.13);
  --lvl-ava-line: rgba(220, 38, 38, 0.42);
}
:root[data-theme="dark"] {
  --lvl-ini: #4ade80;
  --lvl-ini-soft: rgba(34, 197, 94, 0.16);
  --lvl-ini-line: rgba(74, 222, 128, 0.48);
  --lvl-int: #fbbf24;
  --lvl-int-soft: rgba(245, 158, 11, 0.16);
  --lvl-int-line: rgba(251, 191, 36, 0.48);
  --lvl-ava: #f87171;
  --lvl-ava-soft: rgba(239, 68, 68, 0.16);
  --lvl-ava-line: rgba(248, 113, 113, 0.48);
}

/* Level Pills (Treino tab, Preparar modal) — crisp semantic color + subtle transition */
.filter-chips button[data-level="iniciante"][aria-pressed="true"] {
  background: var(--lvl-ini-soft) !important;
  border-color: var(--lvl-ini-line) !important;
  color: var(--lvl-ini) !important;
  box-shadow: 0 0 0 1px var(--lvl-ini-line) !important;
}
.filter-chips button[data-level="intermediario"][aria-pressed="true"] {
  background: var(--lvl-int-soft) !important;
  border-color: var(--lvl-int-line) !important;
  color: var(--lvl-int) !important;
  box-shadow: 0 0 0 1px var(--lvl-int-line) !important;
}
.filter-chips button[data-level="avancado"][aria-pressed="true"] {
  background: var(--lvl-ava-soft) !important;
  border-color: var(--lvl-ava-line) !important;
  color: var(--lvl-ava) !important;
  box-shadow: 0 0 0 1px var(--lvl-ava-line) !important;
}

/* Level Cards (Aba Mais & Tela Qual Nível Escolher) — subtle calm transition, zero exaggeration */
.level-card-option {
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  animation: none !important;
}
.level-card-option:active {
  transform: scale(0.992) !important;
}
.level-card-option.pe-is-pressing,
.level-card-option.pe-tap-pop {
  transform: none !important;
  animation: none !important;
  filter: none !important;
}
.level-card-option[data-level="iniciante"][aria-pressed="true"] {
  border-color: var(--lvl-ini-line) !important;
  background: linear-gradient(145deg, var(--lvl-ini-soft), var(--surface-soft)) !important;
  box-shadow: 0 0 0 1px var(--lvl-ini-line) !important;
}
.level-card-option[data-level="iniciante"][aria-pressed="true"] .badge {
  background: var(--lvl-ini-soft);
  border-color: var(--lvl-ini-line);
  color: var(--lvl-ini);
}
.level-card-option[data-level="intermediario"][aria-pressed="true"] {
  border-color: var(--lvl-int-line) !important;
  background: linear-gradient(145deg, var(--lvl-int-soft), var(--surface-soft)) !important;
  box-shadow: 0 0 0 1px var(--lvl-int-line) !important;
}
.level-card-option[data-level="intermediario"][aria-pressed="true"] .badge {
  background: var(--lvl-int-soft);
  border-color: var(--lvl-int-line);
  color: var(--lvl-int);
}
.level-card-option[data-level="avancado"][aria-pressed="true"] {
  border-color: var(--lvl-ava-line) !important;
  background: linear-gradient(145deg, var(--lvl-ava-soft), var(--surface-soft)) !important;
  box-shadow: 0 0 0 1px var(--lvl-ava-line) !important;
}
.level-card-option[data-level="avancado"][aria-pressed="true"] .badge {
  background: var(--lvl-ava-soft);
  border-color: var(--lvl-ava-line);
  color: var(--lvl-ava);
}

/* Badge level tint helpers */
.badge.lvl-iniciante { background: var(--lvl-ini-soft); border-color: var(--lvl-ini-line); color: var(--lvl-ini); }
.badge.lvl-intermediario { background: var(--lvl-int-soft); border-color: var(--lvl-int-line); color: var(--lvl-int); }
.badge.lvl-avancado { background: var(--lvl-ava-soft); border-color: var(--lvl-ava-line); color: var(--lvl-ava); }

/* 2. Home Install Card + Balanced Home Layout + Breathing Room on Week Squares */
.install-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 58%);
  box-shadow: var(--shadow-sm), var(--inset-top);
}
.install-invite-copy {
  min-width: 0;
}
.install-invite-copy strong {
  display: block;
  margin: 4px 0 4px;
  font-size: 1.05rem;
  font-weight: 760;
  color: var(--text);
}
.install-invite-copy p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.48;
}
.install-invite .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 780px) {
  .install-invite {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
  }
  .install-invite .actions {
    width: 100%;
  }
  .install-invite .actions .button.primary {
    flex: 1;
  }
}

.home-layout {
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.92fr) !important;
  gap: 20px !important;
}
@media (max-width: 1020px) {
  .home-layout {
    grid-template-columns: 1fr !important;
  }
}

.week-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px !important;
  margin-top: 16px !important;
}
.week-day-pill {
  padding: 10px 4px !important;
  border-radius: 12px !important;
  gap: 6px !important;
  font-size: 0.72rem !important;
}
.week-day-pill i {
  width: 7px !important;
  height: 7px !important;
}

/* 3. Dedicated Sub-View Header ("Qual nível escolher?" & "Dias da semana") */
.subview-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.subview-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 680;
}
.subview-back-btn:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}
.subview-back-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  transform: rotate(180deg);
}
.subview-shell {
  max-width: 760px;
}

/* 4. Vivid Centered Checkmark in Evolução -> Descanso */
.day-rest-icon {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  border-radius: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(34, 197, 94, 0.20) !important;
  border: 1px solid rgba(52, 211, 153, 0.52) !important;
  color: #22c55e !important;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.24) !important;
}
.day-rest-icon svg {
  display: block;
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: #22c55e !important;
  stroke-width: 2.6 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 5. Clean Exercise Cards (no skewed play triangle) & Clean Silent Looping Video */
.shape-ex-body {
  padding: 13px 15px 15px;
  display: block;
}
.video-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 54dvh;
  object-fit: contain;
  background: #050608;
  border-radius: 14px;
  pointer-events: none;
}
.cue-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.cue-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.48;
}
.cue-item b {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  margin-top: 1px;
}

/* 6. Profile Hero Inline Name Editor (lives right in Profile card!) */
.profile-inline-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  max-width: 360px;
}
.profile-inline-name input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 620;
}
.profile-inline-name .button {
  min-height: 42px;
  padding: 0 14px;
  flex-shrink: 0;
}
.profile-remove-inline {
  margin-top: 8px;
  padding: 4px 10px !important;
  min-height: 30px !important;
  font-size: 0.74rem !important;
}
@media (max-width: 680px) {
  .profile-inline-name {
    max-width: 100%;
    width: 100%;
  }
}

/* 7. FULL-SCREEN CENTERED WORKOUT MODE (DESKTOP + MOBILE) */
body.workout-active .desktop-sidebar,
body.workout-active .mobile-bottom-nav,
body.workout-active .active-workout-dock {
  display: none !important;
}
body.workout-active main {
  margin-left: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
body.workout-active #view-root {
  max-width: none !important;
  margin: 0 !important;
  width: 100% !important;
}
.workout-screen {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 4vw, 44px) max(48px, calc(32px + env(safe-area-inset-bottom))) !important;
}
.workout-frame {
  width: min(1040px, 100%) !important;
  margin: 0 auto !important;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.workout-stage-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 0 24px;
}
.warmup-card,
.summary-card {
  width: min(640px, 100%);
  margin-inline: auto;
}
.exercise-card {
  width: 100%;
  margin-inline: auto;
}
.workout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: clamp(22px, 3.2vw, 40px);
  align-items: center;
}
@media (max-width: 860px) {
  .workout-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.workout-direct-cue {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* 8. Spacious Dark-Center Rest Timer Ring (zero overlap!) */
.rest-card {
  width: min(560px, 100%) !important;
  margin-inline: auto !important;
}
.rest-ring-wrap {
  width: min(258px, 66vw) !important;
  height: min(258px, 66vw) !important;
  margin: 20px auto 18px !important;
  border-radius: 50%;
  background: radial-gradient(circle, #06070a 56%, rgba(8, 9, 12, 0.82) 78%, transparent 100%);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.72), 0 12px 34px rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] .rest-ring-wrap {
  background: radial-gradient(circle, #111318 62%, rgba(17, 19, 24, 0.9) 82%, transparent 100%);
}
:root[data-theme="light"] .rest-ring-center .rest-timer {
  color: #f5f7fb;
}
:root[data-theme="light"] .rest-ring-center span {
  color: #a3abb9;
}
.rest-ring-track {
  stroke: rgba(255, 255, 255, 0.09) !important;
  stroke-width: 7.5 !important;
}
.rest-ring-progress {
  stroke-width: 7.5 !important;
}
.rest-ring-center {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 20px;
}
.rest-timer {
  font-size: clamp(2.25rem, 6vw, 3.05rem) !important;
  letter-spacing: -0.04em !important;
  line-height: 1 !important;
}
.rest-ring-center span {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 600;
}

/* 9. Gentle, Refined Stepper Number Animation (subtle, not jumpy!) */
.actual-controls input.is-popping,
.workout-progress-label.is-popping {
  animation: shape-gentle-pop 0.19s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
@keyframes shape-gentle-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* 10. Animated Live Workout Progress Bar */
.workout-progress .progress-track {
  height: 10px !important;
  overflow: visible !important;
}
.workout-progress .progress-track > span {
  position: relative;
  overflow: hidden;
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1), background 0.38s ease, box-shadow 0.38s ease !important;
}
.workout-progress .progress-track > span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: pe-shimmer 2.4s var(--ease) infinite;
}



/* ==========================================================================
   SHAPE EM CASA 2.2 · CENTRALIZAÇÃO PERFEITA, LOGO OFICIAL, DOCK VIVO & INSTALAR
   ========================================================================== */

/* Official Splash Logo Frame */
.splash-full-logo {
  width: 148px !important;
  height: 148px !important;
  min-width: 148px !important;
  min-height: 148px !important;
  border-radius: 26px !important;
  padding: 6px !important;
  background: #000000 !important;
}

/* Center ALL Action Rows inside Rest Card & Exercise Card on Desktop + Mobile */
.rest-card .actions {
  justify-content: center !important;
}
.rest-card .next-preview {
  margin-inline: auto;
  text-align: left;
}
.exercise-card .actual-entry .actions {
  justify-content: center !important;
}

/* Permanent, Easy-to-Find "Instalar aplicativo" button in Desktop Sidebar */
.sidebar-spotify-wrap {
  display: grid;
  gap: 8px;
}
.sidebar-install-nav {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  border-radius: 13px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, var(--accent-soft), rgba(244, 208, 63, 0.04));
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
}
.sidebar-install-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}
.sidebar-install-nav:hover {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
  color: #141108;
}
.sidebar-install-nav[hidden] {
  display: none !important;
}

/* Sleek Live Running Workout Timer Pill inside Home Hero Card */
.home-live-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-soft));
  font-size: 0.82rem;
  font-weight: 720;
  color: var(--text);
}
.home-live-timer-pill strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.96rem;
  font-weight: 820;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* Active Workout Floating Dock (with Live Ticking Clock + Fire Badge) */
.active-workout-dock {
  border-color: var(--accent-line) !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.52), 0 0 0 1px var(--accent-soft), var(--inset-top) !important;
}
.active-workout-time {
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.active-workout-dock-actions .active-workout-resume {
  flex: 1;
}
.active-workout-dock-actions .dock-discard {
  width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
}



/* ==========================================================================
   SHAPE EM CASA 2.3 · MODAL "MAIS FICHAS E AULAS" & LEITOR DE FICHAS
   ESPAÇAMENTO GENEROSO, HIERARQUIA LIMPA E LEITURA CONFORTÁVEL
   ========================================================================== */

.guides-dialog {
  display: flex;
  flex-direction: column;
  width: min(660px, 100%);
  max-height: 86dvh;
  padding: 0 !important;
  overflow: hidden !important;
}
.guides-dialog > .dialog-head {
  flex: none;
  margin: 0;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.guides-dialog > .dialog-head h2 {
  font-size: 1.32rem;
  line-height: 1.25;
}
.guides-intro-bar {
  flex: none;
  padding: 14px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  display: grid;
  gap: 12px;
}
.guides-intro-bar p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-soft);
}
.guides-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.guides-tab-btn {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.guides-tab-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}
.guides-tab-btn[aria-selected="true"] {
  border-color: var(--accent-solid);
  background: var(--accent-solid);
  color: #141108;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-glow) 50%, transparent);
}
.guides-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 24px 22px;
}
.guides-panel[hidden] {
  display: none !important;
}
.guides-section + .guides-section {
  margin-top: 22px;
}
.guides-section-label {
  display: block;
  margin: 0 0 10px 2px;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.guides-body .pdf-list {
  margin-top: 0;
  gap: 9px;
}
.guides-body .pdf-row-btn {
  padding: 12px 15px;
  gap: 14px;
  border-radius: 14px;
}
.guides-body .pdf-row-copy strong {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.32;
}
.guides-body .pdf-row-copy small {
  margin-top: 3px;
  font-size: 0.76rem;
  line-height: 1.4;
}
.guides-body .lesson-list {
  margin-top: 0;
  gap: 8px;
}
.guides-body .lesson-link {
  padding: 12px 14px;
  font-size: 0.84rem;
  line-height: 1.38;
}
.lesson-num {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.lesson-link-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.guides-footer {
  flex: none;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
}
.doc-reader-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
}
.doc-reader-body .document-pages {
  max-height: none;
}

@media (max-width: 640px) {
  .guides-dialog {
    max-height: 90dvh;
    border-radius: 24px 24px 0 0;
  }
  .guides-dialog > .dialog-head {
    padding: 16px 18px 12px;
  }
  .guides-intro-bar {
    padding: 12px 18px;
  }
  .guides-body {
    padding: 14px 18px 18px;
  }
  .guides-footer {
    padding: 12px 18px max(16px, env(safe-area-inset-bottom));
  }
}



/* ==========================================================================
   SHAPE EM CASA 2.4 · SPOTIFY NEON CENTRALIZADO, PÁ-PUM 1-TOQUE,
   TREINADOR INTELIGENTE & ACORDEÃO ANIMADO "PARA PROGREDIR"
   ========================================================================== */

/* 1. Spotify Centered Animated Neon Green Emblem */
.spotify-minibar-badge {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  background: radial-gradient(circle at 35% 30%, rgba(34, 243, 109, 0.32), rgba(29, 185, 84, 0.14)) !important;
  border: 1px solid rgba(34, 243, 109, 0.68) !important;
  color: #22f36d !important;
  box-shadow: 0 0 12px rgba(34, 243, 109, 0.48), inset 0 0 10px rgba(34, 243, 109, 0.22) !important;
  animation: shape-spotify-neon 2.4s ease-in-out infinite !important;
}
.spotify-minibar-badge svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  fill: none !important;
  stroke: #22f36d !important;
  stroke-width: 2.15 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(34, 243, 109, 0.85));
}
.spotify-nav-btn svg,
.workout-spotify-btn svg {
  color: #22f36d;
  filter: drop-shadow(0 0 5px rgba(34, 243, 109, 0.55));
}
.spotify-live-dot {
  background: #22f36d !important;
  box-shadow: 0 0 10px rgba(34, 243, 109, 0.85) !important;
}
@keyframes shape-spotify-neon {
  0%, 100% {
    box-shadow: 0 0 10px rgba(34, 243, 109, 0.42), inset 0 0 8px rgba(34, 243, 109, 0.2);
    border-color: rgba(34, 243, 109, 0.6);
  }
  50% {
    box-shadow: 0 0 20px rgba(34, 243, 109, 0.82), 0 0 32px rgba(30, 215, 96, 0.32), inset 0 0 12px rgba(34, 243, 109, 0.34);
    border-color: rgba(110, 255, 160, 0.92);
  }
}

/* 2. "Para progredir" Smooth Animated Expandable Card inside Exercise Modals */
.progress-accordion {
  margin-top: 14px;
  border-radius: 15px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(145deg, var(--accent-soft), var(--surface-soft));
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.progress-accordion[open] {
  box-shadow: 0 8px 26px color-mix(in srgb, var(--accent-glow) 28%, transparent);
}
.progress-accordion > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  user-select: none;
}
.progress-accordion > summary::-webkit-details-marker {
  display: none;
}
.progress-acc-head {
  min-width: 0;
}
.progress-acc-head strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 760;
  color: var(--accent);
}
.progress-acc-head span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-soft);
  line-height: 1.4;
}
.progress-acc-chev {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}
.progress-acc-chev svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  transform: rotate(90deg);
}
.progress-accordion[open] .progress-acc-chev {
  transform: rotate(180deg);
  background: var(--accent-solid);
  color: #141108;
}
.progress-acc-body {
  padding: 0 15px 15px;
  display: grid;
  gap: 8px;
  animation: shape-acc-reveal 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes shape-acc-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.progress-tech-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.82rem;
  line-height: 1.46;
  color: var(--text);
}
.progress-tech-tag {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 780;
  white-space: nowrap;
  margin-top: 1px;
}

/* 3. Pá-Pum 1-Tap Quick-Feel Workout Logger */
.quick-feel-label {
  margin: 12px 0 8px;
  font-size: 0.78rem;
  font-weight: 660;
  color: var(--text-soft);
  text-align: center;
}
.quick-feel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.quick-feel-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 60px;
  padding: 9px 6px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  text-align: center;
  cursor: pointer;
}
.quick-feel-btn strong {
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.15;
}
.quick-feel-btn span {
  font-size: 0.69rem;
  color: var(--text-soft);
  line-height: 1.2;
}
.quick-feel-btn.is-easy {
  border-color: rgba(74, 222, 128, 0.42);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.14), var(--surface-soft));
}
.quick-feel-btn.is-easy strong { color: #4ade80; }
:root[data-theme="light"] .quick-feel-btn.is-easy strong { color: #15803d; }

.quick-feel-btn.is-ideal {
  border-color: var(--accent-line);
  background: linear-gradient(145deg, var(--accent-soft), var(--surface-soft));
}
.quick-feel-btn.is-ideal strong { color: var(--accent); }

.quick-feel-btn.is-hard {
  border-color: rgba(251, 146, 60, 0.46);
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.14), var(--surface-soft));
}
.quick-feel-btn.is-hard strong { color: #fb923c; }
:root[data-theme="light"] .quick-feel-btn.is-hard strong { color: #c2410c; }

.quick-feel-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-sm);
}

/* Compact Adjust Drawer inside Workout (for custom reps / pain / unilateral side) */
.adjust-drawer {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.adjust-drawer > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-size: 0.8rem;
  font-weight: 660;
  color: var(--text-soft);
  cursor: pointer;
}
.adjust-drawer > summary::-webkit-details-marker { display: none; }
.adjust-drawer > summary::after {
  content: "▾";
  font-size: 0.85rem;
  color: var(--accent);
  transition: transform 0.22s ease;
}
.adjust-drawer[open] > summary::after { transform: rotate(180deg); }
.adjust-drawer-body {
  padding: 4px 14px 14px;
  display: grid;
  gap: 10px;
  animation: shape-acc-reveal 0.24s ease both;
}

/* 4. Subtle Personal Coach Pill (In-Workout) & Smart Coach Card (Evolução) */
.coach-inline-hint {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-soft));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.coach-inline-hint.is-caution {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  background: linear-gradient(135deg, var(--danger-soft), var(--surface-soft));
}
.coach-inline-copy {
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.42;
  color: var(--text);
}
.coach-inline-copy strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}
.coach-inline-hint.is-caution .coach-inline-copy strong { color: var(--danger); }
.coach-mini-apply {
  min-height: 36px !important;
  padding: 6px 12px !important;
  font-size: 0.76rem !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.coach-card {
  margin-bottom: 18px;
  padding: 20px 22px;
  border-color: var(--accent-line);
  background:
    radial-gradient(circle at 96% 8%, rgba(244, 208, 63, 0.14), transparent 52%),
    var(--surface);
}
.coach-card h2 {
  margin: 8px 0 6px;
  font-size: 1.24rem;
}
.coach-card > p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.coach-suggestions-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.coach-suggestion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.coach-suggestion-copy {
  min-width: 0;
}
.coach-suggestion-copy strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 740;
}
.coach-suggestion-copy span {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-soft);
  line-height: 1.42;
}
.coach-active-tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 740;
}
@media (max-width: 600px) {
  .coach-suggestion-row,
  .coach-inline-hint {
    flex-direction: column;
    align-items: stretch;
  }
}


/* ==========================================================================
   SHAPE EM CASA 2.5 · TAGS COLORIDAS "PARA PROGREDIR", CHIPS COLORIDOS
   & GUIA RÁPIDO (TUTORIAL INTERATIVO)
   ========================================================================== */

/* Distinct colors on "Para progredir" technique rows & tags */
.progress-tech-item {
  border-left-width: 3px;
}
.progress-tech-item[data-tag-kind="rose"] { border-left-color: #fb7185; }
.progress-tech-item[data-tag-kind="rose"] .progress-tech-tag {
  background: rgba(244, 63, 94, 0.16); border-color: rgba(251, 113, 133, 0.54); color: #fb7185;
}
.progress-tech-item[data-tag-kind="cyan"] { border-left-color: #38bdf8; }
.progress-tech-item[data-tag-kind="cyan"] .progress-tech-tag {
  background: rgba(14, 165, 233, 0.16); border-color: rgba(56, 189, 248, 0.54); color: #38bdf8;
}
.progress-tech-item[data-tag-kind="emerald"] { border-left-color: #34d399; }
.progress-tech-item[data-tag-kind="emerald"] .progress-tech-tag {
  background: rgba(16, 185, 129, 0.16); border-color: rgba(52, 211, 153, 0.54); color: #34d399;
}
.progress-tech-item[data-tag-kind="gold"] { border-left-color: #fbbf24; }
.progress-tech-item[data-tag-kind="gold"] .progress-tech-tag {
  background: rgba(245, 158, 11, 0.16); border-color: rgba(251, 191, 36, 0.54); color: #fbbf24;
}
.progress-tech-item[data-tag-kind="violet"] { border-left-color: #a78bfa; }
.progress-tech-item[data-tag-kind="violet"] .progress-tech-tag {
  background: rgba(139, 92, 246, 0.16); border-color: rgba(167, 139, 250, 0.54); color: #c4b5fd;
}

:root[data-theme="light"] .progress-tech-item[data-tag-kind="rose"] .progress-tech-tag { color: #be123c; }
:root[data-theme="light"] .progress-tech-item[data-tag-kind="cyan"] .progress-tech-tag { color: #0369a1; }
:root[data-theme="light"] .progress-tech-item[data-tag-kind="emerald"] .progress-tech-tag { color: #047857; }
:root[data-theme="light"] .progress-tech-item[data-tag-kind="gold"] .progress-tech-tag { color: #b45309; }
:root[data-theme="light"] .progress-tech-item[data-tag-kind="violet"] .progress-tech-tag { color: #6d28d9; }

/* Distinct colors on Workout Adjust Drawer chips */
.choice-chip[data-chip-group="quality"][data-chip-value="easy"][aria-pressed="true"] {
  border-color: rgba(74, 222, 128, 0.72) !important;
  background: rgba(34, 197, 94, 0.18) !important;
  color: #4ade80 !important;
}
.choice-chip[data-chip-group="quality"][data-chip-value="controlled"][aria-pressed="true"] {
  border-color: var(--accent-line) !important;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}
.choice-chip[data-chip-group="quality"][data-chip-value="difficulty"][aria-pressed="true"] {
  border-color: rgba(251, 146, 60, 0.75) !important;
  background: rgba(249, 115, 22, 0.18) !important;
  color: #fb923c !important;
}
.choice-chip[data-chip-group="quality"][data-chip-value="pain"][aria-pressed="true"] {
  border-color: rgba(251, 113, 133, 0.8) !important;
  background: rgba(244, 63, 94, 0.2) !important;
  color: #fb7185 !important;
}
.choice-chip[data-chip-group="side-note"][data-chip-value="left"][aria-pressed="true"] {
  border-color: rgba(56, 189, 248, 0.75) !important;
  background: rgba(14, 165, 233, 0.18) !important;
  color: #38bdf8 !important;
}
.choice-chip[data-chip-group="side-note"][data-chip-value="right"][aria-pressed="true"] {
  border-color: rgba(167, 139, 250, 0.75) !important;
  background: rgba(139, 92, 246, 0.18) !important;
  color: #c4b5fd !important;
}
.choice-chip[data-chip-group="side-note"][data-chip-value="both"][aria-pressed="true"] {
  border-color: rgba(74, 222, 128, 0.72) !important;
  background: rgba(34, 197, 94, 0.18) !important;
  color: #4ade80 !important;
}

/* Crisp High-Res Tutorial Dialog */
.guide-dialog {
  width: min(640px, 100%) !important;
}
.guide-figure img {
  max-height: 48dvh !important;
  background: #08090c;
}


/* ==========================================================================
   SHAPE EM CASA 2.6 · CALENDÁRIO LEGÍVEL SEM CLICAR & DESCANSO VERDE NEON
   ========================================================================== */

/* At-a-glance Calendar Day Tiles (Feito / Parcial / Treino / Desc.) */
.calendar-day {
  min-height: 54px !important;
  padding: 5px 2px !important;
  gap: 3px !important;
}
.calendar-day strong {
  font-size: 0.84rem;
  line-height: 1;
}
.calendar-day-tag {
  display: block;
  font-size: 0.56rem;
  font-weight: 760;
  letter-spacing: 0.01em;
  line-height: 1.1;
  padding: 2px 4px;
  border-radius: 5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-day.is-done {
  border-color: rgba(34, 243, 109, 0.36);
  background: rgba(34, 243, 109, 0.09);
}
.calendar-day.is-done .calendar-day-tag {
  background: rgba(34, 243, 109, 0.18);
  color: #22f36d;
}
:root[data-theme="light"] .calendar-day.is-done .calendar-day-tag {
  color: #15803d;
}
.calendar-day.is-partial {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(251, 191, 36, 0.09);
}
.calendar-day.is-partial .calendar-day-tag {
  background: rgba(251, 191, 36, 0.18);
  color: var(--warning);
}
.calendar-day.is-planned {
  border-color: var(--accent-line);
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface-soft));
}
.calendar-day.is-planned .calendar-day-tag {
  background: var(--accent-soft);
  color: var(--accent);
}
.calendar-day.is-rest .calendar-day-tag {
  color: var(--text-faint);
  opacity: 0.78;
}
@media (max-width: 440px) {
  .calendar-day {
    min-height: 48px !important;
  }
  .calendar-day-tag {
    font-size: 0.5rem;
    padding: 1px 2px;
  }
}

/* Centered Animated Neon Green Rest Icon (same vivid glow as Spotify!) */
.day-rest-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  padding: 0 !important;
  border-radius: 13px !important;
  background: radial-gradient(circle at 35% 30%, rgba(34, 243, 109, 0.30), rgba(29, 185, 84, 0.12)) !important;
  border: 1px solid rgba(34, 243, 109, 0.68) !important;
  color: #22f36d !important;
  box-shadow: 0 0 14px rgba(34, 243, 109, 0.44), inset 0 0 10px rgba(34, 243, 109, 0.22) !important;
  animation: shape-spotify-neon 2.6s ease-in-out infinite !important;
}
.day-rest-icon svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  fill: none !important;
  stroke: #22f36d !important;
  stroke-width: 2.6 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(34, 243, 109, 0.8));
}
:root[data-theme="light"] .day-rest-icon {
  background: rgba(22, 163, 74, 0.14) !important;
  border-color: rgba(22, 163, 74, 0.55) !important;
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.25) !important;
}
:root[data-theme="light"] .day-rest-icon svg {
  stroke: #15803d !important;
  filter: none;
}


/* ==========================================================================
   SHAPE EM CASA 2.7 · DESCANSO NEON CENTRALIZADO, RESPIRO NO COACH
   & TUTORIAL ESPAÇOSO COM SETAS NO DESKTOP E CELULAR
   ========================================================================== */

.coach-card {
  margin: 18px 0 24px !important;
  padding: 22px 24px !important;
}

.day-rest-box > .day-rest-icon {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px !important;
  border-radius: 14px !important;
  background: radial-gradient(circle at 35% 30%, rgba(34, 243, 109, 0.34), rgba(29, 185, 84, 0.14)) !important;
  border: 1.5px solid rgba(34, 243, 109, 0.78) !important;
  box-shadow: 0 0 16px rgba(34, 243, 109, 0.52), inset 0 0 12px rgba(34, 243, 109, 0.24) !important;
  animation: shape-spotify-neon 2.4s ease-in-out infinite !important;
}
.day-rest-box > .day-rest-icon svg {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  fill: none !important;
  stroke: #22f36d !important;
  stroke-width: 2.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter: drop-shadow(0 0 7px rgba(34, 243, 109, 0.88)) !important;
}
:root[data-theme="light"] .day-rest-box > .day-rest-icon {
  background: rgba(22, 163, 74, 0.16) !important;
  border-color: rgba(22, 163, 74, 0.62) !important;
  box-shadow: 0 0 14px rgba(22, 163, 74, 0.28) !important;
}
:root[data-theme="light"] .day-rest-box > .day-rest-icon svg {
  stroke: #15803d !important;
  filter: none !important;
}

.guide-dialog {
  width: min(740px, calc(100vw - 32px)) !important;
  max-height: 92dvh !important;
  padding: 26px 28px 24px !important;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.guide-dialog .guide-head {
  margin-bottom: 10px;
  font-size: 0.84rem;
  font-weight: 700;
}
.guide-dialog h2 {
  margin: 0 0 8px !important;
  font-size: clamp(1.28rem, 2.2vw, 1.56rem) !important;
  line-height: 1.2;
}
.guide-dialog .guide-copy {
  margin: 0 0 18px !important;
  font-size: 0.94rem !important;
  line-height: 1.55 !important;
  color: var(--text-soft);
}
.guide-dialog .guide-figure {
  margin: 0 !important;
  border-radius: 18px !important;
  border: 1px solid var(--line-strong) !important;
  background: #08090c !important;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}
.guide-dialog .guide-figure img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 52dvh !important;
  object-fit: contain !important;
  background: #08090c;
}
.guide-dialog .guide-dots {
  margin: 18px 0 16px !important;
  gap: 8px !important;
}
.guide-dialog .guide-dots span {
  width: 8px;
  height: 8px;
}
.guide-dialog .guide-dots span.active {
  width: 24px;
  background: var(--accent);
}
.guide-dialog .guide-actions {
  margin-top: 0 !important;
  justify-content: space-between;
}
@media (max-width: 640px) {
  .guide-dialog {
    width: 100% !important;
    padding: 22px 18px max(20px, env(safe-area-inset-bottom)) !important;
  }
  .guide-dialog .guide-figure img {
    max-height: 44dvh !important;
  }
}
