:root {
  color-scheme: dark;
  --ink: #070605;
  --panel: #160f0c;
  --panel-2: #21140f;
  --blood: #7f2418;
  --ember: #d66a32;
  --gold: #c79a5b;
  --gold-light: #f0c179;
  --bone: #e2d1b4;
  --muted: #a58f78;
  --line: rgba(212, 151, 82, 0.34);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: Palatino, 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: #080605;
  overscroll-behavior: none;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--bone);
  background:
    radial-gradient(circle at 50% -10%, rgba(102, 33, 18, 0.34), transparent 42%),
    linear-gradient(180deg, #0f0a08 0%, #070605 72%);
  font-family: var(--font-ui);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    repeating-linear-gradient(115deg, transparent 0 38px, rgba(255, 255, 255, 0.012) 39px 40px),
    radial-gradient(circle at 18% 32%, rgba(150, 51, 20, 0.12), transparent 28%),
    radial-gradient(circle at 82% 66%, rgba(119, 44, 19, 0.1), transparent 32%);
}

.ambient::before {
  content: '';
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(90deg, transparent 49.6%, rgba(167, 106, 55, 0.04) 50%, transparent 50.4%),
    linear-gradient(transparent 49.6%, rgba(167, 106, 55, 0.03) 50%, transparent 50.4%);
  background-size: 96px 96px;
  transform: perspective(500px) rotateX(56deg) translateY(30%);
  opacity: 0.55;
}

.vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 150px 38px #000;
}

.embers i {
  position: absolute;
  left: var(--x);
  bottom: -10px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #ff8b3f;
  box-shadow: 0 0 8px #ff6a24;
  opacity: 0;
  animation: ember-rise var(--duration) linear var(--delay) infinite;
}

@keyframes ember-rise {
  0% { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  12% { opacity: 0.85; }
  60% { transform: translate3d(18px, -58vh, 0) scale(1); opacity: 0.55; }
  100% { transform: translate3d(-12px, -108vh, 0) scale(0.2); opacity: 0; }
}

.rune {
  position: absolute;
  color: rgba(183, 87, 40, 0.06);
  font-family: var(--font-display);
  font-size: clamp(110px, 30vw, 280px);
  text-shadow: 0 0 45px rgba(196, 72, 30, 0.12);
  animation: rune-pulse 10s ease-in-out infinite alternate;
}

.rune-a { top: 12%; left: -6%; transform: rotate(-18deg); }
.rune-b { top: 48%; right: -10%; animation-delay: -4s; transform: rotate(12deg); }
.rune-c { bottom: -7%; left: 25%; animation-delay: -7s; }

@keyframes rune-pulse {
  from { opacity: 0.35; filter: blur(1px); }
  to { opacity: 0.85; filter: blur(0); }
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(12px + var(--safe-top)) 14px calc(16px + var(--safe-bottom));
  position: relative;
}

.topbar {
  display: grid;
  grid-template-columns: 46px 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 14px;
  border-bottom: 1px solid rgba(216, 150, 81, 0.18);
}

.brand-mark,
.icon-button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-mark {
  width: 44px;
  height: 44px;
  position: relative;
  display: grid;
  place-items: center;
}

.brand-mark::before,
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  background: linear-gradient(145deg, #2c160f, #0d0907);
  box-shadow: inset 0 0 14px rgba(198, 88, 34, 0.24), 0 0 12px rgba(121, 39, 20, 0.23);
}

.brand-mark::after {
  inset: 8px;
  border-color: rgba(229, 176, 103, 0.48);
  transform: rotate(0deg);
  background: transparent;
}

.brand-rune {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 10px var(--ember);
}

.brand-copy {
  min-width: 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 6vw, 1.66rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 #000, 0 0 14px rgba(215, 101, 47, 0.22);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 147, 82, 0.3);
  color: var(--gold);
  background: linear-gradient(#1e130f, #0e0a08);
  clip-path: polygon(14% 0, 86% 0, 100% 14%, 100% 86%, 86% 100%, 14% 100%, 0 86%, 0 14%);
  font-size: 1.08rem;
}

.icon-button:active,
.brand-mark:active {
  transform: scale(0.95);
}

.main-view {
  padding: 18px 0 8px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.main-view.view-leaving {
  opacity: 0;
  transform: translateY(8px) scale(0.99);
}

.main-view.view-entering {
  animation: view-enter 420ms cubic-bezier(.16,.78,.26,1);
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.hero-panel,
.workout-head {
  position: relative;
  text-align: center;
  margin-bottom: 17px;
  padding: 18px 16px 15px;
  border: 1px solid rgba(195, 135, 72, 0.25);
  background:
    linear-gradient(180deg, rgba(61, 31, 20, 0.62), rgba(17, 12, 9, 0.88)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.016) 0 1px, transparent 1px 5px);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  box-shadow: inset 0 0 34px rgba(130, 50, 21, 0.16), 0 12px 32px rgba(0,0,0,0.33);
}

.hero-panel::before,
.workout-head::before,
.hero-panel::after,
.workout-head::after {
  content: '';
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 12px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  opacity: 0.42;
}

.hero-panel::before,
.workout-head::before { left: 7px; border-left: 1px solid var(--gold); }
.hero-panel::after,
.workout-head::after { right: 7px; border-right: 1px solid var(--gold); }

.crest {
  width: 110px;
  height: 54px;
  margin: -2px auto 7px;
  position: relative;
  display: grid;
  place-items: center;
}

.crest-core {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold-light);
  background: radial-gradient(circle, #642719 0, #24120d 58%, #0c0806 100%);
  box-shadow: 0 0 18px rgba(210, 90, 35, 0.28);
}

.crest-core i {
  display: block;
  transform: rotate(-45deg);
  font-style: normal;
}

.crest-wing {
  position: absolute;
  top: 22px;
  width: 42px;
  height: 14px;
  border-top: 1px solid var(--gold);
  opacity: 0.68;
}

.crest-wing::after {
  content: '';
  position: absolute;
  top: 4px;
  width: 30px;
  border-top: 1px solid rgba(201, 150, 91, 0.5);
}

.crest-wing-left { left: 0; transform: skewY(-14deg); }
.crest-wing-right { right: 0; transform: skewY(14deg); }
.crest-wing-left::after { right: 0; }
.crest-wing-right::after { left: 0; }

.hero-panel h2,
.workout-head h2,
.modal-panel h2 {
  margin: 4px 0 8px;
  color: #f1dec0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.hero-copy,
.workout-head > p:not(.eyebrow) {
  max-width: 390px;
  margin: 0 auto;
  color: #bca990;
  font-size: 0.87rem;
  line-height: 1.5;
}

.intro-reveal {
  animation: reveal-panel 620ms cubic-bezier(.16,.78,.26,1) both;
}

@keyframes reveal-panel {
  from { opacity: 0; transform: translateY(-10px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.menu-stack,
.exercise-stack {
  display: grid;
  gap: 10px;
}

.menu-button,
.exercise-card,
.back-button {
  -webkit-user-select: none;
  user-select: none;
}

.menu-button {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px 1fr 28px;
  align-items: center;
  gap: 11px;
  position: relative;
  padding: 11px 13px;
  border: 1px solid #6d3c25;
  border-left-color: #a36539;
  border-right-color: #a36539;
  color: var(--bone);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(90, 34, 20, 0.86), rgba(37, 18, 13, 0.96) 49%, rgba(20, 13, 10, 0.98) 50%),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(255,255,255,0.02) 8px);
  clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px), 0 13px);
  box-shadow: inset 0 1px rgba(255, 206, 129, 0.12), inset 0 -10px 25px rgba(0,0,0,0.28), 0 7px 18px rgba(0,0,0,0.28);
  opacity: 0;
  animation: menu-enter 480ms cubic-bezier(.12,.8,.24,1) var(--delay) forwards;
}

.menu-button::before,
.exercise-card::before,
.back-button::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(237, 182, 105, 0.22);
  clip-path: inherit;
  pointer-events: none;
}

.menu-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 199, 123, 0.18) 49%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 620ms ease;
}

.menu-button:hover::after,
.menu-button:focus-visible::after {
  transform: translateX(120%);
}

.menu-button:active {
  transform: scale(0.985);
  filter: brightness(1.14);
}

@keyframes menu-enter {
  from { opacity: 0; transform: translateX(-18px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.menu-index {
  color: rgba(237, 187, 117, 0.58);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
}

.menu-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.menu-copy strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.07em;
}

.menu-copy small {
  color: #b59a7c;
  font-size: 0.71rem;
  letter-spacing: 0.025em;
}

.menu-chevron {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
  text-shadow: 0 0 10px var(--ember);
}

.menu-ornament {
  position: absolute;
  left: 6px;
  top: 50%;
  width: 5px;
  height: 36px;
  transform: translateY(-50%);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  background: linear-gradient(transparent, var(--blood), transparent);
  box-shadow: 0 0 8px rgba(211, 77, 30, 0.36);
}

.swipe-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  color: #c18c58;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.swipe-hint span {
  font-size: 0.95rem;
  animation: hint-pulse 1.7s ease-in-out infinite alternate;
}

@keyframes hint-pulse {
  from { transform: translateX(0); opacity: 0.45; }
  to { transform: translateX(3px); opacity: 1; }
}

.exercise-card {
  --swipe-intensity: 0;
  min-height: 83px;
  display: grid;
  grid-template-columns: 36px 1fr 28px;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 12px 13px;
  border: 1px solid rgba(139, 76, 42, 0.96);
  background:
    linear-gradient(180deg, rgba(54, 27, 19, 0.98), rgba(23, 15, 12, 0.99)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 6px);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  box-shadow: inset 0 0 24px rgba(116, 45, 24, 0.16), 0 7px 18px rgba(0,0,0,0.28);
  cursor: grab;
  touch-action: pan-y;
  will-change: transform, opacity;
  opacity: 0;
  animation: card-enter 420ms cubic-bezier(.12,.8,.24,1) var(--delay) forwards;
  transition: transform 180ms ease, border-color 180ms ease, filter 180ms ease;
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.exercise-card:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.exercise-card.dragging {
  cursor: grabbing;
  transition: none;
  z-index: 5;
  border-color: rgba(231, 123, 62, calc(0.45 + var(--swipe-intensity) * 0.5));
  filter: brightness(calc(1 + var(--swipe-intensity) * 0.22));
}

.card-glow {
  position: absolute;
  inset: 0;
  opacity: var(--swipe-intensity);
  background: radial-gradient(circle at 50% 50%, rgba(220, 80, 30, 0.24), transparent 68%);
  pointer-events: none;
}

.card-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 800;
}

.card-number::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(202, 142, 77, 0.58);
  transform: rotate(45deg);
  background: #190e0b;
  box-shadow: 0 0 12px rgba(187, 68, 28, 0.18);
  z-index: -1;
}

.card-body {
  min-width: 0;
}

.card-body h3 {
  margin: 0 0 4px;
  color: #ecd8b7;
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.15;
}

.card-body p,
.card-body span {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body p {
  color: #bd8b5b;
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.card-body span {
  display: block;
  margin-top: 3px;
  color: #8f7b67;
  font-size: 0.67rem;
}

.card-rune {
  color: rgba(216, 146, 78, 0.48);
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-align: center;
  text-shadow: 0 0 9px rgba(217, 79, 30, 0.28);
}

.exercise-card.banish-left {
  animation: banish-left 340ms cubic-bezier(.45,.02,.8,.38) forwards;
}

.exercise-card.banish-right {
  animation: banish-right 340ms cubic-bezier(.45,.02,.8,.38) forwards;
}

@keyframes banish-left {
  0% { opacity: 1; filter: brightness(1); }
  45% { filter: brightness(1.8) sepia(0.7); }
  100% { opacity: 0; transform: translateX(-130%) rotate(-9deg) scale(0.86); filter: blur(8px) brightness(2); }
}

@keyframes banish-right {
  0% { opacity: 1; filter: brightness(1); }
  45% { filter: brightness(1.8) sepia(0.7); }
  100% { opacity: 0; transform: translateX(130%) rotate(9deg) scale(0.86); filter: blur(8px) brightness(2); }
}

.exercise-card.summoned {
  animation: summon 620ms cubic-bezier(.12,.86,.22,1) both;
}

@keyframes summon {
  0% { opacity: 0; transform: scale(0.72); filter: blur(13px) brightness(2.5); box-shadow: 0 0 70px #d84e22; }
  45% { opacity: 1; transform: scale(1.035); filter: blur(0) brightness(1.35); }
  100% { transform: scale(1); filter: none; }
}

.exercise-card.no-replacement {
  animation: blocked 430ms ease;
}

@keyframes blocked {
  20%, 60% { transform: translateX(-5px); border-color: #d33b2c; }
  40%, 80% { transform: translateX(5px); }
}

.back-button {
  width: 100%;
  min-height: 54px;
  margin-top: 14px;
  position: relative;
  border: 1px solid rgba(176, 120, 67, 0.58);
  color: #d9c29f;
  background: linear-gradient(#251711, #100c09);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  cursor: pointer;
}

.back-button:active {
  transform: translateY(1px);
  filter: brightness(1.15);
}

.footer-seal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin-top: 4px;
  color: rgba(178, 143, 104, 0.5);
  font-size: 0.55rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.seal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7f3b25;
  box-shadow: 0 0 7px #d75c2e;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  opacity: 0;
  transition: opacity 220ms ease;
}

.modal.visible {
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 2, 0.78);
  backdrop-filter: blur(6px);
}

.modal-panel {
  width: min(100%, 560px);
  max-height: min(92dvh, 900px);
  margin: 0 auto;
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 18px calc(24px + var(--safe-bottom));
  border: 1px solid #754027;
  border-bottom: 0;
  color: var(--bone);
  background:
    linear-gradient(180deg, rgba(51, 27, 19, 0.99), rgba(12, 9, 7, 0.995) 35%),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255,255,255,0.012) 6px);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -24px 80px rgba(0,0,0,0.72), inset 0 0 35px rgba(123, 52, 24, 0.14);
  transform: translateY(24px);
  transition: transform 280ms cubic-bezier(.16,.82,.25,1);
}

.modal.visible .modal-panel {
  transform: translateY(0);
}

.modal-panel::before {
  content: '';
  position: absolute;
  inset: 6px 6px auto;
  height: 14px;
  border-top: 1px solid rgba(226, 171, 101, 0.5);
  border-left: 1px solid rgba(226, 171, 101, 0.5);
  border-right: 1px solid rgba(226, 171, 101, 0.5);
  clip-path: polygon(0 0, 42% 0, 46% 100%, 54% 100%, 58% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.modal-close {
  position: sticky;
  top: 0;
  z-index: 3;
  float: right;
  width: 38px;
  height: 38px;
  margin-top: -13px;
  margin-right: -8px;
  border: 1px solid rgba(202, 144, 78, 0.52);
  color: var(--gold-light);
  background: #170e0b;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.modal-title-block {
  padding-right: 30px;
}

.modal-title-block h2 {
  padding-right: 8px;
}

.modal-muscle {
  margin: 0 0 16px;
  color: #b89068;
  font-size: 0.77rem;
  line-height: 1.4;
}

.modal-muscle span {
  margin: 0 5px;
  color: #73371f;
}

.exercise-illustration {
  margin: 14px 0 16px;
  padding: 10px 8px 8px;
  border: 1px solid rgba(190, 126, 68, 0.32);
  background:
    radial-gradient(circle at 50% 50%, rgba(103, 39, 20, 0.24), transparent 64%),
    #0d0907;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.illustration-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: #9e6d42;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-align: center;
}

.exercise-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

.art-divider {
  stroke: rgba(195, 132, 72, 0.16);
  stroke-width: 1;
  stroke-dasharray: 4 8;
}

.head {
  fill: #2a1711;
  stroke: #c69055;
  stroke-width: 4;
}

.torso,
.body-line {
  fill: none;
  stroke: #c69055;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(220, 94, 38, 0.22));
}

.joint {
  fill: #e1ad6a;
  opacity: 0.65;
}

.equipment-line,
.bar-line {
  fill: none;
  stroke: #6b5b4e;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.equipment-faint {
  fill: none;
  stroke: rgba(125, 106, 90, 0.38);
  stroke-width: 3;
}

.bar-line {
  stroke: #92806d;
  stroke-width: 7;
}

.weight {
  fill: #5f4e42;
  stroke: #b58a59;
  stroke-width: 2;
}

.motion-arrow {
  fill: none;
  stroke: #d9793b;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 5 6;
  filter: drop-shadow(0 0 5px rgba(226, 91, 35, 0.45));
  animation: arrow-flow 2s linear infinite;
}

@keyframes arrow-flow {
  to { stroke-dashoffset: -22; }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 10px;
}

.detail-grid section,
.instruction-section {
  border: 1px solid rgba(168, 110, 62, 0.22);
  background: rgba(27, 17, 13, 0.72);
}

.detail-grid section {
  padding: 11px;
}

.detail-grid h3,
.instruction-section h3 {
  margin: 0 0 6px;
  color: #d1a169;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.035em;
}

.detail-grid p,
.instruction-section p,
.instruction-section li {
  color: #c5b39b;
  font-size: 0.78rem;
  line-height: 1.55;
}

.detail-grid p,
.instruction-section p {
  margin: 0;
}

.instruction-section {
  margin-top: 9px;
  padding: 12px 13px;
}

.instruction-section ul {
  margin: 0;
  padding-left: 18px;
}

.instruction-section li + li {
  margin-top: 5px;
}

.danger-section {
  border-color: rgba(151, 53, 37, 0.34);
  background: rgba(57, 20, 15, 0.34);
}

.danger-section h3 {
  color: #cb755b;
}

.safety-note,
.privacy-note {
  margin: 13px 2px 0;
  color: #827363;
  font-size: 0.65rem;
  line-height: 1.5;
}

.settings-panel {
  padding-top: 34px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(185, 125, 69, 0.24);
  background: rgba(30, 18, 13, 0.78);
}

.setting-row span {
  display: grid;
  gap: 4px;
}

.setting-row strong {
  color: #dcc4a1;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.setting-row small {
  color: #94806c;
  font-size: 0.68rem;
  line-height: 1.4;
}

.setting-row input {
  appearance: none;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  position: relative;
  border: 1px solid #6f4630;
  border-radius: 20px;
  background: #0f0b09;
  box-shadow: inset 0 0 8px #000;
  cursor: pointer;
}

.setting-row input::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6f5a47;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.setting-row input:checked::before {
  transform: translateX(20px);
  background: #d7793a;
  box-shadow: 0 0 10px rgba(228, 91, 31, 0.68);
}

.reduced-effects .embers,
.reduced-effects .rune,
.reduced-effects .motion-arrow {
  display: none;
}

.reduced-effects *,
.reduced-effects *::before,
.reduced-effects *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

@media (min-width: 600px) {
  .app-shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  .menu-button {
    min-height: 78px;
  }

  .modal {
    align-items: center;
    padding: 20px;
  }

  .modal-panel {
    border-bottom: 1px solid #754027;
    border-radius: 18px;
    max-height: min(92vh, 860px);
    padding-bottom: 28px;
  }
}

@media (max-width: 360px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .topbar { grid-template-columns: 40px 1fr 38px; }
  .brand-mark { width: 38px; height: 38px; }
  .icon-button { width: 36px; height: 36px; }
  .hero-copy { font-size: 0.8rem; }
  .menu-button { min-height: 66px; }
  .card-body h3 { font-size: 0.9rem; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) *,
  html:not(.force-motion) *::before,
  html:not(.force-motion) *::after {
    scroll-behavior: auto !important;
  }
}

.exercise-card.static-card {
  opacity: 1;
  animation: none;
}


/* Path of Swole v1.1 — smoother mobile interaction and richer ARPG ambience */
html {
  scroll-behavior: smooth;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  font-size: 17px;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.main-view,
.modal-panel {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.topbar {
  grid-template-columns: 46px 1fr 42px;
  padding-bottom: 16px;
}

.brand-copy h1 {
  font-size: clamp(1.52rem, 7vw, 1.9rem);
  letter-spacing: .055em;
  background: linear-gradient(92deg, #d8b57a 0%, #fff0c4 45%, #b87940 70%, #f6d58f 100%);
  background-size: 220% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: title-shimmer 6s linear infinite;
}

@keyframes title-shimmer {
  from { background-position: 180% center; }
  to { background-position: -40% center; }
}

.hero-panel {
  padding: 20px 16px 18px;
}

.hero-panel h2,
.workout-head h2,
.modal-panel h2 {
  font-size: clamp(1.62rem, 6.6vw, 2.15rem);
}

.eyebrow {
  font-size: .73rem;
}

.menu-stack,
.exercise-stack {
  gap: 12px;
}

.menu-button {
  min-height: 78px;
  grid-template-columns: 28px 1fr 30px;
  gap: 13px;
  padding: 13px 15px;
  animation: menu-enter 480ms cubic-bezier(.12,.8,.24,1) var(--delay) forwards,
             menu-breathe 5.8s ease-in-out calc(var(--delay) + 700ms) infinite;
}

@keyframes menu-breathe {
  0%, 100% { border-color: #6d3c25; box-shadow: inset 0 1px rgba(255,206,129,.12), inset 0 -10px 25px rgba(0,0,0,.28), 0 7px 18px rgba(0,0,0,.28); }
  50% { border-color: rgba(177,104,55,.82); box-shadow: inset 0 1px rgba(255,222,163,.18), inset 0 -10px 25px rgba(0,0,0,.28), 0 7px 23px rgba(122,42,21,.22); }
}

.menu-copy strong {
  font-size: 1.28rem;
}

.menu-copy small {
  font-size: .78rem;
  line-height: 1.3;
}

.menu-gem {
  --gem: #a85cff;
  width: 24px;
  height: 24px;
  position: relative;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border: 1px solid color-mix(in srgb, var(--gem), white 32%);
  background:
    linear-gradient(135deg, rgba(255,255,255,.65), transparent 28%),
    linear-gradient(315deg, rgba(0,0,0,.48), transparent 48%),
    var(--gem);
  box-shadow: inset 0 0 8px rgba(255,255,255,.28), 0 0 12px color-mix(in srgb, var(--gem), transparent 45%);
  clip-path: polygon(50% 0, 100% 28%, 82% 100%, 18% 100%, 0 28%);
  animation: gem-pulse 3.8s ease-in-out infinite;
}

.menu-gem i {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255,255,255,.5);
  transform: rotate(45deg);
  opacity: .7;
}

.gem-0 { --gem: #9d59ff; }
.gem-1 { --gem: #37a9ff; }
.gem-2 { --gem: #ef554e; }
.gem-3 { --gem: #a8d840; }
.gem-4 { --gem: #f0a83d; }

@keyframes gem-pulse {
  0%,100% { filter: brightness(.92); }
  50% { filter: brightness(1.28) saturate(1.15); }
}

.exercise-card {
  min-height: 91px;
  grid-template-columns: 42px 1fr 30px;
  gap: 12px;
  padding: 14px 15px;
  touch-action: pan-y pinch-zoom;
  contain: layout paint;
  transform-origin: center;
  transition: transform 250ms cubic-bezier(.2,.8,.2,1), border-color 180ms ease, filter 180ms ease, box-shadow 220ms ease;
}

.exercise-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 0 35%, rgba(255,222,161,.12) 48%, transparent 61%);
  transform: translateX(-135%);
  animation: card-glint 7s ease-in-out calc(var(--delay) + 1s) infinite;
}

@keyframes card-glint {
  0%, 68% { transform: translateX(-135%); opacity: 0; }
  72% { opacity: .65; }
  86%,100% { transform: translateX(135%); opacity: 0; }
}

.exercise-card.dragging {
  transition: none;
  box-shadow: inset 0 0 28px rgba(116,45,24,.2), 0 12px 30px rgba(0,0,0,.42), 0 0 22px rgba(211,90,42,.12);
}

.exercise-card.settling {
  transition: transform 250ms cubic-bezier(.18,.88,.3,1.12), filter 180ms ease;
}

.exercise-card.swapping {
  pointer-events: none;
}

.card-number {
  --gem: #9d59ff;
  width: 38px;
  height: 38px;
  isolation: isolate;
  color: #fff4d9;
  font-size: 1rem;
  text-shadow: 0 1px 2px #000, 0 0 7px rgba(255,255,255,.4);
}

.card-number::before {
  inset: 3px;
  border-color: color-mix(in srgb, var(--gem), white 38%);
  background:
    linear-gradient(135deg, rgba(255,255,255,.58), transparent 26%),
    linear-gradient(315deg, rgba(0,0,0,.58), transparent 52%),
    color-mix(in srgb, var(--gem), #140b09 18%);
  box-shadow: inset 0 0 11px rgba(255,255,255,.25), 0 0 14px color-mix(in srgb, var(--gem), transparent 42%);
  clip-path: polygon(50% 0, 100% 27%, 82% 100%, 18% 100%, 0 27%);
  animation: number-gem 4.3s ease-in-out infinite;
}

@keyframes number-gem {
  0%,100% { filter: brightness(.9) saturate(.94); }
  50% { filter: brightness(1.28) saturate(1.2); }
}

.card-body h3 {
  font-size: 1.12rem;
  line-height: 1.18;
}

.card-body p {
  font-size: .77rem;
}

.card-body span {
  font-size: .75rem;
}

.card-rune {
  font-size: 1.55rem;
  animation: rune-flicker 4.8s ease-in-out infinite;
}

.gem-text-0 { color: rgba(182,114,255,.65); text-shadow: 0 0 10px rgba(157,89,255,.5); }
.gem-text-1 { color: rgba(91,184,255,.65); text-shadow: 0 0 10px rgba(55,169,255,.5); }
.gem-text-2 { color: rgba(255,102,92,.65); text-shadow: 0 0 10px rgba(239,85,78,.5); }
.gem-text-3 { color: rgba(190,230,91,.65); text-shadow: 0 0 10px rgba(168,216,64,.45); }
.gem-text-4 { color: rgba(255,190,91,.68); text-shadow: 0 0 10px rgba(240,168,61,.5); }

@keyframes rune-flicker {
  0%,100% { opacity: .65; transform: scale(.98); }
  45% { opacity: .95; transform: scale(1.04); }
  48% { opacity: .58; }
  52% { opacity: 1; }
}

.card-portal {
  position: absolute;
  width: 80px;
  height: 80px;
  left: -18px;
  top: 50%;
  border: 1px solid color-mix(in srgb, var(--gem, #d66a32), transparent 35%);
  border-radius: 50%;
  transform: translateY(-50%) scale(.4);
  opacity: 0;
  pointer-events: none;
}

.exercise-card.summoned .card-portal {
  animation: portal-bloom 760ms cubic-bezier(.1,.72,.2,1) both;
}

.exercise-card.summoned {
  animation: summon-v11 660ms cubic-bezier(.12,.86,.22,1) both;
}

@keyframes summon-v11 {
  0% { opacity: 0; transform: translate3d(0,14px,0) scale(.82); filter: blur(12px) brightness(2.8) saturate(1.5); }
  38% { opacity: 1; transform: translate3d(0,-2px,0) scale(1.035); filter: blur(0) brightness(1.45) saturate(1.22); }
  100% { transform: none; filter: none; }
}

@keyframes portal-bloom {
  0% { opacity: 0; transform: translateY(-50%) scale(.2) rotate(0deg); box-shadow: 0 0 0 rgba(218,98,42,0); }
  35% { opacity: .9; box-shadow: 0 0 35px rgba(218,98,42,.7), inset 0 0 22px rgba(255,198,111,.4); }
  100% { opacity: 0; transform: translateY(-50%) scale(1.8) rotate(150deg); box-shadow: 0 0 55px rgba(218,98,42,0); }
}

.workout-head > p:not(.eyebrow) {
  font-size: .96rem;
}

.swipe-hint {
  font-size: .69rem;
}

.back-button {
  min-height: 60px;
  font-size: .82rem;
}

.footer-seal {
  font-size: .62rem;
}

.modal-panel p,
.modal-panel li,
.setting-row small {
  font-size: .93rem;
  line-height: 1.55;
}

.instruction-section h3,
.detail-grid h3 {
  font-size: .88rem;
}

/* More visible, GPU-friendly ambience. */
.smoke-field {
  position: absolute;
  width: 130vw;
  height: 52vh;
  left: -15vw;
  border-radius: 50%;
  filter: blur(45px);
  opacity: .12;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(124,54,139,.7), transparent 45%),
    radial-gradient(ellipse at 70% 55%, rgba(35,105,144,.55), transparent 48%),
    radial-gradient(ellipse at 52% 20%, rgba(170,62,28,.56), transparent 42%);
  will-change: transform, opacity;
}

.smoke-a { top: -12vh; animation: smoke-drift-a 18s ease-in-out infinite alternate; }
.smoke-b { bottom: -18vh; transform: rotate(180deg); animation: smoke-drift-b 23s ease-in-out infinite alternate; }

@keyframes smoke-drift-a {
  from { transform: translate3d(-8%,0,0) scale(1); opacity: .08; }
  to { transform: translate3d(9%,6%,0) scale(1.18); opacity: .16; }
}

@keyframes smoke-drift-b {
  from { transform: translate3d(7%,0,0) rotate(180deg) scale(1.05); opacity: .07; }
  to { transform: translate3d(-10%,-7%,0) rotate(180deg) scale(1.22); opacity: .14; }
}

.arcane-ring {
  position: absolute;
  width: min(82vw, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .075;
  background:
    repeating-conic-gradient(from 0deg, transparent 0 9deg, rgba(226,153,78,.9) 10deg 10.6deg, transparent 11deg 21deg),
    radial-gradient(circle, transparent 48%, rgba(202,114,53,.75) 49% 49.7%, transparent 51% 63%, rgba(97,132,191,.65) 64% 64.7%, transparent 66%);
  mask: radial-gradient(circle, transparent 0 34%, #000 35% 72%, transparent 73%);
  will-change: transform;
}

.ring-a { top: 9%; left: -32%; animation: ring-turn 42s linear infinite; }
.ring-b { right: -38%; bottom: 2%; animation: ring-turn-reverse 55s linear infinite; }

@keyframes ring-turn { to { transform: rotate(360deg); } }
@keyframes ring-turn-reverse { to { transform: rotate(-360deg); } }

.gem-motes i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 4px;
  height: 4px;
  transform: rotate(45deg);
  background: var(--gem-color);
  box-shadow: 0 0 9px var(--gem-color);
  opacity: 0;
  animation: gem-mote var(--duration) ease-in-out var(--delay) infinite;
}

@keyframes gem-mote {
  0%,100% { opacity: 0; transform: translate3d(0,8px,0) rotate(45deg) scale(.5); }
  35% { opacity: .68; }
  60% { opacity: .22; transform: translate3d(12px,-19px,0) rotate(150deg) scale(1); }
}

@media (max-width: 360px) {
  body { font-size: 16.5px; }
  .menu-button { min-height: 74px; grid-template-columns: 25px 1fr 26px; gap: 10px; }
  .menu-gem { width: 21px; height: 21px; }
  .card-body h3 { font-size: 1.03rem; }
  .card-body p { font-size: .72rem; }
  .card-body span { font-size: .7rem; }
}

.reduced-effects .smoke-field,
.reduced-effects .arcane-ring,
.reduced-effects .gem-motes,
.reduced-effects .menu-gem,
.reduced-effects .card-number::before,
.reduced-effects .card-rune,
.reduced-effects .brand-copy h1,
.reduced-effects .exercise-card::after {
  animation: none !important;
}


/* Path of Swole v1.3 — visual refinement only. No workout logic changed. */
:root {
  --ambient-cycle: 9s;
  --metal-bright: #e4b96e;
  --metal-mid: #8e552c;
  --metal-dark: #24140d;
}

/* Brighter, stable title treatment for dark mobile environments. */
.brand-copy h1 {
  white-space: nowrap;
  font-size: clamp(1.48rem, 6.45vw, 1.84rem);
  color: #f7e6a8;
  background: none;
  -webkit-text-fill-color: #f7e6a8;
  text-shadow:
    0 1px 0 #000,
    0 0 2px rgba(0, 0, 0, .98),
    0 0 14px rgba(248, 218, 132, .2),
    0 0 28px rgba(190, 111, 43, .13);
  animation: title-breathe var(--ambient-cycle) ease-in-out infinite;
}

@keyframes title-breathe {
  0%, 100% { opacity: .98; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.06); }
}

/* Home buttons use equal left and right visual gutters so text is truly centered. */
.group-button {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 82px;
  padding: 14px 58px;
  text-align: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 31px 50%, color-mix(in srgb, var(--gem, #d66a32), transparent 78%), transparent 58px),
    linear-gradient(180deg, rgba(90, 34, 20, .86), rgba(37, 18, 13, .96) 49%, rgba(20, 13, 10, .98) 50%),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(255,255,255,.02) 8px);
}

.group-button .menu-copy {
  width: 100%;
  justify-items: center;
  text-align: center;
}

.group-button .menu-copy strong,
.group-button .menu-copy small {
  width: 100%;
  text-align: center;
}

.group-button .menu-copy strong {
  font-size: 1.3rem;
  letter-spacing: .075em;
}

.group-button .menu-copy small {
  max-width: 250px;
  color: #c2aa8c;
  font-size: .8rem;
}

.group-button .menu-gem {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.group-button .menu-ornament {
  left: 6px;
  height: 44px;
}

.menu-chevron {
  display: none !important;
}

/* Each path carries one restrained jewel tint into its panel. */
.group-button:nth-child(1) { --gem: #ad74f0; }
.group-button:nth-child(2) { --gem: #43aef0; }
.group-button:nth-child(3) { --gem: #eb5b4a; }
.group-button:nth-child(4) { --gem: #67cc68; }
.group-button:nth-child(5) { --gem: #e7aa45; }

.group-button::after {
  background: linear-gradient(105deg, transparent 20%, rgba(255, 211, 145, .14) 49%, transparent 66%);
}

/* Original jewel sockets: bronze setting outside, faceted coloured gem inside. */
.menu-gem {
  --gem-shape: polygon(50% 0, 86% 16%, 100% 57%, 78% 100%, 22% 100%, 0 57%, 14% 16%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #3a2114;
  border-radius: 50%;
  clip-path: none;
  background:
    conic-gradient(from 20deg, #3a2115, #c18a49 12%, #57321c 24%, #e0b36c 36%, #4a2918 49%, #b87539 64%, #2d1a12 77%, #d5a35d 89%, #3a2115),
    #28170f;
  box-shadow:
    inset 0 0 0 2px rgba(18, 10, 7, .9),
    inset 0 0 0 4px rgba(232, 181, 103, .16),
    0 0 12px rgba(0, 0, 0, .55),
    0 0 15px color-mix(in srgb, var(--gem), transparent 68%);
  animation: socket-breathe var(--ambient-cycle) ease-in-out infinite;
}

.menu-gem::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #0a0706 0 45%, #29150f 66%, #070504 100%);
  box-shadow: inset 0 0 8px #000;
}

.menu-gem i {
  width: 21px;
  height: 21px;
  position: relative;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--gem), white 45%);
  transform: none;
  opacity: 1;
  clip-path: var(--gem-shape);
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.92) 0 6%, transparent 7%),
    linear-gradient(132deg, rgba(255,255,255,.65) 0 14%, transparent 15% 38%, rgba(255,255,255,.18) 39% 46%, transparent 47%),
    linear-gradient(315deg, rgba(0,0,0,.55) 0 22%, transparent 23% 54%, rgba(0,0,0,.2) 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--gem), white 22%), var(--gem) 50%, color-mix(in srgb, var(--gem), black 31%));
  box-shadow:
    inset 0 0 7px rgba(255,255,255,.22),
    inset 0 -5px 7px rgba(0,0,0,.24),
    0 0 9px color-mix(in srgb, var(--gem), transparent 25%);
}

.group-button:nth-child(1) .menu-gem { --gem-shape: polygon(50% 0, 84% 16%, 100% 58%, 77% 100%, 23% 100%, 0 58%, 16% 16%); }
.group-button:nth-child(2) .menu-gem { --gem-shape: polygon(22% 0, 78% 0, 100% 37%, 78% 100%, 22% 100%, 0 37%); }
.group-button:nth-child(3) .menu-gem { --gem-shape: polygon(50% 0, 90% 20%, 100% 54%, 50% 100%, 0 54%, 10% 20%); }
.group-button:nth-child(4) .menu-gem { --gem-shape: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%); }
.group-button:nth-child(5) .menu-gem { --gem-shape: polygon(50% 0, 84% 18%, 100% 54%, 82% 100%, 18% 100%, 0 54%, 16% 18%); }

@keyframes socket-breathe {
  0%, 100% { filter: brightness(.96); }
  50% { filter: brightness(1.08); }
}

/* Exercise-card gems use the same visual language with a larger metal socket. */
.exercise-card[data-gem="0"], .card-number.gem-0 { --gem: #ad74f0; --gem-shape: polygon(50% 0, 84% 16%, 100% 58%, 77% 100%, 23% 100%, 0 58%, 16% 16%); }
.exercise-card[data-gem="1"], .card-number.gem-1 { --gem: #43aef0; --gem-shape: polygon(22% 0, 78% 0, 100% 37%, 78% 100%, 22% 100%, 0 37%); }
.exercise-card[data-gem="2"], .card-number.gem-2 { --gem: #eb5b4a; --gem-shape: polygon(50% 0, 90% 20%, 100% 54%, 50% 100%, 0 54%, 10% 20%); }
.exercise-card[data-gem="3"], .card-number.gem-3 { --gem: #67cc68; --gem-shape: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%); }
.exercise-card[data-gem="4"], .card-number.gem-4 { --gem: #e7aa45; --gem-shape: polygon(50% 0, 84% 18%, 100% 54%, 82% 100%, 18% 100%, 0 54%, 16% 18%); }

.card-number {
  width: 44px;
  height: 44px;
  isolation: isolate;
  z-index: 1;
  color: #fff5d7;
  font-size: 1.03rem;
  text-shadow: 0 1px 2px #000, 0 0 7px rgba(255,255,255,.35);
}

.card-number::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  border: 1px solid #3d2416;
  border-radius: 50%;
  transform: none;
  background: conic-gradient(from 25deg, #2f1b12, #bd8143 12%, #50301d 24%, #e0b36e 37%, #3a2115 52%, #ae6e35 66%, #24150f 80%, #d3a15c 91%, #2f1b12);
  box-shadow: inset 0 0 0 2px rgba(11, 7, 5, .9), 0 0 13px rgba(0,0,0,.48);
  clip-path: none;
  animation: socket-breathe var(--ambient-cycle) ease-in-out infinite;
}

.card-number::after {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--gem), white 46%);
  clip-path: var(--gem-shape);
  background:
    radial-gradient(circle at 28% 21%, rgba(255,255,255,.92) 0 6%, transparent 7%),
    linear-gradient(132deg, rgba(255,255,255,.68) 0 14%, transparent 15% 38%, rgba(255,255,255,.19) 39% 47%, transparent 48%),
    linear-gradient(315deg, rgba(0,0,0,.56) 0 22%, transparent 23% 54%, rgba(0,0,0,.2) 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--gem), white 21%), var(--gem) 50%, color-mix(in srgb, var(--gem), black 32%));
  box-shadow:
    inset 0 0 8px rgba(255,255,255,.24),
    inset 0 -5px 8px rgba(0,0,0,.25),
    0 0 12px color-mix(in srgb, var(--gem), transparent 30%);
  animation: gem-breathe var(--ambient-cycle) ease-in-out infinite;
}

@keyframes gem-breathe {
  0%, 100% { filter: brightness(.95) saturate(.98); }
  50% { filter: brightness(1.18) saturate(1.12); }
}

/* Slightly clearer card hierarchy without increasing card height. */
.exercise-card {
  grid-template-columns: 46px 1fr 30px;
  gap: 12px;
  border-color: rgba(151, 86, 47, .95);
  background:
    radial-gradient(circle at 9% 50%, color-mix(in srgb, var(--gem, #d66a32), transparent 90%), transparent 28%),
    linear-gradient(180deg, rgba(57, 29, 20, .985), rgba(22, 14, 11, .995)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.014) 0 1px, transparent 1px 6px);
}

.card-body h3 {
  color: #f0ddb9;
  font-size: 1.16rem;
  line-height: 1.2;
}

.card-body p {
  color: #d19a65;
  font-size: .8rem;
  letter-spacing: .04em;
}

.card-body span {
  color: #aa947c;
  font-size: .78rem;
}

.gem-text-0 { color: rgba(213,176,255,.72); text-shadow: 0 0 12px rgba(173,116,240,.56); }
.gem-text-1 { color: rgba(164,224,255,.72); text-shadow: 0 0 12px rgba(67,174,240,.56); }
.gem-text-2 { color: rgba(255,167,151,.74); text-shadow: 0 0 12px rgba(235,91,74,.56); }
.gem-text-3 { color: rgba(190,244,178,.74); text-shadow: 0 0 12px rgba(103,204,104,.52); }
.gem-text-4 { color: rgba(255,215,143,.76); text-shadow: 0 0 12px rgba(231,170,69,.56); }

/* Coordinated ambience: slow background movement, focused jewel pulses. */
.smoke-field {
  opacity: .115;
  animation-timing-function: ease-in-out;
  background:
    radial-gradient(ellipse at 26% 44%, rgba(131,70,205,.68), transparent 43%),
    radial-gradient(ellipse at 70% 48%, rgba(48,139,210,.58), transparent 47%),
    radial-gradient(ellipse at 48% 20%, rgba(190,80,55,.5), transparent 43%),
    radial-gradient(ellipse at 58% 72%, rgba(98,186,100,.22), transparent 35%);
}

.arcane-ring {
  opacity: .072;
  background:
    repeating-conic-gradient(from 0deg, transparent 0 8deg, rgba(226,153,78,.86) 9deg 9.7deg, transparent 10.3deg 19deg),
    radial-gradient(circle, transparent 48%, rgba(202,114,53,.7) 49% 49.7%, transparent 51% 60%, rgba(116,88,214,.44) 61% 61.6%, transparent 63% 70%, rgba(69,157,233,.36) 71% 71.5%, transparent 73%);
}

.gem-motes i {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 9px var(--gem-color), 0 0 16px color-mix(in srgb, var(--gem-color), transparent 60%);
}

/* Exercise detail panel: item-panel framing, clearer separators and more breathing room. */
.modal-panel {
  padding: 30px 19px calc(28px + var(--safe-bottom));
  border-color: #8b5731;
  background:
    linear-gradient(180deg, rgba(55, 30, 21, .995), rgba(13, 9, 7, .998) 34%),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255,255,255,.011) 6px);
  box-shadow:
    0 -24px 80px rgba(0,0,0,.74),
    inset 0 0 0 5px rgba(13,8,6,.65),
    inset 0 0 42px rgba(133,58,27,.15);
}

.modal-panel::before {
  height: 18px;
  border-color: rgba(235, 188, 113, .55);
}

.modal-close {
  top: 8px;
  width: 42px;
  height: 42px;
  margin-top: -17px;
  margin-right: -9px;
  border: 1px solid #a56b38;
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 32%),
    linear-gradient(#2d1a12, #100b08);
  box-shadow: inset 0 0 0 2px rgba(7,5,4,.85), 0 4px 14px rgba(0,0,0,.38);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}

.modal-title-block {
  padding-right: 42px;
}

.exercise-illustration {
  position: relative;
  margin: 18px 0 20px;
  padding: 14px 10px 11px;
  border-color: rgba(209, 145, 77, .43);
  background:
    radial-gradient(circle at 50% 48%, rgba(112,43,23,.25), transparent 61%),
    linear-gradient(180deg, #120c09, #080605);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.3), inset 0 0 30px rgba(125,52,25,.13), 0 8px 24px rgba(0,0,0,.28);
}

.exercise-illustration::before,
.exercise-illustration::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 20px;
  height: 20px;
  border-top: 1px solid rgba(231,181,105,.54);
}

.exercise-illustration::before { left: 8px; border-left: 1px solid rgba(231,181,105,.54); }
.exercise-illustration::after { right: 8px; border-right: 1px solid rgba(231,181,105,.54); }

.detail-grid {
  gap: 11px;
  margin-bottom: 14px;
}

.detail-grid section,
.instruction-section {
  position: relative;
  border-color: rgba(177, 117, 64, .28);
  background: linear-gradient(180deg, rgba(35,21,15,.82), rgba(22,14,11,.78));
  box-shadow: inset 0 1px rgba(255, 218, 158, .025);
}

.detail-grid section {
  padding: 13px;
}

.instruction-section {
  margin-top: 12px;
  padding: 15px 15px 16px;
}

.detail-grid h3,
.instruction-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dbad70;
  font-size: .91rem;
  letter-spacing: .04em;
}

.detail-grid h3::after,
.instruction-section h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(213,150,81,.42), transparent);
}

.modal-panel p,
.modal-panel li,
.setting-row small {
  font-size: .95rem;
  line-height: 1.58;
}

.danger-section {
  border-color: rgba(164, 65, 47, .38);
  background: linear-gradient(180deg, rgba(64,24,18,.4), rgba(36,15,12,.38));
}

/* Keep reduced-effects mode quiet while preserving the visual design. */
.reduced-effects .menu-gem,
.reduced-effects .card-number::before,
.reduced-effects .card-number::after,
.reduced-effects .brand-copy h1 {
  animation: none !important;
}

@media (max-width: 360px) {
  .group-button {
    min-height: 78px;
    padding-inline: 52px;
  }

  .group-button .menu-gem {
    left: 12px;
  }

  .menu-gem {
    width: 33px;
    height: 33px;
  }

  .menu-gem i {
    width: 19px;
    height: 19px;
  }

  .card-body h3 { font-size: 1.08rem; }
  .card-body p { font-size: .75rem; }
  .card-body span { font-size: .73rem; }
}


/* Path of Swole v1.4 — immersion, clarity, iPhone and accessibility polish. */
:root {
  --group-accent: #d59a55;
  --group-light: #f3d39a;
  --group-dark: #6b351f;
  --group-rgb: 213, 154, 85;
  --viewport-height: 100dvh;
}

body[data-group="bröst"] { --group-accent: #ee6355; --group-light: #ffc0ad; --group-dark: #72271f; --group-rgb: 238, 99, 85; }
body[data-group="rygg"] { --group-accent: #65ce78; --group-light: #c4f4bd; --group-dark: #245d38; --group-rgb: 101, 206, 120; }
body[data-group="axlar"] { --group-accent: #52b9f3; --group-light: #bce8ff; --group-dark: #24547c; --group-rgb: 82, 185, 243; }
body[data-group="armar"] { --group-accent: #b77bf2; --group-light: #e2c4ff; --group-dark: #583078; --group-rgb: 183, 123, 242; }
body[data-group="ben"] { --group-accent: #e9ad4f; --group-light: #ffe0a1; --group-dark: #70471f; --group-rgb: 233, 173, 79; }
body[data-group="home"] { --group-accent: #d59a55; --group-light: #f3d39a; --group-dark: #6b351f; --group-rgb: 213, 154, 85; }

body[data-transition-group="bröst"] { --group-accent: #ee6355; --group-light: #ffc0ad; --group-dark: #72271f; --group-rgb: 238, 99, 85; }
body[data-transition-group="rygg"] { --group-accent: #65ce78; --group-light: #c4f4bd; --group-dark: #245d38; --group-rgb: 101, 206, 120; }
body[data-transition-group="axlar"] { --group-accent: #52b9f3; --group-light: #bce8ff; --group-dark: #24547c; --group-rgb: 82, 185, 243; }
body[data-transition-group="armar"] { --group-accent: #b77bf2; --group-light: #e2c4ff; --group-dark: #583078; --group-rgb: 183, 123, 242; }
body[data-transition-group="ben"] { --group-accent: #e9ad4f; --group-light: #ffe0a1; --group-dark: #70471f; --group-rgb: 233, 173, 79; }
body[data-transition-group="home"] { --group-accent: #d59a55; --group-light: #f3d39a; --group-dark: #6b351f; --group-rgb: 213, 154, 85; }

html {
  min-height: 100%;
  min-height: var(--viewport-height);
  background: #080605;
}

body {
  min-height: 100%;
  min-height: var(--viewport-height);
  padding: 0;
  background:
    radial-gradient(circle at 50% -8%, rgba(var(--group-rgb), .18), transparent 42%),
    linear-gradient(180deg, #0f0a08 0%, #070605 72%);
  transition: background-color 420ms ease;
}

.skip-link {
  position: fixed;
  top: calc(8px + var(--safe-top));
  left: 50%;
  z-index: 120;
  transform: translate(-50%, -160%);
  padding: 10px 14px;
  border: 1px solid var(--gold);
  color: #fff3cf;
  background: #130c09;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease;
}

.skip-link:focus { transform: translate(-50%, 0); }

.ambient::after {
  content: '';
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: .34;
  background:
    radial-gradient(circle at 18% 30%, rgba(var(--group-rgb), .26), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(var(--group-rgb), .16), transparent 32%);
  mix-blend-mode: screen;
  transition: background 520ms ease, opacity 520ms ease;
  animation: group-aura 13s ease-in-out infinite alternate;
}

@keyframes group-aura {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); opacity: .24; }
  to { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); opacity: .38; }
}

body[data-group]:not([data-group="home"]) .workout-head {
  border-color: rgba(var(--group-rgb), .38);
  background:
    radial-gradient(circle at 50% 0, rgba(var(--group-rgb), .13), transparent 52%),
    linear-gradient(180deg, rgba(61,31,20,.62), rgba(17,12,9,.9));
  box-shadow: inset 0 0 30px rgba(var(--group-rgb), .06), 0 10px 30px rgba(0,0,0,.2);
}

body[data-group]:not([data-group="home"]) .workout-head::after {
  width: 48px;
  height: 48px;
  right: 13px;
  top: 14px;
  bottom: auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--group-rgb), .35);
  border-radius: 50%;
  color: rgba(var(--group-rgb), .66);
  background: radial-gradient(circle, rgba(var(--group-rgb), .13), transparent 68%);
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-shadow: 0 0 12px rgba(var(--group-rgb), .45);
}

body[data-group="bröst"] .workout-head::after { content: '◆'; }
body[data-group="rygg"] .workout-head::after { content: 'ᛉ'; }
body[data-group="axlar"] .workout-head::after { content: '✦'; }
body[data-group="armar"] .workout-head::after { content: '⛓'; font-size: .95rem; }
body[data-group="ben"] .workout-head::after { content: 'Ⅱ'; }

body[data-group]:not([data-group="home"]) .workout-head h2 {
  color: var(--group-light);
  text-shadow: 0 0 18px rgba(var(--group-rgb), .17), 0 2px 0 #000;
}

/* Premium page transition without changing navigation or data flow. */
.transition-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(var(--group-rgb), .13), transparent 32%),
    rgba(5, 4, 3, .82);
  backdrop-filter: blur(0);
  transition: opacity 170ms ease, visibility 0s linear 520ms, backdrop-filter 260ms ease;
}

.transition-veil.active {
  visibility: visible;
  opacity: 1;
  backdrop-filter: blur(7px);
  transition: opacity 170ms ease, visibility 0s, backdrop-filter 260ms ease;
}

.transition-gem {
  width: 68px;
  height: 68px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid #3b2317;
  border-radius: 50%;
  transform: scale(.55) rotate(-20deg);
  opacity: 0;
  background: conic-gradient(from 20deg, #281710, #c18a49 14%, #4e2d1b 27%, #e0b36c 39%, #3a2115 53%, #ae6e35 68%, #24150f 82%, #d3a15c 92%, #281710);
  box-shadow: inset 0 0 0 4px #0c0806, 0 0 34px rgba(var(--group-rgb), .38);
}

.transition-gem::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--group-accent), white 42%);
  clip-path: polygon(50% 0, 88% 19%, 100% 56%, 76% 100%, 24% 100%, 0 56%, 12% 19%);
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.92) 0 6%, transparent 7%),
    linear-gradient(132deg, rgba(255,255,255,.65) 0 14%, transparent 15% 38%, rgba(255,255,255,.18) 39% 46%, transparent 47%),
    linear-gradient(315deg, rgba(0,0,0,.55) 0 22%, transparent 23% 54%, rgba(0,0,0,.2) 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--group-accent), white 22%), var(--group-accent) 50%, color-mix(in srgb, var(--group-accent), black 31%));
  box-shadow: inset 0 0 8px rgba(255,255,255,.22), 0 0 18px rgba(var(--group-rgb), .55);
}

.transition-gem i {
  width: 14px;
  height: 14px;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.42);
  transform: rotate(45deg);
}

.transition-rings,
.transition-rings span {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
}

.transition-rings {
  opacity: 0;
  border: 1px solid rgba(var(--group-rgb), .2);
}

.transition-rings span {
  inset: -1px;
  border: 1px dashed rgba(var(--group-rgb), .32);
}
.transition-rings span:last-child { transform: scale(.72) rotate(30deg); }

.transition-veil.active .transition-gem { animation: transition-gem 690ms cubic-bezier(.12,.82,.22,1) both; }
.transition-veil.active .transition-rings { animation: transition-rings 760ms ease-out both; }
.transition-veil.active .transition-rings span:first-child { animation: ring-turn 2.8s linear infinite; }
.transition-veil.active .transition-rings span:last-child { animation: ring-turn-reverse 2.4s linear infinite; }

@keyframes transition-gem {
  0% { opacity: 0; transform: scale(.45) rotate(-22deg); filter: blur(8px) brightness(2); }
  36% { opacity: 1; transform: scale(1.08) rotate(4deg); filter: blur(0) brightness(1.35); }
  64% { opacity: 1; transform: scale(.98) rotate(0); filter: brightness(1.08); }
  100% { opacity: 0; transform: scale(1.45) rotate(14deg); filter: blur(4px) brightness(1.8); }
}

@keyframes transition-rings {
  0% { opacity: 0; transform: scale(.35); }
  40% { opacity: .72; }
  100% { opacity: 0; transform: scale(1.35); }
}

.group-button.path-chosen {
  z-index: 2;
  border-color: rgba(var(--group-rgb), .75);
  filter: brightness(1.22);
  transform: scale(.985);
}

/* Illustration clarity and group-coloured target language. */
.exercise-illustration {
  overflow: hidden;
}

.illustration-bröst { --group-accent: #ee6355; --group-light: #ffc0ad; --group-dark: #72271f; --group-rgb: 238, 99, 85; }
.illustration-rygg { --group-accent: #65ce78; --group-light: #c4f4bd; --group-dark: #245d38; --group-rgb: 101, 206, 120; }
.illustration-axlar { --group-accent: #52b9f3; --group-light: #bce8ff; --group-dark: #24547c; --group-rgb: 82, 185, 243; }
.illustration-armar { --group-accent: #b77bf2; --group-light: #e2c4ff; --group-dark: #583078; --group-rgb: 183, 123, 242; }
.illustration-ben { --group-accent: #e9ad4f; --group-light: #ffe0a1; --group-dark: #70471f; --group-rgb: 233, 173, 79; }

.illustration-header {
  display: grid;
  gap: 8px;
  margin-bottom: 2px;
}

.illustration-labels {
  font-size: .64rem;
  color: #b8895e;
}

.illustration-labels span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}

.illustration-labels b {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(var(--group-rgb), .42);
  border-radius: 50%;
  color: var(--group-light);
  background: rgba(var(--group-rgb), .09);
  font-size: .66rem;
}

.muscle-target {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(var(--group-rgb), .24);
  color: #cbb69b;
  background: linear-gradient(90deg, transparent, rgba(var(--group-rgb), .075), transparent);
  font-size: .68rem;
  font-weight: 720;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.muscle-target i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  transform: rotate(45deg);
  background: var(--group-accent);
  box-shadow: 0 0 9px rgba(var(--group-rgb), .72);
}

.pose-halo { opacity: .5; }
.pose-halo-start { opacity: .22; }
.pose-halo-end { opacity: .62; }
.pose-stage-start { opacity: .78; }
.pose-stage-end { filter: drop-shadow(0 0 7px rgba(var(--group-rgb), .22)); }
.pose-start .torso,
.pose-start .body-line { stroke-width: 9; opacity: .78; }
.pose-end .torso,
.pose-end .body-line { stroke-width: 11; filter: drop-shadow(0 0 5px rgba(var(--group-rgb), .35)); }

.exercise-illustration .head {
  fill: #251611;
  stroke-width: 4.5;
}

.exercise-illustration .torso,
.exercise-illustration .body-line {
  stroke: var(--pose-gradient);
}

.motion-arrow-halo {
  fill: none;
  stroke: rgba(var(--group-rgb), .22);
  stroke-width: 12;
  stroke-linecap: round;
  filter: blur(3px);
}

.motion-arrow {
  stroke: var(--group-accent);
  stroke-width: 5;
  stroke-dasharray: 7 7;
  filter: drop-shadow(0 0 7px rgba(var(--group-rgb), .7));
}

.movement-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: -3px;
  padding: 7px 8px 2px;
  color: #9f8a73;
  font-size: .7rem;
  line-height: 1.35;
  text-align: center;
}

.movement-note span {
  color: var(--group-accent);
  text-shadow: 0 0 8px rgba(var(--group-rgb), .55);
}

/* Group tint gently follows the current workout into cards and modal details. */
body[data-group]:not([data-group="home"]) .exercise-card {
  border-color: color-mix(in srgb, var(--group-accent), #704124 72%);
  background:
    radial-gradient(circle at 8% 50%, rgba(var(--group-rgb), .08), transparent 29%),
    linear-gradient(180deg, rgba(57,29,20,.985), rgba(22,14,11,.995)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.014) 0 1px, transparent 1px 6px);
}

body[data-group]:not([data-group="home"]) .modal-panel {
  border-color: color-mix(in srgb, var(--group-accent), #8b5731 34%);
  box-shadow: 0 -24px 80px rgba(0,0,0,.74), inset 0 0 0 5px rgba(13,8,6,.65), inset 0 0 42px rgba(var(--group-rgb), .08);
}

/* Strong but tasteful focus indicators and minimum touch targets. */
button,
[role="button"],
a {
  min-width: 44px;
  min-height: 44px;
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--group-light);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(var(--group-rgb), .16), 0 0 18px rgba(var(--group-rgb), .28);
}

.exercise-card:focus-visible {
  transform: translateY(-1px);
  border-color: var(--group-accent);
}

/* Safe-area and installed-PWA refinements. */
.app-shell {
  min-height: 100dvh;
  min-height: var(--viewport-height);
  padding-top: calc(12px + max(var(--safe-top), 0px));
  padding-bottom: calc(18px + max(var(--safe-bottom), 0px));
}

@media (display-mode: standalone) {
  .app-shell { padding-top: calc(8px + max(var(--safe-top), 0px)); }
  .topbar { padding-top: 6px; }
  .footer-seal { padding-bottom: max(4px, var(--safe-bottom)); }
}

@supports (height: 100svh) {
  .app-shell { min-height: 100svh; }
}

/* Pause expensive background work when obscured or backgrounded. */
body.modal-open .ambient *,
body.modal-open .ambient::after,
.app-paused *,
.app-paused *::before,
.app-paused *::after {
  animation-play-state: paused !important;
}

body.modal-open .ambient { opacity: .68; }

.exercise-card,
.menu-button {
  backface-visibility: hidden;
  transform: translateZ(0);
}

.main-view {
  contain: layout style;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.force-full-motion) *,
  html:not(.force-full-motion) *::before,
  html:not(.force-full-motion) *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .transition-veil { display: none !important; }
}

@media (prefers-contrast: more) {
  :root { --bone: #f4e7cf; --muted: #c6b39a; }
  .card-body span,
  .modal-panel p,
  .modal-panel li { color: #dfcfb9; }
  .exercise-card,
  .menu-button { border-width: 2px; }
}

@media (max-width: 360px) {
  .workout-head::after { opacity: .7; transform: scale(.82); transform-origin: top right; }
  .muscle-target { font-size: .62rem; }
  .movement-note { font-size: .65rem; }
}
