:root {
  --bg: #0b0f14;
  --bg-soft: #10161f;
  --panel: #131b26;
  --panel-2: #18222f;
  --border: #243040;
  --border-soft: #1c2634;
  --text: #e6edf3;
  --muted: #8b98a9;
  --muted-2: #64748b;
  --accent: #4ade80;
  --accent-dim: #1f7a4a;
  --blue: #38bdf8;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #a78bfa;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 15% -10%, rgba(74, 222, 128, 0.12), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.10), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  pointer-events: none;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 1.35rem; line-height: 1; }
.brand-text { letter-spacing: 0.3px; }
.topbar-actions { display: flex; gap: 8px; }

/* ---------- layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 26px 20px 40px; }

.empty { text-align: center; padding: 6vh 10px 0; }
.empty h1 { font-size: clamp(1.8rem, 4.4vw, 2.9rem); letter-spacing: -0.5px; margin-bottom: 14px; }
.empty .lead { max-width: 620px; margin: 0 auto 26px; color: var(--muted); font-size: 1.05rem; }

.feature-row {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
  text-align: left;
}
.feature-row li {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.feature-row strong { color: var(--accent); font-size: 0.95rem; }
.feature-row span { color: var(--muted); font-size: 0.86rem; }

/* ---------- buttons ---------- */
.btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn:hover { background: #1f2b3a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #05240f; }
.btn-primary:hover { background: #5ee592; }
.btn-ghost { background: transparent; }
.btn-danger { color: #fca5a5; border-color: #5b2323; }
.btn-danger:hover { background: #2a1414; }
.btn-lg { font-size: 1rem; padding: 13px 26px; border-radius: 11px; }
.btn-sm { font-size: 0.8rem; padding: 6px 11px; }

/* ---------- dashboard ---------- */
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.dash-head h2 { font-size: 1.4rem; letter-spacing: -0.3px; }
.cycle-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
}
.pill.train { color: var(--accent); border-color: var(--accent-dim); }
.pill.rest { color: var(--muted-2); }

.cards { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; margin-bottom: 16px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }

.verdict { display: flex; align-items: center; gap: 18px; }
.score-ring {
  --p: 0;
  width: 104px; height: 104px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--ring-color, var(--accent)) calc(var(--p) * 1%), var(--border-soft) 0);
  position: relative;
}
.score-ring::before {
  content: "";
  position: absolute; inset: 9px;
  border-radius: 50%;
  background: var(--panel);
}
.score-ring .score-num { position: relative; font-size: 1.5rem; font-weight: 700; }
.score-ring .score-num small { font-size: 0.7rem; color: var(--muted); display: block; text-align: center; font-weight: 500; }
.verdict-text h4 { font-size: 1.15rem; margin-bottom: 4px; }
.verdict-text p { color: var(--muted); font-size: 0.9rem; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.stat .k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.stat .v { font-size: 1.35rem; font-weight: 700; margin-top: 2px; }
.stat .v small { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* fix list */
.fix-list { display: flex; flex-direction: column; gap: 2px; }
.fix-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: var(--radius-sm); font-size: 0.9rem;
}
.fix-row + .fix-row { border-top: 1px solid var(--border-soft); }
.fix-name { font-weight: 600; min-width: 96px; }
.fix-note { color: var(--muted); }
.fix-note strong { color: var(--text); font-variant-numeric: tabular-nums; }
.fix-note em { color: var(--muted-2); font-style: normal; }
.fix-none { color: var(--accent); font-size: 0.92rem; }

/* muscle list */
.muscle-list { display: flex; flex-direction: column; gap: 3px; }
.muscle-row {
  display: grid;
  grid-template-columns: 118px 1fr 74px;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.muscle-row + .muscle-row { border-top: 1px solid var(--border-soft); border-top-left-radius: 0; border-top-right-radius: 0; }
.muscle-row:hover { background: var(--panel-2); }
.muscle-row.minor { opacity: 0.72; }
.muscle-name { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.muscle-name .tag { font-size: 0.62rem; color: var(--muted-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 999px; font-weight: 500; }

.bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s cubic-bezier(.2,.7,.3,1); }
.bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(230,237,243,0.55); }
.bar-mark.mrv { background: rgba(239,68,68,0.8); }
.muscle-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.9rem; }
.muscle-val small { display: block; font-weight: 500; font-size: 0.68rem; color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 0.78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* day breakdown */
.days { display: grid; gap: 12px; }
.day-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.day-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; cursor: pointer; user-select: none;
}
.day-head:hover { background: var(--panel-2); }
.day-head .title { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.day-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.day-badge.rest { color: var(--muted-2); }
.day-body { padding: 4px 16px 14px; border-top: 1px solid var(--border-soft); }
.day-ex { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.day-ex:last-child { border-bottom: none; }
.day-ex img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--panel-2); flex: none; }
.day-ex .ex-info { flex: 1; min-width: 0; }
.day-ex .ex-name { font-weight: 600; font-size: 0.9rem; }
.day-ex .ex-muscles { color: var(--muted); font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-ex .ex-sets { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.day-ex .ex-sets small { font-weight: 500; color: var(--muted); }
.day-empty { color: var(--muted); font-size: 0.86rem; padding: 12px 0; }

/* ---------- modal / wizard ---------- */
.modal-root {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 7, 11, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal {
  width: 100%; max-width: 560px;
  max-height: 92vh;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: pop 0.16s ease-out;
}
@keyframes pop { from { transform: scale(0.97) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 18px 20px 0; position: relative; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 1rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { background: var(--panel-2); color: var(--text); }
.modal-step { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; }
.modal-title { font-size: 1.28rem; margin-top: 4px; letter-spacing: -0.3px; }
.modal-sub { color: var(--muted); font-size: 0.9rem; margin-top: 5px; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(0,0,0,0.15);
}
.modal-foot .grow { flex: 1; }
.progress { height: 4px; background: var(--border-soft); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width 0.3s ease; }

/* cycle builder */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  font-family: inherit; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text); padding: 8px 13px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
}
.seg button.active { background: var(--accent); color: #05240f; border-color: var(--accent); }
.seg button:hover:not(.active) { background: var(--panel-2); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { width: 40px; height: 40px; font-size: 1.2rem; background: var(--panel); border: none; color: var(--text); cursor: pointer; }
.stepper button:hover { background: var(--panel-2); }
.stepper input { width: 54px; height: 40px; text-align: center; background: transparent; border: none; color: var(--text); font-family: inherit; font-size: 1rem; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.day-toggle-row { display: flex; flex-wrap: wrap; gap: 8px; }
.day-toggle {
  width: 46px; height: 52px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--muted); cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 0.7rem; font-weight: 700;
}
.day-toggle .n { font-size: 1rem; }
.day-toggle.train { border-color: var(--accent-dim); background: rgba(74,222,128,0.10); color: var(--accent); }
.day-toggle.rest { color: var(--muted-2); background: var(--bg-soft); }
.quickfill { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; }

/* exercise picker */
.search-box { position: relative; }
.search-box input {
  width: 100%; font-family: inherit; font-size: 0.95rem;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
}
.search-box input:focus { outline: none; border-color: var(--accent); }
.results { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.result {
  display: flex; align-items: center; gap: 11px; padding: 8px;
  border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent;
}
.result:hover, .result.active { background: var(--panel-2); border-color: var(--border); }
.result img { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; background: var(--panel-2); flex: none; }
.result .r-info { min-width: 0; flex: 1; }
.result .r-name { font-weight: 600; font-size: 0.88rem; }
.result .r-meta { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result .r-add { color: var(--accent); font-weight: 700; font-size: 1.2rem; flex: none; }
.no-results { color: var(--muted); font-size: 0.86rem; padding: 12px; text-align: center; }

.picked { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.picked-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px;
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.picked-item img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; background: var(--panel-2); flex: none; }
.picked-item .p-info { flex: 1; min-width: 0; }
.picked-item .p-name { font-weight: 600; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked-item .p-sets { font-size: 0.76rem; color: var(--muted); }
.icon-btn { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { color: var(--red); background: rgba(239,68,68,0.1); }

.sets-picker { text-align: center; }
.sets-picker .ex-head { display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 16px; }
.sets-picker .ex-head img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--panel-2); }
.sets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.sets-grid button {
  font-family: inherit; cursor: pointer; padding: 14px 0; font-size: 1.1rem; font-weight: 700;
  border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: var(--radius-sm);
}
.sets-grid button.active { background: var(--accent); color: #05240f; border-color: var(--accent); }
.sets-grid button:hover:not(.active) { background: var(--panel-2); }
.sets-grid button small { display: block; font-size: 0.64rem; font-weight: 500; opacity: 0.75; }

.summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-day { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--panel); }
.summary-day h5 { font-size: 0.85rem; margin-bottom: 4px; }
.summary-day p { color: var(--muted); font-size: 0.8rem; }

/* toast */
.toast-root { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 16px; border-radius: 999px;
  font-size: 0.85rem; box-shadow: var(--shadow); animation: toastin 0.2s ease;
}
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
  padding: 10px 16px; font-size: 0.74rem; color: var(--muted-2);
  background: rgba(11,15,20,0.9); border-top: 1px solid var(--border-soft);
}

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .muscle-row { grid-template-columns: 92px 1fr 62px; gap: 9px; }
  .topbar-actions #btn-edit { display: none; }
  .brand-text { display: none; }
}

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 999px; padding: 3px; }
.tab {
  font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: none; background: transparent; color: var(--muted);
  padding: 7px 16px; border-radius: 999px;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #05240f; }
.lead-sm { color: var(--muted); font-size: 0.88rem; margin: 4px 0 14px; }

/* ---------- catalog ---------- */
.catalog-head h2 { font-size: 1.4rem; letter-spacing: -0.3px; }
.catalog-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 18px; align-items: center; }
.cat-search {
  flex: 1 1 240px; min-width: 200px; font-family: inherit; font-size: 0.95rem;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
}
.cat-search:focus { outline: none; border-color: var(--accent); }
.select {
  font-family: inherit; font-size: 0.88rem; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--panel); color: var(--text); cursor: pointer; max-width: 190px;
}
.select:focus { outline: none; border-color: var(--accent); }
.select-sm { padding: 6px 8px; font-size: 0.8rem; max-width: 100px; }
.check-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; color: var(--muted); cursor: pointer; user-select: none; }
.check-inline input { accent-color: var(--accent); width: 15px; height: 15px; }
.cat-count { grid-column: 1 / -1; color: var(--muted); font-size: 0.82rem; margin-bottom: 2px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-card {
  display: flex; gap: 12px; padding: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.08s, background 0.15s;
}
.cat-card:hover { border-color: var(--accent-dim); background: var(--panel-2); }
.cat-card:active { transform: translateY(1px); }
.cat-card.is-hidden { opacity: 0.5; }
.cat-card img { width: 58px; height: 58px; border-radius: 9px; object-fit: cover; background: var(--panel-2); flex: none; }
.cat-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.cat-name { font-weight: 600; font-size: 0.88rem; line-height: 1.25; }
.cat-muscles { color: var(--muted); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.chip {
  display: inline-flex; align-items: center; font-size: 0.74rem; font-weight: 500;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--muted);
}
.chip-sm { font-size: 0.66rem; padding: 2px 7px; }
.chip-primary { color: var(--accent); border-color: var(--accent-dim); background: rgba(74,222,128,0.08); }
.chip-warn { color: var(--amber); border-color: #5c4212; }
.cat-more { grid-column: 1 / -1; justify-self: center; }

/* ---------- detail modal ---------- */
.detail-images { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.detail-images:has(.detail-img:only-child) { grid-template-columns: 1fr; }
.detail-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--panel-2); }
.detail-h { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin: 18px 0 9px; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-empty { color: var(--muted); font-size: 0.88rem; }
.instructions { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.instructions li { font-size: 0.9rem; color: #cfd8e3; line-height: 1.5; }

/* ---------- suggestions ---------- */
.sugg-title { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.4px; color: var(--text); margin: 16px 0 8px; text-transform: uppercase; }
.sugg-title:first-of-type { margin-top: 4px; }
.sugg-list { display: flex; flex-direction: column; gap: 6px; }
.sugg {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px;
  background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.sugg-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--panel); flex: none; cursor: pointer; }
.sugg-info { flex: 1; min-width: 0; }
.sugg-name { font-weight: 600; font-size: 0.88rem; }
.sugg-meta { color: var(--muted); font-size: 0.78rem; }
.sugg-meta strong { color: var(--accent); font-weight: 600; }
.sugg-actions { display: flex; align-items: center; gap: 7px; flex: none; }

/* ---------- settings ---------- */
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.eq-item { padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.eq-item.on { border-color: var(--accent-dim); background: rgba(74,222,128,0.08); }
.hidden-list { display: flex; flex-wrap: wrap; gap: 7px; }
.hidden-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem;
  padding: 5px 6px 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--muted);
}
.hidden-chip .icon-btn { font-size: 0.85rem; padding: 2px 5px; }

@media (max-width: 760px) {
  .tabs { order: 3; width: 100%; justify-content: center; }
  .topbar { flex-wrap: wrap; }
  .sugg { flex-wrap: wrap; }
  .sugg-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- detailed muscle balance ---------- */
.sub-list { display: flex; flex-direction: column; gap: 2px; }
.sub-group-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); font-weight: 700; margin: 12px 0 4px;
}
.sub-group-label:first-child { margin-top: 0; }
.sub-row {
  display: grid; grid-template-columns: 14px 150px 1fr 46px auto;
  align-items: center; gap: 10px; padding: 5px 6px; border-radius: var(--radius-sm);
}
.sub-row:hover { background: var(--panel-2); }
.sub-name { font-size: 0.85rem; color: #cfd8e3; }
.sub-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.82rem; }
.tag-warn { color: var(--amber); border-color: #5c4212; }
.neglected-note {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.08); border: 1px solid #5c4212;
  font-size: 0.85rem; color: #fcd9a0;
}
.neglected-note strong { color: var(--amber); }

@media (max-width: 760px) {
  .sub-row { grid-template-columns: 14px 1fr 46px auto; }
  .sub-row .bar-track { display: none; }
}

/* ---------- efficient zone / upper limit ---------- */
.bar-band {
  position: absolute; top: 0; bottom: 0;
  background: rgba(74, 222, 128, 0.16);
  border-left: 1px dashed rgba(74,222,128,0.5);
  border-right: 1px dashed rgba(74,222,128,0.5);
  border-radius: 2px;
}
.band-sample {
  display: inline-block; width: 20px; height: 9px; border-radius: 3px;
  background: rgba(74, 222, 128, 0.16);
  border-left: 1px dashed rgba(74,222,128,0.6);
  border-right: 1px dashed rgba(74,222,128,0.6);
  vertical-align: middle;
}
.muscle-label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.muscle-target { font-size: 0.68rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.muscle-row { grid-template-columns: 156px 1fr 74px; }
.fix-group {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--muted); font-weight: 700; margin: 12px 0 2px;
}
.fix-group:first-child { margin-top: 0; }
.fix-max { color: var(--muted-2); }
@media (max-width: 760px) {
  .muscle-row { grid-template-columns: 116px 1fr 62px; }
  .muscle-target { font-size: 0.62rem; }
}

/* ---------- frequency planner ---------- */
.freq-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.freq-stat { background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.freq-stat .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.freq-stat .v { font-size: 1.3rem; font-weight: 700; }
.split-opts { display: flex; flex-direction: column; gap: 8px; }
.split-opt {
  text-align: left; font-family: inherit; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; color: var(--text);
}
.split-opt:hover { background: var(--panel-2); }
.split-opt.active { border-color: var(--accent); background: rgba(74,222,128,0.08); }
.split-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.split-name { font-weight: 600; font-size: 0.92rem; }
.split-freq { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.split-freq strong { color: var(--text); }
.split-note { font-size: 0.76rem; color: var(--muted-2); margin-top: 2px; }
.tag-ok { color: var(--accent); border-color: var(--accent-dim); background: rgba(74,222,128,0.08); }
.freq-verdict { margin-top: 14px; padding: 11px 13px; border-radius: var(--radius-sm); font-size: 0.86rem; }
.freq-verdict.ok { background: rgba(74,222,128,0.08); border: 1px solid var(--accent-dim); color: #bbf7d0; }
.freq-verdict.warn { background: rgba(245,158,11,0.08); border: 1px solid #5c4212; color: #fcd9a0; }

/* ---------- routines manager ---------- */
.routine-list { display: flex; flex-direction: column; gap: 8px; }
.routine-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.routine-card.active { border-color: var(--accent-dim); background: rgba(74,222,128,0.06); }
.routine-pick { display: flex; align-items: center; }
.routine-pick input { accent-color: var(--accent); width: 16px; height: 16px; }
.routine-info { flex: 1; min-width: 0; }
.routine-name { font-weight: 600; font-size: 0.95rem; outline: none; border-radius: 5px; padding: 1px 3px; }
.routine-name:focus { background: var(--panel-2); box-shadow: 0 0 0 1px var(--accent-dim); }
.routine-meta { font-size: 0.76rem; color: var(--muted); }
.routine-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.preset-list { display: flex; flex-direction: column; gap: 8px; }
.preset-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.preset-info { flex: 1; min-width: 0; }
.preset-name { font-weight: 600; font-size: 0.9rem; }
.preset-note { font-size: 0.76rem; color: var(--muted); }
.preset-bundle {
  margin-top: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--accent-dim); border-radius: var(--radius-sm);
}
.preset-bundle-info { flex: 1; min-width: 0; }
.compare-wrap { overflow-x: auto; }
.compare-table { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
.compare-table th, .compare-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.compare-table th { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.5px; }
.compare-table .compare-score td { font-size: 1rem; }
.compare-muscle { color: var(--muted); }
.cmp-mev { color: var(--muted-2); font-size: 0.72rem; }
