:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1d2c26;
  background: #f6f7f2;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #85b65f; outline-offset: 3px; }
svg { width: 20px; height: 20px; flex: none; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { max-width: 760px; margin: 0 auto; min-height: 100vh; padding: 0 28px; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: 52px; }
.topbar { height: 100px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; padding: 0; background: none; border: 0; color: #1e392f; font: 800 23px/1 'Manrope', sans-serif; letter-spacing: -1.3px; }
.brand-dot, .period { color: #8bb86a; }
.brand-mark { width: 29px; height: 29px; display: flex; align-items: center; justify-content: center; gap: 3px; transform: rotate(-24deg); }
.brand-mark i { width: 4px; background: #315a47; border-radius: 3px; }
.brand-mark i:nth-child(1), .brand-mark i:nth-child(4) { height: 12px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { height: 25px; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.top-link { border: 0; background: none; color: #53645a; font-size: 14px; font-weight: 700; padding: 8px 3px; }
.top-link.selected, .top-link:hover { color: #214e3c; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #384e41; }
.icon-button:hover { background: #e9eee5; }
.eyebrow { font-size: 10px; line-height: 1.4; font-weight: 800; letter-spacing: 1.7px; color: #78926e; }
.eyebrow.light { color: #bde393; }
.hero { position: relative; overflow: hidden; padding: 35px 38px 39px; min-height: 346px; border-radius: 24px; background: #204839; color: white; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.hero-spark { color: #bde396; font-size: 27px; line-height: 1; }
.hero h1, .page-intro h1 { font: 800 clamp(34px, 6vw, 48px)/1.12 'Manrope', sans-serif; letter-spacing: -2px; }
.hero h1 { max-width: 410px; margin-top: 36px; position: relative; z-index: 1; }
.hero h1 span { color: #c8eba6; }
.hero p { max-width: 310px; margin: 14px 0 26px; color: #c8d9cd; font-size: 14px; line-height: 1.7; position: relative; z-index: 1; }
.hero-decoration { display: flex; gap: 10px; align-items: center; transform: rotate(38deg); position: absolute; right: -30px; bottom: 8px; opacity: .13; }
.hero-decoration span { display: block; width: 34px; height: 230px; border-radius: 40px; background: #d0edb5; }
.hero-decoration span:nth-child(2) { height: 300px; }
.button { border: 0; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 0 19px; font-size: 13px; font-weight: 800; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 17px; height: 17px; }
.button-lime { background: #d4eca9; color: #23442e; position: relative; z-index: 1; }
.button-lime:hover { background: #e0f3bc; }
.button-dark { color: #fff; background: #254d3d; }
.button-dark:hover { background: #32654d; }
.button-outline { color: #28543f; background: transparent; border: 1.5px dashed #9fbb9f; }
.button-outline:hover { background: #e9f1e7; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 16px 0 43px; }
.summary-card { min-height: 107px; border: 1px solid #e5eae1; border-radius: 17px; background: #fff; padding: 20px 23px; display: flex; flex-direction: column; justify-content: center; }
.summary-value { font: 800 29px/1 'Manrope', sans-serif; letter-spacing: -1px; }
.summary-label { margin-top: 8px; color: #78847b; font-size: 12px; font-weight: 600; }
.section { margin-top: 36px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-heading h2 { font: 800 23px/1.3 'Manrope', sans-serif; letter-spacing: -.7px; margin-top: 5px; }
.text-button { border: 0; background: none; color: #285b41; font-size: 12px; font-weight: 800; white-space: nowrap; display: flex; align-items: center; gap: 6px; padding: 7px 0; }
.text-button svg { width: 14px; height: 14px; }
.empty-card, .exercise-empty { border: 1px dashed #cdd8ca; background: #fcfdfa; border-radius: 17px; padding: 28px; text-align: center; }
.empty-symbol { font: 400 26px/1 'Manrope', sans-serif; color: #789a72; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 12px; width: 44px; height: 44px; background: #e9f1e4; }
.empty-card h3, .exercise-empty h3 { font: 800 16px 'Manrope', sans-serif; }
.empty-card p, .exercise-empty p { color: #77867b; font-size: 13px; margin-top: 5px; line-height: 1.6; }
.empty-card .button { margin-top: 18px; }
.footer { border-top: 1px solid #e7ebe4; padding: 23px 0 32px; font-size: 11px; font-weight: 600; color: #98a49b; display: flex; justify-content: space-between; }
.footer span { color: #94bd77; font-size: 17px; line-height: .7; }
.page-intro { margin: 21px 0 29px; }
.page-intro h1 { margin-top: 7px; }
.page-intro p { color: #79877d; font-size: 14px; line-height: 1.6; margin-top: 10px; }
.metadata-card { border: 1px solid #e4ebe1; border-radius: 19px; background: #fff; padding: 24px 27px 15px; }
.metadata-title { display: flex; align-items: center; gap: 11px; margin-bottom: 27px; }
.metadata-title h2 { font: 800 16px 'Manrope', sans-serif; letter-spacing: -.3px; }
.meta-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #eef4e9; color: #54775a; }
.meta-icon svg { width: 17px; height: 17px; }
.field-group { margin-bottom: 24px; }
.field-group.last { margin-bottom: 13px; }
.field-label { font-size: 12px; font-weight: 800; color: #516253; display: block; margin-bottom: 10px; }
.field-hint { color: #9ca99f; font-weight: 500; margin-left: 4px; }
.date-input { display: block; width: 100%; height: 45px; padding: 0 13px; background: #fafbf8; color: #23382d; border: 1px solid #e3eae0; border-radius: 9px; font-size: 14px; color-scheme: light; }
.choice-row { display: flex; gap: 8px; }
.choice { min-height: 40px; flex: 1; border: 1px solid #e3eae0; border-radius: 9px; background: #fafbf9; color: #6c796e; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 7px; }
.choice span { font-size: 12px; }
.choice.active { background: #e9f3df; color: #305a3e; border-color: #a9cc99; }
.heading-count { font: 700 12px 'DM Sans', sans-serif; display: inline-grid; place-items: center; vertical-align: 4px; width: 23px; height: 23px; margin-left: 4px; color: #587b57; background: #e8f1e2; border-radius: 50%; }
.exercise-card { background: #fff; border: 1px solid #e3eae1; border-radius: 17px; padding: 20px 23px 18px; margin-bottom: 12px; }
.exercise-card-header { display: flex; align-items: center; gap: 13px; margin-bottom: 21px; }
.exercise-index { color: #72926e; background: #edf4e9; border-radius: 9px; width: 37px; height: 37px; display: grid; place-items: center; flex: none; font: 800 13px 'Manrope', sans-serif; }
.exercise-info { flex: 1; min-width: 0; }
.exercise-info > span { color: #8aa17f; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.3px; }
.exercise-info h3, .recap-header h3 { margin-top: 2px; font: 800 16px/1.3 'Manrope', sans-serif; letter-spacing: -.4px; overflow-wrap: anywhere; }
.remove-exercise { color: #a3ada3; }
.sets-heading, .set-row { display: grid; grid-template-columns: 42px 1fr 1fr 31px; gap: 10px; align-items: center; }
.sets-heading { color: #a1ada2; font-size: 10px; font-weight: 800; letter-spacing: 1.1px; margin-bottom: 8px; }
.sets-heading small { font-size: 9px; color: #aeb8aa; }
.set-row { margin-bottom: 8px; }
.set-number { font: 800 12px 'Manrope', sans-serif; color: #90a28c; }
.set-row input { width: 100%; min-width: 0; height: 42px; border: 1px solid #e5ebe2; background: #fafbf8; border-radius: 8px; padding: 0 11px; font-size: 14px; color: #263d2d; }
.set-row input::placeholder { color: #b4bdb1; }
.remove-set { border: 0; background: transparent; color: #adb7ac; padding: 4px; display: grid; place-items: center; }
.remove-set svg { width: 16px; height: 16px; }
.remove-set:hover, .remove-exercise:hover { color: #ae5c51; }
.add-set { color: #43794f; background: none; border: 0; display: flex; align-items: center; gap: 7px; padding: 8px 0 0 52px; font-size: 12px; font-weight: 800; }
.add-set svg { width: 15px; height: 15px; }
.add-exercise { width: 100%; margin-top: 4px; }
.finish-bar { margin: 27px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finish-bar > span { font-size: 12px; color: #8d9d8d; font-weight: 700; }
.history-list { display: grid; gap: 12px; }
.history-card { display: flex; flex-direction: column; width: 100%; text-align: left; background: #fff; border: 1px solid #e3eae1; border-radius: 16px; padding: 20px 23px 17px; color: inherit; }
.history-card:hover { border-color: #abc7a5; }
.history-date { color: #769271; font-size: 11px; font-weight: 800; }
.history-title { font: 800 16px/1.4 'Manrope', sans-serif; margin: 8px 0 13px; overflow-wrap: anywhere; }
.history-bottom { display: flex; align-items: center; justify-content: space-between; color: #8b998c; font-size: 12px; font-weight: 600; }
.history-arrow { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #eef4e9; color: #3b6a45; }
.history-arrow svg { width: 15px; height: 15px; }
.back-button { display: flex; align-items: center; gap: 7px; background: none; border: 0; padding: 12px 0 0; color: #527758; font-size: 12px; font-weight: 800; }
.back-button svg { width: 15px; height: 15px; }
.detail-intro { margin-top: 24px; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-meta > div { padding: 17px 21px; background: #fff; border: 1px solid #e4eae0; border-radius: 13px; display: flex; flex-direction: column; gap: 7px; }
.detail-meta span { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: #8aa283; }
.detail-meta strong { font: 800 16px 'Manrope', sans-serif; }
.recap-card { padding: 20px 23px; margin-bottom: 12px; border: 1px solid #e3eae1; background: #fff; border-radius: 16px; }
.recap-header { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
.recap-sets { border-top: 1px solid #edf0ea; }
.recap-sets > div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0ea; font-size: 12px; }
.recap-sets > div:last-child { border-bottom: 0; padding-bottom: 0; }
.recap-sets > div > span { color: #87968a; }
.recap-sets strong { font-weight: 800; }
.recap-sets strong span { color: #aab9a5; padding: 0 3px; }
.delete-link { border: 0; background: none; color: #a9635d; text-decoration: underline; font-size: 12px; font-weight: 700; margin: 13px 0; padding: 6px 0; }
.modal-open { overflow: hidden; }
.modal-scrim { position: fixed; inset: 0; z-index: 10; background: #12251dcc; display: flex; align-items: flex-end; justify-content: center; }
.modal-panel { width: 100%; max-width: 670px; max-height: min(90dvh, 850px); overflow-y: auto; background: #fdfefa; border-radius: 23px 23px 0 0; padding: 27px 27px max(29px, env(safe-area-inset-bottom)); box-shadow: 0 -18px 60px #0d2a2230; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-header h2 { font: 800 23px 'Manrope', sans-serif; letter-spacing: -.8px; margin-top: 4px; }
.modal-header .icon-button { margin: -3px -8px 0 0; }
.modal-description { font-size: 13px; line-height: 1.6; color: #788779; margin: -7px 0 20px; }
.search-input, .custom-form input, .custom-form select { width: 100%; height: 45px; padding: 0 14px; border: 1px solid #e0e8df; border-radius: 9px; outline: none; color: #273b2c; background: #fff; font-size: 13px; }
.search-input:focus, .custom-form input:focus, .custom-form select:focus { border-color: #91bb82; }
.search-input::placeholder, .custom-form input::placeholder { color: #abb7a9; }
.filter-row { display: flex; gap: 7px; overflow-x: auto; padding: 15px 0 17px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; border: 1px solid #e0e8dd; border-radius: 20px; padding: 7px 12px; color: #657968; background: #fff; font-size: 11px; font-weight: 700; }
.filter-chip.active { background: #28543f; border-color: #28543f; color: #fff; }
.exercise-options { max-height: 38dvh; overflow-y: auto; padding: 2px 4px 2px 0; }
.option-group { margin-bottom: 14px; }
.option-group > .eyebrow { display: block; margin-bottom: 6px; }
.exercise-option { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid #edf0e9; padding: 11px 3px; color: #314436; background: transparent; font-size: 13px; font-weight: 700; text-align: left; }
.exercise-option:hover { color: #427f53; }
.exercise-option svg { width: 17px; height: 17px; color: #71a173; }
.no-results { color: #889588; font-size: 13px; padding: 17px 0; }
.custom-form { border-top: 1px solid #e6ece3; margin-top: 15px; padding-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 126px auto; gap: 8px; }
.custom-form > .eyebrow { grid-column: 1 / -1; }
.custom-form .button { padding: 0 14px; min-height: 45px; }
.custom-form .button svg { width: 15px; height: 15px; }
.modal-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid #e9eee7; background: none; text-align: left; color: #284233; cursor: pointer; }
.modal-option > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.modal-option strong { font-size: 13px; }
.modal-option small { font-size: 11px; color: #8d9d8f; }
.modal-option > svg { width: 16px; height: 16px; }
.option-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; background: #eaf3e5; color: #527b50; }
.option-icon svg { width: 17px; height: 17px; }
.import-option { position: relative; }
.import-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.import-option:focus-within { outline: 3px solid #85b65f; outline-offset: 3px; }
.install-area { margin-top: 22px; padding: 15px; background: #eef3e9; border-radius: 11px; }
.install-area p { color: #5e765f; font-size: 12px; line-height: 1.6; }
.install-area .button { width: 100%; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #1f3f30; color: #fff; border-radius: 10px; padding: 12px 17px; font-size: 12px; font-weight: 700; box-shadow: 0 8px 22px #16351f33; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; width: max-content; max-width: calc(100vw - 36px); text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .modal-scrim { align-items: center; padding: 20px; }
  .modal-panel { border-radius: 20px; }
  .small-modal { max-width: 450px; }
}

@media (max-width: 520px) {
  .shell { padding: 0 19px; }
  .topbar { height: 77px; }
  .hero { min-height: 325px; padding: 28px 25px 32px; }
  .hero h1 { margin-top: 37px; }
  .hero-decoration { right: -89px; }
  .summary-card { padding: 18px; min-height: 100px; }
  .summary-grid { margin-bottom: 36px; }
  .page-intro { margin-top: 20px; }
  .metadata-card { padding: 21px 19px 10px; }
  .exercise-card { padding: 18px 16px; }
  .sets-heading, .set-row { grid-template-columns: 28px 1fr 1fr 24px; gap: 7px; }
  .set-row input { padding: 0 8px; }
  .add-set { padding-left: 35px; }
  .modal-panel { padding: 24px 19px max(25px, env(safe-area-inset-bottom)); }
  .custom-form { grid-template-columns: minmax(0, 1fr) 110px; }
  .custom-form .button { grid-column: 1 / -1; }
  .finish-bar .button { padding: 0 13px; }
}

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