@font-face { font-family: Inter; src: url('assets/fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('assets/fonts/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url('assets/fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url('assets/fonts/inter-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url('assets/fonts/inter-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('assets/fonts/barlow-condensed-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('assets/fonts/barlow-condensed-latin-800-italic.woff2') format('woff2'); font-weight: 800; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  --bg: #0c1018;
  --sidebar: #0f141e;
  --surface: #141a26;
  --surface-raised: #192131;
  --input: #101621;
  --line: #242d3d;
  --text: #f4f6fc;
  --muted: #a1acc1;
  --strong-blue: #275af1;
  --blue: #6e98ff;
  --blue-light: #8eaeff;
  --blue-bg: #1b294b;
  --green: #51d7a8;
  --orange: #ffac65;
  --radius: 15px;
  --sidebar-width: 226px;
  --topbar-height: 64px;
  --nav-height: 64px;
  --focus-ring: 2px solid #99b9ff;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-padding-top: 24px; }
body { margin: 0; min-height: 100vh; color: var(--text); font-size: 14px; line-height: 1.55; }
img { display: block; width: 100%; height: auto; }
svg { flex: none; vertical-align: middle; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.43; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.18; font-weight: 750; letter-spacing: -0.033em; overflow-wrap: anywhere; }
h1 { font-size: clamp(30px, 3.2vw, 43px); }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
.muted, .field-hint { color: var(--muted); }
.field-hint { font-size: 12px; line-height: 1.65; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 30; border-radius: 8px; padding: 12px 18px; background: var(--strong-blue); }
.skip-link:focus { top: 10px; }

/* Navigation */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 6;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 0 15px 18px;
  background: var(--sidebar);
  border-right: 1px solid #222a3a;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; min-height: 88px; padding: 2px 10px 8px; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; }
.brand-emblem {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid #4978ff; border-radius: 10px; background: linear-gradient(155deg, #3a71ff, #1d4de2 85%);
  color: #fff; box-shadow: 0 5px 15px #255af13b;
}
.brand-type { font-family: 'Barlow Condensed', Inter, sans-serif; font-weight: 800; font-size: 29px; line-height: 1; letter-spacing: 0.035em; }
.brand-type > span { color: #6998ff; }
.sidebar-nav { display: grid; gap: 26px; margin-top: 13px; }
.nav-set { display: grid; gap: 4px; }
.nav-caption { padding: 0 10px 6px; font-size: 10px; letter-spacing: 0.14em; font-weight: 700; color: #8c99b1; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 9px 11px;
  border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-weight: 550; font-size: 13px;
  transition: color 160ms, background 160ms, border-color 160ms;
}
.nav-link svg { color: #8796b2; }
.nav-link.is-current { background: #1b2a51; border-color: #263965; color: #a2bdff; font-weight: 650; }
.nav-link.is-current svg { color: #87aaff; }
.nav-link i { margin-left: auto; width: 6px; height: 6px; background: #76a2ff; border-radius: 100%; box-shadow: 0 0 10px #7fabff6b; }
.sidebar-foot { margin-top: auto; display: grid; padding-top: 35px; gap: 12px; }
.rail-level { display: grid; gap: 11px; padding: 13px 11px; border-radius: 12px; border: 1px solid #28334b; background: linear-gradient(143deg, #18243a, #131a29 85%); transition: border-color 160ms; }
.rail-level-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rail-level-top strong { font-size: 12px; white-space: nowrap; }
.rail-level-top small { color: var(--muted); font-size: 9.5px; margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rail-zap { color: #8baeff; display: grid; place-items: center; border-radius: 6px; width: 24px; height: 24px; background: #243a68; }
.meter { height: 5px; overflow: hidden; border-radius: 999px; background: #283249; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b6fff, #80a9ff); transition: width 250ms; }
.app-frame { margin-left: var(--sidebar-width); }
.topbar {
  height: var(--topbar-height); background: #0e131d; border-bottom: 1px solid #202838;
  display: flex; align-items: center;
}
.topbar-content {
  width: 100%; max-width: 1488px; margin: 0 auto; padding: 0 35px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.desktop-crumb, .top-actions { display: flex; align-items: center; gap: 11px; }
.desktop-crumb { color: #c5cee0; font-weight: 600; font-size: 13px; }
.desktop-crumb svg { color: #8796b2; }
.crumb-current { color: #8b9ab3; font-weight: 500; }
.top-actions { gap: 12px; }
.streak-badge { display: inline-flex; gap: 6px; align-items: center; border: 1px solid #4c3021; background: #251c19; color: #ffc58e; font-size: 12px; font-weight: 700; border-radius: 8px; min-height: 33px; padding: 5px 9px; white-space: nowrap; }
.streak-badge svg { color: #ff9c57; }
.icon-button, .profile-button {
  display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface);
  color: #b8c5db; min-height: 38px; min-width: 38px; border-radius: 9px; padding: 6px;
  flex: none; transition: background 160ms, border-color 160ms, color 160ms;
}
.top-bell { position: relative; }
.top-bell i { position: absolute; right: 8px; top: 7px; width: 7px; height: 7px; border: 1px solid #141b29; border-radius: 50%; background: #6994ff; }
.profile-button { border-radius: 50%; color: #b8ccff; border-color: #364b76; background: #243557; font-size: 13px; font-weight: 700; }
.mobile-brand, .mobile-nav { display: none; }

/* Shared surfaces and actions */
.main-content { position: relative; max-width: 1488px; margin: 0 auto; padding: 29px 35px 45px; min-width: 0; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.page-heading p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.button {
  min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 9px; border: 1px solid transparent; padding: 9px 15px; font-size: 13px; font-weight: 700;
  text-align: center; line-height: 1.25; white-space: nowrap;
  transition: background 160ms, border-color 160ms, color 160ms, box-shadow 160ms;
}
.button-primary { background: var(--strong-blue); color: #fff; border-color: #4777ff; box-shadow: 0 4px 14px #183ca746; }
.button-secondary { background: #1d2638; border-color: #303e56; color: #e7eeff; }
.button-ghost { background: #101a2bcc; color: #eaf0ff; border-color: #465976; }
.button-ghost svg, .button-secondary svg { color: #8aabff; }
.button-selected { background: #16392f; border-color: #2f6652; color: #98f0d1; }
.button-danger { background: #42232c; border-color: #723845; color: #ffd3db; }
.text-link { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--blue-light); font-size: 13px; font-weight: 650; width: fit-content; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--blue-light); font-size: 13px; font-weight: 650; }
.date-chip { display: inline-flex; gap: 8px; align-items: center; min-height: 38px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); background: #121924; color: #c4cfe2; font-size: 12px; font-weight: 550; white-space: nowrap; }
.date-chip svg { color: #8398b9; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.content-panel { padding: 22px; min-width: 0; }
.content-panel > .feature-icon { margin-bottom: 13px; }
.content-panel h2 + p { margin-top: 8px; }
.content-panel p { color: var(--muted); }
.content-panel > .text-link, .content-panel > .inline-actions { margin-top: 14px; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-top p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.section-top.compact { margin-bottom: 14px; }
.section-top.compact h2 { font-size: 20px; }
.feature-icon, .small-icon { display: inline-grid; flex: none; place-items: center; width: 43px; height: 43px; border-radius: 10px; background: #1c2d55; color: #90b1ff; }
.small-icon { width: 35px; height: 35px; border-radius: 8px; }
.small-icon.done { background: #153a30; color: var(--green); }
.tag, .xp-pill {
  border-radius: 7px; background: #182238; border: 1px solid #35496f; color: #b6caff; padding: 4px 9px;
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; white-space: nowrap; font-size: 11px; font-weight: 700;
}
.blue-tag { color: #a7c0ff; background: #203566; border-color: #35528e; }
.xp-pill { background: #213361; color: #c5d6ff; padding: 5px 9px; font-variant-numeric: tabular-nums; }
.empty-state {
  padding: 34px 20px; border: 1px dashed #344158; border-radius: var(--radius);
  background: #111722; text-align: center; display: grid; justify-items: center; gap: 11px;
}
.empty-state p { color: var(--muted); max-width: 430px; }
.empty-state .button { margin-top: 3px; }
.storage-warning { margin-bottom: 12px; padding: 10px 13px; border: 1px solid #75582d; border-radius: 8px; background: #332719; color: #f7d8a8; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Dashboard */
.hero {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 17px;
  border: 1px solid #29467b; background: #101c32; min-height: 326px;
  background-image: linear-gradient(90deg, #09152c 0%, #0b1b35e8 23%, #0b1a3445 52%, #0710210a 82%), url('assets/media/hero.webp');
  background-size: cover; background-position: center, right center;
  box-shadow: inset 0 0 65px #05090e24;
}
.hero-inner { position: relative; padding: 29px 32px 29px; max-width: 630px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 750; letter-spacing: 0.105em;
  text-transform: uppercase; padding: 4px 9px; border: 1px solid #3863a8; border-radius: 6px; background: #152d58d9; color: #a9cbff;
}
.hero h2 {
  margin-top: 11px; font-family: 'Barlow Condensed', Impact, 'Arial Narrow', sans-serif; font-weight: 800; font-style: italic;
  font-size: clamp(51px, 5.25vw, 82px); line-height: 0.91; letter-spacing: 0.005em; color: #f7f9ff;
}
.hero h2 em { color: #76a2ff; font-style: inherit; }
.hero p { color: #c2cfe7; margin-top: 15px; font-size: 13px; }
.hero-actions { display: flex; gap: 9px; margin-top: 21px; flex-wrap: wrap; }
.hero-actions .button { min-height: 43px; }
.hero-actions .button-primary { gap: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.stat-card {
  position: relative; min-width: 0; min-height: 108px; display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 15px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  transition: border-color 160ms, background 160ms;
}
.stat-icon { display: grid; width: 43px; height: 43px; border-radius: 10px; flex: none; place-items: center; margin-top: 1px; }
.stat-icon.blue { background: #213466; color: #90b3ff; }
.stat-icon.green { background: #1b3935; color: #68e2b2; }
.stat-icon.orange { background: #3e2c27; color: #ffb079; }
.stat-body { flex: 1; min-width: 0; }
.stat-body > p { color: #a4b1c8; font-size: 9.5px; letter-spacing: 0.105em; font-weight: 750; }
.stat-number { font-size: 30px; font-weight: 800; letter-spacing: -0.055em; line-height: 1.02; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat-number small { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; color: #abb8cf; }
.stat-detail { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.stat-body > .meter { height: 4px; margin-top: 7px; }
.home-groups { margin-top: 25px; }
.muscle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.muscle-card {
  min-width: 0; width: 100%; position: relative; isolation: isolate; display: block; overflow: hidden; min-height: 162px;
  aspect-ratio: 1.43; border-radius: 13px; border: 1px solid #2c374a; background: #172031;
  transition: border-color 160ms;
}
.muscle-card img, .muscle-cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.muscle-card img { object-fit: cover; object-position: center 41%; transition: scale 250ms; }
.muscle-cover { background: linear-gradient(180deg, rgba(4,8,17,0.02) 20%, #06101b42 42%, #0a101cf5 100%); }
.muscle-content {
  position: absolute; z-index: 1; inset: auto 12px 11px; display: flex; align-items: end; gap: 5px; justify-content: space-between;
}
.muscle-content h3 { font-size: clamp(16px, 1.6vw, 22px); line-height: 1.05; }
.muscle-content p { font-size: 11px; color: #ced8eb; margin-top: 4px; }
.card-arrow { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid #4b5d7b; background: #17253edb; color: #d3e0ff; transition: background 160ms; }
.home-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.week-panel { padding: 19px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 0; }
.week-panel > .section-top { margin-bottom: 2px; }
.week-panel > .text-link { margin-top: auto; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-day {
  display: flex; flex-direction: column; align-items: center; color: var(--muted); gap: 6px;
  border: 1px solid var(--line); border-radius: 8px; background: #101621; padding: 7px 1px;
}
.week-day small { font-size: 10px; font-weight: 600; }
.week-day span { display: grid; place-items: center; width: 24px; height: 24px; font-variant-numeric: tabular-nums; border-radius: 7px; font-weight: 650; font-size: 12px; }
.week-day.today { color: #c1d3ff; border-color: #5277c2; background: #1b2b50; }
.week-day.done span { background: #255742; color: #b4f4d8; }
.home-reminder { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 2px 0; }
.home-reminder time { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.home-reminder strong { font-size: 13px; overflow-wrap: anywhere; }

/* Catalog and workout */
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 17px; }
.catalog-bar h2 { font-size: 21px; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #121822; width: fit-content; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid transparent; border-radius: 7px; color: #acb8ce; font-size: 13px; font-weight: 650; }
.tabs a.active { color: #c8d9ff; background: #20325d; border-color: #324c83; }
.search-field {
  display: flex; align-items: center; gap: 8px; color: #9fb1cf; background: #121822; border: 1px solid var(--line);
  border-radius: 9px; padding: 0 11px; min-height: 42px; width: min(335px, 100%);
}
.search-field:focus-within { border-color: #6d91e4; }
.search-field input { width: 100%; min-width: 0; margin: 0; border: 0; background: transparent; color: var(--text); outline: none; padding: 10px 0; font-size: 13px; }
.search-field input::placeholder, textarea::placeholder, input::placeholder { color: #8796b1; opacity: 1; }
.group-hero {
  --group-image: none;
  background: linear-gradient(90deg, #111a2c 37%, #111a2cfa 57%, #111a2caa 69%, #111a2c24), var(--group-image) right 35% / min(505px, 67%) auto no-repeat, #111a2c;
  min-height: 145px; display: flex; align-items: end; padding: 24px 25px; margin-bottom: 22px;
  border: 1px solid #334564; border-radius: var(--radius);
}
.group-hero .page-heading { margin: 0; width: 100%; }
.group-hero .page-heading p { color: #cdd7eb; }
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.photo-card, .exercise-card, .recipe-card { position: relative; min-width: 0; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color 160ms; }
.photo-card > img { aspect-ratio: 1.62; object-fit: cover; object-position: center 57%; }
.photo-card-text { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.photo-card-text small { display: block; color: var(--blue-light); font-weight: 650; font-size: 11px; margin-bottom: 4px; }
.exercise-card { display: flex; flex-direction: column; }
.exercise-thumb { position: relative; display: block; background: #1b2536; overflow: hidden; }
.exercise-thumb img { width: 100%; aspect-ratio: 1.98; object-fit: cover; object-position: center 43%; }
.photo-tag { position: absolute; top: 9px; left: 9px; background: #111b2bef; color: #fff; border-color: #344763; }
.exercise-content { padding: 13px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.overline { font-size: 10px; font-weight: 750; letter-spacing: 0.06em; color: var(--blue-light); text-transform: uppercase; }
.exercise-meta { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.exercise-meta span { display: inline-flex; align-items: center; gap: 4px; }
.exercise-meta svg { color: #92a5c4; }
.exercise-content .button { margin-top: auto; min-height: 37px; }
.exercise-content .exercise-meta { padding: 3px 0 7px; }
.draft-dock {
  position: sticky; bottom: 14px; z-index: 4; margin-top: 15px; display: flex; gap: 14px; justify-content: space-between; align-items: center;
  padding: 10px 13px 10px 16px; border: 1px solid #3a548b; border-radius: 13px;
  background: #15213af2; box-shadow: 0 8px 35px #0008; backdrop-filter: blur(13px);
}
.draft-dock strong { display: block; }
.draft-dock small { display: block; color: #bbc8e1; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.equipment-detail-img, .recipe-detail-img { border-radius: var(--radius); border: 1px solid var(--line); max-height: 340px; height: 100%; object-fit: cover; aspect-ratio: 1.55; }
.detail-grid > .content-panel { align-content: start; }
.image-viewer {
  display: flex; flex-direction: column; justify-content: space-between; min-width: 0; gap: 10px;
  background: #e8ebef; border: 1px solid #384454; border-radius: var(--radius); overflow: hidden;
}
.image-viewer > img { flex: 1; object-fit: contain; min-height: 235px; max-height: 358px; background: #fff; }
.image-controls { display: flex; padding: 8px; gap: 7px; background: #111823; }
.image-controls button { flex: 1; padding: 8px; border-radius: 7px; border: 1px solid #354360; background: #1a2335; color: var(--muted); font-weight: 650; font-size: 12px; }
.image-controls button.active { color: #c9dbff; background: #243a6b; border-color: #4c72bf; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.fact { display: flex; align-items: center; gap: 10px; padding: 13px; }
.fact svg { color: var(--blue-light); }
.fact small, .mini-exercise small, .history-row small, .selection-name small { display: block; color: var(--muted); font-size: 11px; }
.fact strong { display: block; font-size: 13px; }
.steps {
  list-style: none; margin: 15px 0; padding: 0; counter-reset: instructions; display: grid; gap: 14px;
}
.steps li { position: relative; padding-left: 34px; counter-increment: instructions; }
.steps li::before {
  content: counter(instructions); display: grid; place-items: center; position: absolute; left: 0; top: -1px;
  width: 24px; height: 24px; border-radius: 6px; background: #21355d; color: #bad0ff; font-size: 12px; font-weight: 700;
}
.tip-box { display: flex; align-items: flex-start; gap: 8px; margin-top: 15px; padding: 11px 12px; color: #cedaf0; border: 1px solid #2f4773; background: #1a294a; border-radius: 9px; font-size: 12px; }
.tip-box svg { color: #88adff; }
.gear-quicklinks { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.gear-quicklinks a { display: inline-flex; align-items: center; gap: 8px; background: #111823; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px 5px 5px; color: #dce6fb; font-weight: 650; }
.gear-quicklinks img { width: 44px; height: 40px; border-radius: 5px; object-fit: cover; }
.gear-quicklinks svg { color: var(--blue-light); }

.selection-list, .workout-cards { display: grid; gap: 11px; }
.selection-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px; }
.selection-row img { width: 72px; height: 65px; object-fit: contain; background: #eef1f3; border-radius: 8px; }
.selection-name a, .mini-exercise a { display: block; width: fit-content; font-weight: 700; overflow-wrap: anywhere; }
.selection-fields, .selection-actions { display: flex; align-items: center; gap: 6px; }
.selection-fields > label { display: grid; gap: 3px; font-size: 11px; color: var(--muted); }
.selection-fields input, .selection-fields select { width: 72px; padding: 6px 7px; min-height: 35px; }
.order-button svg { transform: rotate(180deg); }
.workout-progress { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 12px 15px; margin-bottom: 16px; }
.workout-progress .meter { margin-top: 6px; }
.workout-card { padding: 15px; }
.workout-card-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.workout-card-heading img { width: 60px; height: 54px; background: #eff0f3; border-radius: 7px; object-fit: contain; flex: none; }
.workout-card-heading h2 { font-size: 19px; }
.workout-card-heading p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.workout-card-heading .icon-button { margin-left: auto; }
.set-labels, .set-row { display: grid; align-items: center; grid-template-columns: minmax(30px, 0.5fr) minmax(85px, 1.5fr) minmax(65px, 1.5fr) minmax(46px, 0.6fr); gap: 9px; }
.set-labels { color: var(--muted); font-size: 11px; font-weight: 650; padding: 0 9px 5px; }
.set-labels > span:last-child { text-align: center; }
.set-row { padding: 7px 9px; border-radius: 8px; border: 1px solid #283449; margin-top: 4px; background: #101722; }
.set-row.checked { background: #152822; border-color: #2b533f; }
.set-row strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.set-row input[type="number"] { width: 100%; min-width: 0; max-width: 140px; }
.set-check { display: grid; place-items: center; position: relative; cursor: pointer; margin: 0 auto; height: 43px; width: 43px; }
.set-check input { position: absolute; inset: 0; margin: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.set-check > span { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #4e6489; background: #19263d; color: transparent; border-radius: 7px; }
.set-check input:focus-visible + span { outline: var(--focus-ring); outline-offset: 3px; }
.set-check input:checked + span { border-color: #51ad83; background: #23563e; color: #b3f4d0; }

.progress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.history-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.heatmap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.heat-square { background: #202b40; border-radius: 4px; height: 11px; }
.heat-square.trained { background: #5487ff; }
.heat-square.current { outline: 1px solid #91aee6; outline-offset: -1px; }
.history-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 3px; min-height: 57px;
  border-bottom: 1px solid var(--line); transition: color 160ms;
}
.history-row:last-child { border-bottom: 0; }
.history-row div { flex: 1; min-width: 0; }
.history-row strong { display: block; overflow-wrap: anywhere; }
.history-row > svg { color: #8798b8; margin-left: auto; }
.history-xp { color: #a4bfff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.history-grid .empty-state { margin-top: 15px; }
.xp-rules dl { display: grid; gap: 0; margin-top: 11px; }
.xp-rules dl div { display: flex; justify-content: space-between; gap: 7px; border-bottom: 1px solid var(--line); padding: 6px 0; font-size: 12px; }
.xp-rules dd { color: #b2c8ff; font-weight: 700; white-space: nowrap; }
.xp-rules p { margin: 12px 0; font-size: 12px; }
.history-set { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.history-set svg { color: var(--green); }
.history-set:last-child { border: 0; }

/* Planner, recipes and reference material */
.planner-layout { display: grid; grid-template-columns: minmax(280px, 0.67fr) minmax(0, 1.33fr); align-items: start; gap: 16px; }
.planner-form, .settings-form, .dialog-form { display: grid; gap: 14px; }
.planner-form .section-top, .settings-form > .feature-icon { margin: 0; }
.planner-form label, .settings-form label, .dialog-form label, .form-label { display: grid; gap: 5px; font-weight: 650; font-size: 12px; }
input:not([type="checkbox"], [type="file"]), select, textarea {
  min-width: 0; min-height: 40px; background: var(--input); border: 1px solid #354358; border-radius: 8px;
  padding: 8px 10px; color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: #789bf0; }
textarea { display: block; resize: vertical; }
.search-field input:not([type="checkbox"], [type="file"]) { background: none; border: 0; min-height: 38px; padding: 6px 0; }
.search-field input:focus-visible { outline: none; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.focus-field { min-width: 0; border: 0; margin: 0; padding: 0; }
.focus-field legend { padding: 0; font-size: 12px; font-weight: 650; margin-bottom: 7px; }
.focus-field legend span { margin-left: 5px; color: var(--muted); font-weight: 400; }
.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 10px; font-size: 12px; font-weight: 650; border: 1px solid #34435d; border-radius: 8px; background: #151d2b; color: #c0cce3; }
.chip.active { background: #223867; color: #cadaff; border-color: #5273c0; }
.planner-result { display: grid; gap: 10px; min-width: 0; }
.planner-result > .tip-box { margin: 0; }
.plan-empty {
  min-height: 360px; display: grid; align-content: center; justify-items: center; text-align: center; gap: 13px;
  padding: 34px 23px; border-radius: var(--radius); border: 1px solid #2f4878;
  background: radial-gradient(ellipse at 50% 16%, #233a70 0%, #172745 34%, #111a2c 75%);
}
.plan-empty p { color: #b9c9e6; max-width: 440px; }
.plan-empty-points { display: flex; gap: 8px 13px; color: #c5d5f7; font-size: 12px; font-weight: 650; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.plan-empty-points span { display: flex; align-items: center; gap: 4px; }
.plan-empty-points svg { color: #83b2ff; }
.plan-orb { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 21px; color: #dbe8ff; background: linear-gradient(150deg,#366ef7,#2046b7); border: 1px solid #6993ff; box-shadow: 0 9px 29px #3165e57d; }
.planner-banner { display: flex; gap: 12px; align-items: center; border: 1px solid #3d5686; border-radius: 13px; padding: 14px 16px; background: linear-gradient(105deg,#1c3158,#152038); }
.planner-banner h2 { font-size: 20px; }
.planner-banner p { color: #c2d1ef; font-size: 12px; margin-top: 3px; }
.plan-day { padding: 12px; }
.plan-day-heading { display: flex; align-items: center; gap: 10px; }
.plan-day-heading > div { flex: 1; min-width: 0; }
.plan-day-heading p { color: var(--muted); font-size: 11px; margin-top: 3px; }
.plan-weekday { display: grid; place-items: center; flex: none; width: 40px; height: 42px; color: #b6caff; background: #223662; border-radius: 8px; border: 1px solid #38558a; font-weight: 750; }
.plan-day details { border-top: 1px solid var(--line); margin-top: 10px; }
.plan-day summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: #c1ceea; font-size: 12px; padding: 7px 2px 0; }
.plan-day summary::-webkit-details-marker { display: none; }
.plan-day details[open] summary svg { transform: rotate(180deg); }
.plan-exercise-list { display: grid; margin-top: 6px; }
.mini-exercise { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mini-exercise:last-child { border: 0; }
.mini-exercise > img { width: 46px; height: 42px; object-fit: contain; background: #eff0f2; border-radius: 6px; flex: none; }
.mini-exercise a { font-size: 12px; }
.recipe-photo { display: block; position: relative; }
.recipe-photo img { aspect-ratio: 1.6; object-fit: cover; }
.protein-label { position: absolute; left: 10px; top: 10px; background: #11281df2; border: 1px solid #3f835e; padding: 4px 8px; border-radius: 6px; color: #baefd0; font-size: 11px; font-weight: 750; pointer-events: none; }
.favorite-button { position: absolute; top: 9px; right: 9px; background: #101826e8; }
.favorite-button.active { color: #ff9da9; background: #3c2532; border-color: #8a4e61; }
.favorite-button.active svg { fill: #ff9da9; }
.recipe-content { display: grid; gap: 7px; padding: 14px; }
.recipe-content .exercise-meta, .tip-card .exercise-meta { justify-content: space-between; }
.recipe-content p, .tip-card p { color: var(--muted); font-size: 13px; }
.recipe-content .text-link, .tip-card .text-link { margin-top: 4px; }
.recipe-nutrition .section-top { margin-bottom: 1px; }
.macro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.macro-grid > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: #111823; display: grid; gap: 1px; }
.macro-grid strong { font-size: 20px; color: #bfd3ff; font-variant-numeric: tabular-nums; }
.macro-grid span { color: var(--muted); font-size: 11px; }
.portion-control { display: flex; gap: 6px; align-items: center; white-space: nowrap; color: #cddefb; font-size: 12px; font-weight: 650; }
.portion-control .icon-button { min-height: 34px; min-width: 34px; }
.ingredient-list { padding: 0; margin: 0; list-style: none; }
.ingredient-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ingredient-list li:last-child { border: 0; }
.ingredient-list strong { white-space: nowrap; color: #c8d8fc; font-size: 12px; }
.tip-card { padding: 16px; display: grid; gap: 8px; transition: border-color 160ms; }
.tip-card .feature-icon { margin-bottom: 4px; }
.article-panel { max-width: 820px; }
.article-panel .steps { margin-bottom: 0; margin-top: 23px; gap: 18px; }

.reminder-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(265px, 1fr); gap: 14px; align-items: start; }
.reminder-list { display: grid; gap: 14px; }
.reminder-row { display: flex; align-items: center; gap: 9px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--line); }
.reminder-row.done > .small-icon { color: var(--green); background: #17382f; }
.reminder-description { flex: 1; min-width: 0; }
.reminder-description h3 { font-size: 14px; }
.reminder-description p { font-size: 11px; margin-top: 4px; }
.reminder-row .button { min-height: 35px; padding: 7px 8px; font-size: 11px; }
.reminder-row .button svg { width: 14px; height: 14px; }
.notification-panel .button { margin: 13px 0 8px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.settings-form .button { width: fit-content; }
.settings-form .switch-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { color: var(--muted); font-weight: 400; margin-top: 3px; }
.switch-row input { position: absolute; right: 0; width: 42px; height: 26px; opacity: 0; margin: 0; }
.switch { display: flex; align-items: center; flex: none; width: 42px; height: 24px; border-radius: 99px; padding: 3px; border: 1px solid #4e6286; background: #25314a; pointer-events: none; transition: background 150ms; }
.switch::after { content: ''; width: 15px; height: 15px; border-radius: 50%; background: #d3e0ff; transition: transform 150ms; }
.switch-row input:checked + .switch { background: #275af1; border-color: #7697ff; }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: var(--focus-ring); outline-offset: 3px; }
.file-button { cursor: pointer; position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: var(--focus-ring); outline-offset: 3px; }
.menu-panel { padding: 5px 13px; }

/* Dialogs, timer and feedback */
.dialog {
  width: min(90vw, 530px); max-width: calc(100% - 24px); max-height: calc(100vh - 30px); max-height: calc(100dvh - 30px);
  overflow: auto; padding: 21px; border: 1px solid #3c5077; border-radius: 17px;
  background: #182132; color: var(--text); box-shadow: 0 18px 88px #000b;
}
.dialog::backdrop { background: #04070bd1; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.dialog-heading > div { flex: 1; }
.dialog-heading p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.dialog-heading .icon-button { margin-left: auto; min-width: 34px; min-height: 34px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.dialog-form { margin-top: 10px; }
.dialog > .inline-actions { margin-top: 8px; }
.action-steps { padding-left: 20px; margin: 0 0 11px; color: #c4d0e8; font-size: 13px; }
.form-error { color: #ffb9c6; font-weight: 650; font-size: 12px; }
.dialog textarea { font-family: ui-monospace, monospace; font-size: 12px; }
.rest-dialog { width: min(90vw, 407px); padding: 17px; }
.rest-top { display: flex; justify-content: space-between; align-items: center; }
.rest-center { display: grid; justify-items: center; gap: 13px; margin: 4px 0 17px; text-align: center; }
.rest-center h2 { font-size: 27px; }
.rest-center p { font-size: 13px; color: #bdc9df; }
.timer-ring {
  --fraction: 100%;
  width: 140px; height: 140px; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(#6896ff 0 var(--fraction), #2a3852 var(--fraction) 100%);
  box-shadow: 0 0 28px #3670ec44;
}
.timer-ring-fill { display: grid; place-content: center; width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; background: #141c2b; }
.timer-clock { font-variant-numeric: tabular-nums; }
.timer-ring .timer-clock { font-family: 'Barlow Condensed', Inter, sans-serif; font-weight: 800; font-size: 58px; letter-spacing: 0.03em; line-height: 1; }
.timer-ring small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: 0.12em; }
.rest-actions { justify-content: center; }
.timer-mini {
  position: fixed; right: 20px; bottom: 19px; z-index: 7; min-height: 46px; display: flex; align-items: center; gap: 7px;
  padding: 8px 11px; border: 1px solid #527bd2; border-radius: 9px; background: #1b3060; color: #dce8ff; box-shadow: 0 4px 28px #000b;
  font-size: 12px; font-weight: 650;
}
.timer-mini svg { color: #92b4ff; }
.summary-dialog { display: grid; justify-items: center; gap: 9px; text-align: center; padding: 6px 0; }
.summary-dialog > p { color: var(--muted); }
.summary-dialog .plan-orb { margin-bottom: 2px; }
.summary-dialog .dialog-actions { justify-content: center; margin-top: 5px; }
.summary-score { display: grid; gap: 1px; }
.summary-score strong { font-weight: 800; color: #a6c2ff; font-size: 28px; line-height: 1.2; }
.summary-score span { color: #d8e2f8; font-size: 12px; }
.toast-stack { position: fixed; z-index: 8; right: 19px; bottom: 74px; display: grid; gap: 6px; width: min(370px, calc(100% - 38px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; border: 1px solid #435d90; border-radius: 11px; padding: 8px; color: #e8efff; background: #1b2a46; box-shadow: 0 8px 26px #0007; }
.toast > div { flex: 1; min-width: 0; }
.toast strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.toast .text-link { font-size: 11px; pointer-events: auto; }
.toast .icon-button { min-width: 31px; min-height: 31px; pointer-events: auto; }
body:has(dialog[open]) { overflow: hidden; }

@media (hover: hover) {
  .nav-link:not(.is-current):hover { color: #eaf1ff; background: #181f2e; }
  .rail-level:hover, .stat-card[href]:hover, .photo-card:hover, .tip-card:hover, .exercise-card:hover, .recipe-card:hover { border-color: #4c6595; }
  .button-primary:not(:disabled):hover { background: #3a6bff; border-color: #7096ff; }
  .button-secondary:not(:disabled):hover, .button-ghost:hover, .icon-button:not(:disabled):hover { background: #27364f; border-color: #556b98; color: #ecf3ff; }
  .button-selected:hover { background: #21473b; border-color: #55a990; }
  .button-danger:hover { background: #592c39; }
  .text-link:hover, .back-link:hover, .history-row:hover, .selection-name a:hover, .mini-exercise a:hover, h3 a:hover, .workout-card h2 a:hover { color: #bed2ff; }
  .muscle-card:hover { border-color: #6f92d6; }
  .muscle-card:hover img { scale: 1.04; }
  .muscle-card:hover .card-arrow, .photo-card:hover .card-arrow { background: #315ba6; }
  .chip:not(.active):hover, .tabs a:not(.active):hover { background: #25334e; color: #e3edff; }
  .gear-quicklinks a:hover { border-color: #5371a4; }
}
@media (max-width: 1190px) {
  :root { --sidebar-width: 206px; }
  .main-content, .topbar-content { padding-left: 26px; padding-right: 26px; }
  .muscle-card { min-height: 145px; }
  .hero { min-height: 310px; }
  .workout-progress { margin-bottom: 12px; }
}
@media (max-width: 1000px) {
  :root { --sidebar-width: 188px; }
  .sidebar { padding-left: 11px; padding-right: 11px; }
  .main-content, .topbar-content { padding-left: 20px; padding-right: 20px; }
  .hero h2 { font-size: clamp(47px, 6vw, 66px); }
  .stat-card { padding: 11px; gap: 8px; }
  .stat-icon { width: 33px; height: 33px; border-radius: 8px; }
  .stat-icon svg { width: 19px; height: 19px; }
  .muscle-grid { gap: 9px; }
  .muscle-card { min-height: 126px; }
  .muscle-content { inset: auto 8px 8px; }
  .card-arrow { width: 28px; height: 28px; }
  .card-arrow svg { width: 16px; height: 16px; }
  .reminder-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 850px) {
  :root { --sidebar-width: 0px; --topbar-height: 59px; }
  html { scroll-padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 8px); }
  .sidebar, .desktop-crumb { display: none; }
  .mobile-brand { display: block; }
  .topbar { height: auto; min-height: calc(var(--topbar-height) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .topbar-content { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .brand-emblem { width: 34px; height: 34px; border-radius: 9px; }
  .brand-emblem svg { width: 22px; height: 22px; }
  .brand-type { font-size: 27px; }
  .main-content { padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 23px); }
  .mobile-nav {
    background: #111723f7; backdrop-filter: blur(13px); border-top: 1px solid #2a354d;
    position: fixed; inset: auto 0 0; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 3px max(5px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(5px, env(safe-area-inset-left));
    min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  }
  .mobile-nav a { display: grid; align-content: center; justify-items: center; gap: 3px; min-width: 0; padding: 5px 1px 6px; color: #a3b1cc; font-size: 10px; font-weight: 650; }
  .mobile-nav a.is-current { color: #a9c4ff; }
  .mobile-nav a.is-current svg { background: #24386c; width: 40px; height: 27px; padding: 3px 9px; border-radius: 8px; }
  .mobile-nav a:not(.is-current) svg { margin: 3px 0; }
  .draft-dock { bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 7px); }
  .timer-mini { bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 72px); }
  .toast-stack { bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 124px); }
}
@media (max-width: 680px) {
  .main-content { padding-right: max(15px, env(safe-area-inset-right)); padding-left: max(15px, env(safe-area-inset-left)); padding-top: 20px; }
  .topbar-content { padding-right: max(15px, env(safe-area-inset-right)); padding-left: max(15px, env(safe-area-inset-left)); }
  .top-actions { gap: 7px; }
  .page-heading { align-items: flex-start; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 17px; }
  .page-heading p { margin-top: 6px; font-size: 13px; }
  .date-chip { min-height: 32px; padding: 5px 8px; font-size: 11px; }
  .date-chip svg { width: 14px; height: 14px; }
  .hero { min-height: 279px; background-position: center, 74% center; }
  .hero-inner { padding: 23px 19px; }
  .hero h2 { font-size: clamp(48px, 9vw, 66px); }
  .hero p { font-size: 12px; }
  .stat-grid { gap: 7px; margin-top: 12px; }
  .stat-card { flex-direction: column; gap: 7px; min-height: 113px; padding: 8px 8px 9px; border-radius: 10px; }
  .stat-icon { width: 30px; height: 30px; margin: 0; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-body { width: 100%; }
  .stat-body > p { font-size: 9px; letter-spacing: 0.04em; }
  .stat-number { font-size: 25px; margin-top: 4px; }
  .stat-number small { font-size: 12px; }
  .stat-detail { font-size: 10px; margin-top: 4px; }
  .home-groups { margin-top: 18px; }
  .section-top h2 { font-size: 21px; }
  .section-top p { font-size: 12px; }
  .section-top .text-link { font-size: 11px; gap: 4px; }
  .muscle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .muscle-card { min-height: 132px; }
  .muscle-content h3 { font-size: 18px; }
  .home-bottom, .detail-grid, .progress-grid, .settings-grid, .planner-layout { grid-template-columns: minmax(0, 1fr); }
  .home-bottom { margin-top: 13px; gap: 10px; }
  .group-hero { padding: 16px; min-height: 135px; margin-bottom: 14px; }
  .catalog-bar { flex-wrap: wrap; margin-bottom: 12px; }
  .search-field { width: 100%; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .exercise-content { padding: 9px; }
  .exercise-content h3 { font-size: 15px; }
  .exercise-thumb img { aspect-ratio: 1.48; }
  .exercise-meta { gap: 4px 8px; }
  .exercise-meta svg { width: 13px; height: 13px; }
  .detail-facts { gap: 6px; }
  .fact { flex-direction: column; align-items: flex-start; gap: 4px; padding: 7px; }
  .fact strong { font-size: 12px; }
  .fact small { font-size: 10px; }
  .content-panel { padding: 15px; }
  .planner-layout { gap: 12px; }
  .recipe-content { padding: 9px; }
  .recipe-content h3 { font-size: 16px; }
  .recipe-content p, .tip-card p { font-size: 12px; }
  .protein-label { left: 6px; top: 6px; padding: 3px 5px; font-size: 10px; }
  .favorite-button { top: 5px; right: 5px; min-height: 35px; min-width: 35px; }
  .tip-card { padding: 11px; }
  .tip-card h3 { font-size: 15px; }
  .selection-row { grid-template-columns: 55px minmax(0, 1fr) auto; align-items: center; gap: 7px; }
  .selection-row img { width: 55px; height: 53px; }
  .selection-fields { grid-row: 2; grid-column: 1 / 3; }
  .selection-actions { grid-row: 2; grid-column: 3; }
  .draft-dock { gap: 6px; padding: 8px; }
  .draft-dock strong { font-size: 12px; }
  .draft-dock small { font-size: 10px; }
  .draft-dock .button { font-size: 11px; min-height: 40px; gap: 5px; padding: 8px; }
  .draft-dock .button svg { width: 15px; height: 15px; }
  input:not([type="checkbox"], [type="file"]), select, textarea, .search-field input:not([type="checkbox"], [type="file"]), .dialog textarea { font-size: 16px; }
  .set-row input[type="number"] { padding: 6px; }
  .workout-card { padding: 10px; }
  .workout-card-heading h2 { font-size: 17px; }
}
@media (max-width: 415px) {
  .main-content[data-page="uebersicht"] { padding-top: 17px; }
  .main-content[data-page="uebersicht"] .page-heading { margin-bottom: 13px; gap: 4px 8px; }
  .main-content[data-page="uebersicht"] .date-chip { padding: 0; border: 0; background: transparent; min-height: 23px; }
  .hero { min-height: 240px; background-image: linear-gradient(90deg, #09152cf5, #0b1933ba 44%, #0e214747 100%), linear-gradient(0deg, #0c1a32, #0b193335 56%), url('assets/media/hero.webp'); background-size: cover, cover, auto 100%; background-position: center, center, 77% top; background-repeat: no-repeat; }
  .hero h2 { font-size: clamp(39px, 10.75vw, 47px); }
  .hero-inner { padding: 17px 14px; }
  .hero p { margin-top: 11px; }
  .hero-actions .button { padding-left: 9px; padding-right: 9px; gap: 5px; }
  .hero-actions { gap: 6px; margin-top: 13px; }
  .stat-card { padding-top: 7px; gap: 6px; min-height: 105px; }
  .stat-icon { width: 27px; height: 27px; }
  .stat-number { font-size: 23px; }
  .dialog { width: calc(100vw - 22px); padding: 15px; }
  .reminder-row { gap: 6px; }
  .reminder-row > .small-icon { width: 29px; height: 29px; }
  .reminder-row .icon-button { min-width: 34px; min-height: 34px; }
  .recipe-grid h3 { font-size: 14px; }
}
@media (max-width: 350px) {
  .main-content { padding-left: 10px; padding-right: 10px; }
  .topbar-content { padding-left: 10px; padding-right: 10px; }
  .brand { gap: 6px; }
  .brand-type { font-size: 24px; }
  .top-actions { gap: 5px; }
  .top-actions .streak-badge { padding: 5px; }
  .top-actions .streak-badge span { display: none; }
  .hero h2 { font-size: 37px; }
  .muscle-card { min-height: 119px; }
  .set-labels, .set-row { gap: 4px; }
  .set-labels { font-size: 10px; }
  .selection-actions .icon-button { min-width: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Search and planning controls */
.catalog-filters { margin: 0 0 15px; }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 9px 15px; flex-wrap: wrap; margin-bottom: 11px; }
.sort-control { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sort-control select { width: fit-content; color: var(--text); }
.recipe-wait { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; }
.planner-form label, .plan-edit-entry label { min-width: 0; }
.planner-weekdays, .planner-week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.planner-weekdays .chip { justify-content: center; min-height: 36px; min-width: 0; padding: 0 3px; }
.planner-equipment-line { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; margin-top: -7px; }
.planner-equipment-line .button { justify-content: flex-start; width: fit-content; }
.planner-equipment-line > span { color: var(--muted); font-size: 11px; }
.planner-week-strip { padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.planner-week-tile {
  min-width: 0; display: grid; justify-items: center; gap: 4px; border-radius: 7px; border: 1px solid transparent;
  padding: 5px 2px; font-size: 11px; color: var(--muted); font-weight: 700;
}
.planner-week-tile.planned { background: #1f3158; color: #a8c4ff; }
.planner-week-tile.current { border-color: #6e98ff; }
.plan-day-note { color: #bdcbe4; font-size: 12px; margin-top: 8px; }
.plan-day details > .button { margin-top: 8px; min-height: 36px; }
.workout-card-heading p.recent-set, .mini-exercise .recent-set { color: #9abaff; margin-top: 3px; }
.plan-insights { display: grid; gap: 10px; align-items: start; }
.plan-insights p { font-size: 12px; }
.volume-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.volume-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 9px; font-size: 12px; }
.volume-list a { width: fit-content; }
.volume-list strong { color: #adc6ff; font-variant-numeric: tabular-nums; }
.volume-track { grid-column: 1 / -1; height: 4px; background: #26334b; border-radius: 999px; overflow: hidden; }
.volume-track i { display: block; height: 100%; border-radius: inherit; background: #5686ff; }
.progression-steps { display: grid; gap: 9px; margin-top: 12px; }
.progression-steps > div { display: grid; gap: 1px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.progression-steps > div:last-child { border-bottom: 0; padding-bottom: 0; }
.progression-steps dt { font-weight: 700; color: #acc8ff; font-size: 12px; }
.progression-steps dd { color: #d2def3; font-size: 13px; }
.equipment-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: min(54vh, 520px); overflow-y: auto; padding: 2px; }
.dialog-form .equipment-option {
  display: flex; align-items: center; min-width: 0; gap: 7px; padding: 5px; min-height: 52px;
  background: #131b28; border: 1px solid #324159; border-radius: 8px; cursor: pointer;
}
.dialog-form .equipment-option:has(input:checked) { border-color: #5276c7; background: #1e2e51; }
.equipment-option img { width: 40px; height: 40px; object-fit: cover; border-radius: 5px; flex: none; }
.equipment-option span { flex: 1; min-width: 0; }
.equipment-option strong, .equipment-option small { display: block; overflow-wrap: anywhere; }
.equipment-option small { color: var(--muted); font-size: 9px; }
.equipment-option input { width: 17px; height: 17px; margin: 0 2px 0 0; flex: none; accent-color: #4978ff; }
.plan-edit-entry { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 9px 10px 10px; border: 1px solid #364767; border-radius: 9px; background: #131b28; }
.plan-edit-entry legend { padding: 0 5px; color: var(--blue-light); font-size: 12px; font-weight: 700; }
.ai-settings { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.ai-prompt { color: var(--muted); margin-top: 9px; font-size: 12px; }
.ai-prompt summary { cursor: pointer; width: fit-content; }
.ai-prompt .form-label { margin-top: 8px; }
.update-notice .button { pointer-events: auto; min-height: 35px; }

@media (min-width: 1190px) {
  .plan-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .library-tools .search-field { flex: 1 1 165px; }
  .sort-control select { padding-inline: 8px; font-size: 16px; }
}
@media (max-width: 400px) {
  .equipment-checklist { grid-template-columns: minmax(0, 1fr); }
}

/* Account, training feedback and weekly meals */
.account-grid .content-panel p + p { margin-top: 10px; }
.account-grid .content-panel > .button { margin-top: 13px; }
.account-status { display: grid; gap: 6px; margin: 13px 0; }
.account-status > small { color: var(--muted); }
.settings-form .account-adopt { display: flex; align-items: center; gap: 8px; }
.account-adopt input, .clean-feedback input, .shopping-item input { width: 17px; height: 17px; accent-color: #4978ff; flex: none; }
.repeat-strip { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; padding: 10px 13px; margin-top: 13px; }
.repeat-strip > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.repeat-strip strong, .repeat-strip small { display: block; }
.repeat-strip small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.workout-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -3px 0 9px; }
.workout-card-actions .button { min-height: 33px; padding: 5px 8px; font-size: 11px; }
.workout-card-actions .button svg { width: 14px; height: 14px; }
.workout-feedback { width: 100%; display: grid; justify-items: center; gap: 8px; padding: 12px; border: 1px solid #32445e; border-radius: 10px; background: #121c2d; }
.workout-feedback fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.workout-feedback legend { text-align: center; font-weight: 700; font-size: 12px; margin-bottom: 7px; }
.effort-options { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.effort-options > label { position: relative; }
.effort-options input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.effort-options span {
  display: block; min-width: 69px; padding: 5px 7px; border-radius: 6px; color: #d3def7; border: 1px solid #3b4c6a;
  background: #1d2940; font-weight: 650; font-size: 11px; text-align: center;
}
.effort-options input:checked + span { color: #d9e5ff; border-color: #728fe6; background: #284374; }
.effort-options input:focus-visible + span { outline: var(--focus-ring); outline-offset: 3px; }
.clean-feedback { display: flex; align-items: center; gap: 6px; color: #d6e3ff; font-size: 12px; }
.workout-feedback .button { min-height: 35px; padding-block: 6px; }
.swap-list { display: grid; gap: 6px; }
.swap-choice {
  display: flex; gap: 9px; align-items: center; width: 100%; min-width: 0; padding: 7px; border-radius: 9px;
  border: 1px solid #394962; background: #141d2c; color: var(--text); text-align: left;
}
.swap-choice img, .timer-next img { flex: none; width: 47px; height: 39px; border-radius: 6px; object-fit: cover; }
.swap-choice span { flex: 1; min-width: 0; }
.swap-choice strong, .swap-choice small { display: block; }
.swap-choice small { color: var(--muted); font-size: 11px; }
.swap-choice > svg { color: var(--blue-light); }
.timer-next { display: flex; align-items: center; gap: 9px; text-align: left; background: #101827; border-radius: 9px; padding: 7px 9px; border: 1px solid #304467; }
.timer-next small, .timer-next strong, .timer-next span { display: block; }
.timer-next small, .timer-next span { color: var(--muted); font-size: 11px; }
.timer-next strong { font-size: 13px; overflow-wrap: anywhere; }
.exercise-chart-panel, .lifting-sessions { margin-top: 14px; }
.lifting-chart { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: clamp(4px, 1vw, 12px); margin-top: 16px; }
.lifter-column { display: grid; grid-template-rows: 128px auto auto; justify-items: center; gap: 4px; min-width: 0; }
.lifter-bar { display: flex; align-items: flex-end; justify-self: stretch; background: #111a28; border-radius: 7px; overflow: hidden; }
.lifter-bar i { display: block; width: 100%; height: var(--bar); background: linear-gradient(#638dfb, #2e55be); border-radius: 5px 5px 0 0; }
.lifter-column strong, .lifter-column small { font-size: 11px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lifter-column small { color: var(--muted); }
.progression-suggestion { margin-bottom: 14px; }
.menu-week-bar { display: flex; align-items: center; justify-content: space-between; gap: 9px; text-align: center; padding: 8px 12px; margin-bottom: 12px; }
.menu-week-bar strong, .menu-week-bar span { display: block; }
.menu-week-bar span { color: var(--muted); font-size: 12px; }
.menu-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: 12px; }
.menu-days { display: grid; gap: 8px; }
.menu-day { padding-block: 12px; }
.menu-day.current { border-color: #5775b5; }
.menu-day-heading { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.menu-day-heading h2 { font-size: 18px; }
.menu-day-heading small { color: var(--muted); font-size: 11px; }
.menu-day-heading .button { min-height: 34px; padding: 6px 8px; font-size: 11px; }
.menu-day-heading .button svg { width: 15px; height: 15px; }
.menu-meal { display: flex; align-items: center; gap: 9px; padding-top: 7px; margin-top: 7px; border-top: 1px solid var(--line); }
.menu-meal img { width: 46px; height: 40px; border-radius: 6px; object-fit: cover; }
.menu-meal > div { min-width: 0; flex: 1; }
.menu-meal a, .menu-meal small { display: block; }
.menu-meal a { font-weight: 650; overflow-wrap: anywhere; }
.menu-meal small { font-size: 11px; color: var(--muted); }
.shopping-panel { position: sticky; top: 12px; }
.shopping-panel > .button { margin-top: 8px; }
.shopping-list { display: grid; }
.shopping-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.shopping-item span { overflow-wrap: anywhere; }
.shopping-item strong { font-size: 12px; color: var(--blue-light); white-space: nowrap; }
.shopping-item.done span { text-decoration: line-through; color: var(--muted); }

@media (max-width: 680px) {
  .page-actions { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .menu-layout { grid-template-columns: minmax(0, 1fr); }
  .shopping-panel { position: static; }
  .lifter-column { grid-template-rows: 94px auto auto; }
  .lifter-column small { font-size: 9px; }
}
.menu-shopping-shortcut { display: none; }
@media (max-width: 680px) {
  .menu-shopping-shortcut { display: flex; justify-content: flex-end; margin-bottom: 9px; }
}

/* Today, training library, muscle balance and challenges */
.today-panel {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  margin: 0 0 15px; padding: 16px 18px; border-color: #304878;
  background: linear-gradient(125deg, #1b2c50, var(--surface) 64%);
}
.hero + .today-panel { margin: 14px 0 0; }
.today-panel > .feature-icon { align-self: start; }
.today-detail h2 { margin: 3px 0 5px; }
.today-detail p { color: #c1cee7; font-size: 13px; }
.today-detail .today-preview { margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.today-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.today-actions .button { justify-content: center; text-align: center; white-space: normal; }
.green-tag { background: #153b31; color: #8af1cb; border-color: #326954; }

.library-stack { display: grid; gap: 14px; }
.library-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  border-top: 1px solid var(--line); padding: 12px 0;
}
.library-row:last-child { padding-bottom: 0; }
.library-row h3 { font-size: 16px; }
.library-row p { margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; }
.library-row .library-preview { color: #c2cfe8; }
.library-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.row-actions { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.library-form { display: grid; gap: 12px; }
.library-form label { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 650; }
.library-form :is(input, select, textarea) { width: 100%; min-width: 0; }
.library-form .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.custom-thumb img { object-fit: cover; }
.custom-illustration { margin: 0; }
.custom-illustration img { object-fit: cover; }
.custom-illustration figcaption { padding: 8px 12px; color: var(--muted); background: var(--surface); font-size: 12px; }

.rest-field {
  display: flex; align-items: center; gap: 6px; min-height: 37px; padding: 3px 7px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: #d0dbea; font-size: 11px;
}
.rest-field svg { color: var(--blue-light); }
.rest-field input { width: 67px; min-height: 29px; padding: 3px 5px; font-size: 16px; }
.workout-tool-footer { margin: 8px 0 0; }
.paired-card { border-color: #3c5e9a; }
.superset-line {
  flex: 1 0 100%; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; border: 1px solid #344e7d; background: #1b2a49; color: #d9e5ff; font-size: 12px;
}
.superset-line > span { display: flex; min-width: 0; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.superset-line svg { color: var(--blue-light); }
.superset-line small { display: block; color: #b4c6e8; font-size: 11px; }
.set-kind { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; color: #c8d7f5; font-weight: 650; font-size: 12px; }
.set-kind span { color: var(--muted); font-weight: 500; font-size: 11px; }
.warmup-row { background: #17243a; border-color: #344b70; }
.warmup-row .remove-warmup { width: 30px; height: 30px; border-color: transparent; background: transparent; }

.progress-shortcuts { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.balance-panel .balance-hint { margin: 8px 0 2px; font-size: 12px; }
.balance-list, .challenge-scores { margin: 0; padding: 0; list-style: none; }
.balance-row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.balance-row:last-child { border-bottom: 0; padding-bottom: 0; }
.balance-row a { font-weight: 650; }
.balance-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.balance-row > strong { min-width: 55px; color: #b5ceff; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.balance-bar .meter { height: 5px; }

.challenge-week { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; color: var(--muted); font-size: 12px; }
.challenge-status { margin-bottom: 10px; }
.challenge-status .button { margin-top: 7px; }
.challenge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 345px), 1fr)); gap: 12px; align-items: start; }
.challenge-card { display: grid; gap: 12px; }
.challenge-card .section-top { margin: 0; }
.challenge-own { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; }
.challenge-own > span { color: #b8ceff; font-variant-numeric: tabular-nums; }
.challenge-own .meter { grid-column: 1 / -1; }
.challenge-sharing { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 9px; border-radius: 8px; background: #1a2740; }
.challenge-sharing > div { display: flex; align-items: center; gap: 7px; color: #a7c5ff; }
.challenge-sharing p, .challenge-results p { font-size: 12px; }
.challenge-results h3 { margin-bottom: 6px; font-size: 14px; }
.challenge-scores li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 5px 0; align-items: center; }
.challenge-scores li > span { overflow-wrap: anywhere; }
.challenge-scores strong { color: #b8ceff; font-variant-numeric: tabular-nums; }

@media (max-width: 890px) {
  .today-panel { grid-template-columns: auto minmax(0, 1fr); }
  .today-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 540px) {
  .today-panel { padding: 12px; gap: 9px; }
  .today-panel .feature-icon { width: 36px; height: 36px; }
  .today-detail h2 { font-size: 19px; }
  .today-actions { grid-column: 1 / -1; }
  .today-actions .button { flex: 1 1 auto; font-size: 12px; padding-inline: 8px; }
  .library-row { grid-template-columns: auto minmax(0, 1fr); gap: 7px; }
  .library-row > .row-actions { grid-column: 2; }
  .workout-card-actions > .button { min-height: 38px; }
  .balance-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .balance-bar { grid-row: 2; grid-column: 1 / -1; }
  .balance-row > strong { grid-row: 1; grid-column: 2; }
}
