/* ===== CSS VARIABLES & THEME ===== */
:root {
  /* ── Motion tokens ── */
  --motion-fast:   150ms;
  --motion-normal: 300ms;
  --motion-slow:   500ms;
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --ease-enter:    cubic-bezier(.0, 0, .2, 1);
  --ease-exit:     cubic-bezier(.4, 0, 1,  1);
  --ease-spring:   cubic-bezier(.34, 1.56, .64, 1);
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: #151515;
  --bg-input: #1E1E1E;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted: #555555;
  --accent: #00C853;
  --accent-dark: #00A843;
  --accent-soft: rgba(0,200,83,0.10);
  --teal: #00C853;
  --teal-dark: #00A843;
  --blue: #3B82F6;
  --blue-dark: #2563eb;
  --gradient: linear-gradient(135deg, #00C853, #00A843);
  --gradient-soft: linear-gradient(135deg, rgba(0,200,83,0.10), rgba(0,168,67,0.10));
  --gradient-card: linear-gradient(135deg, rgba(0,200,83,0.05), rgba(0,168,67,0.05));
  --border: rgba(255,255,255,0.06);
  --shadow: 0 4px 32px rgba(0,0,0,0.6);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-full: 9999px;
  --red: #FF3B30;
  --orange: #FF9500;
  --yellow: #FFD60A;
  --green: #00C853;
  --purple: #AF52DE;
  --pink: #FF375F;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding-top: var(--safe-top);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; -webkit-user-select: none; user-select: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== APP SHELL ===== */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  padding-bottom: calc(80px + var(--safe-bottom));
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  padding: 20px 16px;
}
.screen.active {
  display: block;
  animation: screenEnter var(--motion-normal) var(--ease-enter) both;
}
.screen.exit {
  animation: screenExit var(--motion-fast) var(--ease-exit) both;
}
@keyframes screenEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes screenExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 4px calc(8px + var(--safe-bottom));
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  position: relative;
  min-width: 56px;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.8;
  transition: all 0.2s;
}

.nav-item span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item.active svg { stroke: var(--accent); }
.nav-item.active span { color: var(--accent); font-weight: 600; }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-gradient {
  background: var(--gradient-card);
  border: 1px solid rgba(229,255,60,0.1);
}

.card-glow {
  background: var(--gradient-soft);
  border: 1px solid rgba(229,255,60,0.15);
  box-shadow: 0 0 30px rgba(229,255,60,0.06);
}

/* ===== MOTION KEYFRAMES ===== */
@keyframes btn-ripple    { to { transform: scale(3); opacity: 0; } }
@keyframes snapBack {
  0%   { transform: scale(0.9); }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes levelup-pop   {
  0%   { transform: scale(0.5);  opacity: 0; }
  60%  { transform: scale(1.15); }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes xpFly {
  0%   { opacity: 0; transform: translateY(8px)  scale(0.8); }
  40%  { opacity: 1; transform: translateY(-14px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-44px) scale(1); }
}
@keyframes levelUpBadge {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
@keyframes navItemBounce {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-5px); }
  70%  { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition:
    transform  var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-normal) var(--ease-standard),
    opacity    var(--motion-fast) var(--ease-standard);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
/* Snap-back press states (controlled by JS) */
.btn.btn-pressing {
  transform: scale(0.9) !important;
  transition: transform 0.1s var(--ease-exit) !important;
}
.btn.btn-releasing {
  animation: snapBack 0.35s var(--ease-spring) forwards !important;
  transition: none !important;
}

.btn-ripple-el {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  transform: scale(0);
  animation: btn-ripple 0.55s var(--ease-standard) forwards;
  pointer-events: none;
}

/* XP popup */
.xp-popup {
  position: fixed;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(229,255,60,0.6);
  pointer-events: none;
  z-index: 9999;
  animation: xpFly 900ms var(--ease-standard) forwards;
}

/* Skeleton loader */
.skeleton {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* Nav item bounce on activate */
.nav-item.active svg {
  animation: navItemBounce 0.4s var(--ease-spring);
}

.btn-primary {
  background: var(--accent);
  color: #000000;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,200,83,0.20);
  transition: all 0.2s ease;
}
.btn-primary.btn-releasing {
  animation: snapBack 0.35s var(--ease-spring) forwards !important;
}
.btn-primary:active {
  box-shadow: 0 2px 8px rgba(0,200,83,0.12);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  height: 52px;
  border-radius: 14px;
}

.btn-secondary:active { transform: scale(0.97); }

.btn-ghost {
  color: var(--accent);
  padding: 8px 16px;
}

.btn-full { width: 100%; }

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-round {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 0;
  font-size: 24px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  padding: 0;
}

.btn-icon svg { width: 20px; height: 20px; }

/* ===== INPUTS ===== */
.input-group { margin-bottom: 16px; }

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 16px;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow   var(--motion-fast) var(--ease-standard);
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.12);
  outline: none;
}
.input::placeholder { color: var(--text-muted); }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== PROGRESS BARS ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width var(--motion-slow) var(--ease-standard);
}

.progress-bar-lg { height: 12px; }

/* ===== XP BAR ===== */
.xp-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xp-level {
  min-width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #000;
}

.xp-bar-wrap { flex: 1; }

.xp-bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ===== STREAK BADGE ===== */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
}

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== TONNAGE COMPARISON ===== */
.tonnage-card {
  background: var(--gradient-soft);
  border: 1px solid rgba(229,255,60,0.15);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.tonnage-value {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tonnage-emoji { font-size: 48px; margin: 8px 0; }

.tonnage-comparison {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tonnage-comparison strong { color: var(--accent); }

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-top: 8px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.greeting-text {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ===== ONBOARDING ===== */
.onboarding-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(40px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
}

.onboarding-logo {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.onboarding-logo h1 {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.onboarding-logo p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

.onboarding-step {
  display: none;
  flex: 1;
  animation: fadeIn 0.4s ease;
}

.onboarding-step.active { display: flex; flex-direction: column; }

.onboarding-step h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.onboarding-step p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.onboarding-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 36px;
}

.onboarding-dot {
  height: 6px;
  width: 6px;
  min-width: 6px;
  background: #2A2A2A;
  border-radius: 4px;
  transition: width 0.35s cubic-bezier(.34,1.56,.64,1), background 0.3s;
}

.onboarding-dot.filled {
  background: var(--accent);
  width: 20px;
}

.option-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.option-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-card:active { transform: scale(0.97); }

.option-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.option-card .option-emoji { display: none; }
.option-card .option-label { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.option-card .option-desc { font-size: 11px; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }

.onboarding-nav {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

/* ===== WORKOUT SCREEN ===== */
.exercise-list { margin-bottom: 16px; }

.exercise-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.exercise-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
}

.exercise-name {
  font-weight: 600;
  font-size: 15px;
}

.exercise-muscle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.exercise-sets-container { padding: 0 16px 14px; }

.set-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 1fr 40px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.set-row.header {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.set-number {
  width: 28px;
  height: 28px;
  background: rgba(229,255,60,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.set-input {
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  width: 100%;
  color: var(--text-primary);
}

.set-input:focus { border-color: var(--accent); }

.set-delete {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: all 0.2s;
}

.set-delete:hover { color: var(--red); background: rgba(239,68,68,0.1); }

.add-set-btn {
  width: 100%;
  padding: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s;
}

.add-set-btn:hover { background: rgba(229,255,60,0.08); }

/* ===== TIMER ===== */
.timer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.3s;
}

.timer-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  width: 85%;
  max-width: 320px;
}

.timer-display {
  font-size: 64px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  margin: 16px 0;
}

.timer-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.timer-adjust {
  width: 44px;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== EXERCISE PICKER MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 150;
  animation: fadeIn 0.2s;
}

.modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  background: var(--bg-secondary);
  border-radius: 24px 24px 0 0;
  z-index: 151;
  animation: slideUp 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-search {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  -webkit-overflow-scrolling: touch;
}

.muscle-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 0 6px;
}

.exercise-pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
}

.exercise-pick-item:active { opacity: 0.6; }

.exercise-pick-icon {
  width: 40px;
  height: 40px;
  background: rgba(229,255,60,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.exercise-pick-info { flex: 1; }
.exercise-pick-name { font-weight: 600; font-size: 14px; }
.exercise-pick-detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== TECHNIQUE BUTTONS ===== */
.technique-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: rgba(229,255,60,0.1);
  border: 1px solid rgba(229,255,60,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.technique-btn:active {
  transform: scale(0.9);
  background: var(--gradient);
}

.technique-btn-sm {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: rgba(229,255,60,0.1);
  border: 1px solid rgba(229,255,60,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-right: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.technique-btn-sm:active {
  transform: scale(0.9);
}

/* ===== NUTRITION ===== */
.macro-bars { margin-bottom: 16px; }

.macro-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.macro-label {
  width: 60px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.macro-bar {
  flex: 1;
  height: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.macro-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.macro-fill.protein { background: var(--blue); }
.macro-fill.fat { background: var(--orange); }
.macro-fill.carbs { background: var(--green); }
.macro-fill.calories { background: var(--gradient); }

.macro-value {
  width: 80px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}

/* ===== MEAL ITEM ===== */
.meal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.meal-name { font-weight: 500; font-size: 14px; }

.meal-macros {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.meal-calories {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}

/* ===== PROGRESS CHARTS ===== */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.chart-canvas {
  width: 100%;
  height: 200px;
}

/* ===== RADAR CHART ===== */
.radar-container {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  transition: all 0.3s;
}

.achievement-card.unlocked {
  border-color: rgba(229,255,60,0.25);
  background: var(--gradient-card);
}

.achievement-card.locked { opacity: 0.45; }

.achievement-icon { font-size: 28px; margin-bottom: 6px; }

.achievement-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.achievement-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ===== COACH CARD ===== */
.coach-card {
  background: linear-gradient(135deg, rgba(229,255,60,0.08), rgba(163,230,53,0.08));
  border: 1px solid rgba(229,255,60,0.15);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.coach-avatar {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.coach-message { flex: 1; }
.coach-title { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.coach-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ===== PROFILE ===== */
.profile-header {
  text-align: center;
  padding: 20px 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
}

.profile-name { font-size: 22px; font-weight: 700; }
.profile-level { font-size: 13px; color: var(--accent); margin-top: 4px; }

.settings-list { margin-top: 16px; }

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.settings-label { font-size: 15px; font-weight: 500; }

.settings-value {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== DAILY TRACKING ===== */
.daily-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.daily-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.daily-input-card .daily-emoji { font-size: 24px; margin-bottom: 6px; }
.daily-input-card .daily-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }

.daily-input-card input {
  width: 100%;
  text-align: center;
  padding: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== CONTACTS ===== */
.contact-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.contact-link:hover {
  border-color: var(--accent);
  background: var(--gradient-soft);
}

/* ===== WORKOUT HISTORY ===== */
.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-date { font-size: 13px; color: var(--text-muted); }

.history-exercises {
  font-weight: 600;
  font-size: 14px;
  margin-top: 2px;
}

.history-stats {
  text-align: right;
}

.history-tonnage {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}

.history-duration {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 20px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90%;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon { font-size: 24px; }
.toast-text { font-size: 14px; font-weight: 500; }

/* ===== WORKOUT SUMMARY OVERLAY ===== */
.summary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
}

.summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-emoji { font-size: 56px; margin-bottom: 12px; }

.summary-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.summary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.summary-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.summary-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.summary-xp {
  font-size: 18px;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 20px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* ===== UTILITY ===== */
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ===== TABS ===== */
.tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
}

.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

.tabs.scrollable {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs.scrollable::-webkit-scrollbar { display: none; }

.tabs.scrollable .tab {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: auto;
  padding: 8px 10px;
  font-size: 12px;
}

/* ===== WORKOUT PLAN BADGE ===== */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--gradient-soft);
  border: 1px solid rgba(229,255,60,0.15);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
}

/* ===== CARDIO INPUTS ===== */
.cardio-field-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-align: center;
}

/* ===== PWA INSTALL BANNER ===== */
.install-banner {
  position: fixed;
  bottom: calc(72px + var(--safe-bottom) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: calc(100% - 24px);
  max-width: 460px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.install-banner.show {
  transform: translateX(-50%) translateY(0);
}

/* ===== FOOD SEARCH IN MODAL ===== */
#food-search-results .exercise-pick-item {
  padding: 10px 0;
}

#food-search-results .exercise-pick-detail {
  font-size: 11px;
}

/* ===== RPG STATS ===== */
.rpg-stats { display: flex; flex-direction: column; gap: 8px; }

.rpg-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rpg-stat-label {
  width: 72px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.rpg-stat-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.rpg-stat-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rpg-stat-fill.str { background: linear-gradient(90deg, #ef4444, #f97316); }
.rpg-stat-fill.mass { background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.rpg-stat-fill.end { background: linear-gradient(90deg, #22c55e, #14b8a6); }
.rpg-stat-fill.disc { background: linear-gradient(90deg, #eab308, #f97316); }

.rpg-stat-val {
  width: 28px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== COIN BADGE ===== */
.coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(229,255,60,0.1);
  border: 1px solid rgba(229,255,60,0.15);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* ===== EVENT BANNER ===== */
.event-banner {
  background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(249,115,22,0.15));
  border: 1px solid rgba(234,179,8,0.25);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s infinite;
}

.event-icon { font-size: 20px; }
.event-text { font-size: 14px; font-weight: 700; color: var(--yellow); }

/* ===== SEASON BANNER ===== */
.season-banner {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

/* ===== CHALLENGE ROW ===== */
.challenge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.challenge-row.completed { opacity: 0.6; }

.challenge-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.challenge-info { flex: 1; min-width: 0; }

.challenge-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-reward {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===== LIFETIME STATS ===== */
.lifetime-stat {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.lifetime-val {
  font-size: 18px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lifetime-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== PORTION SLIDER ===== */
#portion-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  outline: none;
}

#portion-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 2px 8px rgba(229,255,60,0.25);
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding: 2px 0;
}

.collapsible-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.collapsible-arrow.open {
  transform: rotate(0deg);
}

.collapsible-arrow:not(.open) {
  transform: rotate(-90deg);
}

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
  opacity: 0;
  margin-top: 0;
}

.collapsible-body.open {
  max-height: 2000px;
  opacity: 1;
  margin-top: 10px;
}

/* ===== MINI PROFILE OVERLAY ===== */
.mini-profile-modal {
  max-height: 85vh;
  overflow-y: auto;
}

.mini-profile-content {
  padding: 20px;
  position: relative;
}

.mini-profile-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* ===== CIRCULAR TIMER ===== */
.timer-circle-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
}

.timer-circle-svg {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 8;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-time-inside {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.timer-presets {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.timer-preset {
  padding: 6px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.timer-preset.active,
.timer-preset:active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ===== ONLINE BAR ===== */
.online-bar {
  position: fixed;
  bottom: calc(56px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(17,17,17,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 6px 16px;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.online-bar .online-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.online-bar .online-count {
  font-weight: 600;
  color: var(--accent);
}

/* ===== TELEGRAM LOGIN ===== */
.tg-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: #2AABEE;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.tg-login-btn:active {
  transform: scale(0.97);
  background: #229ED9;
}

.tg-login-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.tg-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.tg-divider::before,
.tg-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
/* ===== NOTES ===== */
.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  border-left: 4px solid var(--accent);
  transition: transform var(--motion-fast) var(--ease-standard),
              box-shadow var(--motion-fast) var(--ease-standard);
}
.note-card:active { transform: scale(0.98); }
.note-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-card-preview {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.note-card-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}
.note-card-has-sketch {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Note editor overlay */
.note-editor-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 120;
  display: flex;
  flex-direction: column;
  animation: slideUp var(--motion-normal) var(--ease-enter);
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}
.note-editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.note-editor-back {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  line-height: 1;
}
.note-editor-title {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  outline: none;
  min-width: 0;
}
.note-editor-title::placeholder { color: var(--text-muted); }
.note-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.note-editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.note-editor-textarea {
  flex: 1;
  width: 100%;
  min-height: 200px;
  padding: 16px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  outline: none;
  font-family: inherit;
}
.note-editor-textarea::placeholder { color: var(--text-muted); }

/* Note toolbar */
.note-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}
.note-color-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--motion-fast);
}
.note-color-btn.active { border-color: #fff; transform: scale(1.2); }
.note-tool-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--motion-fast);
}
.note-tool-btn.active {
  background: rgba(229,255,60,0.15);
  border-color: var(--accent);
  color: var(--accent);
}
.note-tool-btn-danger {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: var(--red);
}

/* Sketch canvas area */
.note-sketch-area {
  padding: 0 16px 12px;
  border-top: 1px solid var(--border);
  display: none;
}
.note-sketch-area.visible { display: block; }
.note-sketch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 8px;
}
.note-canvas {
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  touch-action: none;
  cursor: crosshair;
  display: block;
}

/* Avatar edit badge */
.avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--bg-primary);
}
.profile-avatar { position: relative; }

/* Timer picker sheet */
.timer-picker-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn var(--motion-fast) var(--ease-enter);
}
.timer-picker-card {
  background: var(--bg-secondary);
  border-radius: 24px 24px 0 0;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  width: 100%;
  max-width: 480px;
}
.timer-picker-title {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}
.timer-picker-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.timer-picker-opt {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-primary);
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
.timer-picker-opt:hover, .timer-picker-opt:active {
  background: rgba(229,255,60,0.1);
  border-color: var(--accent);
  color: var(--accent);
}
.timer-picker-opt.selected {
  background: rgba(229,255,60,0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ===== MINI-GAMES ===== */
@keyframes bjDeal {
  0%   { transform: translate(150px,-90px) rotate(22deg) scale(0.3); opacity:0; }
  55%  { opacity:1; }
  82%  { transform: translate(-3px,3px) rotate(-2deg) scale(1.06); }
  100% { transform: translate(0,0) rotate(0deg) scale(1); opacity:1; }
}
@keyframes bjFlip {
  0%   { transform: perspective(500px) rotateY(90deg) scale(0.9); }
  100% { transform: perspective(500px) rotateY(0deg) scale(1); }
}
@keyframes bjWinPulse {
  0%,100% { box-shadow:0 3px 8px rgba(0,0,0,0.4); }
  50%      { box-shadow:0 0 0 3px var(--accent),0 0 18px rgba(229,255,60,0.5); }
}
.bj-card-deal { animation: bjDeal 0.42s cubic-bezier(0.22,0.61,0.36,1) forwards; }
.bj-card-flip { animation: bjFlip 0.28s ease-out forwards; }
.bj-win-pulse { animation: bjWinPulse 0.45s ease-in-out 3; }

@keyframes memAppear {
  0%   { opacity:0; transform:scale(0.3) rotate(-8deg); }
  70%  { transform:scale(1.18) rotate(2deg); }
  100% { opacity:1; transform:scale(1) rotate(0deg); }
}
@keyframes memHide {
  0%   { opacity:1; transform:scale(1); filter:blur(0); }
  100% { opacity:0; transform:scale(0.82); filter:blur(8px); }
}
@keyframes memTap {
  0%   { transform:scale(1); }
  30%  { transform:scale(0.78); }
  65%  { transform:scale(1.14); }
  100% { transform:scale(1); }
}
@keyframes memWrong {
  0%,100% { transform:translateX(0); }
  20%      { transform:translateX(-8px); }
  60%      { transform:translateX(8px); }
}

/* ===== NUTRITION ASSISTANT ===== */
.advice-row{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px solid var(--border)}
.advice-row:last-child{border-bottom:none}
.advice-icon{font-size:20px;flex-shrink:0;margin-top:1px}
.advice-text{font-size:13px;line-height:1.5;color:var(--text-secondary)}

.analytics-item{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);gap:8px}
.analytics-item:last-child{border-bottom:none}
.analytics-label{font-size:13px;font-weight:600}
.analytics-sub{font-size:11px;color:var(--text-muted);margin-top:2px}
.analytics-badge{font-size:11px;font-weight:600;padding:4px 8px;border-radius:20px;white-space:nowrap;flex-shrink:0}
.badge-good{background:rgba(74,222,128,.15);color:#4ade80}
.badge-warn{background:rgba(251,191,36,.15);color:#fbbf24}
.badge-bad{background:rgba(248,113,113,.15);color:#f87171}

.vitamin-row{padding:12px 0;border-bottom:1px solid var(--border)}
.vitamin-row:last-child{border-bottom:none}
.priority-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:10px;margin-left:6px;vertical-align:middle}
.priority-high{background:rgba(229,255,60,.15);color:var(--accent)}
.priority-medium{background:rgba(96,165,250,.15);color:#60a5fa}
.priority-low{background:rgba(148,163,184,.1);color:var(--text-muted)}

/* ===== BODY HOLOGRAM ===== */
.hologram-wrap{
  position:relative;border-radius:18px;overflow:hidden;
  background:radial-gradient(ellipse 80% 90% at 50% 50%,rgba(0,40,80,.55) 0%,rgba(0,0,0,.88) 100%);
  border:1px solid rgba(0,170,255,.18);
  box-shadow:0 0 32px rgba(0,120,255,.10) inset,0 0 16px rgba(0,120,255,.06);
}
.hologram-wrap::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background-image:linear-gradient(rgba(0,170,255,.025) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(0,170,255,.025) 1px,transparent 1px);
  background-size:28px 28px;border-radius:18px;
}
.hologram-scanlines{position:absolute;inset:0;pointer-events:none;border-radius:18px;
  background:repeating-linear-gradient(0deg,transparent,transparent 3px,rgba(0,170,255,.022) 4px)}
.hologram-wrap canvas{display:block;width:100%}
.hologram-hint{font-size:11px;color:var(--text-muted);text-align:center;margin-top:8px;opacity:.65;letter-spacing:.3px}
.holo-legend-dot{display:inline-block;width:8px;height:8px;border-radius:50%;vertical-align:middle;margin-right:3px}
.holo-legend-label{font-size:10px;color:var(--text-muted);margin-right:8px;vertical-align:middle}

/* ===== TELEGRAM BOT AUTH ===== */
.btn-tg{background:#229ED9;color:#fff;font-weight:700;border:none;display:flex;align-items:center;justify-content:center;gap:8px}
.btn-tg:disabled{opacity:.6;cursor:default}
.tg-bot-auth-block{text-align:center;margin-bottom:4px}
.tg-auth-status{font-size:13px;min-height:20px;margin-top:8px;transition:color .3s;color:var(--text-muted)}
.tg-auth-status.pending{color:#229ED9}
.tg-auth-status.success{color:#4ade80}
.tg-auth-status.error{color:#f87171}
.btn-cancel-auth{font-size:12px;color:var(--text-muted);background:none;border:none;cursor:pointer;margin-top:6px;padding:4px 8px}

/* ===== WORKOUT CALENDAR ===== */
.wc-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.wc-month-label{font-size:14px;font-weight:700}
.wc-nav-btn{background:rgba(255,255,255,.07);border:none;color:var(--text-primary);font-size:18px;width:32px;height:32px;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.wc-weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;margin-bottom:4px}
.wc-weekdays span{font-size:10px;color:var(--text-muted);text-align:center;font-weight:600}
.wc-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.wc-day{border-radius:7px;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;cursor:default}
.wc-day--blank{background:transparent}
.wc-day--empty{background:rgba(255,255,255,.05)}
.wc-day--low{background:rgba(74,222,128,.25)}
.wc-day--mid{background:rgba(251,191,36,.30)}
.wc-day--high{background:rgba(248,113,113,.30)}
.wc-day--today{box-shadow:0 0 0 1.5px var(--accent)}
.wc-day-num{font-size:10px;color:var(--text-muted);line-height:1}
.wc-tonnage{font-size:8px;font-weight:700;color:#fff;margin-top:1px;line-height:1}
.wc-legend{display:flex;align-items:center;gap:6px;margin-top:10px;font-size:11px;color:var(--text-muted);flex-wrap:wrap}
.wc-leg-dot{display:inline-block;width:10px;height:10px;border-radius:3px;flex-shrink:0}

/* ===== ANTHROPOMETRY ===== */
.anthro-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.anthro-field{display:flex;flex-direction:column;gap:4px}
.anthro-label{font-size:11px;font-weight:600;color:var(--text-secondary)}
.anthro-input-wrap{position:relative}
.anthro-input{padding-right:28px!important}
.anthro-unit{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:11px;color:var(--text-muted);pointer-events:none}
.anthro-field-date{font-size:10px;color:var(--text-muted);margin-top:3px;opacity:0.75}

/* ===== 1RM TRACKER ===== */
.rm-tab{background:none;border:1px solid var(--border);border-radius:8px;padding:4px 10px;font-size:12px;color:var(--text-muted);cursor:pointer;transition:all .15s}
.rm-tab.active{background:var(--accent);color:#000;border-color:var(--accent);font-weight:700}

/* ===== MUSCLE BALANCE ===== */
.balance-row{display:grid;grid-template-columns:80px 1fr 32px 60px;align-items:center;gap:8px;margin-bottom:8px}
.balance-label{font-size:12px;color:var(--text-secondary);white-space:nowrap}
.balance-bar-wrap{height:8px;background:var(--bg-input);border-radius:4px;position:relative;overflow:visible}
.balance-bar-fill{height:100%;border-radius:4px;transition:width .3s}
.balance-bar-target{position:absolute;top:-3px;width:2px;height:14px;background:rgba(255,255,255,0.4);border-radius:1px}
.balance-count{font-size:13px;font-weight:700;text-align:right}
.balance-status{font-size:11px;color:var(--text-muted);white-space:nowrap}
.balance-warning{background:rgba(239,68,68,0.1);border:1px solid rgba(239,68,68,0.3);border-radius:8px;padding:8px 12px;font-size:12px;color:var(--red);margin-top:8px}

/* ===== PERIODIZATION BANNER ===== */
.period-banner{display:flex;align-items:center;gap:10px;background:rgba(229,255,60,0.07);border:1px solid rgba(229,255,60,0.2);border-radius:10px;padding:8px 12px;margin-bottom:12px;flex-wrap:wrap}
.period-badge{font-size:13px;font-weight:700;color:var(--accent);white-space:nowrap}
.period-tip{font-size:11px;color:var(--text-muted)}

/* ===== LAST SESSION HINT ===== */
.last-session-hint{font-size:11px;color:var(--text-muted);margin-top:3px}
.last-session-hint b{color:var(--accent)}
