/* MeasureME training space — scoped to the Gym panel. */
#panel-gym { --gym-ink: #19231f; --gym-lime: #d8f16f; --gym-muted: #69736c; }
#panel-gym .gym-view.on { animation: gymViewIn .36s cubic-bezier(.2,.8,.2,1) both; }
@keyframes gymViewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

#panel-gym .gym-overview {
  position: relative; overflow: hidden; min-height: 282px; padding: 24px 28px 0;
  border-radius: 24px; background: var(--gym-ink); color: #f7f8ed;
  margin-bottom: 30px; isolation: isolate;
}
#panel-gym .gym-overview::after {
  content: ''; position: absolute; width: 260px; height: 260px; right: -75px; top: 6px;
  border: 1px solid rgba(216,241,111,.16); border-radius: 50%; box-shadow: 0 0 0 46px rgba(216,241,111,.035), 0 0 0 94px rgba(216,241,111,.025);
  pointer-events: none; z-index: -1;
}
#panel-gym .gym-overview-top, #panel-gym .gym-overview-middle { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
#panel-gym .gym-overview-middle { align-items: flex-end; padding: 24px 0 29px; }
#panel-gym .gym-kicker, #panel-gym .gym-section-kicker, #panel-gym .gym-create-label, #panel-gym .gym-detail-index {
  display: inline-flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: .16em; line-height: 1.3;
}
#panel-gym .gym-kicker { color: var(--gym-lime); }
#panel-gym .gym-kicker-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#panel-gym .gym-kicker-index { color: #a4aca4; margin-left: 4px; }
#panel-gym .gym-overview h1 { font-family: 'Bebas Neue', Impact, sans-serif; font-weight: 400; font-size: clamp(48px, 9vw, 76px); line-height: .85; letter-spacing: .015em; }
#panel-gym .gym-overview h1 em { color: var(--gym-lime); font-style: normal; }
#panel-gym .gym-overview-middle p { color: #b7c0b7; font-size: 13px; line-height: 1.5; margin-top: 14px; }
#panel-gym .gym-motion-mark { display: flex; gap: 5px; align-items: flex-end; flex-shrink: 0; height: 75px; padding: 0 0 4px; }
#panel-gym .gym-motion-mark i { width: 8px; height: var(--h); background: var(--gym-lime); border-radius: 8px; transform-origin: bottom; animation: gymBars .75s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--delay); }
#panel-gym .gym-motion-mark i:nth-child(1) { --h: 27px; --delay: .08s; opacity: .42; }
#panel-gym .gym-motion-mark i:nth-child(2) { --h: 46px; --delay: .14s; opacity: .65; }
#panel-gym .gym-motion-mark i:nth-child(3) { --h: 70px; --delay: .20s; }
#panel-gym .gym-motion-mark i:nth-child(4) { --h: 52px; --delay: .26s; opacity: .72; }
#panel-gym .gym-motion-mark i:nth-child(5) { --h: 36px; --delay: .32s; opacity: .48; }
@keyframes gymBars { from { transform: scaleY(.15); opacity: 0; } to { transform: scaleY(1); } }
#panel-gym .gym-overview-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
#panel-gym .gym-overview-stats > div { display: flex; align-items: baseline; gap: 9px; padding: 16px 0 18px; }
#panel-gym .gym-overview-stats > div + div { border-left: 1px solid rgba(255,255,255,.14); padding-left: 24px; }
#panel-gym .gym-overview-stats strong { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 31px; line-height: 1; font-weight: 400; color: var(--gym-lime); }
#panel-gym .gym-overview-stats span { font-size: 11px; font-weight: 600; color: #b7c0b7; }
#panel-gym .gym-overview .gym-timer-btn { width: auto; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 11px; }
#panel-gym .gym-overview .gym-timer-btn:hover { background: rgba(255,255,255,.2); border-color: var(--gym-lime); }

#panel-gym .gym-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
#panel-gym .gym-section-kicker, #panel-gym .gym-create-label { color: #737d71; }
#panel-gym .gym-section-heading h2 { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 34px; line-height: 1; font-weight: 400; margin-top: 8px; letter-spacing: .02em; }
#panel-gym .gym-section-heading h2 span { vertical-align: top; font: 700 11px 'DM Sans', sans-serif; letter-spacing: .04em; color: var(--accent); margin-left: 6px; }
#panel-gym .gym-section-note { font-size: 12px; color: var(--text-3); padding-bottom: 3px; text-align: right; }
#panel-gym .gym-create-label { margin: 0 0 9px 2px; }
#panel-gym .gym-add-row { gap: 0; align-items: stretch; margin-bottom: 22px; background: #fff; padding: 5px; border: 1px solid #d8ddd6; border-radius: 15px; transition: box-shadow .2s, border-color .2s; }
#panel-gym .gym-add-row:focus-within { border-color: var(--gym-ink); box-shadow: 0 0 0 3px rgba(25,35,31,.08); }
#panel-gym .gym-add-input { min-width: 0; height: 45px; border: 0; border-radius: 10px; padding: 0 14px; background: transparent; font-size: 14px; box-shadow: none; }
#panel-gym .gym-add-input:focus { border: 0; box-shadow: none; }
#panel-gym .gym-add-btn { height: 45px; border-radius: 10px; background: var(--gym-ink); padding: 0 17px; display: flex; align-items: center; gap: 9px; transition: background .2s, transform .2s; }
#panel-gym .gym-add-btn:hover { background: #344a3d; transform: translateY(-1px); }
#panel-gym .gym-add-btn:active { transform: scale(.97); }
#panel-gym .gym-add-plus { font-size: 20px; font-weight: 400; line-height: 1; }

#panel-gym .gcard { position: relative; min-height: 94px; border: 1px solid #e1e4dd; border-radius: 17px; padding: 17px 18px; margin-bottom: 10px; gap: 14px; box-shadow: none; background: #fff; overflow: hidden; transition: transform .24s cubic-bezier(.2,.8,.2,1), border-color .24s, box-shadow .24s; animation: gymCardIn .4s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--gym-order) * 45ms); }
@keyframes gymCardIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
#panel-gym .gcard::before { content: ''; position: absolute; width: 4px; top: 16px; bottom: 16px; left: 0; background: var(--accent); border-radius: 0 4px 4px 0; transform: scaleY(0); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
#panel-gym .gcard:hover { transform: translateY(-3px); border-color: #b5c1b0; box-shadow: 0 12px 28px rgba(25,35,31,.09); }
#panel-gym .gcard:hover::before, #panel-gym .gcard:focus-visible::before { transform: scaleY(1); }
#panel-gym .gcard:active { transform: scale(.99); }
#panel-gym .gcard-open { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; align-self: stretch; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; color: inherit; padding: 0; }
#panel-gym button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#panel-gym .gcard-number { flex: 0 0 49px; font: 400 30px/1 'Bebas Neue', Impact, sans-serif; color: var(--gym-ink); border-right: 1px solid #e2e6df; }
#panel-gym .gcard-number span { display: block; font: 700 9px 'DM Sans', sans-serif; letter-spacing: .1em; color: #a3ada1; margin-top: 4px; }
#panel-gym .gcard-name { display: block; font-size: 17px; font-weight: 700; line-height: 1.2; }
#panel-gym .gcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; margin-top: 7px; color: var(--gym-muted); }
#panel-gym .gcard-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #abb3a8; }
#panel-gym .gcard-arrow { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #edf3e2; color: var(--gym-ink); font-size: 20px; line-height: 1; transition: transform .25s, background .25s; }
#panel-gym .gcard:hover .gcard-arrow { transform: rotate(45deg); background: var(--gym-lime); }
#panel-gym .gcard-del { width: 32px; height: 32px; border-radius: 9px; }
#panel-gym #gym-workouts-empty { background: #fff; border: 1px dashed #cbd3c6; border-radius: 18px; padding: 34px 20px; }

#panel-gym .gym-nav { margin: 0 0 14px; justify-content: space-between; }
#panel-gym .gym-back { background: transparent; border: 0; padding: 0 3px; color: var(--gym-muted); font-size: 13px; }
#panel-gym .gym-back:hover { color: var(--gym-ink); border: 0; }
#panel-gym .gym-detail-index { color: #899286; }
#panel-gym .gym-detail-hero { display: flex; justify-content: space-between; align-items: end; gap: 16px; background: var(--gym-ink); color: #fff; border-radius: 22px; min-height: 173px; padding: 24px 27px; margin-bottom: 22px; overflow: hidden; position: relative; }
#panel-gym .gym-detail-hero::before { content: ''; position: absolute; width: 230px; height: 230px; border: 1px solid rgba(216,241,111,.16); border-radius: 50%; right: -40px; top: -90px; pointer-events: none; }
#panel-gym .gym-detail-hero > div:first-child { min-width: 0; position: relative; }
#panel-gym .gym-detail-hero .gym-view-title { display: block; font-size: clamp(36px, 6vw, 54px); line-height: .96; white-space: normal; overflow-wrap: anywhere; margin: 18px 0 8px; text-transform: none; }
#panel-gym .gym-detail-hero p { color: #b7c0b7; font-size: 12px; }
#panel-gym .gym-detail-symbol { display: grid; place-items: center; border: 1px solid rgba(216,241,111,.55); border-radius: 50%; width: 58px; height: 58px; color: var(--gym-lime); flex: 0 0 58px; font-size: 34px; line-height: 1; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
#panel-gym .gym-detail-hero:hover .gym-detail-symbol { transform: rotate(45deg); }
#panel-gym .gym-ex-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
#panel-gym .gym-ex-tools { display: flex; align-items: center; gap: 7px; }
#panel-gym .gym-vtog-group { gap: 2px; padding: 3px; border-radius: 11px; background: #e9ede5; }
#panel-gym .gym-vtog { border: 0; background: transparent; border-radius: 8px; width: 34px; height: 34px; }
#panel-gym .gym-vtog.on { background: #fff; color: var(--gym-ink); box-shadow: 0 1px 4px rgba(25,35,31,.12); }
#panel-gym .gym-ex-tools > .gym-timer-btn { border-radius: 11px; width: 40px; height: 40px; background: #fff; border-color: #e1e4dd; }

#panel-gym .excard { border: 1px solid #e1e4dd; border-radius: 17px; box-shadow: none; margin-bottom: 11px; background: #fff; animation: gymCardIn .4s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--gym-order) * 45ms); transition: border-color .2s, box-shadow .2s; }
#panel-gym .excard:hover { border-color: #b5c1b0; box-shadow: 0 9px 24px rgba(25,35,31,.07); }
#panel-gym .excard-main { padding: 15px; gap: 13px; }
#panel-gym .excard-gif, #panel-gym .excard-gif-ph { width: 74px; height: 74px; border-radius: 12px; }
#panel-gym .excard-index { font-size: 9px; font-weight: 800; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; margin-bottom: 5px; }
#panel-gym .excard-index span { color: #899286; letter-spacing: .04em; }
#panel-gym .excard-name { font-size: 16px; line-height: 1.24; }
#panel-gym .excard-last { margin-top: 7px; }
#panel-gym .excard-last-val { font-size: 26px; }
#panel-gym .excard-log-btn { background: var(--gym-ink); border-radius: 9px; transition: background .2s, transform .2s; }
#panel-gym .excard-log-btn:hover { background: #344a3d; transform: translateY(-1px); }
#panel-gym .excard-log-btn:active { transform: scale(.97); }
#panel-gym .excard-hist { display: grid; grid-template-rows: 0fr; opacity: 0; border-top: 0; transition: grid-template-rows .28s cubic-bezier(.2,.8,.2,1), opacity .22s; }
#panel-gym .excard-hist.on { grid-template-rows: 1fr; opacity: 1; border-top: 1px solid #e1e4dd; }
#panel-gym .excard-hist-inner { min-height: 0; overflow: hidden; padding: 0 15px; }
#panel-gym .excard-hist.on .excard-hist-inner { padding: 12px 15px 14px; }
#panel-gym .gym-addex-btn { background: #f0f3eb; border: 1px dashed #b8c4b1; color: var(--gym-ink); min-height: 56px; border-radius: 14px; font-weight: 700; margin-top: 13px; }
#panel-gym .gym-addex-btn:hover { background: #e6efdb; border-color: var(--gym-ink); color: var(--gym-ink); }
#panel-gym .gym-ptable-wrap { border-radius: 15px; }

/* Sheets keep the same visual language while preserving their existing actions. */
.gym-search-sheet, .gym-log-sheet, .gym-edit-sheet { background: #f9faf6; border-radius: 24px 24px 0 0; }
.gym-search-hdr, .gym-log-hdr { border-bottom-color: #e0e5dc; }
.gym-search-title, .gym-log-title { font-size: 27px; color: #19231f; }
.gym-search-tab { border: 0; background: #e9ede5; color: #58665b; border-radius: 10px; }
.gym-search-tab.on { background: #19231f; color: #fff; }
.gym-search-inp, .gym-manual-inp, .gym-log-inp { border-color: #d8ddd6; background: #fff; }
.gym-search-inp:focus, .gym-manual-inp:focus, .gym-log-inp:focus { border-color: #19231f; box-shadow: 0 0 0 3px rgba(25,35,31,.1); }
.gym-search-item { margin: 4px 12px; padding: 10px; border: 1px solid #e1e5dd; border-radius: 13px; background: #fff; transition: transform .2s, border-color .2s; }
.gym-search-item:hover { background: #fff; border-color: #adbaa7; transform: translateX(3px); }
.gym-search-item-add { background: #e9f3d1; color: #19231f; }
.gym-search-item-add:hover { background: #d8f16f; color: #19231f; }
.gym-img-upload { background: #f0f3eb; border-color: #b8c4b1; }
.gym-log-inp { height: 84px; border-radius: 13px; }
.gym-log-field label, .gym-manual-lbl { color: #69736c; }
.gym-log-foot .btn-save, .gym-manual-panel .btn-save { background: #19231f; border-radius: 11px; }
.gym-log-foot .btn-save:hover, .gym-manual-panel .btn-save:hover { background: #344a3d; }
.gym-timer-sheet { border-radius: 23px; background: #f9faf6; }
.gym-timer-hdr { padding: 18px 22px 10px; }
.gym-timer-hdr-title { font-size: 28px; color: #19231f; }
.timer-btn-main:not(.go):not(:disabled) { background: #19231f; box-shadow: none; }
.timer-btn-main:not(.go):not(:disabled):hover { background: #344a3d; box-shadow: none; }

@media (max-width: 600px) {
  #panel-gym .gym-overview { min-height: 0; padding: 20px 20px 0; border-radius: 20px; margin-bottom: 26px; }
  #panel-gym .gym-overview-middle { padding: 28px 0 25px; }
  #panel-gym .gym-overview h1 { font-size: clamp(48px, 13vw, 66px); }
  #panel-gym .gym-overview-middle p { max-width: 210px; font-size: 11px; }
  #panel-gym .gym-motion-mark { transform: scale(.72); transform-origin: right bottom; margin-left: -16px; }
  #panel-gym .gym-overview-stats > div { flex-direction: column; gap: 2px; padding: 13px 0 15px; }
  #panel-gym .gym-overview-stats > div + div { padding-left: 15px; }
  #panel-gym .gym-overview-stats strong { font-size: 28px; }
  #panel-gym .gym-overview-stats span { font-size: 10px; }
  #panel-gym .gym-section-note { display: none; }
  #panel-gym .gcard { min-height: 86px; gap: 9px; padding: 13px 11px 13px 14px; }
  #panel-gym .gcard-open { gap: 9px; }
  #panel-gym .gcard-number { flex-basis: 37px; font-size: 26px; }
  #panel-gym .gcard-name { font-size: 15px; }
  #panel-gym .gcard-arrow { flex-basis: 29px; width: 29px; height: 29px; }
  #panel-gym .gcard-del { width: 29px; height: 29px; }
  #panel-gym .gym-detail-hero { min-height: 155px; padding: 21px; }
  #panel-gym .gym-detail-symbol { width: 48px; height: 48px; flex-basis: 48px; font-size: 29px; }
  #panel-gym .excard-main { flex-wrap: wrap; gap: 10px; }
  #panel-gym .excard-drag { width: 15px; margin-left: -5px; }
  #panel-gym .excard-gif, #panel-gym .excard-gif-ph { width: 58px; height: 58px; }
  #panel-gym .excard-body { flex-basis: calc(100% - 95px); }
  #panel-gym .excard-actions { flex: 1 1 100%; flex-direction: row; padding-left: 21px; }
  #panel-gym .excard-log-btn { flex: 1; }
  #panel-gym .excard-btns-row { flex: 1; }
  #panel-gym .excard-hist-btn, #panel-gym .excard-edit-btn, #panel-gym .excard-del-btn { height: 42px; }
}
@media (max-width: 360px) {
  #panel-gym .gym-add-input { padding: 0 9px; font-size: 12px; }
  #panel-gym .gym-add-btn { padding: 0 11px; }
  #panel-gym .gym-ex-toolbar { align-items: flex-start; flex-direction: column; }
  #panel-gym .gym-ex-tools { width: 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  #panel-gym .gym-view.on, #panel-gym .gcard, #panel-gym .excard, #panel-gym .gym-motion-mark i { animation: none !important; }
  #panel-gym .gcard, #panel-gym .gcard::before, #panel-gym .gcard-arrow, #panel-gym .gym-add-btn, #panel-gym .excard, #panel-gym .excard-hist, #panel-gym .gym-detail-symbol, #panel-gym .excard-log-btn { transition: none !important; }
  .gym-search-overlay.on, .gym-log-overlay.on, .gym-edit-overlay.on, .gym-timer-overlay.on,
  .gym-search-sheet, .gym-log-sheet, .gym-edit-sheet, .gym-timer-sheet, .timer-digits.tick, .timer-complete-pop, .timer-ring-flash, .gym-timer-btn.running { animation: none !important; }
}
