:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #111014;
  --panel-strong: #181720;
  --panel-soft: #0d0c12;
  --line: #24222c;
  --line-strong: #343244;
  --accent: #42f5b3;
  --accent-rgb: 66, 245, 179;
  --accent-soft: rgba(var(--accent-rgb), 0.15);
  --accent-strong: rgba(var(--accent-rgb), 0.28);
  --text: #f5f6f7;
  --muted: #8e8c96;
  --danger: #ff5c5c;
  --warning: #f5b642;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  --radius: 18px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #15141c 0%, #070707 55%, #050505 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4rem;
  font-weight: 600;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

strong {
  color: var(--text);
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

select,
input,
textarea {
  width: 100%;
  background: var(--panel-strong);
  border: 1px solid #262533;
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

select:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.6);
  outline-offset: 2px;
}

.primary {
  background: var(--accent);
  color: #050505;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #2c2a35;
  padding: 0.58rem 1rem;
  border-radius: 10px;
}

.primary:disabled {
  background: var(--panel-strong);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

.ghost:disabled,
.tab:disabled,
.chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4vw 1rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  height: 28px;
  width: auto;
  opacity: 0.82;
  margin-right: 8px;
  flex-shrink: 0;
}

.nav-wordmark {
  height: 32px;
  max-height: 32px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .nav-logo {
    height: 24px;
  }
  .nav-wordmark {
    height: 26px;
  }
}


.tabs {
  display: flex;
  gap: 0.6rem;
  background: var(--panel);
  padding: 0.4rem;
  border-radius: 999px;
}

.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.tab.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.settings-icon-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-left: auto;
  transition: color 0.15s, background 0.15s;
}

.settings-icon-btn.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

main {
  padding: 0 4vw 4vw;
}

body.rest-timer-visible main {
  padding-top: 42px;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.controls,
.settings-card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid #1f1e27;
  box-shadow: var(--shadow);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.group-filter {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1 1 320px;
  min-width: 240px;
}

.group-label,
.controls label,
.session-picker span,
.edit-label,
.dialog-subtitle,
.post-summary {
  color: var(--muted);
  font-size: 0.9rem;
}

.group-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  width: auto;
  background: transparent;
  border: 1px solid #2c2a35;
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.chip.is-active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.chip.is-partial {
  color: var(--text);
  border-style: dashed;
}

.btn--add-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: none;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}

.btn--add-inline:hover,
.btn--add-inline:focus-visible {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.45);
  outline: none;
}

.btn--add-inline:active {
  background: rgba(var(--accent-rgb), 0.14);
}

.chip--sm {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
}

.machine-muscles {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.edit-submuscles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.submuscle-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.submuscle-row-label {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 60px;
  padding-top: 0.25rem;
  flex-shrink: 0;
}

.submuscle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.submuscle-breakdown {
  margin-top: 1.5rem;
}

.submuscle-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.submuscle-row-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.submuscle-row-stat .muscle-name {
  min-width: 160px;
  color: var(--text);
}

.submuscle-row-stat .muscle-sets {
  color: var(--muted);
}

.controls-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-toggle,
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-toggle input,
.toggle input {
  width: auto;
  accent-color: var(--accent);
}

.autosave,
.status {
  color: var(--muted);
  font-size: 0.85rem;
}

.machine-list {
  display: grid;
  gap: 1.5rem;
}

.pinned-stack {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: calc(1rem + env(safe-area-inset-top));
  z-index: 20;
  align-self: start;
  grid-column: 1 / -1;
}

.machine {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid #1f1e27;
}

.machine.is-pinned {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb), 0.18);
}

.machine.is-collapsed .machine-header {
  margin-bottom: 0;
}

.machine.is-collapsed .machine-body {
  display: none;
}

.machine.is-collapsed .edit-machine,
.machine.is-collapsed .remove-machine {
  display: none;
}

.pin-machine.is-active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.machine-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.machine-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.machine-name {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 1.3rem;
}

.machine-group {
  color: var(--muted);
  font-size: 0.85rem;
}

.machine-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
}

.machine-media {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.machine-media .edit-photo {
  align-self: stretch;
}

.machine-photo,
.checkin-photo,
.edit-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.machine-photo {
  height: 220px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.machine-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sessions {
  background: var(--panel-soft);
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.sessions-header,
.section-header,
.checkin-header,
.chart-header,
.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.edit-header-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.edit-header-actions button {
  white-space: nowrap;
}

.sessions-subtitle,
.session-previous,
.session-empty,
.edit-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.session-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  opacity: 0.8;
  margin-top: 0.1rem;
}

.coaching-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0;
}

.coaching-line select {
  width: auto;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.coaching-line #coachingLineText {
  font-size: 0.82rem;
  color: var(--muted);
}

.session-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.session-picker {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 180px;
  font-size: 0.82rem;
}

.session {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.set-table {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.4rem;
}

.set-row {
  display: grid;
  grid-template-columns: 60px 1fr 1.2fr auto;
  gap: 0.6rem;
  align-items: center;
}

.set-head {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.set-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.set-label {
  display: none;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.set-weight {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.set-weight-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

.set-reps,
.set-weight-value {
  font-size: 1.1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-height: 48px;
}

.set-weight-value {
  flex: 1 1 0%;
  width: 0;
  min-width: 48px;
}


.session-fields {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.session-field {
  display: grid;
  gap: 0.4rem;
}

.session-field span,
.toolbar label,
.post-controls label,
.form-grid label,
.edit-body label,
.chart-select,
.chart-header label {
  color: var(--muted);
  font-size: 0.82rem;
}

.session-field--full {
  margin-top: 0.8rem;
}

.settings-card {
  padding: 1.6rem;
  display: grid;
  gap: 1.4rem;
}

.settings-card--wide {
  margin-bottom: 1.5rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}

.toolbar label,
.post-controls label,
.form-grid label {
  display: grid;
  gap: 0.35rem;
}

.toolbar--compact {
  justify-content: flex-end;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}

.stat-card {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02));
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 16px;
  padding: 1rem;
  min-height: 118px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  margin-top: 0.35rem;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stat-hint {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.insights-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.chart-card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid #1f1e27;
  box-shadow: var(--shadow);
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.chart-card:last-child {
  grid-column: 1 / -1;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: radial-gradient(circle at top, rgba(22, 21, 29, 0.9), rgba(9, 8, 11, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.breakdown-grid {
  display: grid;
  gap: 0.85rem;
}

.breakdown-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

.breakdown-head,
.breakdown-metrics {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.breakdown-metrics {
  color: var(--muted);
  font-size: 0.84rem;
}

.feedback-list {
  display: grid;
  gap: 0.9rem;
}

.feedback-item {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  gap: 0.45rem;
}

.feedback-item strong {
  font-size: 0.9rem;
}

.tone-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.76rem;
}

.progress-hub,
.settings-grid {
  display: grid;
  gap: 1.5rem;
}

.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.progress-overview {
  gap: 1rem;
}

.progress-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.progress-subtab {
  width: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.7rem 1rem;
}

.progress-subtab.is-active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.36);
  color: var(--text);
}

.progress-stage {
  display: grid;
}

.progress-pane {
  display: none;
}

.progress-pane.is-active {
  display: grid;
}

.pane-intro {
  display: grid;
  gap: 0.25rem;
}

.progress-card,
.post-studio,
.story-studio,
.photo-gallery-card {
  min-height: 100%;
}

.studio-layout {
  display: grid;
  gap: 1.25rem;
}

.studio-sidebar,
.studio-preview-card {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.studio-preview-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel-soft);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem;
}

.studio-preview-head {
  display: grid;
  gap: 0.25rem;
}

.post-summary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}

.checkin-list {
  display: grid;
  gap: 1rem;
}

.checkin-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem;
  display: grid;
  gap: 1.15rem;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: start;
}

.checkin-card--empty {
  grid-template-columns: 1fr;
}

.checkin-photo-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #09090d;
  min-height: 180px;
  display: grid;
  place-items: center;
}

.checkin-photo {
  display: none;
}

.checkin-photo-frame.has-photo .checkin-photo {
  display: block;
}

.checkin-photo-frame.has-photo .checkin-photo-placeholder {
  display: none;
}

.checkin-photo-placeholder {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 0 1rem;
}

.checkin-content {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.checkin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.checkin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.checkin-meta,
.checkin-note {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.post-controls {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr);
}

.story-controls {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr);
}

.post-display-controls {
  display: grid;
  gap: 0.65rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.post-unit-select {
  width: auto;
  font-size: 0.8rem;
  padding: 0.15rem 0.4rem;
  border-radius: 7px;
  margin-left: auto;
}

.post-bw-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.post-bw-row input {
  flex: 1;
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
}

.post-bw-row select {
  width: auto;
  font-size: 0.85rem;
}

.post-custom-label-field {
  margin-top: 0.25rem;
}

.post-custom-label-field input {
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
}

.post-actions {
  display: grid;
  gap: 0.7rem;
}

.post-format-select {
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
}

.post-framing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
}

.post-zoom {
  display: grid;
  gap: 0.35rem;
}

.post-scale-value {
  min-width: 84px;
  justify-content: center;
}

.post-hint {
  grid-column: 1 / -1;
  font-size: 0.82rem;
}

.post-preview {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  place-items: center;
}

.story-preview {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  place-items: center;
}

#postCanvas {
  aspect-ratio: auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: block;
  touch-action: none;
  cursor: grab;
}

#storyCanvas {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: block;
  touch-action: none;
  cursor: grab;
}

#storyCanvas.is-dragging {
  cursor: grabbing;
}

#postCanvas.is-dragging {
  cursor: grabbing;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.photo-gallery-empty {
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed var(--line);
  color: var(--muted);
  grid-column: 1 / -1;
}

.gallery-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel-soft);
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  color: inherit;
  text-align: left;
  display: grid;
  height: 100%;
  width: 100%;
}

.gallery-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #09090d;
}

.gallery-body {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
}

.gallery-date {
  font-size: 0.96rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.gallery-meta {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.settings-actions,
.edit-photo-actions,
.export-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.file-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  background: var(--panel-strong);
  border-radius: 12px;
  padding: 0.62rem 1rem;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  cursor: pointer;
}

.file-upload input {
  display: none;
}

.chart-dialog,
.edit-dialog {
  border: none;
  color: var(--text);
  box-shadow: var(--shadow);
}

.chart-dialog {
  background: var(--panel);
  border-radius: 18px;
  padding: 1.5rem;
  width: min(1000px, 94vw);
}

.edit-dialog {
  background: var(--panel);
  border-radius: 18px;
  padding: 0;
  width: min(760px, 94vw);
}

.pick-group-dialog {
  width: min(320px, 94vw);
}

.pick-group-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.edit-card {
  padding: 1.6rem;
  display: grid;
  gap: 1.4rem;
}

.edit-body {
  display: grid;
  gap: 1.2rem;
}

.edit-groups,
.edit-photo {
  display: grid;
  gap: 0.7rem;
}

.edit-photo-preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  height: 320px;
  display: grid;
  place-items: center;
}

.edit-photo-preview img {
  display: none;
}

.edit-photo-placeholder {
  color: var(--muted);
  font-size: 0.9rem;
}


.form-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-gate {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 600px 400px at 50% 38%, #141220 0%, #070707 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-gate.is-hidden {
  display: none;
}

.login-card {
  background: transparent;
  padding: 3rem 2rem;
  border-radius: 24px;
  width: min(500px, calc(100vw - 2rem));
  text-align: center;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.login-icon {
  width: 120px;
  height: auto;
  display: block;
}

.login-wordmark {
  width: 240px;
  height: auto;
}

.login-tagline {
  font-size: 1rem;
  color: #8e8c96;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-bottom: 1.5rem;
  width: 100%;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #6e6c78;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.login-feature-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.75;
}

.login-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, #42f5b3, transparent);
  margin: 1.2rem 0 1.5rem;
  opacity: 0.5;
}

.login-description {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #a8a6b2;
  max-width: 380px;
  margin-bottom: 2.5rem;
  letter-spacing: 0.005em;
}

.login-description em {
  color: #42f5b3;
  font-style: normal;
  font-weight: 600;
}

.login-body__citation {
  font-size: 0.75rem;
  line-height: 1.5;
  color: #5a5868;
  max-width: 380px;
  margin-top: 1.2rem;
  letter-spacing: 0.005em;
}

/* Structured description body — below CTA */
.login-divider--after-cta {
  margin-top: 2rem;
  margin-bottom: 1.75rem;
}

.login-body {
  width: 100%;
  max-width: 340px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-bottom: 0.5rem;
}

.login-body__headline {
  font-size: 1.05rem;
  font-weight: 600;
  color: #d4d2de;
  line-height: 1.4;
  margin: 0 0 0.55rem;
  letter-spacing: 0.01em;
}

.login-body__headline em {
  color: #42f5b3;
  font-style: normal;
}

.login-body__stat {
  font-size: 0.95rem;
  font-weight: 600;
  color: #42f5b3;
  letter-spacing: 0.04em;
  margin: 0 0 0.55rem;
  font-variant-numeric: tabular-nums;
}

.login-body__stat em {
  font-style: normal;
}

.login-body__sub {
  font-size: 0.83rem;
  line-height: 1.65;
  color: #7a7888;
  margin: 0 0 1rem;
  letter-spacing: 0.005em;
}

.login-body__sub strong {
  color: #a8a6b2;
  font-weight: 600;
}

.login-body__sub--fine {
  font-size: 0.78rem;
  color: #5a5868;
  margin-bottom: 0;
}

.login-body__sub--fine strong {
  color: #8e8c96;
}

.login-body__rule {
  width: 24px;
  height: 1px;
  background: #2a2836;
  margin: 0.25rem auto 1rem;
  flex-shrink: 0;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 360px;
  height: 56px;
  margin: 0 auto 1.5rem;
  background: #ffffff;
  color: #1a1a1a;
  border: none;
  border-radius: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 150ms ease, transform 80ms ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-google:hover {
  background: #f0f0f0;
}

.btn-google:active {
  background: #e0e0e0;
  transform: scale(0.98);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.login-status {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.2rem;
}

.login-hint--small {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.75;
  line-height: 1.5;
  max-width: 380px;
}

.undo-toast {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--panel);
  border: 1px solid #1f1e27;
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.undo-toast span {
  flex: 1;
  font-size: 0.9rem;
}

.undo-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.is-compact .machine-list {
  gap: 1rem;
}

.is-compact .machine {
  padding: 1.1rem;
}

.is-compact .machine-header {
  margin-bottom: 0.6rem;
}

.is-compact .machine-body {
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.is-compact .machine-media {
  display: none;
}

.is-compact .sessions {
  padding: 0.85rem;
}

.is-compact .session {
  padding-top: 0.7rem;
  margin-top: 0.7rem;
}

dialog::backdrop {
  background: rgba(4, 4, 6, 0.72);
}

@media (min-width: 1100px) {
  .studio-layout {
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 960px) {
  .insights-layout {
    grid-template-columns: 1fr;
  }

  .chart-card:last-child {
    grid-column: auto;
  }

  .machine-body {
    grid-template-columns: 1fr;
  }

  .session-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-framing {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 720px) {
  .top-bar {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  /* B1: tabs move to fixed bottom bar */
  .tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    border-radius: 0;
    background: rgba(11, 10, 16, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    border-bottom: none;
    padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom));
    gap: 0.25rem;
    justify-content: space-around;
    width: 100%;
  }

  .tab {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.4rem;
  }

  .settings-icon-btn {
    flex: 1;
  }

  main {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .controls {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
  }

  .controls .group-filter {
    flex: 0 0 auto;
  }

  .section-header,
  .machine-header,
  .sessions-header,
  .chart-header,
  .edit-header,
  .checkin-header {
    flex-direction: column;
    align-items: stretch;
  }

  .progress-subtabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-left: 0;
  }

  .controls-actions .autosave {
    display: none;
  }

  .machine-actions,
  .settings-actions,
  .export-actions,
  .edit-actions,
  .checkin-actions,
  .post-actions {
    width: 100%;
    justify-content: stretch;
  }

  .controls-actions button,
  .controls-actions .primary,
  .controls-actions .btn--add-inline,
  .machine-actions button,
  .settings-actions button,
  .export-actions button,
  .edit-actions button,
  .checkin-actions button,
  .post-actions button {
    width: 100%;
  }

  .checkin-card {
    grid-template-columns: 1fr;
  }

  .checkin-photo-frame {
    min-height: 260px;
  }

  .set-head {
    display: none;
  }

  .set-table {
    gap: 0.8rem;
  }

  .set-row {
    grid-template-columns: 1fr 1.6fr;
    grid-template-areas:
      "index index"
      "reps weight"
      "remove remove";
    gap: 0.75rem 0.8rem;
    padding-bottom: 0.8rem;
  }

  .set-index {
    grid-area: index;
  }

  .set-reps-field {
    grid-area: reps;
  }

  .set-weight {
    grid-area: weight;
    flex-direction: column;
    align-items: stretch;
  }

  .set-unit-label {
    font-size: 0.8rem;
  }

  .set-weight-value {
    min-width: 0;
    flex: 1;
  }

  .remove-set {
    grid-area: remove;
    justify-self: flex-end;
  }

  .set-label {
    display: block;
  }
}

@media (max-width: 600px) {
  .top-bar {
    padding: 1.5rem 6vw 1rem;
  }

  main {
    padding: 0 6vw 12vw;
  }

  .controls {
    padding: 1rem;
  }

  .session-fields,
  .form-grid,
  .post-framing,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .post-actions,
  .progress-subtabs {
    grid-template-columns: 1fr;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar label {
    flex: 1 1 100%;
  }

  .chart-dialog,
  .edit-card,
  .settings-card {
    padding: 1.2rem;
  }

  .edit-photo-preview {
    height: 260px;
  }
}

/* ── Multi-gym support ──────────────────────────────────────────────────── */

.gym-filter {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1 1 320px;
  min-width: 200px;
}

.gym-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.gym-options::-webkit-scrollbar {
  display: none;
}

.gym-add-row {
  margin-top: 0.75rem;
}

.gym-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.75rem;
}

.gym-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.gym-row:last-child {
  border-bottom: none;
}

.gym-row-name {
  font-size: 0.95rem;
  color: var(--text);
  flex: 1;
}

.gym-row-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.gym-inline-input {
  flex: 1;
  font-size: 0.95rem;
  padding: 0.25rem 0.5rem;
  background: var(--input-bg, #1e1e1e);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  min-width: 0;
}

.danger-ghost {
  color: var(--danger, #ff5c5c);
  border-color: rgba(255, 92, 92, 0.35);
}

.danger-ghost:hover,
.danger-ghost.is-confirming {
  background: rgba(255, 92, 92, 0.12);
  color: var(--danger, #ff5c5c);
}

.edit-gyms {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ── Phase A UX improvements ─────────────────────────────────────────────── */

/* A3 — Add set button: visually dominant over ghost siblings */
.add-set {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
  font-weight: 600;
}

.add-set:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

/* B3 — Per-machine unit toggle (replaces per-set select) */
.sessions-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.unit-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.unit-toggle .chip {
  border-radius: 0;
  border: none;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  min-height: 30px;
}

.unit-toggle .chip:first-child {
  border-right: 1px solid var(--line);
}

.set-unit-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  align-self: center;
  min-width: 24px;
}

/* B2 — Previous session reference panel */
.session-previous {
  border-left: 2px solid rgba(var(--accent-rgb), 0.4);
  padding-left: 0.75rem;
  margin-bottom: 0.75rem;
}

.session-previous[hidden] {
  display: none;
}

.prev-panel-header {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 0.4rem;
}

.prev-panel-table {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.prev-panel-row {
  display: grid;
  grid-template-columns: 60px 1fr 1.2fr;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prev-set-index {
  font-size: 0.72rem;
  color: var(--text-dim, #616161);
}

.prev-set-reps,
.prev-set-weight {
  font-weight: 500;
  color: var(--text-secondary, #9e9e9e);
}

.prev-set-dim {
  color: var(--text-dim, #616161);
  font-weight: 400;
}

/* A1 + A2 — Mobile: compact brand lockup (logo + wordmark), tabs already in bottom nav */
@media (max-width: 720px) {
  .top-bar {
    display: flex;
    padding: env(safe-area-inset-top, 0px) 16px 0;
    min-height: 48px;
    height: auto;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #2A2A2A;
    position: sticky;
    top: 0;
    z-index: 100;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    height: 48px;
  }

  .nav-logo {
    height: 26px;
    width: auto;
    opacity: 0.92;
    margin-right: 0;
    flex-shrink: 0;
  }

  .nav-wordmark {
    height: 20px;
    width: auto;
    max-width: 150px;
    opacity: 1;
    display: block;
    flex-shrink: 0;
  }

  /* A9 — Data-dense default on mobile: single-column layout */
  .machine-body {
    grid-template-columns: 1fr;
  }
}

/* B4 — Rest timer bar (fixed, always at top) */
.rest-timer-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(11, 10, 16, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.rest-timer-bar[hidden] {
  display: none;
}

.rest-timer-body {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 1rem;
}

.rest-timer-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex-shrink: 0;
}

.rest-timer-display {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.01em;
  flex: 1;
  transition: color 0.4s ease;
}

.rest-timer-display.is-ready {
  color: var(--accent);
}

.rest-timer-start {
  font-size: 1rem;
  padding: 0.1rem 0.5rem;
  min-height: 24px;
  flex-shrink: 0;
  color: var(--muted);
  line-height: 1;
}

.rest-timer-start:hover {
  color: var(--text);
}

.rest-timer-track {
  height: 2px;
  background: var(--line);
  position: relative;
}

/* Marker ticks at 90s and 3min (out of 5min max = 30%, 60%) */
.rest-timer-track::before,
.rest-timer-track::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.12);
}
.rest-timer-track::before { left: 30%; } /* 90s */
.rest-timer-track::after  { left: 60%; } /* 3min */

.rest-timer-progress {
  height: 100%;
  background: var(--muted);
  width: 0%;
  transition: background 0.4s ease;
}

.rest-timer-progress.is-ready {
  background: var(--accent);
}

@media (max-width: 720px) {
  .rest-timer-bar {
    top: 0;
  }

  main {
    padding-top: 0;
  }

  body.rest-timer-visible main {
    padding-top: 42px;
  }
}

/* Sub-muscle designation in edit dialog */
.edit-submuscles {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.submuscle-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.submuscle-row-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.submuscle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip--sub {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  min-height: 30px;
  border-radius: 99px;
  opacity: 0.85;
}

.chip--sub.is-active {
  opacity: 1;
}

/* Settings chip group (unit selector etc.) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* --- PRO FEATURES --- */
body.theme-gold {
  --accent: #FFD700;
  --accent-rgb: 255, 215, 0;
  --accent-soft: rgba(255, 215, 0, 0.15);
  --accent-strong: rgba(255, 215, 0, 0.28);
}
body.theme-neon {
  --accent: #4FC3F7;
  --accent-rgb: 79, 195, 247;
  --accent-soft: rgba(79, 195, 247, 0.15);
  --accent-strong: rgba(79, 195, 247, 0.28);
}
body.theme-purple {
  --accent: #B388FF;
  --accent-rgb: 179, 136, 255;
  --accent-soft: rgba(179, 136, 255, 0.15);
  --accent-strong: rgba(179, 136, 255, 0.28);
}
body.theme-rose {
  --accent: #F48FB1;
  --accent-rgb: 244, 143, 177;
  --accent-soft: rgba(244, 143, 177, 0.15);
  --accent-strong: rgba(244, 143, 177, 0.28);
}
body.theme-mint {
  --accent: #69F0AE;
  --accent-rgb: 105, 240, 174;
  --accent-soft: rgba(105, 240, 174, 0.15);
  --accent-strong: rgba(105, 240, 174, 0.28);
}
body.theme-crimson {
  --accent: #FF5252;
  --accent-rgb: 255, 82, 82;
  --accent-soft: rgba(255, 82, 82, 0.15);
  --accent-strong: rgba(255, 82, 82, 0.28);
}
.pro-locked-canvas {
  filter: blur(4px) grayscale(0.8);
  opacity: 0.5;
}
/* --- END PRO FEATURES --- */

/* --- REORDER MODE --- */
.reorder-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px 4px 0;
  flex-shrink: 0;
}
.reorder-up, .reorder-down {
  font-size: 11px;
  padding: 2px 6px;
  min-width: 28px;
  color: var(--muted);
  line-height: 1;
}
.reorder-up:hover, .reorder-down:hover {
  color: var(--accent);
}
.reorder-mode .machine {
  display: flex;
  align-items: flex-start;
}
#reorderToggle.is-active {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
}

/* --- FOCUS CHIP ROW --- */
.focus-chip-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.focus-chip-toggle {
  align-self: flex-start;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.focus-chip-toggle.is-active {
  opacity: 1;
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
}
.focus-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.focus-chip {
  font-size: 12px;
  padding: 4px 10px;
  opacity: 0.4;
  border-radius: 20px;
}
.focus-chip.is-active {
  opacity: 1;
}

/* --- AUTOCOMPLETE --- */
.autocomplete-wrap {
  position: relative;
}
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--panel-strong);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.autocomplete-dropdown li {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background 0.1s;
}
.autocomplete-dropdown li:hover {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

/* --- INSIGHTS: MUSCLE FOCUS BARS --- */
.muscle-focus-bars {
  padding: 12px 0 4px;
}
.focus-label {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.focus-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.focus-bar-name {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.focus-bar-wrap {
  background: var(--panel-strong);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.focus-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 2px;
}
.focus-bar-pct {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* --- INSIGHTS: ORDER HINTS --- */
.order-hints-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-hint-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
}
.order-hint-card strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}
.order-hint-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 6px;
}
.order-hint-card cite {
  font-size: 11px;
  color: var(--accent);
  font-style: normal;
  opacity: 0.8;
}
