@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800;900&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Philosopher:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg-dark: #07070a;
  --bg-app-shell: rgba(13, 14, 20, 0.75);
  --bg-header: #070913;
  --bg-bottom-nav: rgba(10, 11, 16, 0.92);
  --bg-surface: rgba(18, 19, 28, 0.85);
  --bg-card: rgba(24, 26, 38, 0.65);
  --bg-card-hover: rgba(32, 35, 52, 0.85);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-color-active: rgba(225, 29, 72, 0.6);
  
  --accent-primary: #e11d48; /* High-Reiatsu Bankai Crimson */
  --accent-primary-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #881337 100%);
  --accent-primary-shadow: rgba(225, 29, 72, 0.35);
  --accent-primary-shadow-hover: rgba(225, 29, 72, 0.55);
  --accent-primary-hover: #f43f5e;
  --accent-success: #10b981; /* Emerald */
  --accent-success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-warning: #f59e0b; /* Amber */
  --accent-danger: #ef4444; /* Rose */
  --accent-info: #38bdf8; /* Reiatsu / Quincy Azure */

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-input: rgba(16, 18, 27, 0.75);
  --bg-input-focus: rgba(24, 26, 38, 0.95);

  --bg-glass-subtle: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --accent-cyan-text: #38bdf8;
  --accent-amber-text: #fbbf24;
  --accent-emerald-text: #34d399;
  --accent-indigo-text: #a5b4fc;
  --accent-purple-text: #c084fc;
  --accent-pink-text: #f472b6;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  --border-radius-xl: 24px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Global Bottom Boundary & Modal Clearance Variables */
  --impersonation-banner-offset: 0px;
  --bottom-nav-height: 72px;
  --modal-top-clearance: calc(24px + var(--impersonation-banner-offset, 0px) + env(safe-area-inset-top, 0px));
  --modal-bottom-cutoff: calc(var(--bottom-nav-height) + 20px + env(safe-area-inset-bottom, 0px)); /* 92px + safe-area: cuts off 20px above bottom nav */
  --modal-max-height: calc(100dvh - var(--modal-top-clearance) - var(--modal-bottom-cutoff));
  --modal-scroll-padding-bottom: 48px;
  --app-scroll-padding-bottom: calc(var(--bottom-nav-height) + 68px + env(safe-area-inset-bottom, 0px)); /* 140px + safe-area */
  --app-scroll-padding-bottom-workout: calc(var(--bottom-nav-height) + 132px + env(safe-area-inset-bottom, 0px)); /* 204px + safe-area */
}

body.impersonating-active {
  --impersonation-banner-offset: var(--impersonation-banner-measured-height, 42px);
  --modal-top-clearance: calc(var(--impersonation-banner-offset, 42px) + 12px + env(safe-area-inset-top, 0px));
  --modal-max-height: calc(100dvh - var(--modal-top-clearance) - var(--modal-bottom-cutoff));
}

/* Bleach Light Mode Theme */
:root[data-theme="bleach-light"],
body.light-theme {
  color-scheme: light;
  --bg-dark: #f4f5f9;
  --bg-app-shell: rgba(255, 255, 255, 0.96);
  --bg-header: #ffffff;
  --bg-bottom-nav: rgba(255, 255, 255, 0.95);
  --bg-surface: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(241, 245, 249, 0.95);
  --bg-card-hover: rgba(226, 232, 240, 0.98);
  --border-color: rgba(15, 23, 42, 0.12);
  --border-color-active: rgba(220, 38, 38, 0.6);
  
  --accent-primary: #dc2626; /* Crimson Accent */
  --accent-primary-gradient: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  --accent-primary-shadow: rgba(220, 38, 38, 0.25);
  --accent-primary-shadow-hover: rgba(220, 38, 38, 0.4);
  --accent-primary-hover: #ef4444;
  --accent-success: #059669;
  --accent-success-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --accent-warning: #d97706;
  --accent-danger: #dc2626;
  --accent-info: #0284c7; /* Quincy Ice Blue */

  --text-main: #09090b; /* Deep sumi-e ink, high legibility */
  --text-secondary: #334155; /* Slate charcoal */
  --text-muted: #475569; /* Readable muted slate (WCAG AA compliant on #ffffff) */
  --bg-input: rgba(241, 245, 249, 0.9);
  --bg-input-focus: #ffffff;
  --shadow-glass: 0 8px 30px rgba(0, 0, 0, 0.08);

  --bg-glass-subtle: rgba(15, 23, 42, 0.04);
  --bg-glass-hover: rgba(15, 23, 42, 0.08);
  --border-subtle: rgba(15, 23, 42, 0.12);

  --accent-cyan-text: #0369a1;
  --accent-amber-text: #b45309;
  --accent-emerald-text: #047857;
  --accent-indigo-text: #4338ca;
  --accent-purple-text: #7e22ce;
  --accent-pink-text: #be185d;

  --space-surface-obsidian: #f8fafc;
  --space-surface-card: rgba(255, 255, 255, 0.96);
  --space-surface-console: #ffffff;
  --space-surface-steel: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --space-surface-steel-hover: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --shadow-altitude-1: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-altitude-2: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-altitude-3: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-floating-crimson: 0 12px 30px -6px rgba(220, 38, 38, 0.15), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-inset-console: inset 0 1px 3px rgba(0, 0, 0, 0.06), inset 0 0 1px rgba(0, 0, 0, 0.08);
  --specular-rim-glass: inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
  --specular-rim-steel: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  --border-glass-subtle: 1px solid rgba(15, 23, 42, 0.1);
  --border-glass-active: 1px solid rgba(220, 38, 38, 0.5);
}

/* Base resets */
html, body {
  color-scheme: dark;
}

body.light-theme,
html[data-theme="bleach-light"] body {
  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-dark);
}

/* Universal Media & Image Containment Reset */
img, picture, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background-color: var(--text-muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-primary);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background grid glow effects */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

select {
  color-scheme: dark;
}

/* Global native select dropdown backdrop and option typography */
select option,
select optgroup,
.form-select option,
.set-input-box option,
.chart-select option,
.routine-location-select option,
.routine-sub-filter option,
.manage-checklist-goal-select option,
.weight-ctrl-input option {
  background-color: #0f172a !important; /* Dark solid backdrop to ensure light text is crisp and clear */
  color: #f8fafc !important; /* High-contrast bright readable slate/white */
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
}

select option:checked,
select option:hover,
select option:focus,
.form-select option:checked,
.set-input-box option:checked {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

select option:disabled {
  color: #64748b !important;
  background-color: #0b1120 !important;
}

/* Bleach Light Mode Specific Contrast & Legibility Overrides */
body.light-theme::before,
html[data-theme="bleach-light"] body::before {
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(5, 150, 105, 0.03) 0%, transparent 50%);
}

body.light-theme select,
html[data-theme="bleach-light"] select {
  color-scheme: light;
}

body.light-theme select option,
body.light-theme select optgroup,
body.light-theme .form-select option,
body.light-theme .set-input-box option,
body.light-theme .chart-select option,
body.light-theme .routine-location-select option,
body.light-theme .routine-sub-filter option,
body.light-theme .manage-checklist-goal-select option,
body.light-theme .weight-ctrl-input option {
  background-color: #ffffff !important;
  color: #09090b !important;
}

body.light-theme select option:checked,
body.light-theme select option:hover,
body.light-theme select option:focus,
body.light-theme .form-select option:checked,
body.light-theme .set-input-box option:checked {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

body.light-theme select option:disabled {
  color: #94a3b8 !important;
  background-color: #f1f5f9 !important;
}

body.light-theme .glass-panel {
  background: var(--bg-surface);
  border-color: var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body.light-theme .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
}

body.light-theme .modal-content {
  background: #ffffff !important;
  color: #09090b !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18) !important;
}

body.light-theme .modal-header h3,
body.light-theme .modal-header h4,
body.light-theme .modal-header h5,
body.light-theme .modal-body h2,
body.light-theme .modal-body h3,
body.light-theme .modal-body h4,
body.light-theme .modal-body h5,
body.light-theme .modal-body label,
body.light-theme .modal-content h1,
body.light-theme .modal-content h2,
body.light-theme .modal-content h3,
body.light-theme .modal-content h4,
body.light-theme .modal-content h5,
body.light-theme .modal-content h6,
body.light-theme .section-title,
body.light-theme .card-title,
body.light-theme .profile-card h3,
body.light-theme .profile-card h4,
body.light-theme .antigravity-card h3,
body.light-theme .antigravity-card h4,
body.light-theme .ai-ea-card h3,
body.light-theme .ai-ea-card h4 {
  color: var(--text-main);
}

body.light-theme .form-input,
body.light-theme .form-select,
body.light-theme textarea,
body.light-theme .routine-name-input,
body.light-theme .routine-location-search-input,
body.light-theme .routine-location-select,
body.light-theme .routine-search-input,
body.light-theme .routine-notes-input {
  background: rgba(241, 245, 249, 0.95) !important;
  color: #09090b !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
}

body.light-theme .form-input:focus,
body.light-theme .form-select:focus,
body.light-theme textarea:focus,
body.light-theme .routine-name-input:focus,
body.light-theme .routine-location-search-input:focus,
body.light-theme .routine-location-select:focus,
body.light-theme .routine-search-input:focus,
body.light-theme .routine-notes-input:focus {
  background: #ffffff !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
  color: #09090b !important;
}

body.light-theme .form-input::placeholder,
body.light-theme textarea::placeholder {
  color: #64748b !important;
}

body.light-theme .btn-secondary {
  background: rgba(241, 245, 249, 0.95);
  color: #1e293b;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

body.light-theme .btn-secondary:hover {
  background: #e2e8f0;
  color: #09090b;
}

body.light-theme .btn-circle {
  background: rgba(241, 245, 249, 0.9);
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

body.light-theme .btn-circle:hover {
  background: #e2e8f0;
  color: #09090b;
}

body.light-theme .metallic-pin {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #334155;
}

body.light-theme .metallic-pin:hover {
  background: #e2e8f0;
  color: #09090b;
}

body.light-theme .bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .nav-item {
  color: #64748b;
}

body.light-theme .nav-item.active {
  color: var(--accent-primary);
}

body.light-theme .dashboard-sub-nav,
body.light-theme .profile-sub-nav,
body.light-theme .manage-sub-nav {
  background: rgba(241, 245, 249, 0.95) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

body.light-theme .sub-nav-item {
  color: #475569 !important;
}

body.light-theme .sub-nav-item:hover {
  color: #09090b !important;
  background: rgba(226, 232, 240, 0.9) !important;
}

body.light-theme .sub-nav-item.active {
  color: #ffffff !important;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #dc2626 0%, #b91c1c 100%)) !important;
  box-shadow: 0 4px 12px var(--accent-primary-shadow, rgba(220, 38, 38, 0.25)) !important;
}

/* Light Mode Card Surfaces & Spatial Depth Elevators */
body.light-theme .antigravity-card,
body.light-theme .profile-card.glass-panel {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .antigravity-card:hover,
body.light-theme .profile-card.glass-panel:hover {
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08), 0 0 16px rgba(220, 38, 38, 0.1) !important;
}

body.light-theme .ai-ea-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 15px rgba(220, 38, 38, 0.06) !important;
}

body.light-theme .ai-ea-card:hover {
  border-color: rgba(220, 38, 38, 0.4) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08), 0 0 20px rgba(220, 38, 38, 0.12) !important;
}

body.light-theme #ai-ea-toggle-btn {
  background: rgba(15, 23, 42, 0.06) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #09090b !important;
}

body.light-theme #ai-ea-guide-btn,
body.light-theme #ai-ea-settings-btn,
body.light-theme #ai-ea-body-toggle-btn {
  background: rgba(15, 23, 42, 0.06) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}

body.light-theme #ai-ea-briefing-container {
  background: rgba(241, 245, 249, 0.9) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

body.light-theme .vea-action-btn-card {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #1e293b;
}

body.light-theme .vea-action-btn-card:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #09090b;
}

body.light-theme .vea-action-btn-card.highlight-red {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

body.light-theme .vea-action-btn-card.highlight-blue {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

body.light-theme .vea-action-btn-card.highlight-amber {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.25);
  color: #d97706;
}

body.light-theme .vea-action-btn-card.highlight-emerald {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
  color: #059669;
}

body.light-theme .vea-filter-pill {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #475569;
}

body.light-theme .vea-filter-pill.active {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
}

body.light-theme .ai-ea-alert-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .btn-glass-icon {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .btn-glass-icon svg,
body.light-theme .btn-glass-icon i {
  stroke: #475569;
}

body.light-theme .btn-glass-icon:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-theme .btn-glass-icon:hover svg,
body.light-theme .btn-glass-icon:hover i {
  stroke: #dc2626;
}

body.light-theme .tracker-console-card {
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-top: 1px solid rgba(220, 38, 38, 0.25) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .dome-button.dome-past,
body.light-theme .dome-button.dome-future,
body.light-theme .dome-button.dome-inactive {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #475569;
}

body.light-theme .consistency-milestone-progress-bar-wrap {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

body.light-theme .consistency-milestone-progress-bar-wrap:hover {
  background: rgba(226, 232, 240, 0.95);
}

body.light-theme .metadata-pill-badge {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}

body.light-theme .metadata-pill-badge.badge-primary-glow {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #09090b;
}

body.light-theme .set-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .set-input-box {
  background: rgba(241, 245, 249, 0.85);
  color: #09090b;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

/* Header & Brand Lockup Overrides */
body.light-theme header.app-top-header {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05) !important;
}

body.light-theme .brand-title-fitness .brand-fit {
  color: #09090b !important;
}

body.light-theme .brand-title-fitness .brand-ness {
  color: #4338ca !important;
}

body.light-theme .brand-title-fitness .brand-god {
  color: #09090b !important;
  text-shadow: none !important;
}

body.light-theme .brand-sub-quest,
body.light-theme .brand-sub-godquest {
  color: #dc2626 !important;
  text-shadow: none !important;
}

body.light-theme .brand-name {
  background: linear-gradient(120deg, #09090b 40%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .brand-logo {
  background: radial-gradient(circle at 50% 30%, #ffffff, #f1f5f9) !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .brand-logo svg {
  color: #09090b !important;
}

/* Mode Capsule Switcher Light Theme Harmonization */
body.light-theme .mode-capsule-pin.mode-personal-active {
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
  color: #b45309 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .mode-capsule-pin.mode-personal-active:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(217, 119, 6, 0.6) !important;
  color: #92400e !important;
}

body.light-theme .mode-capsule-pin.mode-personal-active #mode-capsule-icon {
  color: #d97706 !important;
  filter: none !important;
}

body.light-theme .mode-capsule-pin.mode-coach-active {
  background: rgba(79, 70, 229, 0.08) !important;
  border: 1px solid rgba(67, 56, 202, 0.35) !important;
  color: #4338ca !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .mode-capsule-pin.mode-coach-active:hover {
  background: rgba(79, 70, 229, 0.15) !important;
  border-color: rgba(67, 56, 202, 0.6) !important;
  color: #3730a3 !important;
}

body.light-theme .mode-capsule-pin.mode-coach-active #mode-capsule-icon {
  color: #4f46e5 !important;
  filter: none !important;
}

body.light-theme .mode-capsule-switch-icon {
  color: #64748b !important;
}

body.light-theme .mode-capsule-pin:hover .mode-capsule-switch-icon {
  color: #09090b !important;
}

/* Header Metallic Pins Light Theme Harmonization */
body.light-theme .metallic-pin {
  background: rgba(241, 245, 249, 0.9) !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
  color: #334155 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .metallic-pin:hover {
  background: #e2e8f0 !important;
  color: #09090b !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Daily Login Rewards Pin High Contrast */
body.light-theme #header-login-rewards-btn {
  background: rgba(217, 119, 6, 0.08) !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}

body.light-theme #header-login-rewards-btn:hover {
  background: rgba(217, 119, 6, 0.15) !important;
  border-color: rgba(217, 119, 6, 0.5) !important;
}

body.light-theme #header-login-rewards-btn .gold-accent {
  color: #b45309 !important;
  text-shadow: none !important;
}

body.light-theme #header-login-rewards-btn .gift-icon-glow {
  color: #b45309 !important;
}

/* Unread Notification Dot Clean Light Border */
body.light-theme .metallic-pin .notif-unread-dot {
  border: 2px solid #ffffff !important;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.35) !important;
}

/* Theme Toggle Button in Header */
body.light-theme #header-theme-toggle-btn {
  background: rgba(15, 23, 42, 0.05) !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
  color: #334155 !important;
}

body.light-theme #header-theme-toggle-btn:hover {
  background: rgba(15, 23, 42, 0.1) !important;
  color: #09090b !important;
}

/* Header Sub-Banners (Client Coach & Disconnection Banners) */
body.light-theme #coach-info-banner {
  background: rgba(241, 245, 249, 0.95) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}

body.light-theme #coach-info-banner #client-coach-name {
  color: #09090b !important;
}

body.light-theme #disconnection-request-banner {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.95), rgba(254, 243, 199, 0.95)) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  color: #09090b !important;
}

body.light-theme .streak-counter {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #b45309;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.1);
}

body.light-theme .streak-counter:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(217, 119, 6, 0.5);
  color: #78350f;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

body.light-theme .streak-counter i,
body.light-theme .streak-counter svg {
  color: #d97706;
  filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
}

body.light-theme .weekly-day-bubble {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--text-muted);
}

/* Component Selectors Typography Normalization */
body.light-theme .stat-value,
body.light-theme .pvl-metric-value,
body.light-theme .pvl-ex-title,
body.light-theme .weight-history-title,
body.light-theme .weight-history-val-main,
body.light-theme .weight-hero-input,
body.light-theme .strength-header-title,
body.light-theme .strength-lift-input,
body.light-theme .strength-club-hero-name,
body.light-theme .strength-hall-title,
body.light-theme .strength-trophy-club-name,
body.light-theme .nutrition-date-title,
body.light-theme .macro-donut-center-text .val,
body.light-theme .macro-box-current,
body.light-theme .meal-bucket-name,
body.light-theme .meal-item-name,
body.light-theme .pmp-template-title,
body.light-theme .pmp-bucket-head,
body.light-theme .pmp-item-row-name,
body.light-theme .routine-available-name,
body.light-theme .routine-selected-name,
body.light-theme .grouping-count,
body.light-theme .rest-timer-countdown,
body.light-theme .workout-quick-guide-title,
body.light-theme .quick-guide-card-header,
body.light-theme .vea-client-name,
body.light-theme .vea-welcome-stat-val,
body.light-theme .vea-guide-card-title,
body.light-theme .routine-tutorial-title,
body.light-theme .routine-step-title,
body.light-theme .nutrition-tutorial-title,
body.light-theme .nutrition-step-title,
body.light-theme .nutrition-guide-step-title,
body.light-theme .nutrition-guide-card-title,
body.light-theme .partner-gym-name,
body.light-theme .qna-faq-question-btn,
body.light-theme .edit-profile-header h3,
body.light-theme .client-pmp-item {
  color: #09090b !important;
}

body.light-theme .pvl-table td,
body.light-theme .weight-stepper-btn,
body.light-theme .weight-switch-text,
body.light-theme .quick-guide-table td,
body.light-theme .quick-guide-list,
body.light-theme .quick-guide-util-item,
body.light-theme .quick-guide-pill-item,
body.light-theme .dropdown-item,
body.light-theme .qna-faq-answer,
body.light-theme .btn-ghost {
  color: #334155 !important;
}

/* Badges, Tags, & Pills Contrast Normalization (WCAG AA Compliance) */
body.light-theme .real-life-stat-bonus,
body.light-theme .real-life-stat-bonus-sub {
  color: #0369a1 !important;
}
body.light-theme .real-life-stat-chip,
body.light-theme .real-life-stat-pill,
body.light-theme .syllabus-scheduled-badge,
body.light-theme .syllabus-equipment-badge,
body.light-theme .badge-cyan,
body.light-theme .tile-icon-cloud,
body.light-theme .tile-icon-biofeedback,
body.light-theme .muscle-tag-chest,
body.light-theme .badge-exercise-rest,
body.light-theme .rest-duration-pill.active {
  background: rgba(2, 132, 199, 0.12) !important;
  color: #0369a1 !important;
  border-color: rgba(2, 132, 199, 0.3) !important;
}

body.light-theme .checklist-note-btn.active,
body.light-theme .checklist-note-badge,
body.light-theme .milestone-reward-pill,
body.light-theme .saas-streak-badge,
body.light-theme .checklist-goal-badge.goal-cardio,
body.light-theme .checklist-freq-badge.freq-weekly,
body.light-theme .manage-checklist-control-label.weekly-reset,
body.light-theme .pvl-badge-under,
body.light-theme .ai-notice-box,
body.light-theme .ai-ea-badge-tag.tag-weighin,
body.light-theme .ai-ea-badge-tag.tag-renewal,
body.light-theme .rest-timer-title-badge,
body.light-theme .rest-timer-status-pill.paused,
body.light-theme .badge-amber,
body.light-theme .badge-gold,
body.light-theme .tile-icon-notifications,
body.light-theme .tile-icon-nutrition,
body.light-theme .tile-icon-gold,
body.light-theme .tag-adventurer,
body.light-theme .phase-badge-strength,
body.light-theme .timeline-seg-strength,
body.light-theme .adherence-badge-pill.partial,
body.light-theme .tempo-pill-iso,
body.light-theme .cadence-phase-title.phase-iso,
body.light-theme .idle-canvas-breakthrough-pill,
body.light-theme .rpe-9,
body.light-theme .credential-status-badge.pending,
body.light-theme .qna-status-badge.open,
body.light-theme .gym-slot-star-badge {
  background: rgba(217, 119, 6, 0.12) !important;
  color: #b45309 !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}

body.light-theme .custom-flag,
body.light-theme .muscle-tag-back,
body.light-theme .checklist-goal-badge.goal-mobility,
body.light-theme .pvl-badge-exceeded,
body.light-theme .weight-kpi-trend,
body.light-theme .weight-delta-badge.down,
body.light-theme .vea-meta-chip.chip-accent,
body.light-theme .vea-diff-pill.load-up,
body.light-theme .timeline-item-node.node-set,
body.light-theme .badge-set-completed,
body.light-theme .rest-timer-status-pill.resting,
body.light-theme .syllabus-done-badge.active,
body.light-theme .adherence-badge-pill.full,
body.light-theme .invoice-badge-paid,
body.light-theme .badge-emerald,
body.light-theme .tile-icon-coach,
body.light-theme .tile-icon-tasks,
body.light-theme .tile-icon-emerald,
body.light-theme .emom-timer-digits,
body.light-theme .emom-phase-banner.phase-work,
body.light-theme .set-protocol-pill.pill-emom,
body.light-theme .phase-badge-conditioning,
body.light-theme .timeline-seg-conditioning,
body.light-theme .macro-chip-carb,
body.light-theme .rpe-7,
body.light-theme .credential-status-badge.verified,
body.light-theme .qna-status-badge.answered,
body.light-theme .partner-selected-badge,
body.light-theme .partner-toggle-btn.is-added,
body.light-theme .gym-slot-tag.tag-addon {
  background: rgba(5, 150, 105, 0.12) !important;
  color: #047857 !important;
  border-color: rgba(5, 150, 105, 0.3) !important;
}

body.light-theme .exercise-meta .muscle-badge,
body.light-theme .superset-tag-header,
body.light-theme .routine-header-icon,
body.light-theme .routine-step-badge,
body.light-theme .routine-tutorial-step-badge,
body.light-theme .pvl-metric-sub,
body.light-theme .pvl-badge-match,
body.light-theme .nutrition-today-chip,
body.light-theme .btn-sync-tdee-mini,
body.light-theme .strength-club-hero-title,
body.light-theme .strength-progress-pct,
body.light-theme .strength-hall-count-badge,
body.light-theme .badge-indigo,
body.light-theme .badge-blue,
body.light-theme .tile-icon-tutorials,
body.light-theme .tile-icon-analytics,
body.light-theme .tile-icon-gcal,
body.light-theme .tile-icon-scheduler,
body.light-theme .tile-icon-program,
body.light-theme .macro-chip-pro,
body.light-theme .water-quick-btn,
body.light-theme .rpe-8,
body.light-theme .qna-status-badge.resolved,
body.light-theme .emom-phase-banner.phase-rest {
  background: rgba(67, 56, 202, 0.1) !important;
  color: #4338ca !important;
  border-color: rgba(67, 56, 202, 0.28) !important;
}

body.light-theme .weeks-indicator,
body.light-theme .game-streak-badge,
body.light-theme .muscle-tag-delts,
body.light-theme .muscle-tag-shoulders,
body.light-theme .checklist-goal-badge.goal-general,
body.light-theme .ai-ea-badge-tag.tag-overload,
body.light-theme .vea-diff-pill.deload,
body.light-theme .tag-player,
body.light-theme .badge-purple,
body.light-theme .tile-icon-config,
body.light-theme .tile-icon-social,
body.light-theme .tile-icon-purple,
body.light-theme .tile-icon-admin,
body.light-theme .phase-badge-hypertrophy,
body.light-theme .timeline-seg-hypertrophy,
body.light-theme .pmp-category-badge.recomposition,
body.light-theme .badge-epic,
body.light-theme .rarity-epic {
  background: rgba(126, 34, 206, 0.1) !important;
  color: #7e22ce !important;
  border-color: rgba(126, 34, 206, 0.28) !important;
}

body.light-theme .fp-reward-chip,
body.light-theme .fp-balance-pill,
body.light-theme .mission-reward-chip.dust {
  background: rgba(190, 24, 93, 0.1) !important;
  color: #be185d !important;
  border-color: rgba(190, 24, 93, 0.28) !important;
}

body.light-theme .badge-common,
body.light-theme .rarity-common,
body.light-theme .rpe-6,
body.light-theme .phase-badge-custom,
body.light-theme .timeline-seg-custom,
body.light-theme .tile-icon-slate {
  background: rgba(15, 23, 42, 0.05) !important;
  color: #334155 !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

/* Hover States & Secondary Button Normalization */
body.light-theme .dropdown-item:hover,
body.light-theme .routine-kebab-item:hover,
body.light-theme .btn-ghost:hover,
body.light-theme .weight-seg-btn:hover,
body.light-theme .weight-preset-chip:hover,
body.light-theme .rest-timer-adjust-btn:hover,
body.light-theme .heatmap-preset-btn:hover,
body.light-theme .mode-pill-btn:hover,
body.light-theme .segmented-option-btn:hover:not(.active),
body.light-theme .tutorial-step-tab:hover,
body.light-theme .syllabus-status-btn:hover,
body.light-theme .nutrition-cat-tab-btn:hover,
body.light-theme .week-nav-pill:hover,
body.light-theme .pmp-tab-btn:hover,
body.light-theme .analytics-modal-tab-btn:hover,
body.light-theme .daily-tasks-modal-tab-btn:hover,
body.light-theme .social-modal-tab-btn:hover,
body.light-theme .routine-tutorial-skip-btn:hover,
body.light-theme .client-tutorial-skip-btn:hover,
body.light-theme .amrap-emom-chip-btn:hover,
body.light-theme .portion-stepper-btn:hover,
body.light-theme .water-quick-btn:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  color: #09090b !important;
}

body.light-theme .btn-google {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  color: #09090b !important;
}
body.light-theme .btn-google:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
}

body.light-theme .btn-modal-back {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  color: #334155 !important;
}
body.light-theme .btn-modal-back:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  color: #09090b !important;
}

/* =========================================================================
   UNIVERSAL SCOPED INLINE-STYLE & SURFACES HARMONIZER (LIGHT MODE)
   ========================================================================= */

/* A. Inline Light/White Text Normalization */
body.light-theme :not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-almighty-cta):not(.active):not(.active-rpg-tab):not(.sub-nav-item.active):not(.filter-pill.active):not(.badge-pro-feature):not(#admin-impersonation-banner):not(.reiatsu-loading-overlay):not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  h1, h2, h3, h4, h5, h6, strong, b, label, th, p, span, div, td, code, i, svg
)[style*="color: white"],
body.light-theme :not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-almighty-cta):not(.active):not(.active-rpg-tab):not(.sub-nav-item.active):not(.filter-pill.active):not(.badge-pro-feature):not(#admin-impersonation-banner):not(.reiatsu-loading-overlay):not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  h1, h2, h3, h4, h5, h6, strong, b, label, th, p, span, div, td, code, i, svg
)[style*="color:white"],
body.light-theme :not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-almighty-cta):not(.active):not(.active-rpg-tab):not(.sub-nav-item.active):not(.filter-pill.active):not(.badge-pro-feature):not(#admin-impersonation-banner):not(.reiatsu-loading-overlay):not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  h1, h2, h3, h4, h5, h6, strong, b, label, th, p, span, div, td, code, i, svg
)[style*="color: #fff"],
body.light-theme :not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-almighty-cta):not(.active):not(.active-rpg-tab):not(.sub-nav-item.active):not(.filter-pill.active):not(.badge-pro-feature):not(#admin-impersonation-banner):not(.reiatsu-loading-overlay):not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  h1, h2, h3, h4, h5, h6, strong, b, label, th, p, span, div, td, code, i, svg
)[style*="color:#fff"],
body.light-theme :not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-almighty-cta):not(.active):not(.active-rpg-tab):not(.sub-nav-item.active):not(.filter-pill.active):not(.badge-pro-feature):not(#admin-impersonation-banner):not(.reiatsu-loading-overlay):not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  h1, h2, h3, h4, h5, h6, strong, b, label, th, p, span, div, td, code, i, svg
)[style*="color: #f8fafc"],
body.light-theme :not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-almighty-cta):not(.active):not(.active-rpg-tab):not(.sub-nav-item.active):not(.filter-pill.active):not(.badge-pro-feature):not(#admin-impersonation-banner):not(.reiatsu-loading-overlay):not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  h1, h2, h3, h4, h5, h6, strong, b, label, th, p, span, div, td, code, i, svg
)[style*="color: #f1f5f9"],
body.light-theme :not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-almighty-cta):not(.active):not(.active-rpg-tab):not(.sub-nav-item.active):not(.filter-pill.active):not(.badge-pro-feature):not(#admin-impersonation-banner):not(.reiatsu-loading-overlay):not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  h1, h2, h3, h4, h5, h6, strong, b, label, th, p, span, div, td, code, i, svg
)[style*="color: #e2e8f0"] {
  color: var(--text-main) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  p, span, div, td, label
)[style*="color: #cbd5e1"] {
  color: var(--text-secondary) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *):is(
  p, span, div, td, label
)[style*="color: #94a3b8"] {
  color: var(--text-muted) !important;
}

/* B. Inline Pastel/Neon Contrast Normalization */
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #fbbf24"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #fcd34d"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #fde68a"] {
  color: var(--accent-amber-text) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #38bdf8"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #7dd3fc"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #93c5fd"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #60a5fa"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #00f2fe"] {
  color: var(--accent-cyan-text) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #34d399"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #6ee7b7"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #a7f3d0"] {
  color: var(--accent-emerald-text) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #a5b4fc"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #818cf8"] {
  color: var(--accent-indigo-text) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #c084fc"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #d8b4fe"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #a855f7"] {
  color: var(--accent-purple-text) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #f472b6"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="color: #f9a8d4"] {
  color: var(--accent-pink-text) !important;
}

/* C. Inline Translucent-White Backgrounds & Borders Normalization */
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="background: rgba(255, 255, 255, 0."],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="background:rgba(255, 255, 255, 0."],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="background: rgba(255,255,255,0."],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="background:rgba(255,255,255,0."] {
  background: var(--bg-glass-subtle) !important;
}

body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="border: 1px solid rgba(255, 255, 255"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="border: 1px solid rgba(255,255,255"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="border-color: rgba(255, 255, 255"],
body.light-theme :not(.dark-viewport-surface):not(.dark-viewport-surface *)[style*="border-color: rgba(255,255,255"] {
  border-color: var(--border-subtle) !important;
}

/* D. Inline Dark Sub-Containers Inside Light Modals & Cards Normalization */
body.light-theme .modal-content div[style*="background: rgba(15, 23, 42"],
body.light-theme .modal-content div[style*="background: rgba(15,23,42"],
body.light-theme .modal-content div[style*="background: rgba(30, 41, 59"],
body.light-theme .modal-content div[style*="background: rgba(30,41,59"],
body.light-theme .modal-content div[style*="background: rgba(10, 15, 29"],
body.light-theme .modal-content div[style*="background: rgba(0, 0, 0, 0.25)"],
body.light-theme .modal-content div[style*="background: rgba(0,0,0,0.25)"],
body.light-theme .modal-content div[style*="background: rgba(0, 0, 0, 0.3)"],
body.light-theme .modal-content div[style*="background: rgba(0,0,0,0.3)"],
body.light-theme .glass-panel div[style*="background: rgba(15, 23, 42"],
body.light-theme .glass-panel div[style*="background: rgba(15,23,42"],
body.light-theme .glass-panel div[style*="background: rgba(30, 41, 59"],
body.light-theme .glass-panel div[style*="background: rgba(30,41,59"],
body.light-theme .glass-panel div[style*="background: rgba(10, 15, 29"],
body.light-theme .glass-panel div[style*="background: rgba(0, 0, 0, 0.25)"],
body.light-theme .glass-panel div[style*="background: rgba(0,0,0,0.25)"] {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

/* E. Signature Pad Canvas Container High Contrast Support */
body.light-theme .signature-pad-box,
body.light-theme #doc-trainee-signature-canvas,
body.light-theme #doc-coach-signature-canvas,
body.light-theme #doc-signature-canvas {
  background: #0f172a !important; /* Preserves crisp high-contrast signature area */
  border-radius: var(--border-radius-sm);
}

/* F. Atmospheric Game Canvases & Theaters Dark-Mode Isolation */
.dark-viewport-surface,
.dark-viewport-surface .modal-content,
.dark-viewport-surface *,
#idle-canvas-container,
.idle-canvas-container,
.idle-canvas-container *,
.poker-table-wrapper,
#arena-combat-viewport {
  color-scheme: only dark !important;
}

/* G. Theme Preview Swatches in Settings Modal */
body.light-theme .preview-dark {
  background: #07070a !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}
body.light-theme .preview-dark span,
body.light-theme .preview-dark [style*="color: #f8fafc"] {
  color: #f8fafc !important;
}
body.light-theme .preview-dark i {
  color: #cbd5e1 !important;
}
body.light-theme .preview-light {
  background: #f4f5f9 !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
}
body.light-theme .preview-light span {
  color: #09090b !important;
}

/* H. PVL Cards, Tables & Badges Light Mode Harmony */
body.light-theme .pvl-metric-card,
body.light-theme .pvl-ex-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .pvl-metric-title {
  color: #475569 !important;
}

body.light-theme .pvl-table-wrapper {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

body.light-theme .pvl-table th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
}

body.light-theme .pvl-table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
  color: #1e293b !important;
}

body.light-theme .pvl-table tr:hover td {
  background: rgba(15, 23, 42, 0.03) !important;
}

body.light-theme .pvl-badge-missed {
  background: rgba(220, 38, 38, 0.12) !important;
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}

/* I. Fun Tab & 2.5D RPG Game Canvas Dark-Mode HUD Preservation */
body.light-theme .idle-canvas-container,
body.light-theme .idle-canvas-container *,
body.light-theme .dark-viewport-surface,
body.light-theme .dark-viewport-surface * {
  color-scheme: only dark !important;
}

body.light-theme .idle-canvas-container .glass-panel,
body.light-theme .dark-viewport-surface .glass-panel {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6) !important;
}

body.light-theme .idle-minimap-claim-pill {
  background: rgba(15, 23, 42, 0.94) !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 10px rgba(245, 158, 11, 0.2) !important;
}

body.light-theme .idle-claim-pill-val-juice {
  color: #ffffff !important;
}

body.light-theme .idle-claim-pill-val-sauce {
  color: #38bdf8 !important;
}

body.light-theme .idle-claim-cap-badge {
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

body.light-theme .idle-stage-radar-dock {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(99, 102, 241, 0.25) !important;
}

body.light-theme .idle-stage-name-text {
  color: #f8fafc !important;
}

body.light-theme .idle-stage-arrow-btn {
  color: #a5b4fc !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.light-theme .idle-stage-arrow-btn:hover:not(:disabled) {
  color: #ffffff !important;
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
}

body.light-theme .idle-radar-expand-badge {
  color: #a5b4fc !important;
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
}

/* App container */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  padding-bottom: var(--app-scroll-padding-bottom, calc(140px + env(safe-area-inset-bottom, 0px))); /* Generous space for bottom nav + scroll buffer */
  background: var(--bg-app-shell, rgba(7, 9, 19, 0.5));
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  transition: background 0.3s ease, padding-bottom 0.25s ease;
}

/* Ensure scrollable view containers clear both bottom nav AND floating minimized workout dock */
body.has-minimized-workout .app-shell,
body:has(#live-workout-bar:not([style*="display: none"])) .app-shell {
  padding-bottom: var(--app-scroll-padding-bottom-workout, calc(204px + env(safe-area-inset-bottom, 0px))) !important;
}

/* Header style */
header {
  padding: 20px 24px 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-header, rgba(7, 9, 19, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1200;
  transition: background 0.3s ease;
}

header.app-top-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 12px;
  background: var(--bg-header, #070913);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  width: 100%;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.0;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  gap: 2.5px;
}

.rpg-top-bar {
  position: relative;
  z-index: 5;
}

.brand,
.landing-brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.brand:hover,
.landing-brand-lockup:hover {
  transform: translateY(-1px);
}

.brand:active,
.landing-brand-lockup:active {
  transform: translateY(0) scale(0.98);
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: radial-gradient(circle at 50% 30%, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.brand:hover .brand-logo,
.landing-brand-lockup:hover .brand-logo {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(245, 158, 11, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.brand-logo svg {
  color: white;
}

.brand-title-fitness {
  font-family: var(--font-heading, 'Inter', system-ui, sans-serif);
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
}

.brand-title-fitness .brand-word-fitness {
  display: inline-flex;
  align-items: center;
}

.brand-title-fitness .brand-fit {
  color: #ffffff;
}

.brand-title-fitness .brand-ness {
  color: #e0e7ff;
}

.brand-title-fitness .brand-god {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.brand-sub-quest,
.brand-sub-godquest {
  font-family: var(--font-heading, 'Inter', system-ui, sans-serif);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: #ff2a6d;
  line-height: 1.0;
  display: block;
  width: 100%;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 30, 86, 0.5);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.streak-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
  user-select: none;
}

.streak-counter i,
.streak-counter svg {
  color: #f59e0b;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.8));
  animation: flame-pulse 2s infinite ease-in-out;
}

.streak-counter:hover {
  transform: translateY(-1px) scale(1.06);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(239, 68, 68, 0.4));
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
  color: #ffffff;
}

@keyframes flame-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.8)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.9)); }
}

.weekly-day-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.weekly-day-bubble.active {
  background: linear-gradient(135deg, #6366f1, #f59e0b);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Glass panel */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-glass);
}

/* Views & Navigation */
main {
  padding: 16px 20px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.view-container {
  display: none;
  animation: fadeIn var(--transition-normal);
  width: 100%;
  box-sizing: border-box;
}

.view-container.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

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

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 72px;
  background: var(--bg-bottom-nav, rgba(7, 9, 19, 0.88));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  transition: background 0.3s ease;
  z-index: 1200;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  flex: 1;
}

.nav-item:hover {
  color: var(--text-main);
}

.nav-item.active {
  color: var(--accent-primary);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.nav-item.active svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.nav-item span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background: var(--accent-primary-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-primary-shadow, rgba(99, 102, 241, 0.3));
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-primary-shadow-hover, rgba(99, 102, 241, 0.45));
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-success {
  background: var(--accent-success-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-google {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-google:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.08);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 12px 0;
  gap: 12px;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.btn-circle:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.btn-modal-back {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.btn-modal-back:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateX(-1.5px);
  color: white;
}

.btn-modal-back:active {
  transform: scale(0.92);
}

body.light-theme .btn-modal-back {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #1e293b;
}

body.light-theme .btn-modal-back:hover {
  background: rgba(15, 23, 42, 0.14);
  color: #0f172a;
}

/* MINI-GAME PRE-GAME LAUNCHER SCREENS */
.mini-game-launcher-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  animation: fadeInLauncher 0.22s ease-out;
}

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

.mg-launcher-intel-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mg-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.mg-launcher-stat-cell {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mg-launcher-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 900;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.mg-launcher-start-btn:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.1);
}

.mg-launcher-start-btn:active {
  transform: scale(0.98);
}

.btn-block {
  width: 100%;
}

/* SECTION HEADERS */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title svg {
  color: var(--accent-primary);
}

/* PROFILE VIEW */
.profile-card {
  padding: 20px;
  margin-bottom: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.profile-info h3 {
  font-size: 20px;
  font-weight: 700;
}

.profile-info p {
  color: var(--text-secondary);
  font-size: 13px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 16px;
  padding: 0;
}

#view-profile .profile-stats-grid {
  grid-template-columns: repeat(2, 1fr);
}

.profile-stat-box {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.profile-stat-box:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.stat-label {
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Real-Life Workout Stat Bonus Badge & Text Differentiation */
.real-life-stat-bonus {
  color: #38bdf8 !important; /* Electric Cyan accent for differentiation */
  font-weight: 800;
  font-size: 0.88em;
  margin-left: 3px;
  display: inline-flex;
  align-items: center;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.45);
}

.real-life-stat-bonus-sub {
  color: #38bdf8 !important;
  font-weight: 800;
  font-size: 9px;
  margin-left: 2px;
  text-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.real-life-stat-chip {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.real-life-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 10.5px;
  font-weight: 700;
}

/* Streaks calendar helper */
.streaks-calendar-wrapper {
  margin-top: 20px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.2);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.calendar-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.calendar-days {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.calendar-day-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.calendar-day-dot span {
  font-size: 10px;
  color: var(--text-muted);
}

.dot-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-normal);
}

.dot-indicator.completed {
  background: var(--accent-success-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.dot-indicator.missed {
  border-color: var(--border-color);
}

/* Measurements progress chart */
.chart-container {
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chart-select {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.svg-chart {
  width: 100%;
  height: 150px;
  overflow: visible;
}

.inline-unit-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 2px;
  gap: 2px;
  user-select: none;
}

.unit-toggle-btn {
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.unit-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.unit-toggle-btn.active {
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.chart-onboarding-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 16px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  min-height: 160px;
  overflow: hidden;
}

.chart-onboarding-ghost-svg {
  width: 100%;
  max-width: 320px;
  height: 55px;
  margin-bottom: 10px;
  opacity: 0.65;
}

.physique-analytics-card {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.5rem !important; /* 24px (p-6) */
  box-sizing: border-box;
}

/* Eliminate nested framing box when collapsible body is inside a glass-panel / physique-analytics-card */
.glass-panel .onboard-collapsible-body,
.physique-analytics-card .onboard-collapsible-body {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.analytics-chart-wrapper {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 4px;
}

.chart-trend-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 18px;
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
  margin-top: 14px;
  padding-bottom: 2px;
  flex-wrap: wrap;
}

.chart-trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}


.social-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.social-tab-btn {
  padding: 10px 16px;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.social-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.social-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.social-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.social-item .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* EXERCISE DATABASE VIEW */
.search-bar-row {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  padding: 12px 38px 12px 42px;
  border-radius: var(--border-radius-md);
  transition: var(--transition-normal);
}

/* Suppress native search clear/decoration buttons across browsers */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition-fast, 0.15s ease);
  z-index: 2;
}

.search-clear-btn:hover {
  color: var(--text-primary, #ffffff);
}

.search-input:focus {
  border-color: var(--accent-primary);
  background: rgba(30, 41, 59, 0.7);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.filter-pill {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-pill.active {
  background: var(--accent-primary-gradient);
  color: white;
  border-color: transparent;
}

.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exercise-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  transition: var(--transition-normal);
  cursor: pointer;
}

.exercise-item-card:hover {
  transform: scale(1.01);
  background: var(--bg-card-hover);
  border-color: var(--border-color-active);
}

.exercise-item-card.is-selected {
  border-color: var(--accent-primary, #6366f1) !important;
  background: rgba(99, 102, 241, 0.14) !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

.exercise-select-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color, #475569);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.6);
  color: transparent;
}

.exercise-item-card:hover .exercise-select-checkbox {
  border-color: var(--accent-primary, #6366f1);
}

.exercise-select-checkbox svg,
.exercise-select-checkbox i {
  opacity: 0;
  stroke: #ffffff;
  color: #ffffff;
  transition: opacity 0.15s ease;
}

.exercise-item-card.is-selected .exercise-select-checkbox {
  border-color: var(--accent-primary, #6366f1);
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
}

.exercise-item-card.is-selected .exercise-select-checkbox svg,
.exercise-item-card.is-selected .exercise-select-checkbox i {
  opacity: 1;
}

.exercise-swap-modal-content {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(88vh, 660px) !important;
  padding: 18px 18px 0 18px !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

.exercise-swap-modal-content #swap-exercises-list {
  flex: 1 1 auto;
  min-height: 180px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.swap-modal-sticky-footer {
  margin-left: -18px;
  margin-right: -18px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  flex-shrink: 0;
  border-radius: 0 0 var(--border-radius-lg, 12px) var(--border-radius-lg, 12px);
}

body.light-theme .swap-modal-sticky-footer {
  background: rgba(255, 255, 255, 0.96) !important;
  border-top-color: var(--border-subtle, rgba(0, 0, 0, 0.1)) !important;
}

#exercise-detail-modal .modal-content.has-swap-action-bar {
  padding-bottom: 0 !important;
}

.ex-detail-swap-action-bar {
  position: sticky;
  bottom: 0;
  margin-left: -24px;
  margin-right: -24px;
  margin-top: 14px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  z-index: 30;
  flex-shrink: 0;
  border-radius: 0 0 var(--border-radius-lg, 12px) var(--border-radius-lg, 12px);
}

body.light-theme .ex-detail-swap-action-bar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-top-color: var(--border-subtle, rgba(0, 0, 0, 0.1)) !important;
}

@media (max-width: 480px) {
  .ex-detail-swap-action-bar {
    margin-left: -16px;
    margin-right: -16px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

body.light-theme .exercise-select-checkbox {
  background: rgba(241, 245, 249, 0.8);
  border-color: #cbd5e1;
}

body.light-theme .exercise-item-card.is-selected .exercise-select-checkbox {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: #ffffff;
}

.exercise-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exercise-thumbnail {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.exercise-meta p {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.exercise-meta .muscle-badge {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.custom-flag {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ROUTINES & PROGRAMS VIEW */
.routine-section {
  margin-bottom: 24px;
}

.routine-subtitle {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.routines-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.routine-card {
  padding: 16px;
  transition: var(--transition-normal);
}

.routine-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-active);
}

.routine-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 12px;
}

.routine-title-box {
  flex: 1 1 200px;
  min-width: 0;
}

.routine-title-box h3 {
  font-size: 16px;
  font-weight: 700;
}

.routine-meta-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.routine-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.routine-exercises-preview {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.routine-exercises-preview span {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.weeks-indicator {
  background: rgba(139, 92, 246, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--modal-top-clearance, calc(24px + env(safe-area-inset-top, 0px)));
  padding-bottom: var(--modal-bottom-cutoff, calc(92px + env(safe-area-inset-bottom, 0px)));
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  overscroll-behavior: contain;
  transition: opacity var(--transition-normal);
}

.modal-overlay:not(.active) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.modal-overlay.active {
  display: flex !important;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  z-index: 2500;
}

.modal-content {
  width: 90%;
  max-width: 480px;
  max-height: calc(100vh - 108px);
  max-height: var(--modal-max-height, calc(100dvh - 108px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 40px;
  padding: 24px;
  transform: translateY(20px);
  transition: transform var(--transition-slow);
}

/* Generous bottom scroll range for standard modal contents */
.modal-content:not(.vea-hub-modal-container):not(.edit-profile-modal-container):not(.routine-builder-workspace):not(.poker-modal-container):not(.character-customizer-modal-content):not(#supply-drop-modal-content):not(.protein-launcher-modal-content):not(#protein-launcher-game-modal .modal-content):not(.exercise-swap-modal-content):not(.routine-bodypart-modal-content):not(.has-swap-action-bar):not(.program-session-modal-content) {
  padding-bottom: var(--modal-scroll-padding-bottom, 48px) !important;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* ==========================================================================
   DASHBOARD MODAL CONTAINMENT & RESPONSIVE SIZING SYSTEM (PC & MOBILE)
   ========================================================================== */

/* 1. Global PC Dashboard Containment: All standard modals fit strictly within the 600px dashboard frame */
@media (min-width: 601px) {
  .modal-overlay:not(.fullscreen-modal-overlay) .modal-content:not(.routine-builder-workspace):not(.client-tutorial-card) {
    width: 94% !important;
    max-width: min(580px, calc(100vw - 24px)) !important;
    max-height: min(86dvh, 760px, var(--modal-max-height, calc(100dvh - 116px))) !important;
  }
}

/* 2. Global Mobile Dashboard Containment: Fluid width with safe-area bottom clearance */
@media (max-width: 600px) {
  .modal-overlay:not(.fullscreen-modal-overlay) .modal-content:not(.routine-builder-workspace):not(.client-tutorial-card) {
    width: 96% !important;
    max-width: calc(100vw - 12px) !important;
    max-height: var(--modal-max-height, calc(100dvh - 116px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
  }
}

/* 3. Dedicated Dashboard & Manage Modal Classes */
.dashboard-modal-content {
  overflow-y: auto;
  border-radius: var(--border-radius-lg);
  box-sizing: border-box;
}

@media (min-width: 601px) {
  .dashboard-modal-content,
  #manage-scheduler-modal .modal-content,
  #manage-overview-modal .modal-content,
  #manage-program-modal .modal-content,
  #manage-nutrition-modal .modal-content,
  #manage-analytics-modal .modal-content,
  #manage-administration-modal .modal-content {
    width: 94% !important;
    max-width: 580px !important;
    max-height: min(var(--modal-max-height, calc(100dvh - 116px)), 760px) !important;
    padding: 18px 20px !important;
  }
}

@media (max-width: 600px) {
  .dashboard-modal-content,
  #manage-scheduler-modal .modal-content,
  #manage-overview-modal .modal-content,
  #manage-program-modal .modal-content,
  #manage-nutrition-modal .modal-content,
  #manage-analytics-modal .modal-content,
  #manage-administration-modal .modal-content {
    width: 96% !important;
    max-width: calc(100vw - 12px) !important;
    max-height: var(--modal-max-height, calc(100dvh - 116px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
    padding: 12px 14px !important;
  }
}

@media (max-width: 420px) {
  .dashboard-modal-content,
  #manage-scheduler-modal .modal-content,
  #manage-overview-modal .modal-content,
  #manage-program-modal .modal-content,
  #manage-nutrition-modal .modal-content,
  #manage-analytics-modal .modal-content,
  #manage-administration-modal .modal-content {
    width: 98% !important;
    max-width: calc(100vw - 8px) !important;
    padding: 10px 10px !important;
  }
}


.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 16px;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input, rgba(30, 41, 59, 0.5));
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  transition: var(--transition-normal);
  color-scheme: dark;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  background: var(--bg-input-focus, rgba(30, 41, 59, 0.8));
}

/* Password Input Wrapper & Eye Toggle Button */
.password-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-wrapper .form-input {
  padding-right: 42px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.1s ease;
  user-select: none;
  z-index: 2;
}

.password-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle-btn.active {
  color: var(--accent-primary, #818cf8);
}

/* AI ROUTINE BUILDER VIEW */
.ai-console {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 210px);
  min-height: 450px;
}

.ai-chat-history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 4px;
  margin-bottom: 16px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn var(--transition-normal);
}

.chat-bubble.ai {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.chat-bubble.user {
  background: var(--accent-primary-gradient);
  color: white;
  align-self: flex-end;
  border-top-right-radius: 2px;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.ai-input-row {
  display: flex;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
}

.ai-input {
  flex: 1;
  padding: 8px 12px;
  background: none;
  border: none;
  outline: none;
  color: var(--text-main, #ffffff);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  min-height: 60px;
  max-height: 85px;
  overflow-y: auto;
}

/* AI response cards styling */
.generated-program-wrapper {
  margin-top: 10px;
  border: 1px dashed var(--accent-primary);
  background: rgba(99, 102, 241, 0.03);
}

.generated-week {
  margin-bottom: 12px;
  border-left: 2px solid var(--accent-secondary);
  padding-left: 10px;
}

/* LIVE WORKOUT OVERLAY */
.live-workout-overlay {
  position: fixed;
  bottom: 72px; /* Rest just above bottom-nav */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  z-index: 90;
  transition: all var(--transition-slow);
}

/* MINIMIZED STATE */
.live-workout-overlay.minimized {
  height: 62px;
  padding: 10px 18px;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

.live-workout-overlay.minimized:hover {
  background: rgba(15, 23, 42, 0.95);
}

.min-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.min-timer {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.min-rest-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.min-rest-pill:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(245, 158, 11, 0.6);
  transform: scale(1.03);
}

.rest-timer-completion-content {
  animation: fanoutMenuFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.min-title {
  font-weight: 600;
  font-size: 14px;
}

.min-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* EXPANDED STATE */
.live-workout-overlay.expanded {
  bottom: 0;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  border-top: none;
  overflow: hidden;
}

.expanded-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.expanded-header-title h2 {
  font-size: 20px;
  font-weight: 700;
}

.expanded-header-title p {
  color: var(--text-secondary);
  font-size: 12px;
}

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

/* Health Metrics Panel (Google Health Connect style) */
.health-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  background: var(--bg-surface, rgba(18, 19, 28, 0.92));
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  position: relative;
  z-index: 30;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.health-metrics-row:has(#rest-timer-dropdown:not([style*="display: none"])) {
  z-index: 100;
}

body.light-theme .health-metrics-row {
  background: var(--bg-surface, #ffffff);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.metric-item.metric-item-interactive {
  cursor: pointer;
  touch-action: manipulation;
  padding: 6px 8px;
  border-radius: var(--border-radius-md);
  transition: background-color var(--transition-fast), transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.metric-item.metric-item-interactive:hover {
  background: rgba(255, 255, 255, 0.05);
}

.metric-item.metric-item-interactive:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.09);
}

#rest-timer-card {
  position: relative;
  z-index: 35;
}

#rest-timer-card:has(#rest-timer-dropdown:not([style*="display: none"])):active,
.metric-item.metric-item-interactive:has(#rest-timer-dropdown:not([style*="display: none"])):active {
  transform: none !important;
}

.metric-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
}

.metric-icon-box svg,
.metric-icon-box i {
  width: 16px;
  height: 16px;
}

.metric-icon-box.timer {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
}

.metric-icon-box.heart {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-danger);
}

.heart-pulsing svg {
  animation: heartPulse 1.2s infinite alternate;
}

@keyframes heartPulse {
  0% { transform: scale(0.9); filter: drop-shadow(0 0 1px rgba(239, 68, 68, 0.2)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.8)); }
}

.metric-icon-box.calories {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
}

.metric-details {
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.metric-val {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
}

.metric-lbl {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ACTIVE WORKOUT EXERCISES */
.active-exercise-card {
  margin-bottom: 18px;
  padding: 16px;
  position: relative;
  transition: padding var(--transition-normal), margin var(--transition-normal);
}

.active-exercise-card.collapsed .active-ex-body {
  display: none !important;
}

.active-exercise-card.collapsed {
  padding-bottom: 12px;
  margin-bottom: 10px;
}

.ex-group-select {
  accent-color: var(--accent-primary, #e11d48);
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  vertical-align: middle;
  transition: border-color var(--transition-fast);
}

.ex-group-select:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 1px;
}

.active-ex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.active-ex-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.active-ex-title-row h3 {
  font-size: 16px;
  font-weight: 700;
}

/* Superset indicator brackets styling */
.superset-badge {
  background: var(--accent-primary-gradient);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.active-ex-actions {
  display: flex;
  gap: 6px;
}

/* Sets table styling */
.sets-table {
  width: 100%;
  margin-bottom: 12px;
}

.set-row-header {
  display: grid;
  grid-template-columns: 40px 1fr 75px 65px 60px 48px;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
  text-align: center;
}

.set-row {
  display: grid;
  grid-template-columns: 40px 1fr 75px 65px 60px 48px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 0;
  transition: var(--transition-fast);
}

.set-index-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.set-badge-btn,
.set-type-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  padding: 0;
  text-align: center;
  line-height: 1;
  box-sizing: border-box;
  user-select: none;
}

.set-badge-btn:hover,
.set-type-btn:hover {
  filter: brightness(1.15);
  transform: scale(1.05);
}

.set-badge-btn:active,
.set-type-btn:active {
  transform: scale(0.95);
}

/* Solid Set Tag styles */
.tag-N, .set-type-n, .set-type-btn.set-type-n { 
  background: #334155; 
  border: 1px solid #475569; 
  color: #ffffff; 
}
.tag-W, .set-type-w, .set-type-btn.set-type-w { 
  background: #f59e0b; 
  border: 1px solid #d97706; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-D, .set-type-d, .set-type-btn.set-type-d { 
  background: #8b5cf6; 
  border: 1px solid #7c3aed; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-F, .set-type-f, .set-type-btn.set-type-f { 
  background: #ef4444; 
  border: 1px solid #dc2626; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-P, .set-type-p, .set-type-btn.set-type-p { 
  background: #06b6d4; 
  border: 1px solid #0891b2; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-P.tag-P-full, .set-type-btn.tag-P-full {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  position: relative;
}
.tag-P.tag-P-armed, .set-type-btn.tag-P-armed {
  background: #0891b2;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
  animation: pulse-partial-armed 1.2s infinite;
}
.tag-A, .set-type-a, .set-type-btn.set-type-a {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: 1px solid #fb923c;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.35);
}
.tag-E, .set-type-e, .set-type-btn.set-type-e {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid #34d399;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}
.tag-RPE, .set-type-rpe, .set-type-btn.set-type-rpe {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid #818cf8;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
}
@keyframes pulse-partial-armed {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 16px rgba(56, 189, 248, 0.9); }
}
.promoted-set-flash {
  animation: flash-promoted-row 1.2s ease-out;
}
@keyframes flash-promoted-row {
  0% { background: rgba(6, 182, 212, 0.3); border-radius: 6px; }
  100% { background: transparent; }
}

/* Drop Set Sub-Row Styles (+ Add Drop / Clean Targets / - Remove Drop) */
.set-row.set-drop-down-row {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.14) 0%, rgba(109, 40, 217, 0.05) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 10px;
  padding: 5px 2px;
  margin-top: -2px;
  margin-bottom: 6px;
}

.drop-subrow-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid #a855f7;
  color: #e9d5ff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-fast);
  user-select: none;
}

.drop-subrow-add-btn:hover {
  background: rgba(139, 92, 246, 0.38);
  border-color: #c084fc;
  color: #ffffff;
  transform: scale(1.05);
}

.drop-subrow-add-btn:active {
  transform: scale(0.95);
}

.drop-subrow-remove-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.48);
  color: #fca5a5;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-fast);
  user-select: none;
}

.drop-subrow-remove-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #f87171;
  color: #ffffff;
  transform: scale(1.05);
}

.drop-subrow-remove-btn:active {
  transform: scale(0.95);
}

.set-input-box.drop-set-input-box {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(15, 23, 42, 0.72);
}

.set-input-box.drop-set-input-box:focus {
  border-color: #a855f7;
  background: rgba(15, 23, 42, 0.9);
}

body.light-theme .set-row.set-drop-down-row {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.03) 100%);
  border-color: rgba(139, 92, 246, 0.35);
}

body.light-theme .drop-subrow-add-btn {
  background: rgba(139, 92, 246, 0.18);
  border-color: #7c3aed;
  color: #5b21b6;
}

body.light-theme .drop-subrow-remove-btn {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #b91c1c;
}

body.light-theme .set-input-box.drop-set-input-box {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(139, 92, 246, 0.45);
}

@media (max-width: 640px) {
  .drop-subrow-add-btn {
    min-width: 30px;
    min-height: 30px;
  }
}

/* ==========================================================================
   WORKOUT LOGGER FAN-OUT CONTROLS (ADD SET & SET TYPE SELECTION)
   ========================================================================== */

/* --- 1. Set Type Column Fan-Out Dropdown (Independent Portal Layer) --- */
.set-index-cell {
  position: relative;
}

.set-type-fanout-portal-root {
  position: fixed;
  z-index: 99999;
  pointer-events: auto;
}

.set-type-fanout-dropdown {
  position: relative;
  min-width: 205px;
  max-width: 235px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--border-radius-md, 8px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fanoutMenuFadeIn 0.14s ease-out;
  transform-origin: top left;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.set-type-fanout-dropdown::-webkit-scrollbar {
  width: 4px;
}

.set-type-fanout-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.set-type-fanout-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

@keyframes fanoutMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.set-type-fanout-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.12s ease;
  user-select: none;
}

.set-type-fanout-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.set-type-fanout-option.active {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.4);
}

.set-type-fanout-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.set-type-fanout-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.set-type-fanout-desc {
  font-size: 9.5px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  margin-top: 1px;
}

/* Quest-Locked Set Type Fanout Option & Badges */
.set-type-fanout-option.locked-quest-option {
  opacity: 0.85;
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.15);
}

.set-type-fanout-option.locked-quest-option:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.set-type-quest-pill {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-warning, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* --- 2. Add Set Fan-Out Menu --- */
.add-set-fanout-container {
  position: relative;
  flex: 1;
  min-width: 100px;
}

.add-set-fanout-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 0;
  margin-bottom: 6px;
  padding: 5px 6px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-md, 8px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: fanoutMenuFadeIn 0.18s ease-out;
}

.add-set-fanout-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  min-height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.14s ease;
  user-select: none;
}

.add-set-fanout-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.add-set-fanout-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.add-set-fanout-item.item-regular .add-set-fanout-icon {
  background: #334155;
  border: 1px solid #475569;
  color: #ffffff;
}

.add-set-fanout-item.item-partial .add-set-fanout-icon {
  background: #06b6d4;
  border: 1px solid #0891b2;
  color: #ffffff;
}

.add-set-fanout-item.item-emom .add-set-fanout-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid #34d399;
  color: #ffffff;
}

.add-set-fanout-item.item-amrap .add-set-fanout-icon {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: 1px solid #fb923c;
  color: #ffffff;
}

.add-set-fanout-item-label {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.25;
}

.add-set-fanout-item-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main, #f8fafc);
  flex: 1;
}

.add-set-fanout-item-desc {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  margin-top: 1px;
}

.add-set-fanout-item-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Light Theme Overrides */
body.light-theme .set-type-fanout-dropdown,
body.light-theme .add-set-fanout-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

body.light-theme .set-type-fanout-option {
  color: #1e293b;
}

body.light-theme .set-type-fanout-option:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .set-type-fanout-option.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

body.light-theme .set-type-fanout-title,
body.light-theme .add-set-fanout-item-title {
  color: #0f172a;
}

body.light-theme .set-type-fanout-desc,
body.light-theme .add-set-fanout-item-desc {
  color: #64748b;
}

body.light-theme .add-set-fanout-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1e293b;
}

body.light-theme .add-set-fanout-item:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.set-input-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 6px 4px;
  text-align: center;
  font-size: 13px;
  width: 100%;
  color: var(--text-main);
  font-family: monospace;
  color-scheme: dark;
}

.set-input-box::placeholder {
  color: rgba(165, 180, 252, 0.7) !important;
  font-weight: 500;
  font-style: italic;
  opacity: 1;
}

.btn-use-last:hover {
  background: rgba(99, 102, 241, 0.35) !important;
  color: #ffffff !important;
  border-color: rgba(99, 102, 241, 0.7) !important;
}

select.set-input-box {
  cursor: pointer;
  background-color: rgba(30, 41, 59, 0.6);
  color-scheme: dark;
}

select.set-input-box option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  text-align: center;
  font-weight: 600;
  padding: 6px 8px;
}

select.set-input-box option:checked,
select.set-input-box option:hover {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

.set-input-box:focus {
  border-color: var(--accent-primary);
  background: rgba(30, 41, 59, 0.7);
}

/* Ghost Placeholder styling */
.set-input-box::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 11px;
}

.set-completed-chk {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.5);
  transition: var(--transition-fast);
}

.set-completed-chk svg {
  opacity: 0;
  width: 18px;
  height: 18px;
  color: white;
  transition: var(--transition-fast);
}

.set-row.completed-set .set-completed-chk {
  background: var(--accent-success-gradient);
  border-color: transparent;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.set-row.completed-set .set-completed-chk svg {
  opacity: 1;
}

.set-row.completed-set .set-input-box {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

/* Superset brackets indicator visual overlay wrapper */
.superset-group-indicator {
  position: relative;
  margin-top: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--accent-primary);
  border-radius: 4px;
}

.superset-tag-header {
  font-size: 11px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.superset-tag-header svg {
  width: 12px;
  height: 12px;
}

.expanded-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  background: rgba(15, 23, 42, 0.9);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* WORKOUT HISTORY LOG CARDS */
.history-workout-card {
  margin-bottom: 14px;
  padding: 16px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.history-title-grp h4 {
  font-size: 15px;
  font-weight: 700;
}

.history-title-grp p {
  font-size: 11px;
  color: var(--text-secondary);
}

.history-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.history-exercises-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-exercise-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.history-ex-name {
  font-weight: 600;
}

.history-ex-sets {
  color: var(--text-secondary);
}

/* WORKOUT HISTORY CARD ACTIONS - MOBILE-FIRST STRUCTURED GRID */
.history-card-actions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: 2px;
  width: 100%;
  box-sizing: border-box;
}

.history-action-banner {
  width: 100%;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: white;
  border-radius: var(--border-radius-sm, 6px);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
  box-sizing: border-box;
  text-decoration: none;
}

.history-card-actions-row-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

.history-card-actions-row-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

.history-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--border-radius-sm, 6px);
  min-height: 33px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main, #ffffff);
}

.history-action-btn:hover {
  filter: brightness(1.15);
}

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

.history-action-btn i,
.history-action-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.history-action-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Thematic Color Variants */
.history-btn-routine {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.history-btn-education {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.history-btn-edit {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.history-btn-friends {
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #f472b6;
}

.history-btn-share {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.history-btn-sheets {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
}

.history-btn-delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--accent-danger, #ef4444);
}

/* Header & Date Filter Export Button */
.history-export-sheets-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  border-radius: var(--border-radius-sm, 6px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-export-sheets-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

/* Responsive adjustment for wide screens / desktop */
@media (min-width: 641px) {
  .history-card-actions-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .history-card-actions-row-top,
  .history-card-actions-row-bottom {
    display: flex;
    flex: 1;
    min-width: auto;
  }
  .history-action-btn {
    flex: 1;
    padding: 5px 8px;
  }
}

/* Animations & transitions */
.toast-msg {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--accent-primary, #6366f1);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: var(--border-radius-md, 10px);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: calc(100vw - 32px);
  text-align: center;
  box-sizing: border-box;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pulse-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-danger);
  opacity: 0.3;
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 480px) {
  main {
    padding: 10px 8px;
  }

  .active-exercise-card {
    padding: 12px 8px;
  }

  .active-ex-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
  }

  .active-ex-title-row {
    width: 100%;
    align-items: flex-start;
  }

  .active-ex-title-row h3 {
    font-size: 14.5px;
  }

  .active-ex-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
  }

  .sets-table {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .sets-table::-webkit-scrollbar {
    display: none;
  }
  
  .set-row-header, .set-row {
    grid-template-columns: 30px minmax(0, 1fr) 54px 42px 46px 44px;
    gap: 4px;
  }
  
  .set-badge-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    font-size: 10px;
    border-radius: 6px;
  }

  .set-completed-chk {
    width: 28px;
    height: 28px;
  }

  .set-completed-chk svg {
    width: 15px;
    height: 15px;
  }
  
  .set-input-box {
    padding: 5px 2px;
    font-size: 16px !important; /* Critical: Eradicates iOS Safari forced auto-zoom */
    min-width: 0;
    box-sizing: border-box;
  }
  
  .health-metrics-row {
    grid-template-columns: 1fr 1fr;
    padding: 8px;
    gap: 4px;
  }
  
  .metric-icon-box {
    width: 28px;
    height: 28px;
  }

  .metric-icon-box svg,
  .metric-icon-box i {
    width: 14px;
    height: 14px;
  }
  
  .metric-val {
    font-size: 12px;
  }
}

/* UNIFIED ROUTINE CREATOR STYLES */
.routine-builder-tabs .btn {
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  font-weight: 600;
}

.routine-builder-tabs .btn.active {
  background: var(--accent-primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   MODERN DUAL-PANEL WORKOUT ROUTINE BUILDER STYLES
   ========================================================================== */
.routine-builder-workspace {
  max-width: 980px !important;
  width: 90vw !important;
  height: 90vh !important;
  max-height: min(880px, var(--modal-max-height, calc(100dvh - 116px))) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #141721 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
  margin: auto !important;
}

.routine-builder-pinned-header {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #1a1d28;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
}

.routine-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.routine-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.routine-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.routine-header-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  max-width: 440px;
  min-width: 0;
}

.routine-name-input {
  width: 100% !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
}

.routine-name-input:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
}

.routine-location-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
}

.routine-location-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #818cf8;
  pointer-events: none;
  z-index: 2;
}

.routine-location-search-input {
  width: 100% !important;
  padding-left: 30px !important;
  padding-right: 50px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  height: 32px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.routine-location-search-input:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
  outline: none;
}

.routine-location-clear-btn {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
  z-index: 2;
}

.routine-location-clear-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.routine-location-clear-btn svg {
  width: 13px;
  height: 13px;
}

.routine-location-chevron-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, transform 0.2s ease;
  z-index: 2;
}

.routine-location-chevron-btn:hover {
  color: #ffffff;
}

.routine-location-chevron-btn svg {
  width: 14px;
  height: 14px;
}

.routine-location-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  z-index: 500;
  background: #1a1d28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  padding: 4px 0;
}

.routine-location-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.routine-location-dropdown-item:last-child {
  border-bottom: none;
}

.routine-location-dropdown-item:hover,
.routine-location-dropdown-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
}

.routine-location-dropdown-item.selected {
  color: #818cf8;
  font-weight: 600;
}

.routine-location-dropdown-item.custom-action {
  color: var(--accent-primary, #6366f1);
  font-weight: 600;
  background: rgba(99, 102, 241, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.routine-location-dropdown-item.custom-action:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
}

.routine-location-dropdown-empty {
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}

.routine-location-select {
  width: 100%;
  padding-left: 26px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-radius: 6px !important;
}

.routine-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.routine-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.routine-save-btn.btn-saved-success {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

.routine-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.routine-publish-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.routine-subnav-bar {
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 21, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.routine-type-toggle-group, .routine-builder-tabs {
  display: flex;
  gap: 6px;
}

.routine-main-pane, .routine-manual-workspace {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.routine-weekly-workspace {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.routine-ai-workspace {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.weekly-routine-selection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.weekly-routine-selection-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.4);
}

.routine-mobile-tab-nav {
  display: none;
}

.routine-split-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  grid-template-rows: 1fr;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

/* LEFT PANEL: EXERCISE LIBRARY */
.routine-library-panel {
  background: #161922;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.routine-lib-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-search-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.routine-search-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

.routine-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.routine-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.routine-search-clear:hover {
  color: white;
}

.routine-search-input {
  width: 100%;
  padding-left: 28px !important;
  padding-right: 26px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  color: #f8fafc !important;
}

.routine-custom-ex-btn {
  font-size: 11px !important;
  padding: 6px 9px !important;
  flex-shrink: 0;
  white-space: nowrap;
}

.routine-compact-filter-btn,
.routine-compact-done-btn {
  display: none !important;
  font-size: 11px !important;
  padding: 6px 9px !important;
  border-radius: 6px !important;
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
  gap: 4px;
}

.routine-compact-filter-btn {
  background: rgba(99, 102, 241, 0.14) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
}

.routine-compact-filter-btn.active {
  background: rgba(99, 102, 241, 0.28) !important;
  border-color: rgba(99, 102, 241, 0.65) !important;
  color: #ffffff !important;
}

.routine-compact-filter-badge {
  background: #6366f1;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 8px;
  line-height: 1.4;
}

.routine-compact-done-btn {
  background: rgba(16, 185, 129, 0.16) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
  font-weight: 700 !important;
}

/* QUICK-TAP CATEGORY CHIPS */
.routine-filter-chips-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 2px;
  padding-bottom: 2px;
}

.routine-filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.routine-filter-chips {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.routine-chip-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.routine-chip-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.routine-chip-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* ROUTINE BUILDER BODY PART FILTER BAR & BUTTON */
.routine-bodypart-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 2px;
  margin-bottom: 2px;
}

.routine-bodypart-filter-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.routine-bodypart-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.35);
}

.routine-bodypart-filter-btn.has-active-filters {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.routine-filter-btn-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.routine-filter-icon-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.routine-bodypart-filter-btn.has-active-filters .routine-filter-icon-box {
  background: #6366f1;
  color: #ffffff;
}

.routine-filter-btn-label {
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  flex-shrink: 0;
}

.routine-filter-btn-val {
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-filter-btn-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--text-muted, #94a3b8);
}

.routine-filter-count-badge {
  background: #6366f1;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.routine-filter-reset-icon-btn {
  padding: 6px 9px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.routine-filter-reset-icon-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #ffffff !important;
}

/* ROUTINE BODY PART FILTER MODAL */
.routine-bodypart-modal-content {
  max-width: 520px !important;
  width: 95vw !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #141722 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}

.routine-filter-modal-header {
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.routine-filter-header-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.routine-filter-modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
  flex-shrink: 0;
}

.routine-filter-modal-actions {
  display: flex;
  gap: 6px;
}

.routine-filter-selection-counter {
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
  font-weight: 500;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-filter-modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.routine-filter-group-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.routine-filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.routine-filter-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.routine-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.routine-group-quick-btn {
  background: transparent;
  border: none;
  font-size: 10.5px;
  font-weight: 600;
  color: #818cf8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.routine-group-quick-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
}

.routine-filter-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.routine-filter-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #cbd5e1);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.routine-filter-select-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.routine-filter-select-chip.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(79, 70, 229, 0.4));
  border-color: rgba(99, 102, 241, 0.7);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.routine-filter-chip-check {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.routine-filter-select-chip.active .routine-filter-chip-check {
  background: #6366f1;
  border-color: #818cf8;
  color: #ffffff;
}

.routine-filter-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 20, 30, 0.95);
  flex-shrink: 0;
  gap: 12px;
}

/* SECONDARY FILTERS ROW */
.routine-secondary-filters-row {
  display: flex;
  gap: 6px;
}

.routine-filter-select-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.routine-filter-select-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.routine-sub-filter {
  width: 100%;
  padding-left: 24px !important;
  padding-right: 8px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  font-size: 11px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  color: var(--text-secondary) !important;
}

/* AVAILABLE EXERCISES SCROLL AREA */
.routine-available-scroll-area {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-available-scroll-area::-webkit-scrollbar,
.routine-sequencer-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.routine-available-scroll-area::-webkit-scrollbar-track,
.routine-sequencer-scroll-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}

.routine-available-scroll-area::-webkit-scrollbar-thumb,
.routine-sequencer-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.routine-available-scroll-area::-webkit-scrollbar-thumb:hover,
.routine-sequencer-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.routine-panel-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.routine-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.routine-section-counter {
  font-size: 10.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.routine-available-cards-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-available-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: #1c202d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
  transition: all 0.15s ease;
}

.routine-available-card.is-in-routine {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
}

.routine-available-card:hover {
  background: #232838;
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.routine-available-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.routine-available-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.routine-history-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.35;
}

.routine-history-count-badge.is-zero {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #94a3b8);
  border-color: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

body.light-theme .routine-history-count-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.3);
}

body.light-theme .routine-history-count-badge.is-zero {
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
  border-color: rgba(15, 23, 42, 0.12);
}

.routine-add-btn {
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
  transition: all 0.15s ease;
}

.routine-add-btn:hover {
  background: #6366f1 !important;
  color: white !important;
  border-color: #6366f1 !important;
}

.routine-add-btn.added-success {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

/* SOFT FILLED COLOR PILLS FOR MUSCLE GROUPS */
.muscle-tag-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.muscle-tag-chest {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.muscle-tag-back {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.muscle-tag-delts, .muscle-tag-shoulders {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.muscle-tag-arms {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.muscle-tag-legs {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.muscle-tag-core {
  background: rgba(251, 113, 133, 0.15);
  color: #fb7185;
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.muscle-tag-other {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.brand-tag-pill {
  font-size: 9.5px;
  font-weight: 500;
  padding: 1.5px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* RIGHT PANEL: ROUTINE SEQUENCER */
.routine-sequencer-panel {
  background: #141721;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.routine-sequencer-header {
  padding: 12px 20px;
  background: rgba(20, 23, 33, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.routine-sequencer-metrics {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
}

.routine-grouping-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
}

.grouping-count {
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.grouping-btns {
  display: flex;
  gap: 4px;
}

.circuit-btn {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}

.routine-sequencer-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.routine-selected-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100px;
}

.routine-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.routine-selected-card {
  background: #1e2230;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.routine-selected-card.dragging {
  opacity: 0.4;
  border: 1.5px dashed var(--accent-primary) !important;
  transform: scale(0.98);
}

.routine-selected-card.drag-over-indicator {
  border-top: 2.5px solid #6366f1 !important;
  transform: translateY(2px);
}

.routine-card-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.routine-drag-handle {
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  color: var(--text-muted);
  border-radius: 4px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.routine-drag-handle:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.routine-group-chk {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.routine-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.routine-selected-details {
  flex: 1.3;
  min-width: 0;
}

.routine-selected-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.routine-selected-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.routine-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.routine-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.routine-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* COLLAPSIBLE NOTES ACCORDION */
.routine-notes-accordion {
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  padding-top: 6px;
  margin-top: 4px;
}

.routine-notes-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 2px 0;
  user-select: none;
}

.routine-notes-drawer {
  margin-top: 6px;
}

.routine-notes-input {
  width: 100%;
  font-size: 11.5px !important;
  padding: 6px 10px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  color: #f8fafc !important;
  resize: vertical;
  min-height: 48px;
}

/* SUPERSET VISUAL BRACKET CONNECTORS */
.routine-superset-wrapper {
  position: relative;
  border-left: 3px solid #818cf8;
  padding-left: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(99, 102, 241, 0.03);
  border-radius: 0 8px 8px 0;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 8px;
}

.routine-circuit-wrapper {
  position: relative;
  border-left: 3px solid #34d399;
  padding-left: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(16, 185, 129, 0.03);
  border-radius: 0 8px 8px 0;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 8px;
}

.routine-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.routine-group-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #818cf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.routine-circuit-wrapper .routine-group-badge {
  color: #34d399;
}

.routine-ungroup-btn {
  padding: 2px 7px !important;
  font-size: 10px !important;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 860px) {
  #custom-routine-modal.active {
    align-items: flex-start !important;
  }

  .routine-builder-workspace {
    width: 100vw !important;
    height: min(calc(var(--routine-vvh, 100dvh) - var(--modal-top-clearance, 24px)), var(--modal-max-height, calc(100dvh - var(--modal-top-clearance, 24px) - var(--modal-bottom-cutoff, 92px)))) !important;
    max-height: min(calc(var(--routine-vvh, 100dvh) - var(--modal-top-clearance, 24px)), var(--modal-max-height, calc(100dvh - var(--modal-top-clearance, 24px) - var(--modal-bottom-cutoff, 92px)))) !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .routine-builder-workspace.modal-content {
    padding: 0 !important;
    width: 100vw !important;
    height: min(calc(var(--routine-vvh, 100dvh) - var(--modal-top-clearance, 24px)), var(--modal-max-height, calc(100dvh - var(--modal-top-clearance, 24px) - var(--modal-bottom-cutoff, 92px)))) !important;
    max-height: min(calc(var(--routine-vvh, 100dvh) - var(--modal-top-clearance, 24px)), var(--modal-max-height, calc(100dvh - var(--modal-top-clearance, 24px) - var(--modal-bottom-cutoff, 92px)))) !important;
    border-radius: 0 !important;
  }

  /* COMPACT SEARCH-FOCUS MODE (Mobile Virtual Keypad Obstruction Fix) */
  .routine-builder-workspace.routine-search-focus-mode .routine-builder-pinned-header {
    padding: 7px 12px !important;
    gap: 0 !important;
    grid-template-areas: "title actions" !important;
  }

  .routine-builder-workspace.routine-search-focus-mode .routine-header-fields,
  .routine-builder-workspace.routine-search-focus-mode .routine-subnav-bar,
  .routine-builder-workspace.routine-search-focus-mode .routine-mobile-tab-nav,
  .routine-builder-workspace.routine-search-focus-mode .routine-builder-hint-banner {
    display: none !important;
  }

  .routine-builder-workspace.routine-search-focus-mode .routine-lib-header {
    padding: 8px 12px !important;
    gap: 6px !important;
  }

  .routine-builder-workspace.routine-search-focus-mode:not(.filters-expanded-in-search) .routine-bodypart-filter-row,
  .routine-builder-workspace.routine-search-focus-mode:not(.filters-expanded-in-search) .routine-secondary-filters-row {
    display: none !important;
  }

  .routine-builder-workspace.routine-search-focus-mode .routine-custom-ex-btn {
    display: none !important;
  }

  .routine-builder-workspace.routine-search-focus-mode .routine-compact-filter-btn,
  .routine-builder-workspace.routine-search-focus-mode .routine-compact-done-btn {
    display: inline-flex !important;
  }

  .routine-builder-workspace.routine-search-focus-mode .routine-available-scroll-area {
    padding: 8px 12px !important;
  }

  .routine-builder-pinned-header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "title actions"
      "fields fields" !important;
    gap: 8px 10px !important;
    padding: 10px 14px !important;
  }

  .routine-header-left {
    display: contents !important;
  }

  .routine-title-box {
    grid-area: title !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .routine-title-box h3 {
    font-size: 14px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .routine-header-actions {
    grid-area: actions !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    justify-self: end !important;
  }

  .routine-save-btn,
  .routine-publish-btn {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
  }

  .routine-header-fields {
    grid-area: fields !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .routine-name-input {
    width: 100% !important;
    min-width: 0 !important;
  }

  .routine-location-wrapper {
    width: 100% !important;
    min-width: 0 !important;
  }

  .routine-subnav-bar {
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding: 6px 12px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .routine-subnav-bar::-webkit-scrollbar {
    display: none !important;
  }

  .routine-type-toggle-group,
  .routine-builder-tabs {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .routine-subnav-bar .btn-sm {
    padding: 5px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .routine-drag-handle {
    padding: 8px 6px !important;
  }

  .routine-mobile-tab-nav {
    display: flex;
    background: #161922;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }

  .routine-mobile-tab-btn {
    flex: 1;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .routine-mobile-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.06);
  }

  .routine-count-pill {
    background: #6366f1;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
  }

  .routine-split-grid {
    display: flex;
    flex-direction: column;
  }

  .routine-library-panel {
    display: none;
    width: 100%;
    border-right: none;
  }

  .routine-library-panel.mobile-active {
    display: flex;
  }

  .routine-sequencer-panel {
    display: none;
    width: 100%;
  }

  .routine-sequencer-panel.mobile-active {
    display: flex;
  }

  .prescriptive-pill-container {
    flex-wrap: wrap;
  }

  .routine-weekly-workspace,
  .routine-ai-workspace {
    padding: 16px;
  }

  .routine-builder-hint-banner {
    margin: 8px 16px 0 16px;
  }
}

/* CALENDAR SYSTEM STYLES */
#calendar-days-grid,
#trainee-calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
}

.calendar-day-cell {
  background: rgba(30, 41, 59, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 4px;
  min-height: 46px;
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-day-cell:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

#calendar-days-grid.trainee-view .calendar-day-cell {
  cursor: default;
}
#calendar-days-grid.trainee-view .calendar-day-cell:hover {
  transform: none;
  border-color: var(--border-color);
  background: rgba(30, 41, 59, 0.25);
}

.calendar-day-cell.faded {
  opacity: 0.35;
}

.calendar-day-cell.today {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.calendar-day-cell .day-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  align-self: flex-end;
}

.calendar-day-cell.today .day-number {
  color: white;
}

.calendar-day-events-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
  overflow: hidden;
  max-height: 65px;
}

/* Event pills */
.event-pill {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  text-align: left;
  border-left: 3px solid transparent;
  transition: opacity 0.2s;
}

.event-pill:hover {
  opacity: 0.85;
}

.event-pill.event-pt {
  background: rgba(16, 185, 129, 0.12);
  border-left-color: #10b981;
  color: #34d399;
}

.event-pill.event-checkin {
  background: rgba(139, 92, 246, 0.12);
  border-left-color: #8b5cf6;
  color: #a78bfa;
}

.event-pill.event-payment {
  background: rgba(239, 68, 68, 0.12);
  border-left-color: #ef4444;
  color: #f87171;
}

.event-pill.event-assessment {
  background: rgba(14, 165, 233, 0.12);
  border-left-color: #0ea5e9;
  color: #38bdf8;
}

.event-pill.event-custom {
  background: rgba(245, 158, 11, 0.12);
  border-left-color: #f59e0b;
  color: #fbbf24;
}

/* Event list timeline styles */
.calendar-timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
}

.calendar-timeline-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.calendar-timeline-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-timeline-indicator.indicator-pt { background: #10b981; box-shadow: 0 0 6px #10b981; }
.calendar-timeline-indicator.indicator-checkin { background: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }
.calendar-timeline-indicator.indicator-payment { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.calendar-timeline-indicator.indicator-assessment { background: #0ea5e9; box-shadow: 0 0 6px #0ea5e9; }
.calendar-timeline-indicator.indicator-custom { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

/* ==========================================================================
   RESPONSIVE CALENDAR & SCHEDULER MODAL SIZING CONDITIONS
   ========================================================================== */

/* PC Condition: 601px and above */
@media (min-width: 601px) {
  #calendar-days-grid,
  #trainee-calendar-days-grid {
    grid-auto-rows: minmax(46px, auto) !important;
  }

  .calendar-day-cell {
    min-height: 46px !important;
    padding: 4px !important;
    gap: 2px !important;
  }

  .calendar-day-cell .day-number {
    font-size: 10.5px !important;
  }

  .calendar-day-events-container {
    max-height: 24px !important;
    gap: 2px !important;
  }

  #manage-scheduler-modal .section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  #manage-scheduler-modal .section-title-row .section-title {
    font-size: 15px !important;
  }

  #manage-scheduler-modal #calendar-gcal-sync-btn,
  #manage-scheduler-modal #calendar-add-event-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  #manage-scheduler-modal #calendar-month-year-label {
    font-size: 15px !important;
    min-width: 130px !important;
  }
}

/* Mobile Condition: 600px and below */
@media (max-width: 600px) {
  #calendar-days-grid,
  #trainee-calendar-days-grid {
    grid-auto-rows: minmax(38px, auto) !important;
    gap: 3px !important;
  }

  .calendar-day-cell {
    min-height: 38px !important;
    padding: 2px !important;
    border-radius: var(--border-radius-sm) !important;
    gap: 1px !important;
  }

  .calendar-day-cell .day-number {
    font-size: 9px !important;
  }

  .calendar-day-events-container {
    max-height: 18px !important;
    gap: 2px !important;
    margin-top: 1px !important;
  }

  .event-pill {
    font-size: 8px !important;
    padding: 0px 2px !important;
    line-height: 1.1 !important;
  }

  #manage-scheduler-modal .section-title-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  #manage-scheduler-modal .section-title-row > div {
    width: 100%;
    justify-content: flex-end;
  }

  #manage-scheduler-modal #calendar-gcal-sync-btn,
  #manage-scheduler-modal #calendar-add-event-btn {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
  }

  #manage-scheduler-modal #calendar-month-year-label {
    font-size: 14px !important;
    min-width: 110px !important;
  }
}

/* Ultra Compact Mobile: 420px and below */
@media (max-width: 420px) {
  #calendar-days-grid,
  #trainee-calendar-days-grid {
    grid-auto-rows: minmax(34px, auto) !important;
    gap: 2px !important;
  }

  .calendar-day-cell {
    min-height: 34px !important;
    padding: 1px !important;
  }

  .calendar-day-cell .day-number {
    font-size: 8px !important;
  }
}

/* Calendar Event Micro-Dots & Multi-Event Layout */
.calendar-event-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
  width: 100%;
}

.calendar-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 4px currentColor;
  transition: transform 0.15s ease;
  cursor: pointer;
}

.calendar-event-dot:hover {
  transform: scale(1.4);
}

@media (max-width: 480px) {
  .calendar-event-dot {
    width: 5px;
    height: 5px;
  }
}

@media (max-width: 380px) {
  .calendar-event-dot {
    width: 4px;
    height: 4px;
  }
}


/* Hide number input spinners for cleaner workout grids */
.set-input-box::-webkit-outer-spin-button,
.set-input-box::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.set-input-box {
  -moz-appearance: textfield;
}

/* Checklist items styling */
.checklist-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md, 10px);
  padding: 12px 14px;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}
.checklist-item-wrapper:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.18);
}
.checklist-item-wrapper.has-note {
  border-left: 4px solid var(--accent-warning);
}
.checklist-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
}
.checklist-item-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 2px 0;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.checklist-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
}
.checklist-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--accent-success);
  cursor: pointer;
  flex-shrink: 0;
}
.checklist-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
  width: 100%;
  display: block;
}
.checklist-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}
.checklist-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  width: 100%;
}
.checklist-item-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: 10px;
}
.checklist-note-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm, 8px);
  padding: 8px 14px;
  min-width: 48px;
  min-height: 48px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  touch-action: manipulation;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.checklist-note-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.28);
}
.checklist-note-btn.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
}

@media (max-width: 480px) {
  .checklist-item-wrapper {
    padding: 10px 12px;
    margin-bottom: 8px;
  }
  .checklist-item-row {
    gap: 8px;
  }
  .checklist-item-left {
    gap: 8px;
  }
  .checklist-text {
    font-size: 13px;
    line-height: 1.35;
  }
  .checklist-item-meta {
    gap: 4px;
    margin-top: 3px;
  }
  .checklist-goal-badge,
  .checklist-freq-badge {
    font-size: 9.5px;
    padding: 2px 6px;
  }
  .checklist-note-btn {
    padding: 5px 9px;
    font-size: 11px;
    min-height: 34px;
    gap: 4px;
  }
}

@media (max-width: 350px) {
  .checklist-item-row {
    flex-wrap: wrap;
  }
  .checklist-item-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
    margin-top: 4px;
  }
}

.checklist-note-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
  line-height: 1.4;
  word-break: break-word;
}
.checklist-note-badge i {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  margin-top: 2px;
}

.checklist-note-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-sm);
}
.checklist-note-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 52px;
  outline: none;
}
.checklist-note-input:focus {
  border-color: var(--accent-primary);
}

/* Checklist celebration badge and effects */
.checklist-celebrate-pulse {
  animation: checklistCelebrateAnim 1.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checklistCelebrateAnim {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  30% {
    transform: scale(1.18);
    box-shadow: 0 0 20px 6px rgba(16, 185, 129, 0.6);
  }
  60% {
    transform: scale(0.96);
    box-shadow: 0 0 10px 2px rgba(16, 185, 129, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

#checklist-confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* History Modal Navigation & Components */
.checklist-history-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 8px 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.checklist-history-timeline {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}
.checklist-history-day-pill {
  flex: 1 0 54px;
  min-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.checklist-history-day-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}
.checklist-history-day-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

/* Manage Checklist Items list & Goal Alignment */
.manage-checklist-goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.manage-checklist-goal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.manage-checklist-goal-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.manage-checklist-goal-chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.manage-checklist-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  min-height: auto;
  height: auto;
  flex-shrink: 0;
  margin-bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 8px);
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.manage-checklist-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.85);
}

.manage-checklist-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.manage-checklist-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.manage-checklist-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
  flex: 1;
}

.manage-checklist-delete-btn {
  flex-shrink: 0;
  padding: 3px;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.manage-checklist-delete-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.manage-checklist-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.manage-checklist-control-label {
  font-size: 10px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0;
}

.manage-checklist-control-label.weekly-reset {
  color: #fbbf24;
}

.manage-checklist-goal-select,
.manage-checklist-freq-select,
.manage-checklist-day-select {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  max-width: 220px;
}

.manage-checklist-goal-select:hover,
.manage-checklist-goal-select:focus,
.manage-checklist-freq-select:hover,
.manage-checklist-freq-select:focus,
.manage-checklist-day-select:hover,
.manage-checklist-day-select:focus {
  border-color: var(--accent-primary);
  color: #fff;
}

/* Aligned Goal Badges for Daily Checklist Items */
.checklist-goal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  line-height: 1.2;
  white-space: nowrap;
}

.checklist-goal-badge.goal-strength {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
  background: rgba(99, 102, 241, 0.15);
}

.checklist-goal-badge.goal-fatloss {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.15);
}

.checklist-goal-badge.goal-mobility {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.15);
}

.checklist-goal-badge.goal-cardio {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(245, 158, 11, 0.15);
}

.checklist-goal-badge.goal-nutrition {
  color: #bef264;
  border-color: rgba(163, 230, 53, 0.35);
  background: rgba(132, 204, 22, 0.15);
}

.checklist-goal-badge.goal-general {
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(168, 85, 247, 0.15);
}

/* Frequency Badges for Daily and Weekly Checklist Items */
.checklist-freq-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  line-height: 1.2;
  white-space: nowrap;
}

.checklist-freq-badge.freq-daily {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.15);
}

.checklist-freq-badge.freq-weekly {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.15);
}

/* Muscle Group tab buttons styles */
.muscle-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.muscle-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.muscle-tab-btn.active {
  background: var(--accent-primary-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* Alert animations */
@keyframes pulse-alert {
  0% {
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
  }
  100% {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.5);
  }
}

.pulse-icon {
  animation: pulse-icon-scale 1.5s infinite ease-in-out;
}

@keyframes pulse-icon-scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6)); }
  100% { transform: scale(1); }
}

#custom-exercise-modal {
  z-index: 210; /* Render custom exercise modal above custom routine modal (z-index 200) */
}

/* ADMIN DASHBOARD STYLES */
#admin-clients-table th {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#admin-clients-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  color: var(--text-main);
}

#admin-clients-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-trainer-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.admin-last-sync-badge {
  font-size: 11px;
  color: var(--text-muted);
}

/* Onboarding Step 2 Collapsible Sections */
.onboard-collapsible-section {
  border-radius: var(--border-radius-lg);
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color 0.2s ease;
}

.onboard-collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.6);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease;
}

.onboard-collapsible-header:hover {
  background: rgba(30, 41, 59, 0.8);
}

.onboard-collapsible-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboard-collapsible-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboard-collapsible-check {
  color: var(--accent-success);
  display: flex;
  align-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.onboard-collapsible-check.show {
  opacity: 1;
  transform: scale(1);
}

.onboard-collapsible-arrow {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

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

.onboard-collapsible-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out, opacity 0.3s ease-out;
  overflow: hidden;
}

.onboard-collapsible-body.collapsed {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.onboard-collapsible-body .form-group {
  margin-bottom: 8px;
}

.onboard-collapsible-body .form-label {
  font-size: 11px;
  margin-bottom: 4px;
}

.onboard-collapsible-body .form-input,
.onboard-collapsible-body .form-select {
  padding: 8px 12px;
  font-size: 13px;
}

/* Individual Field Completion Checks */
.field-check {
  color: var(--accent-success);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.field-check.show {
  opacity: 1;
  transform: scale(1);
}

/* Active Dashboard Metric Card */
.profile-stat-box.active {
  border-color: var(--accent-primary) !important;
  background: rgba(99, 102, 241, 0.1) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  .bottom-nav, 
  .glass-panel, 
  header,
  .modal-overlay,
  .ai-input-row {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  header {
    background: rgba(7, 9, 19, 0.98) !important;
  }
  
  .bottom-nav {
    background: rgba(7, 9, 19, 0.98) !important;
  }
  
  .glass-panel,
  .ai-input-row {
    background: rgba(15, 23, 42, 0.98) !important;
  }
}

/* Responsive Grid Classes for Sets table */
.set-row-header.is-repetitive,
.set-row.is-repetitive {
  grid-template-columns: 35px 1.2fr 65px 60px 75px 48px;
  gap: 6px;
}
.set-row-header.is-repetitive.no-rpe,
.set-row.is-repetitive.no-rpe {
  grid-template-columns: 35px 1.2fr 80px 75px 48px;
  gap: 6px;
}
.set-row-header.is-cardio,
.set-row.is-cardio {
  grid-template-columns: 35px 1.2fr 70px 85px 48px;
  gap: 6px;
}
.set-row-header.is-time-movement,
.set-row.is-time-movement {
  grid-template-columns: 35px 1.2fr 70px 70px 48px;
  gap: 6px;
}
.set-row-header.is-general,
.set-row.is-general {
  grid-template-columns: 35px 1.2fr 80px 90px 48px;
  gap: 6px;
}

@media (max-width: 480px) {
  .set-row-header, .set-row {
    gap: 4px !important;
  }
  .set-row-header.is-repetitive,
  .set-row.is-repetitive {
    grid-template-columns: 30px minmax(0, 1fr) 54px 42px 46px 44px !important;
  }
  .set-row-header.is-repetitive.no-rpe,
  .set-row.is-repetitive.no-rpe {
    grid-template-columns: 30px minmax(0, 1fr) 58px 54px 44px !important;
  }
  .set-row-header.is-cardio,
  .set-row.is-cardio {
    grid-template-columns: 30px minmax(0, 1fr) 56px 66px 44px !important;
  }
  .set-row-header.is-time-movement,
  .set-row.is-time-movement {
    grid-template-columns: 30px minmax(0, 1fr) 56px 56px 44px !important;
  }
  .set-row-header.is-general,
  .set-row.is-general {
    grid-template-columns: 30px minmax(0, 1fr) 62px 70px 44px !important;
  }
  .set-row-header span {
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
  }
  .set-row-header span:not([onclick]) {
    color: #94a3b8 !important;
  }

  /* Responsive Calendar Cells */
  .calendar-day-cell {
    min-height: 48px !important;
    padding: 2px !important;
    border-radius: var(--border-radius-sm) !important;
  }
  .calendar-day-cell .day-number {
    font-size: 9px !important;
  }
  .calendar-day-events-container {
    max-height: 32px !important;
    gap: 2px !important;
    margin-top: 2px !important;
  }
  .event-pill {
    font-size: 8px !important;
    padding: 0px 2px !important;
    line-height: 1.1 !important;
  }
}

/* RPG Sidebar Responsive Layout */
.rpg-sidebar {
  width: 100%;
  max-width: 100%;
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255,255,255,0.05);
  box-sizing: border-box;
  text-align: left;
}

.rpg-hero-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.rpg-hero-left-panel, .rpg-hero-right-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.rpg-sidebar-familiar-box:hover {
  border-color: var(--accent-primary) !important;
  background: rgba(30, 41, 59, 0.85) !important;
  transform: translateY(-1px);
}

.rpg-stats-grid {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  color: var(--text-secondary);
}

.rpg-stat-grid-item {
  background: rgba(255,255,255,0.02);
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.rpg-stat-grid-label {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.rpg-gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.rpg-gear-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  background: rgba(255,255,255,0.02);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.04);
}

@media (max-width: 480px) {
  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  
  .section-title-row > div {
    width: 100%;
    justify-content: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .routine-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .routine-card-header .routine-title-box,
  .routine-card .routine-title-box {
    width: 100%;
    flex: none;
  }

  .routine-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* ================= RPG VIEW SUB-TABS & MAP SYSTEM ================= */
.rpg-tabs button {
  transition: all var(--transition-fast);
}
.rpg-tabs button.active-rpg-tab {
  background: var(--accent-primary-gradient) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.rpg-scroller-wrapper {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.rpg-scroller-minimap {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.rpg-scroller-minimap:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45) !important;
}
.rpg-scroller-minimap:active {
  transform: scale(0.98);
}

.radar-station-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f8fafc;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
  user-select: none;
}
.radar-station-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.radar-station-chip:active {
  transform: translateY(0px) scale(0.97);
}

.rpg-touch-btn {
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.rpg-touch-btn:active {
  transform: scale(0.92) !important;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.6);
  }
  100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.8), 0 0 35px rgba(56, 189, 248, 0.6);
    border-color: rgba(56, 189, 248, 0.9);
  }
}

.rpg-map-container {
  overflow: hidden;
  cursor: grab;
  position: relative;
  width: 100%;
  height: 440px;
  border-radius: var(--border-radius-md);
  border: 3px solid #1e293b;
  background: #fdf6e2; /* Parchment cream */
  box-shadow: inset 0 0 30px rgba(0,0,0,0.15), 0 10px 25px rgba(0,0,0,0.5);
  user-select: none;
}
.rpg-map-container:active {
  cursor: grabbing;
}

.rpg-map-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  transition: transform 0.15s ease-out;
  width: 100%;
  height: 100%;
}

.rpg-map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rpg-hotspot {
  position: absolute;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.0);
  border: 2px dashed transparent;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rpg-hotspot::after {
  content: attr(data-label);
  position: absolute;
  bottom: -22px;
  background: #1e293b;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}
.rpg-hotspot:hover {
  background: rgba(30, 41, 59, 0.08);
  border-color: #1e293b;
  box-shadow: 0 0 12px rgba(30, 41, 59, 0.15);
}
.rpg-hotspot:hover::after {
  opacity: 1;
}

.map-zoom-btn {
  transition: all var(--transition-fast);
}
.map-zoom-btn:hover {
  background: #f4f4f5 !important;
  transform: scale(1.05);
}
.map-zoom-btn:active {
  transform: scale(0.95) translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.15) !important;
}

/* Character detailed sheet styles */
.char-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.char-attribute-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Inventory styles */
.rpg-inventory-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rpg-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.rpg-inventory-item {
  position: relative;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  transition: var(--transition-normal);
}
.rpg-inventory-item:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-color-active);
}

/* Onboarding Wizard Stepper & Progress Fills */
.onboard-progress-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0 20px 0;
}
.onboard-progress-fill {
  height: 100%;
  background: var(--accent-primary-gradient);
  width: 20%; /* Will update dynamically in JS */
  transition: width 0.3s ease-in-out;
}

/* Selectable Cards (Account type, Feature toggle) */
.onboard-select-card {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--border-radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.onboard-select-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.03);
}
.onboard-select-card.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Goals Grid & Multi-Select Tiles */
.onboard-goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.onboard-goal-tile {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--border-radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  text-align: left;
}
.onboard-goal-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.4);
}
.onboard-goal-tile.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.12);
}
.onboard-goal-tile-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.onboard-goal-tile-check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent-primary);
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.2s ease;
}
.onboard-goal-tile.selected .onboard-goal-tile-check {
  opacity: 1;
  transform: scale(1);
}



/* Custom Sub-tab Dropdown styles */
.dropdown-item {
  width: 100%;
}

/* ==========================================================================
   DUAL ONBOARDING FUNNEL & ANTI-FATIGUE STYLING (22-Q + Dynamic Matrix + 14-Day Pro)
   ========================================================================== */
.onboard-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.onboard-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--border-radius-md, 10px);
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
  text-align: left;
}
.onboard-option-card:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}
.onboard-option-card:active {
  transform: scale(0.98);
}
.onboard-option-card.selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.18));
  border-color: var(--accent-primary, #6366f1);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}
.onboard-option-emoji {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onboard-option-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
}
.onboard-option-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 400;
}
.onboard-option-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  color: transparent;
}
.onboard-option-card.selected .onboard-option-check {
  border-color: var(--accent-primary, #6366f1);
  background: var(--accent-primary, #6366f1);
  color: white;
}

@keyframes onboard-card-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); border-color: rgba(239, 68, 68, 0.7); }
  40%, 80% { transform: translateX(6px); border-color: rgba(239, 68, 68, 0.7); }
}

.card-shake-error {
  animation: onboard-card-shake 0.35s ease-in-out;
}

/* Dynamic Transformation Matrix Simulation Screen */
.onboard-matrix-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 6px 0;
  width: 100%;
}
.matrix-dial-container {
  position: relative;
  width: 105px;
  height: 105px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.matrix-dial-svg {
  transform: rotate(-90deg);
  width: 105px;
  height: 105px;
}
.matrix-dial-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}
.matrix-dial-circle-fill {
  fill: none;
  stroke: #6366f1;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.3s ease;
}
.matrix-dial-percent {
  position: absolute;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-heading, sans-serif);
  color: white;
}
.matrix-stat-bars-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-md, 10px);
  padding: 12px 14px;
}
.matrix-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}
.matrix-stat-label {
  width: 90px;
  color: #94a3b8;
  font-weight: 600;
  text-align: left;
}
.matrix-stat-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.matrix-stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.matrix-stat-val {
  width: 32px;
  text-align: right;
  font-weight: 700;
  color: white;
}
.matrix-tick-card {
  width: 100%;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--border-radius-md, 10px);
  text-align: left;
  box-sizing: border-box;
}
.matrix-tick-title {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 6px;
}
.matrix-tick-desc {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 3px;
  line-height: 1.4;
}

/* 3-Step Trial Timeline Screen */
.onboard-trial-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  width: 100%;
  margin: 14px 0 20px 0;
}
.onboard-trial-rail::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f43f5e 0%, #a855f7 50%, #3b82f6 100%);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}
.trial-step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}
.trial-step-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #090d16;
  border: 2.5px solid var(--accent-primary, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.trial-step-content {
  flex: 1;
  text-align: left;
  padding-top: 2px;
}
.trial-step-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.trial-step-sub {
  font-size: 13.5px;
  color: #cbd5e1;
  margin-top: 5px;
  line-height: 1.55;
  font-weight: 400;
}

@media (max-width: 480px) {
  #onboarding-page {
    padding: 16px 12px 40px 12px !important;
  }
  #onboarding-page > .glass-panel {
    padding: 24px 18px !important;
  }
  .trial-step-item {
    gap: 14px;
    padding: 10px 0;
  }
  .trial-step-badge {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
  .onboard-trial-rail::before {
    left: 20px;
    top: 21px;
    bottom: 21px;
  }
  .trial-step-title {
    font-size: 15px;
  }
  .trial-step-sub {
    font-size: 13px;
  }
}

.dropdown-item {
  text-align: left;
  background: none;
  border: none;
  padding: 8px 12px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.dropdown-item.active-rpg-tab {
  background: rgba(163, 230, 53, 0.15) !important;
  color: #a3e635 !important;
}

/* Document Cards & signature styles */
.document-card {
  transition: all var(--transition-fast);
}
.document-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}
.document-card.completed {
  border-color: rgba(34, 197, 94, 0.3) !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.05);
}

/* Document Modal Forms Styles */
.doc-form-group {
  margin-bottom: 16px;
}
.doc-form-label {
  display: block;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  font-size: 13px;
}
.doc-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.doc-textarea {
  min-height: 80px;
}

/* PDF Print Template Layout Styles */
.pdf-print-container {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #1e293b;
  background: #ffffff;
  padding: 40px;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.6;
}
.pdf-print-container h1, .pdf-print-container h2, .pdf-print-container h3, .pdf-print-container h4 {
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
  margin-top: 24px;
}
.pdf-print-container h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 10px;
  border-bottom: 2px solid #0f172a;
}
.pdf-print-container .pdf-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.pdf-print-container .pdf-meta-table td {
  padding: 8px;
  border: 1px solid #e2e8f0;
}
.pdf-print-container .pdf-meta-table td.label {
  font-weight: bold;
  background: #f8fafc;
  width: 30%;
}
.pdf-print-container .pdf-clause {
  margin-bottom: 16px;
  text-align: justify;
}
.pdf-print-container .pdf-quiz-item {
  margin-bottom: 12px;
  padding: 10px;
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
}
.pdf-print-container .pdf-quiz-question {
  font-weight: bold;
}
.pdf-print-container .pdf-quiz-answer {
  margin-top: 4px;
  color: #1d4ed8;
  font-weight: 500;
}
.pdf-print-container .pdf-signatures-section {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  page-break-inside: avoid;
}
.pdf-print-container .pdf-sig-box {
  width: 45%;
  border-top: 1px solid #94a3b8;
  padding-top: 10px;
  text-align: center;
}
.pdf-print-container .pdf-sig-image {
  max-height: 80px;
  display: block;
  margin: 10px auto;
  background: transparent;
}

/* ================= NEW INTEGRATION STYLES ================= */

/* Landing Page Navbar & Navigation Links */
.landing-navbar {
  display: flex;
  gap: 20px;
  align-items: center;
}
.landing-nav-link {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast) ease;
  position: relative;
  padding: 6px 0;
}
.landing-nav-link:hover {
  color: white;
}
.landing-nav-link.active {
  color: white;
}
.landing-nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  border-radius: 2px;
}

/* Responsive Landing Navbar */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }
  .landing-navbar {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
  }
  .landing-nav-link {
    font-size: 11px;
  }
}

/* ================= REBRANDING: BECOME ALMIGHTY ================= */

.almighty-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(255, 0, 68, 0.18) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 30, 86, 0.5);
  box-shadow: 0 0 16px rgba(255, 0, 68, 0.3);
  color: #ff4d79;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.almighty-figure-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -6px 0 -6px 0;
}

.almighty-figure-wrapper::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 0, 68, 0.25) 0%, rgba(99, 102, 241, 0.15) 50%, transparent 75%);
  border-radius: 50%;
  filter: blur(22px);
  pointer-events: none;
  z-index: 0;
}

.almighty-hero-img {
  width: clamp(180px, 42vw, 310px);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(255, 30, 86, 0.45)) drop-shadow(0 0 16px rgba(167, 139, 250, 0.35));
  pointer-events: none;
  user-select: none;
  position: relative;
  z-index: 1;
}

.almighty-tagline {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: clamp(20px, 5.5vw, 36px);
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 10px;
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #ffa3b8 30%, #ff1e56 70%, #b3002d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 30, 86, 0.6));
  line-height: 1.15;
}

.almighty-subhook {
  font-size: clamp(12.5px, 3.2vw, 16px);
  font-weight: 600;
  color: #c7d2fe;
  letter-spacing: 0.04em;
  margin-top: 4px;
  line-height: 1.4;
  max-width: 580px;
}

.almighty-hero-desc {
  color: #94a3b8;
  font-size: clamp(13px, 3.2vw, 15px);
  line-height: 1.65;
  max-width: 620px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.btn-almighty-cta {
  padding: 13px 30px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  background: linear-gradient(135deg, #ff1e56 0%, #e60039 50%, #b3002d 100%) !important;
  border: 1px solid rgba(255, 77, 121, 0.55) !important;
  box-shadow: 0 0 20px rgba(255, 0, 68, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-almighty-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 0, 68, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-almighty-secondary {
  padding: 13px 22px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  backdrop-filter: blur(10px) !important;
}

.btn-almighty-secondary:hover {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
}

.almighty-feature-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.almighty-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 68, 0.25);
}

/* ================= LANDING FEATURES SECTION OVERHAUL ================= */

.features-pill-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 14px 0;
  width: 100%;
}

.feature-pill-btn {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feature-pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  background: rgba(30, 41, 59, 0.9);
}

.feature-pill-btn.active {
  background: linear-gradient(135deg, #ff1e56 0%, #b3002d 100%);
  color: #ffffff;
  border-color: rgba(255, 77, 121, 0.65);
  box-shadow: 0 0 16px rgba(255, 30, 86, 0.45);
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  box-sizing: border-box;
}

.feature-pillar-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: var(--border-radius-lg, 14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.feature-pillar-card.feature-card-hidden {
  display: none !important;
}

.feature-pillar-card h4,
.feature-pillar-card p {
  text-align: center;
}

.feature-pillar-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 30, 86, 0.35);
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 30, 86, 0.2);
}

.feature-pillar-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.feature-pillar-bullets {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 14px auto 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  text-align: left !important;
  max-width: 280px;
  width: 100%;
}

.feature-pillar-bullets li {
  list-style: none !important;
  list-style-type: none !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px;
  line-height: 1.45;
  text-align: left !important;
}

.feature-pillar-bullets li svg,
.feature-pillar-bullets li i {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #34d399;
  margin-top: 2px;
}

.feature-pillar-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: var(--text-muted, #64748b);
  font-weight: 500;
  text-align: center !important;
}

.feature-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.5) 50%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.feature-mode-toggle-mockup {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(2, 6, 23, 0.6);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.feature-mode-switch-pill {
  width: 44px;
  height: 24px;
  background: #10b981;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.feature-mode-switch-dot {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.comparison-matrix-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  margin-top: 10px;
  box-sizing: border-box;
}

.comparison-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.comparison-table th {
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-col-brand {
  background: rgba(255, 30, 86, 0.08) !important;
  border-left: 1px solid rgba(255, 30, 86, 0.25);
  border-right: 1px solid rgba(255, 30, 86, 0.25);
  font-weight: 700;
  text-align: center;
  color: white !important;
}

.comparison-col-brand.th {
  color: #ff6b8b !important;
  background: rgba(255, 30, 86, 0.18) !important;
}

.comparison-col-other {
  text-align: center;
}

.comparison-tag-full {
  color: #34d399;
  font-weight: 700;
}

.comparison-tag-partial {
  color: #fbbf24;
  font-weight: 600;
}

.comparison-tag-none {
  color: #64748b;
}

.comparison-tag-exclusive {
  color: #ff4d79;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 30, 86, 0.4);
}

@media (max-width: 768px) {
  .feature-mode-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    gap: 14px;
  }
  .feature-mode-toggle-mockup {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }
  .features-pill-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .feature-pill-btn {
    white-space: nowrap;
    padding: 7px 14px;
    font-size: 11.5px;
  }
}

/* General Catalog Card Grids (Shop & Coaching) */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 12px auto 0 auto;
  box-sizing: border-box;
}

.catalog-grid.shop-compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
}

@media (max-width: 540px) {
  .catalog-grid.shop-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

.catalog-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--border-radius-lg, 12px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  transition: all var(--transition-medium, 0.25s) ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.catalog-card.shop-compact-card {
  padding: 12px;
  gap: 8px;
  text-align: center;
  align-items: stretch;
  contain-intrinsic-size: auto 215px;
}

.catalog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-active, rgba(99, 102, 241, 0.4));
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
  background: rgba(30, 41, 59, 0.7);
}

.catalog-card-image-placeholder {
  width: 100%;
  height: 160px;
  border-radius: var(--border-radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  position: relative;
}

.catalog-card.shop-compact-card .catalog-card-image-placeholder {
  height: 112px;
  padding: 8px;
  overflow: hidden;
}

.shop-card-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.25s ease;
  pointer-events: none;
  user-select: none;
}

.catalog-card.shop-compact-card:hover .shop-card-img {
  transform: scale(1.07) translateY(-2px);
}

.shop-card-info-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 15;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.shop-card-info-btn:hover,
.shop-card-info-btn:focus-visible {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.65);
  color: #38bdf8;
  transform: scale(1.08);
}

.shop-card-info-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.catalog-card.shop-compact-card .catalog-card-image-placeholder > .catalog-card-badge {
  top: 8px;
  left: 8px;
  right: auto;
  font-size: 9px;
  padding: 2px 6px;
}

.shop-card-qty {
  font-size: 14.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.2px;
  line-height: 1.25;
  margin: 2px 0 0 0;
}

.shop-card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  line-height: 1.2;
  pointer-events: none;
}

.catalog-card > .catalog-card-badge {
  top: 36px;
  right: 36px;
}

.catalog-card-image-placeholder > .catalog-card-badge {
  top: 12px;
  right: 12px;
}

.catalog-card-price {
  font-size: 20px;
  font-weight: 800;
  color: #fbbf24; /* Amber Gold color */
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.catalog-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-features-list li svg {
  color: var(--accent-success, #10b981);
  flex-shrink: 0;
}

.shop-crystals-pill {
  transition: all 0.2s ease;
  user-select: none;
}

.shop-crystals-pill:hover {
  background: rgba(168, 85, 247, 0.22) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

/* Dashboard Shop Tab Navigation, Profile Sub-Nav & Manage Sub-Nav */
.dashboard-sub-nav,
.profile-sub-nav,
.manage-sub-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md, 10px);
  padding: 4px;
  gap: 4px;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dashboard-sub-nav::-webkit-scrollbar,
.profile-sub-nav::-webkit-scrollbar,
.manage-sub-nav::-webkit-scrollbar {
  display: none;
}

.profile-tab-panel,
.manage-tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.profile-tab-panel.active,
.manage-tab-panel.active {
  display: flex;
}

/* Ensure direct top-level section cards inside view containers & tab panels do not have conflicting vertical margins */
.view-container > .glass-panel,
.view-container > .profile-card,
.view-container > .ai-ea-card,
.view-container > .profile-sub-nav,
.view-container > .manage-sub-nav,
.view-container > .dashboard-sub-nav,
.profile-tab-panel > .glass-panel,
.profile-tab-panel > .milestones-card,
.profile-tab-panel > div,
.manage-tab-panel > .glass-panel,
.manage-tab-panel > .profile-card,
.manage-tab-panel > div {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.sub-nav-item {
  flex: 1 1 0px;
  min-width: 0;
  text-align: center;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sub-nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.sub-nav-item.active {
  color: white;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  box-shadow: 0 4px 12px var(--accent-primary-shadow, rgba(99, 102, 241, 0.3));
}

body.light-theme .sub-nav-item {
  color: #475569 !important;
}

body.light-theme .sub-nav-item:hover {
  color: #09090b !important;
  background: rgba(226, 232, 240, 0.9) !important;
}

body.light-theme .sub-nav-item.active {
  color: #ffffff !important;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #dc2626 0%, #b91c1c 100%)) !important;
  box-shadow: 0 4px 12px var(--accent-primary-shadow, rgba(220, 38, 38, 0.25)) !important;
}

/* Responsive scrollable sub-nav carousel optimization for mobile screens */
@media (max-width: 600px) {
  .dashboard-sub-nav,
  .profile-sub-nav,
  .manage-sub-nav {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 5px !important;
    padding: 5px !important;
    flex-wrap: nowrap !important;
  }
  .dashboard-sub-nav .sub-nav-item,
  .profile-sub-nav .sub-nav-item,
  .manage-sub-nav .sub-nav-item {
    flex: 0 0 auto !important;
    min-width: fit-content !important;
    padding: 7px 11px !important;
    font-size: 11.5px !important;
    gap: 5px !important;
    letter-spacing: 0px !important;
    scroll-snap-align: center;
    white-space: nowrap !important;
    text-overflow: clip !important;
    overflow: visible !important;
  }
  .dashboard-sub-nav .sub-nav-item svg,
  .dashboard-sub-nav .sub-nav-item i,
  .profile-sub-nav .sub-nav-item svg,
  .profile-sub-nav .sub-nav-item i,
  .manage-sub-nav .sub-nav-item svg,
  .manage-sub-nav .sub-nav-item i {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0;
  }
}

/* Accessibility: Ensure high contrast for checklist settings button */
#manage-checklist-btn {
  color: var(--text-main) !important;
}


/* Profile Action Buttons (Edit/Delete Profile) */
.profile-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-sm);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#edit-client-btn.profile-action-btn,
#profile-settings-btn.profile-action-btn {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

#edit-client-btn.profile-action-btn:hover,
#profile-settings-btn.profile-action-btn:hover {
  background: var(--accent-primary);
  color: white;
}

#delete-client-btn.profile-action-btn {
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
}

#delete-client-btn.profile-action-btn:hover {
  background: var(--accent-danger);
  color: white;
}

/* Header Notifications & Responsive Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.notifications-header-btn-container {
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast);
}
.notifications-header-btn-container:hover {
  transform: translateY(-1px);
}
.notifications-header-btn-container:hover .notif-letter-box {
  background: rgba(99, 102, 241, 0.3) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5) !important;
}
.notifications-header-btn-container:hover .notif-text-banner {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.35) 0%, rgba(139, 92, 246, 0.25) 100%) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
}

/* Mobile responsive fixes for Top Header elements (spillover prevention) */
@media (max-width: 600px) {
  header.app-top-header {
    padding: 8px 10px !important;
  }

  .header-top-row {
    gap: 4px !important;
  }

  .brand,
  .landing-brand-lockup {
    gap: 6px !important;
  }

  .brand-logo,
  .logo-brushed-metal {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7.5px !important;
  }

  .logo-brushed-metal svg,
  .logo-brushed-metal i {
    width: 13px !important;
    height: 13px !important;
  }

  .brand-title-fitness {
    font-size: 13.5px !important;
  }

  .brand-sub-quest,
  .brand-sub-godquest {
    font-size: 8px !important;
    letter-spacing: 0.22em !important;
    text-indent: 0.22em !important;
  }

  .brand-title-spatial {
    font-size: 13px !important;
  }

  .brand-sub-spatial {
    font-size: 7px !important;
  }

  .header-controls {
    gap: 4px !important;
  }

  .metallic-pin {
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 10.5px !important;
    gap: 4px !important;
    border-radius: 9px !important;
  }

  .metallic-pin svg,
  .metallic-pin i {
    width: 12px !important;
    height: 12px !important;
  }

  .mode-capsule-pin {
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 10px !important;
    gap: 3.5px !important;
    border-radius: 9px !important;
  }

  .mode-capsule-pin #mode-capsule-icon {
    width: 11px !important;
    height: 11px !important;
  }

  #header-logout-btn,
  #header-theme-toggle-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
  }

  #header-logout-btn svg,
  #header-logout-btn i,
  #header-theme-toggle-btn svg,
  #header-theme-toggle-btn i {
    width: 12px !important;
    height: 12px !important;
  }
}

@media (max-width: 480px) {
  header.app-top-header {
    padding: 6px 8px !important;
  }

  .header-top-row {
    gap: 4px !important;
  }

  .brand,
  .landing-brand-lockup {
    gap: 5px !important;
    min-width: 0;
  }

  .brand-logo,
  .logo-brushed-metal {
    width: 26px !important;
    height: 26px !important;
    border-radius: 7px !important;
  }

  .logo-brushed-metal svg,
  .logo-brushed-metal i {
    width: 13px !important;
    height: 13px !important;
  }

  .brand-title-fitness {
    font-size: 12px !important;
  }

  .brand-sub-quest,
  .brand-sub-godquest {
    font-size: 7px !important;
    letter-spacing: 0.2em !important;
    text-indent: 0.2em !important;
  }

  .brand-title-spatial {
    font-size: 12px !important;
  }

  .brand-sub-spatial {
    display: none !important;
  }

  .header-controls {
    gap: 3.5px !important;
    flex-shrink: 0;
  }

  .header-alerts-label,
  .header-rewards-label {
    display: none !important;
  }

  .metallic-pin {
    height: 26px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    gap: 3px !important;
    border-radius: 7px !important;
  }

  .metallic-pin svg,
  .metallic-pin i {
    width: 12px !important;
    height: 12px !important;
  }

  .mode-capsule-pin {
    height: 26px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    gap: 3px !important;
    border-radius: 7px !important;
  }

  .mode-capsule-switch-icon {
    display: none !important;
  }

  #header-logout-btn,
  #header-theme-toggle-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
  }

  #header-logout-btn svg,
  #header-logout-btn i,
  #header-theme-toggle-btn svg,
  #header-theme-toggle-btn i {
    width: 12px !important;
    height: 12px !important;
  }
}

@media (max-width: 390px) {
  header.app-top-header {
    padding: 5px 6px !important;
  }

  .header-top-row {
    gap: 3px !important;
  }

  .brand-title-fitness {
    font-size: 11px !important;
  }

  .brand-sub-quest,
  .brand-sub-godquest {
    font-size: 6.5px !important;
    letter-spacing: 0.18em !important;
    text-indent: 0.18em !important;
  }

  .brand-title-spatial {
    font-size: 11px !important;
  }

  .header-controls {
    gap: 2.5px !important;
  }

  .metallic-pin {
    height: 24px !important;
    padding: 0 5px !important;
    font-size: 9.5px !important;
    gap: 2.5px !important;
  }

  .mode-capsule-pin {
    height: 24px !important;
    padding: 0 5px !important;
    font-size: 9.5px !important;
    gap: 2.5px !important;
  }

  #header-logout-btn,
  #header-theme-toggle-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
  }
}

/* Dynamic Collision Avoidance: Offset Assistant FAB when Minimized Workout Overlay is Active */
body.has-minimized-workout .vea-fab-trigger,
body:has(#live-workout-bar:not([style*="display: none"])) .vea-fab-trigger {
  bottom: 148px !important;
  transition: bottom 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease, opacity 0.2s ease;
}

/* Responsive Modal Padding & Boundary Optimization on Mobile Viewports */
@media (max-width: 480px) {
  .modal-content {
    padding: 14px 16px !important;
    width: 95% !important;
    max-height: calc(100vh - 108px) !important;
    max-height: var(--modal-max-height, calc(100dvh - 108px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
  }
  .physique-analytics-card {
    padding: 14px 12px !important;
  }
  .modal-content:not(.vea-hub-modal-container):not(.edit-profile-modal-container):not(.routine-builder-workspace):not(.poker-modal-container):not(.character-customizer-modal-content):not(#supply-drop-modal-content):not(.protein-launcher-modal-content):not(#protein-launcher-game-modal .modal-content):not(.exercise-swap-modal-content):not(.routine-bodypart-modal-content):not(.has-swap-action-bar):not(.program-session-modal-content) {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .routine-builder-workspace.modal-content {
    padding: 0 !important;
    width: 100vw !important;
    height: min(calc(var(--routine-vvh, 100dvh) - var(--modal-top-clearance, 24px)), var(--modal-max-height, calc(100dvh - var(--modal-top-clearance, 24px) - var(--modal-bottom-cutoff, 92px)))) !important;
    max-height: min(calc(var(--routine-vvh, 100dvh) - var(--modal-top-clearance, 24px)), var(--modal-max-height, calc(100dvh - var(--modal-top-clearance, 24px) - var(--modal-bottom-cutoff, 92px)))) !important;
    border-radius: 0 !important;
  }
}

/* Standardized Onboarding Step Footer */
.onboard-step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  gap: 12px;
  width: 100%;
}

/* Routine Card Kebab Menu & Popover */
.routine-kebab-container {
  position: relative;
  display: inline-block;
}
.routine-kebab-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-md, 8px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  min-width: 160px;
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 4px;
}
.routine-kebab-dropdown.active {
  display: flex;
}
.routine-kebab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}
.routine-kebab-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.routine-kebab-item.danger {
  color: #f87171;
}
.routine-kebab-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.routine-kebab-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}


/* PRESCRIBED VS LOGGED COMPARISON DASHBOARD STYLES */
.pvl-metric-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 8px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, border-color 0.2s;
}
.pvl-metric-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.pvl-metric-title {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pvl-metric-value {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}
.pvl-metric-sub {
  font-size: 10.5px;
  color: #a5b4fc;
  font-weight: 500;
}

.pvl-ex-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pvl-ex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}
.pvl-ex-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pvl-table-wrapper {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 15, 30, 0.5);
}
.pvl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}
.pvl-table th {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pvl-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
}
.pvl-table tr:last-child td {
  border-bottom: none;
}
.pvl-table tr:hover td {
  background: rgba(99, 102, 241, 0.05);
}

.pvl-badge-exceeded {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pvl-badge-match {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pvl-badge-under {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pvl-badge-missed {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* AI CHATBOT INTERACTIVE STYLES */
.ai-chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-chip-btn {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: #e2e8f0;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ai-chip-btn:hover {
  background: var(--accent-primary-gradient);
  border-color: var(--accent-primary);
  color: white;
  transform: translateY(-1px);
}

.ai-chip-btn.selected {
  background: var(--accent-primary);
  border-color: #818cf8;
  color: white;
  font-weight: 700;
}

.ai-notice-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  padding: 10px 12px;
  border-radius: var(--border-radius-md);
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-locked-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.ai-preview-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  margin-top: 10px;
}

/* Analytics Minitab Exclamation Notifier */
.tab-exclamation-notifier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: pulse-exclamation-notifier 1.8s infinite;
  vertical-align: middle;
  flex-shrink: 0;
  @media (prefers-reduced-motion: reduce) {
    animation: none;
  }
}

@keyframes pulse-exclamation-notifier {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ================= CLEAN MATTE DAILY WEIGHT ENTRY & TRACKER STYLES ================= */
.weight-tracker-panel {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: var(--border-radius-md, 12px) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  position: relative;
}

.weight-tracker-panel .onboard-collapsible-body {
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  opacity: 1;
  pointer-events: auto;
}

.weight-tracker-panel .onboard-collapsible-body.collapsed {
  display: none !important;
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.weight-header-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary, #6366f1);
  flex-shrink: 0;
}

.weight-kpi-pill {
  background: #1e293b;
  color: var(--text-secondary, #94a3b8);
  border: 1px solid #334155;
  font-size: 11px;
  padding: 3px 9px;
  font-weight: 600;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
}

.weight-kpi-trend {
  color: #34d399;
}

.weight-kpi-trend.trend-up {
  color: #fb7185;
}

.weight-kpi-trend.trend-neutral {
  color: #94a3b8;
}

/* Opaque Matte Hero Entry Container */
.weight-hero-container {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--border-radius-md, 10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weight-hero-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.weight-hero-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 140px;
}

.weight-hero-input {
  background: transparent;
  border: none;
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  width: 100%;
  max-width: 220px;
  padding: 0;
  line-height: 1;
  outline: none;
  font-family: inherit;
  letter-spacing: -1px;
}

.weight-hero-input::placeholder {
  color: #475569;
}

.weight-hero-unit-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
}

.weight-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.weight-steppers-group {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.weight-stepper-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.weight-stepper-btn:hover {
  background: #334155;
  color: #ffffff;
}

.weight-stepper-btn:active {
  transform: scale(0.92);
}

.weight-stepper-btn svg,
.weight-stepper-btn i {
  width: 15px;
  height: 15px;
}

/* Segmented Unit Switcher */
.weight-segmented-toggle {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  user-select: none;
}

.weight-seg-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.weight-seg-btn:hover {
  color: #ffffff;
}

.weight-seg-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Second Row: Context Controls */
.weight-controls-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  align-items: flex-end;
  padding-top: 10px;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
}

.weight-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weight-ctrl-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.weight-ctrl-input {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  outline: none !important;
  transition: border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.weight-ctrl-input:focus {
  border-color: var(--accent-primary, #6366f1) !important;
}

/* Post-Toilet Modern Toggle Switch */
.weight-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  height: 32px;
  user-select: none;
}

.weight-switch-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.weight-switch-slider {
  width: 38px;
  height: 20px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.weight-switch-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: #94a3b8;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.weight-switch-checkbox:checked + .weight-switch-slider {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
}

.weight-switch-checkbox:checked + .weight-switch-slider::before {
  transform: translateX(18px);
  background: #ffffff;
}

.weight-switch-text {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 600;
}

/* Weekly Check-In Reminder Configuration Card */
.weekly-reminder-config-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.weekly-reminder-config-card.active-reminder {
  border-color: rgba(56, 189, 248, 0.45) !important;
  background: rgba(15, 23, 42, 0.8) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25), 0 0 12px rgba(56, 189, 248, 0.08);
}
.weekly-reminder-config-card.highlight-flash {
  animation: reminderCardFlash 1.2s ease;
}
@keyframes reminderCardFlash {
  0%, 100% { border-color: rgba(255, 255, 255, 0.08); }
  50% { border-color: #38bdf8; box-shadow: 0 0 16px rgba(56, 189, 248, 0.4); }
}

/* Fluid Presets */
.weight-fluid-presets {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}

.weight-preset-chip {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.weight-preset-chip:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.weight-preset-chip.active {
  background: #334155;
  color: #38bdf8;
  font-weight: 700;
}

/* Main CTA Button */
.weight-log-cta-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
}

.weight-log-cta-btn:hover {
  background: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.weight-log-cta-btn:active {
  transform: scale(0.99);
}

/* Timeline History List & Rows */
.weight-history-section {
  border-top: 1px solid #334155;
  padding-top: 14px;
  margin-top: 4px;
}

.weight-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.weight-history-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weight-select-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.weight-custom-checkbox {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: var(--accent-primary, #6366f1);
}

.weight-count-badge {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.weight-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.weight-history-row {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s ease;
}

.weight-history-row:hover {
  border-color: #475569;
}

.weight-history-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.weight-history-val-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weight-history-val-main {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.weight-history-val-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.weight-delta-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.weight-delta-badge.down {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.weight-delta-badge.up {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.weight-delta-badge.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.weight-history-date-time {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weight-tag-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.weight-tag-chip.toilet {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.4);
}

.weight-tag-chip.fluid {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.weight-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.weight-action-btn {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.weight-action-btn:hover {
  background: #334155;
  color: #ffffff;
}

.weight-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ================= AI EXECUTIVE ASSISTANT (EA) STYLES ================= */
/* ================= AI EXECUTIVE ASSISTANT (EA) STYLES ================= */
.ai-ea-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  border: 1px solid var(--border-color, rgba(239, 68, 68, 0.3)) !important;
  border-radius: var(--border-radius-md, 12px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px var(--accent-primary-shadow, rgba(239, 68, 68, 0.15)) !important;
  transition: all var(--transition-medium, 0.25s) ease;
}

.ai-ea-card:hover {
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.5)) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 22px var(--accent-primary-shadow-hover, rgba(239, 68, 68, 0.25)) !important;
}

body.light-theme .ai-ea-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 15px rgba(220, 38, 38, 0.06) !important;
}

body.light-theme .ai-ea-card:hover {
  border-color: rgba(220, 38, 38, 0.4) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08), 0 0 20px rgba(220, 38, 38, 0.12) !important;
}

/* VEA Master Command Hub Modal Styles */
.vea-hub-modal-container {
  background: radial-gradient(circle at top right, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.99)) !important;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(239, 68, 68, 0.2) !important;
}

body.light-theme .vea-hub-modal-container {
  background: #ffffff !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 20px rgba(220, 38, 38, 0.1) !important;
}

body.light-theme .vea-modal-header {
  background: rgba(241, 245, 249, 0.85) !important;
  border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}

@media (max-width: 600px) {
  .ai-ea-summary-main-row {
    flex-wrap: wrap;
    gap: 8px !important;
  }
  .ai-ea-summary-controls {
    width: 100%;
    justify-content: space-between;
  }
  .vea-hub-modal-container {
    width: 96% !important;
    max-height: calc(100vh - 108px) !important;
    max-height: var(--modal-max-height, calc(100dvh - 108px)) !important;
  }
  .vea-modal-header {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .vea-avatar-ring-outer {
    width: 44px !important;
    height: 44px !important;
  }
  .vea-header-identity {
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .vea-header-controls {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .vea-header-btn {
    padding: 5px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    min-width: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .vea-header-btn .vea-btn-label {
    display: none !important;
  }
  .vea-header-close-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }
  #ai-ea-name {
    font-size: 14px !important;
    gap: 4px !important;
  }
  .vea-role-tag {
    font-size: 9px !important;
    padding: 1.5px 6px !important;
  }
  #ai-ea-subtitle {
    font-size: 10.5px !important;
    max-width: 190px !important;
  }
  .vea-modal-body {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
}

.vea-role-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.vea-header-btn {
  transition: all var(--transition-fast, 0.15s) ease;
}

/* Circular Neon Glowing Avatar for VEA */
.vea-avatar-ring-outer {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #334155 0%, #0f172a 50%, #1e293b 100%);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px var(--accent-primary-shadow, rgba(239, 68, 68, 0.35)),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.vea-avatar-ring-neon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 2px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #ff0055 50%, #f59e0b 100%));
  box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.8)), inset 0 0 6px var(--accent-primary-shadow, rgba(239, 68, 68, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: veaNeonBreathing 3s ease-in-out infinite alternate;
}

.vea-avatar-ring-outer.has-critical-alerts .vea-avatar-ring-neon {
  background: linear-gradient(135deg, #ff0000 0%, #ef4444 50%, #dc2626 100%) !important;
  animation: veaCriticalPulse 1.5s ease-in-out infinite !important;
}

@keyframes veaNeonBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  }
}

@keyframes veaCriticalPulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.7));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(239, 68, 68, 1)) drop-shadow(0 0 8px rgba(255, 0, 0, 0.8));
    transform: scale(1.03);
  }
}

.vea-avatar-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1e293b 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vea-avatar-ring-inner img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ea-mascot-btn {
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  transition: all var(--transition-fast, 0.15s) ease;
}

.ea-mascot-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ea-mascot-btn.active {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #dc2626 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--accent-primary-shadow, rgba(239, 68, 68, 0.4)) !important;
}

#ai-ea-settings-btn:hover,
#ai-ea-body-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Action Micro-Grid */
.vea-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  width: 100%;
}

@media (max-width: 640px) {
  .vea-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vea-action-btn-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  box-sizing: border-box;
}

.vea-action-btn-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary-hover, rgba(239, 68, 68, 0.5));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vea-action-btn-card.highlight-red {
  border-color: var(--accent-primary-shadow-hover, rgba(239, 68, 68, 0.4));
  background: linear-gradient(135deg, var(--accent-primary-shadow, rgba(239, 68, 68, 0.18)), rgba(0, 0, 0, 0.2));
  color: var(--text-main, #fca5a5);
}
.vea-action-btn-card.highlight-blue {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}
.vea-action-btn-card.highlight-amber {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}
.vea-action-btn-card.highlight-emerald {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

/* VEA Revenue Radar Styles */
.vea-revenue-period-btn {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  white-space: nowrap;
}
.vea-revenue-period-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.vea-revenue-period-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.18);
}
.vea-revenue-kpi-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.vea-revenue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.vea-revenue-table th {
  padding: 10px 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.4);
}
.vea-revenue-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.vea-revenue-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}


/* Dynamic Filter Chips & Edge-Fade Masking */
.vea-radar-filters-wrapper {
  overflow-x: auto;
  -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, black 90%, transparent 100%);
  padding-right: 12px;
  padding-bottom: 2px;
  display: flex;
  gap: 4px;
  align-items: center;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.vea-filter-pill {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  border-radius: 14px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.vea-filter-pill.active {
  background: var(--accent-primary-shadow, rgba(239, 68, 68, 0.2));
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.5));
  color: var(--accent-primary, #f87171);
}

.vea-filter-pill.zero-count {
  display: none !important;
}

/* Three-tier Structured Alert Cards */
.ai-ea-alert-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: all 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  flex-shrink: 0;
  min-height: min-content;
  position: relative;
}

.ai-ea-alert-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(239, 68, 68, 0.35);
  transform: translateX(2px);
}

.vea-client-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.vea-client-card-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.vea-client-avatar-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 12px;
  flex-shrink: 0;
}

.vea-client-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  flex-shrink: 0;
}

.vea-client-card-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.vea-client-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.vea-client-card-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
}

.vea-client-card-actions-bar .ai-ea-action-btn {
  flex: 1;
  justify-content: center;
  padding: 5px 8px;
  font-size: 11px;
  text-align: center;
  min-height: 28px;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .vea-client-card-actions-bar {
    gap: 4px;
  }
  .vea-client-card-actions-bar .ai-ea-action-btn {
    padding: 4px 6px;
    font-size: 10.5px;
  }
  .vea-client-name {
    max-width: 130px;
  }
}

.vea-meta-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  box-sizing: border-box;
}

.vea-meta-chip.chip-primary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.vea-meta-chip.chip-accent {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  font-weight: 700;
}

/* Multi-line VEA Note Chip with up to 2-line vertical wrap & smooth ellipsis clamp */
.vea-meta-chip.chip-note,
.vea-meta-chip.chip-primary.chip-note,
.ai-ea-alert-card.severity-injury .vea-meta-chip.chip-primary {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ai-ea-alert-card.severity-high {
  border-left: 4px solid #ef4444;
}

.ai-ea-alert-card.severity-medium {
  border-left: 4px solid #f59e0b;
}

.ai-ea-alert-card.severity-low {
  border-left: 4px solid #3b82f6;
}

.ai-ea-alert-card.severity-injury {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.12);
}

.ai-ea-alert-card.severity-renewal {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.ai-ea-alert-card.severity-overload {
  border-left: 4px solid #a855f7;
  background: rgba(168, 85, 247, 0.06);
}

.ai-ea-alert-card.severity-debrief {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.2), rgba(15, 23, 42, 0.65));
}

.ai-ea-alert-card.severity-adaptive {
  border-left: 4px solid #ef4444;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.18), rgba(15, 23, 42, 0.65));
}

.ai-ea-badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.ai-ea-badge-tag.tag-weighin {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ai-ea-badge-tag.tag-workout {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ai-ea-badge-tag.tag-login {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-ea-badge-tag.tag-injury {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: vea-pulse 2s infinite ease-in-out;
}

.ai-ea-badge-tag.tag-renewal {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.ai-ea-badge-tag.tag-overload {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.ai-ea-badge-tag.tag-debrief {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.ai-ea-badge-tag.tag-adaptive {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.ai-ea-action-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-ea-action-btn:hover {
  background: var(--accent-primary, #ef4444);
  color: #ffffff;
  border-color: var(--accent-primary, #ef4444);
}

/* Sleek Low-Opacity Scrollbars & Radar List Constraints */
#ai-ea-client-list {
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100%;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

#ai-ea-client-list > * {
  flex-shrink: 0;
}

#ai-ea-client-list,
.vea-radar-filters-wrapper {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#ai-ea-client-list::-webkit-scrollbar,
.vea-radar-filters-wrapper::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

#ai-ea-client-list::-webkit-scrollbar-track,
.vea-radar-filters-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

#ai-ea-client-list::-webkit-scrollbar-thumb,
.vea-radar-filters-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

#ai-ea-client-list::-webkit-scrollbar-thumb:hover,
.vea-radar-filters-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* AI Executive Assistant Collapsed Header Bar */
.ai-ea-collapsed-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--border-radius-md, 12px);
  transition: background var(--transition-fast) ease;
}

.ai-ea-collapsed-header:hover {
  background: rgba(15, 23, 42, 0.6);
}

.ai-ea-collapsed-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.ai-ea-collapsed-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.ai-ea-collapsed-names {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-ea-collapsed-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ai-ea-collapsed-alert-summary {
  font-size: 11.5px;
  color: var(--text-secondary, #fca5a5);
  font-weight: 600;
  padding-left: 48px;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .ai-ea-collapsed-header {
    padding: 10px 12px !important;
    gap: 6px !important;
  }
  .ai-ea-collapsed-alert-summary {
    padding-left: 0 !important;
    font-size: 11px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .ai-ea-collapsed-controls {
    gap: 6px !important;
  }
  #ai-ea-collapsed-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
}

/* Floating Assistant Trigger (FAB) */
.vea-fab-trigger {
  position: fixed;
  bottom: 74px;
  right: 18px;
  z-index: 1900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid var(--accent-primary, #ef4444);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 12px 6px 6px;
  border-radius: 28px;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}

.vea-fab-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(239, 68, 68, 0.5);
}

.vea-fab-icon-box {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: visible;
}

.vea-fab-icon-box img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.vea-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.5px solid #0f172a;
}

.vea-fab-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Voice Dictation Waveform */
.vea-voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  margin-top: 4px;
}

.vea-voice-wave span {
  display: block;
  width: 4px;
  height: 12px;
  background: #ef4444;
  border-radius: 2px;
  animation: vea-wave 1.2s infinite ease-in-out;
}

.vea-voice-wave span:nth-child(2) { animation-delay: 0.15s; height: 18px; }
.vea-voice-wave span:nth-child(3) { animation-delay: 0.3s; height: 24px; }
.vea-voice-wave span:nth-child(4) { animation-delay: 0.45s; height: 16px; }
.vea-voice-wave span:nth-child(5) { animation-delay: 0.6s; height: 10px; }

@keyframes vea-wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

@keyframes vea-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.4); }
}

/* VEA Debrief & Adaptive Category Cards */
.ai-ea-alert-card.severity-debrief {
  border-color: rgba(59, 130, 246, 0.45);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.28), rgba(15, 23, 42, 0.65));
}
.ai-ea-alert-card.severity-adaptive {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.22), rgba(15, 23, 42, 0.65));
}

.ai-ea-badge-tag.tag-debrief {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.ai-ea-badge-tag.tag-adaptive {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.vea-diff-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.vea-diff-pill.load-up {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.vea-diff-pill.hold-load {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.vea-diff-pill.deload {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* VEA Daily Welcome Back Briefing Modal */
.vea-welcome-avatar-wrapper img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.vea-welcome-avatar-wrapper:hover img {
  transform: scale(1.05);
}
.vea-welcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 480px) {
  .vea-welcome-grid {
    grid-template-columns: 1fr;
  }
}
.vea-welcome-stat-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.vea-welcome-stat-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
}
.vea-welcome-stat-card.alert-highlight {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(15, 23, 42, 0.7));
}
.vea-welcome-stat-card.success-highlight {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.7));
}
.vea-welcome-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vea-welcome-stat-lbl {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.vea-welcome-quote-box {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #ef4444;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 12px;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.45;
}

/* VEA Capabilities Guide & Tutorial Modal */
.vea-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
@media (max-width: 520px) {
  .vea-guide-grid {
    grid-template-columns: 1fr;
  }
}
.vea-guide-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.vea-guide-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.vea-guide-card.highlight-blue {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.2), rgba(15, 23, 42, 0.65));
}
.vea-guide-card.highlight-red {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.15), rgba(15, 23, 42, 0.65));
}
.vea-guide-card.highlight-purple {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.15), rgba(15, 23, 42, 0.65));
}
.vea-guide-card.highlight-amber {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.15), rgba(15, 23, 42, 0.65));
}
.vea-guide-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vea-guide-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
.vea-guide-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: white;
  margin: 0;
}
.vea-guide-card-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.vea-guide-key-benefit {
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 2px solid var(--accent-primary, #ef4444);
}
.vea-guide-card-action {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

/* Debrief Redirection Highlight Pulse */
@keyframes highlightPulseGlow {
  0% {
    box-shadow: 0 0 0 rgba(99, 102, 241, 0);
    border-color: rgba(99, 102, 241, 0.4);
  }
  30% {
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.7), inset 0 0 12px rgba(99, 102, 241, 0.3);
    border-color: #818cf8;
  }
  60% {
    box-shadow: 0 0 28px rgba(99, 102, 241, 0.85), inset 0 0 16px rgba(99, 102, 241, 0.4);
    border-color: #a5b4fc;
  }
  100% {
    box-shadow: 0 0 0 rgba(99, 102, 241, 0);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.highlight-pulse-glow {
  animation: highlightPulseGlow 3s ease-in-out forwards !important;
  scroll-margin-top: 100px;
}

/* Categorized Muscle Group Section */
.muscle-category-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.muscle-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.muscle-category-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(30, 41, 59, 0.3);
  padding: 8px;
  border-radius: var(--border-radius-sm, 6px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Toggle Switch Component */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(51, 65, 85, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-primary, #ef4444);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--accent-primary, #ef4444);
  outline-offset: 2px;
}

/* Reduced motion & power saver hardware acceleration fallback */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================= WORKOUT HISTORY SESSION TIMELINE ================= */
.workout-timeline-drawer {
  background: var(--bg-surface, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--border-radius-md, 12px);
  padding: 14px 16px;
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
  animation: fadeIn 0.25s ease-out;
}

.timeline-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.timeline-header-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-main, #f8fafc);
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-filter-pills {
  display: flex;
  gap: 5px;
}

.timeline-filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast, 0.15s ease);
}

.timeline-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main, #f8fafc);
}

.timeline-filter-pill.active {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.timeline-list {
  position: relative;
  padding-left: 24px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.4) 0%, rgba(99, 102, 241, 0.4) 50%, rgba(245, 158, 11, 0.4) 100%);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-item-node {
  position: absolute;
  left: -24px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.timeline-item-node.node-set {
  background: rgba(16, 185, 129, 0.2);
  border: 1.5px solid #10b981;
  color: #34d399;
}

.timeline-item-node.node-rest {
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid #f59e0b;
  color: #fbbf24;
}

.timeline-item-content {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm, 8px);
  padding: 8px 12px;
  transition: var(--transition-fast, 0.15s ease);
}

.timeline-item-content:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}

.timeline-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.timeline-item-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-set-completed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-rest-timer {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.timeline-item-timestamp {
  color: var(--text-secondary, #94a3b8);
  font-size: 10.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.timeline-item-details {
  font-size: 12px;
  color: var(--text-main, #f8fafc);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Admin Impersonation Banner & Global Viewport Offset Architecture */
#admin-impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10005;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.97) 0%, rgba(194, 65, 12, 0.97) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 6px 12px;
  padding-top: max(6px, env(safe-area-inset-top, 6px));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  animation: slideDownBanner 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  transition: padding 0.2s ease, background 0.2s ease;
}

.impersonation-banner-inner {
  display: flex;
  align-items: safe center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  min-inline-size: 0;
  min-width: 0;
}

.impersonation-info-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-inline-size: 0;
  min-width: 0;
  overflow: hidden;
}

@keyframes slideDownBanner {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.impersonation-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.28);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.32);
  white-space: nowrap;
  flex-shrink: 0;
  color: #ffffff;
}

.impersonation-badge-compact {
  display: none;
}

.impersonation-client-summary {
  color: #ffedd5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-inline-size: 0;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.3;
}

.impersonation-client-name {
  color: #ffffff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.impersonation-client-email-wrap {
  color: rgba(255, 237, 213, 0.9);
  font-size: 11.5px;
}

.impersonation-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-CompactToggle-impersonation {
  background: rgba(0, 0, 0, 0.24);
  color: #ffedd5;
  border: 1px solid rgba(255, 255, 255, 0.28);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.btn-CompactToggle-impersonation:hover {
  background: rgba(0, 0, 0, 0.38);
  color: #ffffff;
}

.btn-exit-impersonation {
  background: #ffffff;
  color: #c2410c;
  border: none;
  padding: 4px 11px;
  height: 26px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.btn-exit-impersonation:hover {
  background: #ffedd5;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.impersonation-exit-compact {
  display: none;
}

/* Ultra-Slim Compact Status Strip Mode (~28px height) */
#admin-impersonation-banner.impersonation-banner-compact {
  padding: 2px 10px;
  padding-top: max(2px, env(safe-area-inset-top, 2px));
  font-size: 11px;
}

#admin-impersonation-banner.impersonation-banner-compact .impersonation-badge {
  padding: 1px 6px;
  font-size: 9.5px;
}

#admin-impersonation-banner.impersonation-banner-compact .impersonation-badge-full,
#admin-impersonation-banner.impersonation-banner-compact .impersonation-viewing-prefix,
#admin-impersonation-banner.impersonation-banner-compact .impersonation-client-email-wrap,
#admin-impersonation-banner.impersonation-banner-compact .impersonation-exit-full {
  display: none;
}

#admin-impersonation-banner.impersonation-banner-compact .impersonation-badge-compact,
#admin-impersonation-banner.impersonation-banner-compact .impersonation-exit-compact {
  display: inline;
}

#admin-impersonation-banner.impersonation-banner-compact .btn-CompactToggle-impersonation,
#admin-impersonation-banner.impersonation-banner-compact .btn-exit-impersonation {
  height: 22px;
  padding: 2px 8px;
  font-size: 10.5px;
}

#admin-impersonation-banner.impersonation-banner-compact .btn-CompactToggle-impersonation {
  width: 22px;
  padding: 0;
}

/* Mobile Responsive Single-Line Optimization */
@media (max-width: 600px) {
  #admin-impersonation-banner {
    padding: 5px 10px;
    padding-top: max(5px, env(safe-area-inset-top, 5px));
    font-size: 11.5px;
  }

  .impersonation-badge-full,
  .impersonation-viewing-prefix,
  .impersonation-exit-full {
    display: none;
  }

  .impersonation-badge-compact,
  .impersonation-exit-compact {
    display: inline;
  }

  .impersonation-badge {
    padding: 2px 7px;
    font-size: 9.5px;
    gap: 4px;
  }

  .impersonation-client-email-wrap {
    font-size: 10.5px;
  }

  .btn-exit-impersonation {
    padding: 3px 9px;
    height: 25px;
    font-size: 11px;
    gap: 4px;
  }

  .btn-CompactToggle-impersonation {
    width: 25px;
    height: 25px;
  }
}

/* Global Top Clearance & Sticky/Fixed Element Offsets When Impersonating */
body.impersonating-active .app-shell {
  padding-top: var(--impersonation-banner-offset, 42px);
}

body.impersonating-active header.app-top-header {
  top: var(--impersonation-banner-offset, 42px) !important;
}

body.impersonating-active .live-workout-overlay.expanded {
  top: var(--impersonation-banner-offset, 42px) !important;
  height: calc(100dvh - var(--impersonation-banner-offset, 42px)) !important;
  max-height: calc(100dvh - var(--impersonation-banner-offset, 42px)) !important;
}

body.impersonating-active .poker-modal-container {
  max-height: var(--modal-max-height, calc(100dvh - var(--modal-top-clearance, 54px) - var(--modal-bottom-cutoff, 92px))) !important;
}

body.impersonating-active .toast-msg {
  top: calc(var(--impersonation-banner-offset, 42px) + max(12px, env(safe-area-inset-top, 12px))) !important;
  z-index: 10010 !important;
}

/* ==========================================================================
   MOBILE-FIRST REST TIMER COMPONENT & MODAL
   ========================================================================== */
.rest-timer-component {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 18px 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(245, 158, 11, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  user-select: none;
  box-sizing: border-box;
}

.rest-timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  padding: 0 4px;
}

.rest-timer-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px;
  border-radius: 12px;
}

.rest-timer-title-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  display: inline-block;
  box-shadow: 0 0 8px #fbbf24;
}

.rest-timer-title-badge.active .pulse-dot {
  animation: restTimerPulse 1.2s infinite ease-in-out;
}

@keyframes restTimerPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Progress Ring Container */
.rest-timer-ring-container {
  position: relative;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 14px;
}

.rest-timer-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.rest-timer-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 8;
}

.rest-timer-ring-progress {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
}

.rest-timer-ring-progress.resting {
  stroke: #10b981;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

.rest-timer-ring-progress.paused {
  stroke: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.rest-timer-ring-progress.completed {
  stroke: #ef4444;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.7));
}

.rest-timer-ring-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.rest-timer-countdown {
  font-family: 'JetBrains Mono', 'Roboto Mono', 'SF Mono', Consolas, monospace;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #f8fafc;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.rest-timer-status-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary, #94a3b8);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.rest-timer-status-pill.resting {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rest-timer-status-pill.paused {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rest-timer-status-pill.completed {
  color: #f87171;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Preset Buttons Grid */
.rest-timer-presets-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
}

.rest-timer-presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
}

.rest-timer-preset-btn {
  padding: 8px 0;
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rest-timer-preset-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.rest-timer-preset-btn:active {
  transform: scale(0.94);
}

.rest-timer-preset-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Quick Adjust Pills */
.rest-timer-adjust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.rest-timer-adjust-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rest-timer-adjust-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.rest-timer-adjust-btn:active {
  transform: scale(0.95);
}

/* Actions Controls */
.rest-timer-actions-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.rest-timer-toggle-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.rest-timer-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.rest-timer-toggle-btn:active {
  transform: scale(0.97);
}

.rest-timer-toggle-btn.active {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
}

.rest-timer-toggle-btn.active:hover {
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.55);
}

.rest-timer-reset-btn {
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rest-timer-reset-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.rest-timer-reset-btn:active {
  transform: scale(0.95);
}

/* Custom duration fold-out */
.rest-timer-custom-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rest-timer-custom-input {
  width: 52px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: white;
  padding: 5px;
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  outline: none;
}

.rest-timer-custom-input:focus {
  border-color: #f59e0b;
}

/* Dropdown specific compact mode */
#rest-timer-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1100;
  width: 300px;
  max-width: 90vw;
  margin-top: 8px;
  pointer-events: auto;
}

#rest-timer-dropdown.glass-panel {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

#rest-timer-dropdown .rest-timer-component {
  max-width: 320px;
  padding: 14px 12px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-lg);
  pointer-events: auto;
}

#rest-timer-dropdown .rest-timer-ring-container {
  width: 150px;
  height: 150px;
  margin: 4px 0 10px;
}

#rest-timer-dropdown .rest-timer-countdown {
  font-size: 1.85rem;
}

/* ==========================================================================
   Add / Invite Client Modal Component Styles
   ========================================================================== */

.client-modal-tabs-container button {
  transition: all 0.2s ease;
  white-space: nowrap;
}

.client-modal-tabs-container button.btn-primary {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #4f46e5 100%));
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.client-modal-tabs-container button.btn-secondary {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-secondary, #94a3b8);
  border-color: rgba(255, 255, 255, 0.08);
}

.client-modal-tabs-container button.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

#invite-success-code-display {
  transition: all 0.2s ease;
}

#invite-success-code-display:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #f59e0b;
}

#copy-invite-code-btn:active,
#copy-invite-link-btn:active {
  transform: scale(0.96);
}

#manage-client-invite-badge {
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    opacity: 0.85;
    box-shadow: 0 0 8px 2px rgba(245, 158, 11, 0.2);
  }
}

/* VOLUME HEATMAP ANALYZER & SEGMENTED CONTROLS */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm, 8px);
  padding: 3px;
  gap: 2px;
}

.segmented-control-btn,
.heatmap-preset-btn,
.manage-heatmap-preset-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  user-select: none;
}

.segmented-control-btn:hover,
.heatmap-preset-btn:hover,
.manage-heatmap-preset-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.segmented-control-btn.active,
.heatmap-preset-btn.active,
.manage-heatmap-preset-btn.active {
  background: #1e1e24 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.heatmap-custom-date-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm, 8px);
  margin-top: 8px;
  margin-bottom: 8px;
  animation: fadeIn 0.2s ease;
}

/* Metric Badges Strip */
.metric-badge-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.heatmap-metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary, #94a3b8);
  transition: all 0.15s ease;
  user-select: none;
}

.heatmap-metric-badge.badge-total {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
  color: #22d3ee;
  font-weight: 700;
}

.heatmap-metric-badge.badge-normal {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.heatmap-metric-badge.badge-drop {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.heatmap-metric-badge.badge-failure {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.heatmap-metric-badge.badge-load {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
  color: #34d399;
  font-weight: 700;
}

/* GitHub style Square Activity Tiles */
.heatmap-day-header-cell {
  width: 24px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  user-select: none;
}

.heatmap-activity-tile {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.heatmap-activity-tile:hover {
  transform: scale(1.22);
  z-index: 10;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
  border-color: rgba(6, 182, 212, 0.6) !important;
}

.heatmap-muscle-pill {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 10px;
  min-height: 54px;
  box-sizing: border-box;
  border-radius: var(--border-radius-md, 8px);
  font-size: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.heatmap-muscle-pill:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(6, 182, 212, 0.5) !important;
}

.heatmap-muscle-pill:active {
  transform: scale(0.97);
}

.heatmap-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-lg, 12px);
  gap: 8px;
}

/* Workout History Muscle Group Heatmap */
.workout-history-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 6px;
}

.workout-history-heatmap-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 10px;
  box-sizing: border-box;
  min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.workout-history-heatmap-pill.zero-score {
  justify-content: center;
}

.workout-history-heatmap-pill .heatmap-muscle-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  text-align: left;
  line-height: 1.2;
}

.workout-history-heatmap-pill.zero-score .heatmap-muscle-label {
  text-align: center;
}

.workout-history-heatmap-pill .heatmap-score-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.2;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Physique Chart Header */
.physique-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.physique-chart-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* App Mode Switcher (Personal vs Coach/Client) */
.app-mode-switcher-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  box-sizing: border-box;
}

.mode-pill-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.mode-pill-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.mode-pill-btn.active {
  background: var(--accent-primary-gradient);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px var(--accent-primary-shadow);
}

.mode-pill-btn.active i,
.mode-pill-btn.active svg {
  color: white;
}

@media (max-width: 480px) {
  .mode-pill-btn {
    padding: 6px 8px;
    font-size: 11.5px;
    gap: 5px;
  }
}

/* SET COMPLETION STATUS BADGES (C / NC) */
.set-status-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  user-select: none;
}
.set-status-badge.badge-c {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.set-status-badge.badge-nc {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.history-set-badge.is-not-completed {
  opacity: 0.8;
  border-color: rgba(239, 68, 68, 0.2) !important;
}

/* ================= EDIT CLIENT PROFILE MODAL & REFACTOR STYLES ================= */
.edit-profile-modal-container {
  display: flex !important;
  flex-direction: column !important;
  max-width: 520px !important;
  width: 92% !important;
  max-height: 88vh !important;
  max-height: 88dvh !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: var(--border-radius-lg, 18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 25px rgba(99, 102, 241, 0.12) !important;
}

.edit-profile-header {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.75) !important;
}

.edit-profile-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.edit-profile-icon {
  font-size: 18px;
  color: #fbbf24;
  flex-shrink: 0;
}

.edit-profile-header h3 {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.edit-profile-modal-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 20px !important;
}

.edit-profile-footer {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding: 14px 20px !important;
  margin-top: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* Sections & Dividers */
.form-section-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section-divider {
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin: 6px 0 !important;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.form-section-header i,
.form-section-header svg {
  width: 14px;
  height: 14px;
  color: var(--accent-primary, #ef4444);
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #64748b);
  margin-top: 4px;
  line-height: 1.35;
}

/* Profile Picture Uploader */
.profile-avatar-uploader {
  cursor: pointer !important;
  margin: 8px auto !important;
  width: 76px !important;
  height: 76px !important;
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(24, 24, 27, 0.7) !important;
  background-repeat: no-repeat !important;
  border: 2px dashed rgba(255, 255, 255, 0.22) !important;
  border-radius: 50% !important;
  background-size: cover !important;
  background-position: center !important;
  transition: all 0.2s ease !important;
}

.profile-avatar-uploader:hover {
  border-color: var(--accent-primary, #ef4444) !important;
  transform: scale(1.04);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

/* Neutral Dark Input Fields & Contrast Rules */
.edit-profile-modal-body .form-input,
.edit-profile-modal-body .form-select,
.edit-profile-modal-body textarea.form-input {
  background: rgba(24, 24, 27, 0.75) !important;
  border: 1px solid #27272a !important; /* Neutral dark gray / border-zinc-800 */
  color: #f4f4f5 !important; /* text-zinc-100 */
  border-radius: var(--border-radius-md, 10px) !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.edit-profile-modal-body .form-input::placeholder,
.edit-profile-modal-body textarea.form-input::placeholder {
  color: #71717a !important; /* text-zinc-500 */
  opacity: 1 !important;
}

.edit-profile-modal-body .form-input:focus,
.edit-profile-modal-body .form-select:focus,
.edit-profile-modal-body textarea.form-input:focus {
  border-color: var(--accent-primary, #ef4444) !important;
  background: rgba(24, 24, 27, 0.95) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

/* Progression Helper Card (Resolves Dropdown Truncation) */
.progression-helper-card {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(24, 24, 27, 0.65);
  border: 1px solid #27272a;
  border-radius: var(--border-radius-sm, 8px);
  font-size: 11.5px;
  transition: all 0.2s ease;
}

.progression-helper-title {
  font-weight: 700;
  color: #f4f4f5;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.progression-helper-desc {
  color: #94a3b8;
  line-height: 1.4;
}


/* Button Styling (Ghost vs Full-contrast Accent) */
.btn-ghost {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 9px 18px !important;
  border-radius: var(--border-radius-md, 10px) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.edit-profile-save-btn {
  background: linear-gradient(135deg, var(--accent-primary, #ef4444), #dc2626) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 9px 20px !important;
  border-radius: var(--border-radius-md, 10px) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.edit-profile-save-btn:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5) !important;
}

/* Floating Widgets / Badges Isolation when Modals/Drawers are Active */
body:has(.modal-overlay.active) .vea-fab-trigger,
body.modal-open .vea-fab-trigger,
.modal-overlay.active ~ .vea-fab-trigger,
body:has(.modal-overlay.active) .floating-badge,
body.modal-open .floating-badge {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: scale(0.85) translateY(10px) !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s !important;
}

/* Background Page Scroll Lock when Modals are Active */
body.modal-open,
body:has(.modal-overlay.active) {
  overflow: hidden !important;
  touch-action: none;
}

/* Multi-Select Training Goals Grid in Edit Profile */
.edit-profile-goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.edit-profile-goal-tile {
  border: 1px solid #27272a;
  background: rgba(24, 24, 27, 0.75);
  border-radius: var(--border-radius-md, 10px);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  text-align: left;
  user-select: none;
}

.edit-profile-goal-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(39, 39, 42, 0.85);
}

.edit-profile-goal-tile:focus-visible {
  outline: 2px solid var(--accent-primary, #ef4444);
  outline-offset: 2px;
}

.edit-profile-goal-tile.selected {
  border-color: var(--accent-primary, #ef4444) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.22) !important;
}

.edit-profile-goal-icon {
  font-size: 18px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edit-profile-goal-label {
  font-size: 12px;
  font-weight: 600;
  color: #f4f4f5;
  line-height: 1.25;
  flex: 1;
  padding-right: 14px;
}

.edit-profile-goal-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  color: var(--accent-primary, #ef4444);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.edit-profile-goal-tile.selected .edit-profile-goal-check {
  opacity: 1;
  transform: scale(1);
}

/* Responsive Mobile Layout */
@media (max-width: 600px) {
  .edit-profile-goals-grid {
    grid-template-columns: 1fr;
  }

  .edit-profile-modal-container {
    width: 95% !important;
    max-height: calc(100vh - 108px) !important;
    max-height: var(--modal-max-height, calc(100dvh - 108px)) !important;
  }

  .edit-profile-header {
    padding: 14px 16px !important;
  }

  .edit-profile-modal-body {
    padding: 16px !important;
  }

  .form-row-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .edit-profile-footer {
    padding: 12px 16px !important;
  }

  .edit-profile-footer button {
    flex: 1 !important;
    min-height: 42px !important;
  }
}



/* ==========================================================================
   SPATIAL DEPTH ("ANTIGRAVITY") DESIGN SYSTEM EXTENSIONS
   ========================================================================== */

:root {
  --space-surface-obsidian: #090d16;
  --space-surface-card: rgba(15, 23, 42, 0.72);
  --space-surface-console: #080c14;
  --space-surface-steel: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  --space-surface-steel-hover: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  
  --space-crimson-base: #dc2626;
  --space-crimson-bright: #ef4444;
  --space-coral-glow: #fb7185;
  --space-gold-accent: #fbbf24;
  --space-gold-metallic: linear-gradient(135deg, #fef08a 0%, #fbbf24 50%, #b45309 100%);
  --space-crimson-gradient: linear-gradient(135deg, #ef4444 0%, #e11d48 50%, #be123c 100%);
  --space-crimson-coral-gradient: linear-gradient(135deg, #ff4d6d 0%, #ef4444 50%, #f43f5e 100%);
  
  --shadow-altitude-1: 0 4px 12px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-altitude-2: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-altitude-3: 0 24px 48px -12px rgba(0, 0, 0, 0.7), 0 8px 20px rgba(0, 0, 0, 0.4);
  --shadow-floating-crimson: 0 16px 40px -8px rgba(239, 68, 68, 0.25), 0 8px 16px rgba(0, 0, 0, 0.6);
  --shadow-inset-console: inset 0 3px 10px rgba(0, 0, 0, 0.85), inset 0 0 1px rgba(255, 255, 255, 0.08);

  --specular-rim-glass: inset 0 1px 1px rgba(255, 255, 255, 0.18), inset 0 -1px 1px rgba(0, 0, 0, 0.6);
  --specular-rim-steel: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.8);
  --border-glass-subtle: 1px solid rgba(255, 255, 255, 0.09);
  --border-glass-active: 1px solid rgba(239, 68, 68, 0.45);
}

.antigravity-card,
.profile-card.glass-panel {
  background: var(--space-surface-card) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: var(--border-glass-subtle) !important;
  border-radius: 20px !important;
  box-shadow: var(--shadow-altitude-2), var(--specular-rim-glass) !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease !important;
  position: relative;
  overflow: hidden;
}

.antigravity-card:hover,
.profile-card.glass-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-altitude-3), var(--shadow-floating-crimson), var(--specular-rim-glass) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}

body.light-theme .antigravity-card,
body.light-theme .profile-card.glass-panel {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .antigravity-card:hover,
body.light-theme .profile-card.glass-panel:hover {
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08), 0 0 16px rgba(220, 38, 38, 0.1) !important;
}

/* Gold & Crimson Brushed Metal Logo */
.logo-brushed-metal {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(251, 191, 36, 0.4) 0%, transparent 60%),
    linear-gradient(135deg, #7f1d1d 0%, #b91c1c 30%, #450a0a 70%, #991b1b 100%);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 
    0 0 16px rgba(220, 38, 38, 0.4),
    0 3px 8px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-brushed-metal:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 
    0 0 24px rgba(239, 68, 68, 0.6),
    0 0 10px rgba(251, 191, 36, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.7),
    inset 0 1px 3px rgba(255, 255, 255, 0.6);
}

.logo-brushed-metal svg,
.logo-brushed-metal i {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
  color: #fffbeb;
  width: 15px;
  height: 15px;
}

.brand-title-spatial {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 45%, #f87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(239, 68, 68, 0.25));
  line-height: 1.1;
  white-space: nowrap;
}

.brand-sub-spatial {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--space-gold-accent, #fbbf24);
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
  line-height: 1.1;
  margin-top: 1px;
  white-space: nowrap;
}

/* Segmented iOS-Style Mode Switcher */
.segmented-mode-container {
  position: relative;
  display: flex;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 4px 14px rgba(0, 0, 0, 0.35);
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.segmented-sliding-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 9999px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #f43f5e 50%, #fb7185 100%));
  box-shadow: 
    0 0 18px var(--accent-primary-shadow, rgba(239, 68, 68, 0.55)),
    0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
  animation: pillGlowPulse 3s ease-in-out infinite alternate;
}

@keyframes pillGlowPulse {
  0% {
    box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.45)), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 24px var(--accent-primary-shadow, rgba(239, 68, 68, 0.75)), 0 0 8px rgba(255, 255, 255, 0.4), 0 2px 10px rgba(0, 0, 0, 0.6);
  }
}

.segmented-option-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.3s ease-out, text-shadow 0.3s ease-out, transform 0.2s ease;
  font-family: var(--font-heading);
}

.segmented-option-btn:hover:not(.active) {
  color: #f1f5f9;
}

.segmented-option-btn.active {
  color: #ffffff !important;
  font-weight: 800;
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.9)),
    0 1px 2px rgba(0, 0, 0, 0.9);
}

/* Single Flip Mode Capsule Pin (Option 3 Compact Toggle) */
.mode-capsule-pin {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  user-select: none;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
  text-transform: uppercase;
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}

.mode-capsule-pin.mode-personal-active {
  background: linear-gradient(145deg, #1e293b 0%, #0b0f17 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 0 8px rgba(245, 158, 11, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  color: #fef08a !important;
}

.mode-capsule-pin.mode-personal-active:hover {
  transform: translateY(-1px) scale(1.02) !important;
  border-color: rgba(251, 191, 36, 0.8) !important;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(245, 158, 11, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

.mode-capsule-pin.mode-personal-active #mode-capsule-icon {
  color: #f59e0b !important;
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.85)) !important;
}

.mode-capsule-pin.mode-coach-active {
  background: linear-gradient(145deg, #1e1b4b 0%, #090d16 100%) !important;
  border: 1px solid rgba(99, 102, 241, 0.55) !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(99, 102, 241, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: #e0e7ff !important;
}

.mode-capsule-pin.mode-coach-active:hover {
  transform: translateY(-1px) scale(1.02) !important;
  border-color: rgba(129, 140, 248, 0.9) !important;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.65),
    0 0 16px rgba(99, 102, 241, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

.mode-capsule-pin.mode-coach-active #mode-capsule-icon {
  color: #818cf8 !important;
  filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.85)) !important;
}

.mode-capsule-pin #mode-capsule-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.mode-capsule-switch-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  color: var(--text-muted, #94a3b8);
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.mode-capsule-pin:hover .mode-capsule-switch-icon {
  opacity: 1 !important;
  color: #ffffff !important;
  transform: rotate(180deg);
}

/* Textured Metallic Header Pins */
.metallic-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1e293b 0%, #0b0f17 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.8);
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  font-family: var(--font-heading);
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease;
}

.metallic-pin:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(251, 191, 36, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.metallic-pin svg,
.metallic-pin i {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.metallic-pin .gold-accent {
  color: var(--space-gold-accent, #fbbf24);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.metallic-pin .notif-unread-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 9999px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444, #dc2626));
  border: 2px solid #090d16;
  color: white;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--accent-primary-shadow, rgba(239, 68, 68, 0.9));
  animation: notifPulse 2.5s infinite;
  box-sizing: border-box;
}

#header-logout-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: var(--accent-danger, #ef4444) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#header-logout-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

#header-logout-btn svg,
#header-logout-btn i {
  width: 13px !important;
  height: 13px !important;
}

#header-theme-toggle-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#header-theme-toggle-btn svg,
#header-theme-toggle-btn i {
  width: 13px !important;
  height: 13px !important;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); box-shadow: 0 0 12px var(--accent-primary-shadow, rgba(239, 68, 68, 1)); }
}

/* Avatar Ring of Power */
.avatar-ring-outer {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #334155 0%, #0f172a 50%, #1e293b 100%);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px var(--accent-primary-shadow, rgba(239, 68, 68, 0.35)),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.avatar-ring-neon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #ff0055 50%, #f59e0b 100%));
  box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.8)), inset 0 0 6px var(--accent-primary-shadow, rgba(239, 68, 68, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: neonRingBreathing 3s ease-in-out infinite alternate;
}

@keyframes neonRingBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  }
}

.avatar-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1e293b 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-initial-text {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, var(--text-main, #fca5a5) 40%, var(--accent-primary, #ef4444) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px var(--accent-primary-shadow, rgba(239, 68, 68, 0.4)));
  line-height: 1;
}

.avatar-initial-text.has-image {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: initial !important;
  filter: none !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
}

/* Badge-Based Metadata */
.metadata-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  transition: all 0.3s ease-out;
}

.metadata-pill-badge:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.3));
  color: #ffffff;
  transform: translateY(-1px);
}

.metadata-pill-badge.badge-primary-glow {
  background: var(--accent-primary-shadow, rgba(239, 68, 68, 0.12));
  border: 1px solid var(--border-color-active, rgba(239, 68, 68, 0.35));
  color: var(--text-main, #fecdd3);
}

.metadata-pill-badge.badge-primary-glow i,
.metadata-pill-badge.badge-primary-glow svg {
  color: var(--accent-primary, #f43f5e) !important;
}

/* Decoupled Goals Cluster Badges */
.metadata-pill-badge.profile-goal-lead-badge {
  font-weight: 700;
  letter-spacing: 0.02em;
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.45));
}

.metadata-pill-badge.profile-goal-item-badge {
  font-weight: 600;
  user-select: none;
}

/* Elevated Player Rank Progression Badge */
.metadata-pill-badge.badge-rank-progression {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(239, 68, 68, 0.14) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  color: #fef08a !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  letter-spacing: 0.04em;
  padding: 4px 12px;
}

.metadata-pill-badge.badge-rank-progression:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(239, 68, 68, 0.22) 100%) !important;
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}

/* Profile Header Architecture */
.profile-header {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Subtle Top-Right Glass Icon Controls */
.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: center;
}

/* Decoupled Single-Row Horizontal Scroll Ribbon for Goal Badges */
.profile-goals-scroll-ribbon,
.profile-metadata-row.profile-goals-scroll-ribbon {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE 10+ */
  -webkit-overflow-scrolling: touch !important; /* Smooth momentum scrolling on iOS */
  padding: 3px 2px 4px 2px !important;
  margin-top: 2px !important;
  box-sizing: border-box !important;
  cursor: grab;
}

.profile-goals-scroll-ribbon:active {
  cursor: grabbing;
}

.profile-goals-scroll-ribbon::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.profile-goals-scroll-ribbon .metadata-pill-badge {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
}

.btn-glass-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.btn-glass-icon svg,
.btn-glass-icon i {
  width: 15px;
  height: 15px;
  stroke: #94a3b8;
  stroke-width: 2px;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.btn-glass-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.45));
  color: #f8fafc;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-primary-shadow, rgba(239, 68, 68, 0.25));
}

.btn-glass-icon:hover svg,
.btn-glass-icon:hover i {
  stroke: var(--accent-primary-hover, #ff6b6b);
  transform: scale(1.1);
}

.btn-glass-icon:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#manage-voice-notes-btn,
#profile-share-referral-btn {
  overflow: visible !important;
}

#manage-voice-notes-btn-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px solid #0f172a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4), 0 0 6px rgba(14, 165, 233, 0.5);
  pointer-events: none;
  z-index: 5;
  box-sizing: border-box;
}

body.light-theme #manage-voice-notes-btn-badge {
  border-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 6px rgba(14, 165, 233, 0.4);
}

/* Brushed Dark Steel Buttons with Inset LED Lettering */
.btn-brushed-steel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--space-surface-steel, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.5),
    var(--specular-rim-steel, inset 0 1px 0 rgba(255, 255, 255, 0.1));
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  font-family: var(--font-heading);
}

.btn-brushed-steel:hover {
  background: var(--space-surface-steel-hover, #334155);
  border-color: var(--accent-primary-hover, rgba(239, 68, 68, 0.5));
  transform: translateY(-1.5px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.6),
    0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.35)),
    var(--specular-rim-steel, inset 0 1px 0 rgba(255, 255, 255, 0.1));
}

.btn-brushed-steel .led-text {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary, #ff5252);
  text-shadow: 
    0 0 6px var(--accent-primary-shadow, rgba(255, 82, 82, 0.8)),
    0 0 14px rgba(0, 0, 0, 0.45);
}

.btn-brushed-steel:hover .led-text {
  color: var(--accent-primary-hover, #ff7b7b);
  text-shadow: 
    0 0 10px var(--accent-primary, #ff7b7b),
    0 0 18px var(--accent-primary-shadow, rgba(239, 68, 68, 0.8));
}

/* Weekly Consistency Tracker Card (Clean Glassmorphism) */
.tracker-console-card {
  position: relative;
  background: var(--bg-surface, rgba(15, 23, 42, 0.65));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-top: 1px solid var(--border-color-active, rgba(99, 102, 241, 0.35));
  padding: 14px 16px 16px 16px;
  box-shadow: var(--shadow-glass, 0 8px 32px 0 rgba(0, 0, 0, 0.35));
  overflow: hidden;
}

.console-status-dot {
  display: none;
}

.console-streak-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main, #f8fafc);
  text-transform: uppercase;
}

.console-streak-active-badge {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.12);
  letter-spacing: 0.02em;
}

.flame-icon-glow {
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
}

/* Fused Streak Milestone Pill Button */
.streak-milestone-pill-btn {
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.streak-milestone-pill-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.streak-milestone-pill-btn:active {
  transform: translateY(0);
}

.streak-milestone-subtag {
  color: rgba(251, 191, 36, 0.85);
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 3px;
  letter-spacing: 0.02em;
}

.streak-claim-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: streakClaimPulse 1.5s infinite;
  margin-left: 2px;
}

@keyframes streakClaimPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.12); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Consistency Milestone Progress Track (Beneath Weekly Domes) */
.consistency-milestone-progress-bar-wrap {
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--border-radius-sm, 8px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.consistency-milestone-progress-bar-wrap:hover {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 0 12px rgba(245, 158, 11, 0.08);
}

.milestone-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
}

.milestone-progress-header span#consistency-next-milestone-label {
  color: var(--text-main, #f8fafc);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.milestone-reward-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 8px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  white-space: nowrap;
}

.milestone-reward-pill.claim-ready {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(245, 158, 11, 0.35));
  border-color: rgba(239, 68, 68, 0.7);
  color: #fef08a;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
  animation: streakClaimPulse 1.8s infinite;
}

.milestone-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.milestone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.milestone-progress-fill.ticket-tier {
  background: linear-gradient(90deg, #a855f7, #ec4899);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

/* Streak Badges Cluster (SaaS + Game Login Streaks) */
.streak-badges-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.saas-streak-badge {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.saas-streak-badge:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.game-streak-badge {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.game-streak-badge:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
}

/* Consistency Bottom Split: Lifetime Workouts & Rookie Missions */
.consistency-footer-split-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: stretch;
  width: 100%;
}

body.light-theme .consistency-footer-split-row {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.consistency-footer-split-row > .consistency-lifetime-strip {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0 !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(99, 102, 241, 0.3) !important;
  transition: flex 0.35s ease, all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .consistency-footer-split-row > .consistency-lifetime-strip {
  border-top-color: rgba(99, 102, 241, 0.25) !important;
}

.consistency-missions-strip.starter-missions-btn-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--border-radius-md, 8px);
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

body.light-theme .consistency-missions-strip.starter-missions-btn-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
  border-color: rgba(168, 85, 247, 0.25);
}

.consistency-missions-strip.starter-missions-btn-card:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(168, 85, 247, 0.2) 100%);
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.25);
  transform: translateY(-1px);
}

.consistency-missions-strip.starter-missions-btn-card:active {
  transform: scale(0.985);
}

.consistency-missions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.consistency-missions-jan-avatar-wrap {
  width: 18px;
  height: 18px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #a855f7;
  flex-shrink: 0;
  background: #1e1b4b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.consistency-missions-jan-avatar {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.consistency-missions-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main, #f8fafc);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-theme .consistency-missions-title {
  color: #1e293b;
}

.consistency-missions-badge {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

body.light-theme .consistency-missions-badge {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: #7c3aed;
}

.consistency-missions-badge.badge-emerald {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
}

.consistency-missions-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
}

body.light-theme .consistency-missions-bar-wrap {
  background: rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.consistency-missions-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.4s ease;
}

.consistency-missions-action-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  color: #a78bfa;
  line-height: 1.3;
}

body.light-theme .consistency-missions-action-text {
  color: #7c3aed;
}

.consistency-missions-action-text i,
.consistency-missions-action-text svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.consistency-missions-strip.starter-missions-btn-card:hover .consistency-missions-action-text i,
.consistency-missions-strip.starter-missions-btn-card:hover .consistency-missions-action-text svg {
  transform: translateX(2px);
}

@media (max-width: 560px) {
  .consistency-footer-split-row {
    flex-direction: column;
    gap: 8px;
  }
  .consistency-footer-split-row > .consistency-lifetime-strip,
  .consistency-missions-strip.starter-missions-btn-card {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* Workout Summation Card & Distribution Bar - Compact Button Card & Chart Modal */
.consistency-lifetime-strip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .consistency-lifetime-strip {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.consistency-lifetime-strip.workout-summation-btn-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(79, 70, 229, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--border-radius-md, 8px);
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-sizing: border-box;
}

body.light-theme .consistency-lifetime-strip.workout-summation-btn-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.06) 100%);
  border-color: rgba(99, 102, 241, 0.25);
}

.consistency-lifetime-strip.workout-summation-btn-card:hover,
.consistency-footer-split-row > .consistency-lifetime-strip.workout-summation-btn-card:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(79, 70, 229, 0.16) 100%);
  border-color: rgba(99, 102, 241, 0.65) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.consistency-lifetime-strip.workout-summation-btn-card:active {
  transform: scale(0.985);
}

.consistency-lifetime-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.consistency-lifetime-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main, #f8fafc);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-theme .consistency-lifetime-title {
  color: #1e293b;
}

.workout-summation-total-badge {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

body.light-theme .workout-summation-total-badge {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
  color: #4f46e5;
}

.consistency-lifetime-action-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #818cf8;
  line-height: 1.3;
}

body.light-theme .consistency-lifetime-action-text {
  color: #4f46e5;
}

.consistency-lifetime-action-text i,
.consistency-lifetime-action-text svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.consistency-lifetime-strip.workout-summation-btn-card:hover .consistency-lifetime-action-text i,
.consistency-lifetime-strip.workout-summation-btn-card:hover .consistency-lifetime-action-text svg {
  transform: translateX(2px);
}

/* Lifetime Workouts Statistics Chart Modal Styles */
.lifetime-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.lifetime-kpi-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

body.light-theme .lifetime-kpi-card {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
}

.lifetime-kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lifetime-kpi-value {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lifetime-workouts-chart-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
}

@media (max-width: 540px) {
  .lifetime-workouts-chart-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.lifetime-donut-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 10px;
}

body.light-theme .lifetime-donut-panel {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(15, 23, 42, 0.1);
}

.lifetime-bars-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lifetime-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lifetime-bar-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.lifetime-bar-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}

body.light-theme .lifetime-bar-track {
  background: rgba(15, 23, 42, 0.08);
}

.lifetime-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.workout-summation-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
}

body.light-theme .workout-summation-bar-wrap {
  background: rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.workout-summation-bar {
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.workout-summation-segment {
  height: 100%;
  transition: width 0.4s ease;
  position: relative;
}

.workout-kind-chips-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 4px;
}

.workout-micro-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-main, #f1f5f9);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.workout-micro-chip:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .workout-micro-chip {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
  color: #1e293b;
}

.workout-micro-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.workout-micro-name {
  font-weight: 600;
}

.workout-micro-stat {
  color: var(--text-muted, #94a3b8);
  font-size: 10px;
}

body.light-theme .workout-micro-stat {
  color: #64748b;
}

.workout-kind-chip {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}


/* 3D Button Domes Grid */
.day-domes-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.day-dome-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Standard / Inactive Day Button (Clean Translucent Glass Disc) */
.dome-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease-out, filter 0.25s ease, color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  outline: none;
}

.dome-button:focus-visible {
  outline: 2px solid var(--accent-primary, #6366f1);
  outline-offset: 2px;
}

.dome-button.dome-past,
.dome-button.dome-future,
.dome-button.dome-inactive {
  background: rgba(30, 41, 59, 0.45);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #94a3b8);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 600;
}

.dome-button.dome-past:hover,
.dome-button.dome-future:hover,
.dome-button.dome-inactive:hover {
  transform: translateY(-1.5px);
  color: var(--text-main, #ffffff);
  background: rgba(51, 65, 85, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Active Completed Dome (Fallback Accent Gradient) */
.dome-button.dome-completed {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  box-shadow: 
    0 0 14px rgba(239, 68, 68, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: domeGlowBreathing 3s ease-in-out infinite alternate;
}

@keyframes domeGlowBreathing {
  0% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.45), 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.75), 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
  }
}

.dome-button.dome-completed:hover {
  transform: translateY(-1.5px) scale(1.05);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.7);
}

.holographic-check {
  color: #ffffff;
  width: 15px;
  height: 15px;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
  stroke-width: 3.2;
}

.day-name-label {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.05em;
  transition: color 0.25s ease;
}

.day-name-label.active {
  color: var(--text-main, #ffffff) !important;
}


/* ==========================================================================
   REUSABLE SYSTEM TOOLTIP ENGINE (Glassmorphic & Viewport-Aware)
   ========================================================================== */
.sys-tooltip {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  max-width: 280px;
  min-width: 140px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color-active, rgba(99, 102, 241, 0.4));
  border-radius: var(--border-radius-md, 12px);
  box-shadow: var(--shadow-glass, 0 8px 32px rgba(0, 0, 0, 0.6)),
              0 0 14px rgba(99, 102, 241, 0.25);
  color: var(--text-main, #f8fafc);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.78rem;
  line-height: 1.35;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.sys-tooltip.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto; /* Allows hovering over tooltip text for accessibility */
}

/* Tooltip Content Header & Body */
.sys-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sys-tooltip-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.sys-tooltip-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  text-transform: uppercase;
  white-space: nowrap;
}

.sys-tooltip-body {
  color: var(--text-secondary, #94a3b8);
}

.sys-tooltip-body strong {
  color: #fff;
}

.sys-tooltip-formula {
  margin-top: 6px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--accent-warning, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Directional Arrow Tips */
.sys-tooltip::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border-color-active, rgba(99, 102, 241, 0.4));
  transform: rotate(45deg);
}

.sys-tooltip[data-placed="top"]::after {
  bottom: -5px;
  left: calc(var(--arrow-x, 50%) - 4px);
  border-top: none;
  border-left: none;
}

.sys-tooltip[data-placed="bottom"]::after {
  top: -5px;
  left: calc(var(--arrow-x, 50%) - 4px);
  border-bottom: none;
  border-right: none;
}

.sys-tooltip[data-placed="left"]::after {
  right: -5px;
  top: calc(var(--arrow-y, 50%) - 4px);
  border-bottom: none;
  border-left: none;
}

.sys-tooltip[data-placed="right"]::after {
  left: -5px;
  top: calc(var(--arrow-y, 50%) - 4px);
  border-top: none;
  border-right: none;
}

/* ================= BATTLE PASS SYSTEM STYLES ================= */
.bp-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.bp-header-banner {
  background: radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.25) 0%, rgba(30, 27, 75, 0.6) 40%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--border-radius-md);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bp-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.bp-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 900;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.5px;
}

.bp-progress-bar-container {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  height: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.bp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #c084fc, #f59e0b);
  border-radius: 6px;
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.6);
}

/* Horizontal Scrollable Progression Track */
.bp-track-wrapper {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.bp-track-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 16px 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.bp-track-scroll::-webkit-scrollbar {
  height: 8px;
}
.bp-track-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.bp-track-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}
.bp-track-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
}

.bp-tier-card {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bp-tier-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.3);
}

.bp-tier-card.unlocked {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(99, 102, 241, 0.3);
}

.bp-tier-card.current {
  border-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.bp-tier-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bp-tier-card.unlocked .bp-tier-header {
  color: #a5b4fc;
}

.bp-tier-card.current .bp-tier-header {
  color: #fbbf24;
}

.bp-reward-slot {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 80px;
  justify-content: center;
  position: relative;
}

.bp-reward-slot.premium {
  border-color: rgba(245, 158, 11, 0.4);
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.bp-reward-slot.claimed {
  opacity: 0.55;
}

.bp-reward-slot.claimed::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  background: #10b981;
  color: #064e3b;
  font-weight: 900;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-claim-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.bp-claim-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.bp-locked-tag {
  font-size: 9px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Seasonal Quests & Missions Grid */
.bp-missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  width: 100%;
}

.bp-mission-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color 0.2s;
}

.bp-mission-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.bp-mission-card.completed {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.bp-mission-progress {
  width: 100%;
  height: 6px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 3px;
  overflow: hidden;
}

.bp-mission-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 3px;
}

/* ==========================================================================
   TRAINING SETTINGS & RPE / PARTIALS TUTORIAL SYSTEM
   ========================================================================== */

/* Modern UI Switch / Toggle Component */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease;
  gap: 12px;
}

.switch-container:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.switch-container.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.05);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked + .toggle-slider {
  background-color: var(--accent-primary, #6366f1);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

input:disabled + .toggle-slider {
  cursor: not-allowed;
  opacity: 0.4;
}

/* RPE / RIR Scale Pill Group */
.rpe-scale-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.rpe-scale-pill {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rpe-scale-pill.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Educational Tutorial Modal Tabs & Panels */
.tutorial-step-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.tutorial-step-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tutorial-step-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.tutorial-step-tab.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
}

.tutorial-step-tab.completed {
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.tutorial-step-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.2s ease-in-out;
}

.tutorial-step-pane.active {
  display: flex;
}

/* Quiz Option Card */
.quiz-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.quiz-option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.quiz-option-card.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.quiz-option-card.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--accent-success) !important;
  color: #a7f3d0 !important;
}

.quiz-option-card.incorrect {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--accent-danger) !important;
  color: #fca5a5 !important;
}

/* Training Protocol Quests Hub & Cards */
.protocol-quest-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.protocol-quest-progress-wrap {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.protocol-quest-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.protocol-quest-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.protocol-quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.protocol-quest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: all 0.15s ease;
}

.protocol-quest-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.protocol-quest-card.is-unlocked {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.03);
}

.protocol-quest-card.is-locked {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.02);
}

.protocol-quest-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.protocol-quest-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.protocol-quest-title {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.protocol-quest-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Protocol Academy Chip Bar */
.protocol-academy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}
.protocol-academy-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.protocol-academy-chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary, #6366f1);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}
.protocol-academy-chip.is-mastered {
  border-color: rgba(16, 185, 129, 0.4);
}
.protocol-academy-chip.is-mastered.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* Onboarding Checklist Card */
.onboard-checklist-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboard-checklist-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.onboard-checklist-card.selected {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.onboard-checklist-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.onboard-checklist-card.selected .onboard-checklist-checkbox {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
}

/* ================= DAILY LOGIN REWARDS SYSTEM STYLES ================= */
.login-rewards-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .login-rewards-grid {
    gap: 3px;
  }
}

.login-day-card {
  position: relative;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-width: 0;
  width: 100%;
  min-height: 64px;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.login-day-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.login-day-card .day-badge {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 1px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.login-day-card .reward-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
  margin: 1px 0;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.login-day-card:hover .reward-icon-box {
  transform: scale(1.08);
}

.login-day-card .reward-count-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0 2px;
  font-size: 7.5px;
  font-weight: 800;
  color: #fcd34d;
  line-height: 1.1;
}

.login-day-card .reward-label {
  font-size: 8px;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.1;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 1px;
  box-sizing: border-box;
}

/* Status States */
.login-day-card.claimed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  opacity: 0.65;
}

.login-day-card.claimed .day-badge {
  color: #34d399;
}

.login-day-card.claimed::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  font-size: 7.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.5);
}

.login-day-card.ready {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.22), rgba(99, 102, 241, 0.22));
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  animation: loginCardGlow 2s infinite ease-in-out;
  transform: translateY(-1px);
}

.login-day-card.ready .day-badge {
  color: #fde047;
  font-weight: 900;
}

.login-day-card.ready .reward-icon-box {
  background: rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.login-day-card.ready::before {
  content: 'CLAIM';
  position: absolute;
  top: 2px;
  right: 2px;
  background: #f59e0b;
  color: #0f172a;
  font-size: 6px;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  animation: badgeBlink 1.4s infinite alternate;
}

.login-day-card.locked {
  opacity: 0.55;
}

.login-day-card.milestone {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.18), rgba(236, 72, 153, 0.18));
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}

.login-day-card.milestone .day-badge {
  color: #d8b4fe;
}

.login-day-card.milestone.ready {
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.3), rgba(168, 85, 247, 0.3));
  border-color: #f472b6;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.55);
}

.login-day-card.grand-finale {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.3), rgba(236, 72, 153, 0.3), rgba(99, 102, 241, 0.3));
  border: 1.5px solid #fcd34d;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.login-day-card.grand-finale .day-badge {
  color: #fde047;
}

/* Milestone Chests Track */
.milestone-chests-container {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 8px);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.milestone-chest-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.milestone-chest-node:hover {
  transform: translateY(-2px);
}

.milestone-chest-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.milestone-chest-node.ready .milestone-chest-icon {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  animation: chestBounce 1.5s infinite ease-in-out;
}

.milestone-chest-node.claimed .milestone-chest-icon {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  opacity: 0.6;
}

/* Keyframes */
@keyframes loginCardGlow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
    border-color: #fbbf24;
  }
  50% {
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.7);
    border-color: #fde047;
  }
}

@keyframes badgeBlink {
  0% { opacity: 0.8; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes chestBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Header Login Reward Gift Glow */
.gift-icon-glow {
  animation: giftIconPulse 2s infinite ease-in-out;
}

@keyframes giftIconPulse {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.9));
  }
}

/* ==========================================================================
   CLIENT EDUCATION MANAGER (SIMPLIFIED MOVEMENT SYLLABUS) STYLES
   ========================================================================== */

.syllabus-pattern-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.syllabus-pattern-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--border-radius-md);
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.syllabus-pattern-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.syllabus-pattern-btn.active {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  border-color: transparent;
  color: white;
  box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(99, 102, 241, 0.4));
}

.syllabus-pattern-btn .badge-count {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: white;
}

.syllabus-pattern-btn.active .badge-count {
  background: rgba(255, 255, 255, 0.25);
}

.syllabus-pattern-chip {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
}

.syllabus-pattern-chip.pattern-push {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.syllabus-pattern-chip.pattern-pull {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.syllabus-pattern-chip.pattern-squat {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.syllabus-pattern-chip.pattern-hip-hinge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.syllabus-pattern-chip.pattern-lunge {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.syllabus-pattern-chip.pattern-custom {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

.syllabus-pattern-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.syllabus-search-box-wrapper {
  position: relative;
  margin-bottom: 14px;
  width: 100%;
}

.syllabus-search-input-field {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: white;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.syllabus-search-input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

.syllabus-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.syllabus-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
}

.syllabus-search-result-item {
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.syllabus-search-result-item:hover {
  background: rgba(99, 102, 241, 0.2);
}

.syllabus-exercise-row {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.syllabus-exercise-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.syllabus-status-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.syllabus-status-btn {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.syllabus-status-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.syllabus-status-btn.btn-to-learn.active {
  background: rgba(100, 116, 139, 0.35);
  border-color: rgba(148, 163, 184, 0.5);
  color: #f1f5f9;
}

.syllabus-status-btn.btn-learning.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde047;
}

.syllabus-status-btn.btn-proficient.active {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
  color: #e9d5ff;
}

.syllabus-status-btn.btn-mastered.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.syllabus-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.syllabus-done-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.syllabus-done-badge.zero {
  background: rgba(100, 116, 139, 0.15);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

.syllabus-scheduled-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  white-space: nowrap;
}

.syllabus-frequency-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.syllabus-equipment-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
  white-space: nowrap;
}

.syllabus-lock-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--border-radius-md);
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* =========================================================================
   NUTRITION LOGGING & FOOD DIARY STYLES
   ========================================================================= */

:root {
  --macro-cals: #f59e0b;
  --macro-pro: #3b82f6;
  --macro-carb: #10b981;
  --macro-fat: #8b5cf6;
  --macro-fiber: #06b6d4;
  --macro-sugar: #ec4899;
  --macro-sodium: #94a3b8;
  --macro-water: #0ea5e9;
}

/* 1. Date Navigator Bar (Standardized 3-Column Glass Layout) */
.nutrition-date-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: var(--border-radius-md, 12px);
  padding: 10px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.nutrition-date-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  user-select: none;
}

.nutrition-date-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.nutrition-date-subtitle {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.2;
}

/* Standardized Navigation Buttons */
.nutrition-date-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nutrition-date-nav-btn i,
.nutrition-date-nav-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2px;
  transition: transform 0.2s ease, color 0.2s ease;
  color: #94a3b8;
}

.nutrition-date-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-color-active, rgba(99, 102, 241, 0.5));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-primary-shadow, rgba(99, 102, 241, 0.25));
}

.nutrition-date-nav-btn:hover i,
.nutrition-date-nav-btn:hover svg {
  color: var(--accent-primary-hover, #a5b4fc);
}

.nutrition-date-nav-btn.prev-btn:hover i,
.nutrition-date-nav-btn.prev-btn:hover svg {
  transform: translateX(-2px);
}

.nutrition-date-nav-btn.next-btn:hover i,
.nutrition-date-nav-btn.next-btn:hover svg {
  transform: translateX(2px);
}

.nutrition-date-nav-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Smart "Jump to Today" Chip */
.nutrition-today-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}

.nutrition-today-chip:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.nutrition-today-chip i,
.nutrition-today-chip svg {
  width: 10px;
  height: 10px;
}

/* 2. Macro Rollup Hero Card & Donut Ring */
.nutrition-macro-card {
  padding: 20px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.macro-donut-wrapper {
  position: relative;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.macro-donut-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.macro-donut-circle-bg {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
  fill: none;
}

.macro-donut-circle-fill {
  stroke: var(--macro-cals);
  stroke-width: 8;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 251.32;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}

.macro-donut-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.macro-donut-center-text .val {
  font-size: 19px;
  font-weight: 900;
  color: white;
  line-height: 1.1;
}

.macro-donut-center-text .lbl {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* Linear Progress Bar Tracks */
.macro-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.macro-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.macro-progress-fill.cals { background: var(--macro-cals); }
.macro-progress-fill.pro  { background: var(--macro-pro); }
.macro-progress-fill.carb { background: var(--macro-carb); }
.macro-progress-fill.fat  { background: var(--macro-fat); }
.macro-progress-fill.water { background: var(--macro-water); }

/* Secondary Micronutrient Summary Grid & Boxes (Hydration, Fiber, Sodium) */
.nutrition-macro-summary-grid,
.secondary-macro-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}

.macro-box,
.secondary-macro-pill {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-sm, 8px);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.macro-box:hover,
.secondary-macro-pill:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.macro-box.hydration {
  border-left: 3px solid #38bdf8;
}

.macro-box.fiber {
  border-left: 3px solid var(--macro-fiber, #06b6d4);
}

.macro-box.sodium {
  border-left: 3px solid #a855f7;
}

.macro-box-label,
.secondary-macro-pill .lbl {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.macro-box-values,
.secondary-macro-pill .val {
  display: flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.macro-box-current {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.macro-box-target {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

@media (max-width: 480px) {
  .nutrition-macro-summary-grid,
  .secondary-macro-pills {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 10px;
  }
  .macro-box,
  .secondary-macro-pill {
    padding: 6px 7px;
  }
  .macro-box-label,
  .secondary-macro-pill .lbl {
    font-size: 10px;
    gap: 3px;
  }
  .macro-box-current {
    font-size: 12px;
  }
  .macro-box-target {
    font-size: 10px;
  }
}

/* 3. Nutrition Grids & Meal Buckets */
.nutrition-meals-3col-grid,
.nutrition-ancillary-3col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.meal-bucket-card {
  border-radius: var(--border-radius-md);
  margin-bottom: 12px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.meal-bucket-card.meal-bucket-card-column {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.meal-bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 13px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 6px;
  flex-wrap: wrap;
}

.meal-bucket-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.meal-bucket-icon {
  font-size: 16px;
}

.meal-bucket-name {
  font-size: 13.5px;
  font-weight: 800;
  color: white;
}

.meal-bucket-subtotal-badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.meal-bucket-subtotal-badge strong {
  color: var(--macro-cals);
}

.meal-items-list {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meal-bucket-card.meal-bucket-card-column .meal-items-list {
  flex: 1;
  min-height: 70px;
}

.meal-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  transition: background 0.15s ease;
  gap: 8px;
}

.meal-item-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.meal-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.meal-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-item-portion {
  font-size: 10.5px;
  color: var(--text-muted);
}

.meal-item-macros {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.macro-chip-cals {
  font-size: 10px;
  font-weight: 700;
  color: var(--macro-cals);
}

.macro-chip-pro {
  font-size: 10px;
  font-weight: 600;
  color: #93c5fd;
}

.macro-chip-carb {
  font-size: 10px;
  font-weight: 600;
  color: #6ee7b7;
}

.macro-chip-fat {
  font-size: 10px;
  font-weight: 600;
  color: #c4b5fd;
}

.meal-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.meal-bucket-actions {
  display: flex;
  gap: 6px;
  padding: 8px 10px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.meal-bucket-card.meal-bucket-card-column .meal-bucket-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* 4. Water Hydration Tracker Card */
.nutrition-water-card {
  padding: 16px;
  border-radius: var(--border-radius-md);
  margin-bottom: 16px;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nutrition-water-card.water-card-grid-box {
  margin-bottom: 0;
  height: 100%;
  padding: 12px 13px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.water-buttons-row,
.water-quick-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.water-card-grid-box .water-buttons-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: auto;
}

@media (max-width: 880px) {
  .nutrition-meals-3col-grid,
  .nutrition-ancillary-3col-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .meal-bucket-card.meal-bucket-card-column,
  .nutrition-water-card.water-card-grid-box {
    margin-bottom: 12px;
  }
  .water-buttons-row,
  .water-quick-btn-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

.water-quick-btn {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #7dd3fc;
  padding: 6px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.water-quick-btn:hover {
  background: rgba(14, 165, 233, 0.25);
  color: white;
  border-color: rgba(14, 165, 233, 0.5);
}

/* 5. Food Discovery & Search Modal Components */
.nutrition-search-bar-wrapper {
  position: relative;
  width: 100%;
}

.nutrition-category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 6px 0;
  scrollbar-width: thin;
}

.nutrition-cat-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nutrition-cat-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nutrition-cat-tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  font-weight: 700;
}

.nutrition-food-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.nutrition-food-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
}

.nutrition-food-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* 6. Portion Stepper & Live Preview */
.portion-stepper-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.portion-stepper-btn {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portion-stepper-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.portion-chips-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.portion-quick-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portion-quick-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  color: white;
  border-color: var(--accent-primary);
}

.portion-live-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  text-align: center;
}

.portion-macro-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portion-macro-box .lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portion-macro-box .val {
  font-size: 14px;
  font-weight: 900;
}


/* =========================================================================
   8. Macronutrient Entry Cards & Real-Time Kcal Displays (Option 4)
   ========================================================================= */
.macro-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.macro-entry-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.macro-entry-card:hover {
  transform: translateY(-1px);
}

.macro-entry-card.protein {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.3);
}
.macro-entry-card.protein:focus-within {
  border-color: var(--macro-pro);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.macro-entry-card.carbs {
  background: rgba(16, 185, 129, 0.07);
  border-color: rgba(16, 185, 129, 0.3);
}
.macro-entry-card.carbs:focus-within {
  border-color: var(--macro-carb);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.macro-entry-card.fat {
  background: rgba(139, 92, 246, 0.07);
  border-color: rgba(139, 92, 246, 0.3);
}
.macro-entry-card.fat:focus-within {
  border-color: var(--macro-fat);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.macro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.macro-card-label {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.macro-pct-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.2px;
}

.macro-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.macro-input-wrapper input {
  padding-right: 22px !important;
  text-align: center;
  font-weight: 700;
}

.macro-unit-suffix {
  position: absolute;
  right: 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
}

.macro-kcal-subbox {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 4px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.macro-kcal-val {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.macro-density-note {
  font-size: 8.5px;
  color: var(--text-muted, #94a3b8);
  opacity: 0.85;
}

.custom-food-serving-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 10px 12px;
}

.custom-food-basis-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px;
}

.custom-food-basis-btn {
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.custom-food-basis-btn:hover {
  color: #f8fafc;
}

.custom-food-basis-btn.active {
  background: var(--macro-cals, #f59e0b);
  color: #020617;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.custom-food-calc-calories-box {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--border-radius-md, 10px);
  padding: 10px 12px;
}

.macro-ratio-bar-wrapper {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.macro-ratio-track {
  height: 6px;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.macro-ratio-seg {
  height: 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.macro-ratio-seg.pro { background: var(--macro-pro); }
.macro-ratio-seg.carb { background: var(--macro-carb); }
.macro-ratio-seg.fat { background: var(--macro-fat); }

.macro-match-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 6px);
  padding: 8px 12px;
  font-size: 11.5px;
  margin-top: 4px;
}

/* =========================================================================
   9. Deficit & Surplus Strategy & Smart Intercept System
   ========================================================================= */
.strategy-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.strategy-pill-btn {
  padding: 7px 6px;
  border-radius: var(--border-radius-md, 10px);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.strategy-pill-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}

.strategy-pill-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.7);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.strategy-pill-btn.active.deficit {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.7);
  color: #93c5fd;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.strategy-pill-btn.active.surplus {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.strategy-pill-sub {
  font-size: 9.5px;
  font-weight: 500;
  opacity: 0.8;
}

.preset-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.preset-chip {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #cbd5e1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  background: rgba(51, 65, 85, 0.9);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-chip.deficit {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}
.preset-chip.deficit:hover {
  background: rgba(59, 130, 246, 0.25);
}

.preset-chip.surplus {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}
.preset-chip.surplus:hover {
  background: rgba(245, 158, 11, 0.25);
}

.btn-sync-tdee-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
  text-decoration: none;
  user-select: none;
}

.btn-sync-tdee-mini:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.btn-sync-tdee-mini:active {
  transform: translateY(0);
}

/* =========================================================================
   10. Macro Split Generator Component
   ========================================================================= */
.macro-split-generator-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.macro-split-generator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.macro-split-action-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
  transition: all 0.2s ease;
}

.macro-split-action-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.55);
  transform: translateY(-1px);
}

.macro-split-action-btn:active {
  transform: translateY(0);
}

/* 2x2 Macro Split Grid */
.macro-split-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
}

.macro-split-grid-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm, 8px);
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.macro-split-grid-tile:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.macro-split-grid-tile:active {
  transform: translateY(0);
}

/* Hydration Regimen Selector Pills */
.hydration-regimen-pills {
  display: flex;
  gap: 6px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.hydration-regimen-pill {
  padding: 4px 9px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.hydration-regimen-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.hydration-regimen-pill.active {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.smart-intercept-action-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--border-radius-md, 10px);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-intercept-action-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.smart-intercept-action-btn.primary-phase {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.smart-intercept-action-btn.primary-phase.surplus {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(245, 158, 11, 0.4);
}

.smart-intercept-action-btn.primary-phase:hover {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

.smart-intercept-action-btn.primary-phase.surplus:hover {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.2);
}

.projection-rate-banner {
  border-radius: var(--border-radius-sm, 6px);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.projection-rate-banner.deficit {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #bfdbfe;
}

.projection-rate-banner.surplus {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fef08a;
}

/* ==========================================================================
   Big 3 Quick-Select & 1RM Performance Snapshot Styles
   ========================================================================== */
.big3-quick-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.big3-quick-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.big3-quick-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: white;
}

.big3-quick-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary);
  color: #e0e7ff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.big3-snapshot-banner {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

/* ==========================================================================
   1RM STRENGTH TOTAL & 100KG - 1000KG CLUB ACHIEVEMENT SYSTEM
   ========================================================================== */

.strength-club-section {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.strength-club-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #f59e0b, #34d399, #6366f1);
  background-size: 200% auto;
  animation: strengthHeaderGlow 6s linear infinite;
}

@keyframes strengthHeaderGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.strength-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.strength-header-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
}

.strength-mode-pill-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.strength-mode-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.strength-mode-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #e0e7ff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.strength-sync-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.strength-sync-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.4) 100%);
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.strength-lifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.strength-lift-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.strength-lift-card:focus-within {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.06);
}

.strength-lift-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.strength-lift-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.strength-lift-pr-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.15);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

.strength-lift-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 3px 8px;
}

.strength-lift-input {
  background: transparent;
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 800;
  width: 100%;
  outline: none;
}

.strength-lift-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Hero Active Club Showcase */
.strength-club-hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.strength-club-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.strength-club-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.strength-hero-trophy-emblem {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.strength-hero-trophy-emblem::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: inherit;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.strength-club-hero-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strength-club-hero-status {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.strength-club-hero-name {
  font-size: 18px;
  font-weight: 900;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.strength-club-hero-title {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
}

.strength-club-hero-total-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  padding: 8px 14px;
  text-align: right;
  min-width: 130px;
}

.strength-hero-total-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.strength-hero-total-val {
  font-size: 20px;
  font-weight: 900;
  color: #34d399;
  display: block;
  line-height: 1.2;
}

.strength-hero-total-alt {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

/* Progress toward Next Club */
.strength-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.strength-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.strength-progress-target-label {
  font-weight: 700;
  color: var(--text-secondary);
}

.strength-progress-pct {
  font-weight: 800;
  color: #a5b4fc;
}

.strength-progress-track {
  height: 7px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.strength-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.strength-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: strengthProgressShimmer 2s infinite;
}

@keyframes strengthProgressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 10-Tier Strength Club Trophy Hall of Fame */
.strength-hall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.strength-hall-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

.strength-hall-count-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.strength-trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 10px;
}

.strength-trophy-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.strength-trophy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.strength-trophy-card.unlocked {
  border-color: var(--trophy-border, rgba(255, 255, 255, 0.2));
  background: var(--trophy-bg, rgba(30, 41, 59, 0.7));
}

.strength-trophy-card.unlocked:hover {
  border-color: var(--trophy-glow, #6366f1);
  box-shadow: 0 0 16px var(--trophy-glow, rgba(99, 102, 241, 0.4));
}

.strength-trophy-card.locked {
  opacity: 0.6;
  filter: grayscale(0.5);
  background: rgba(10, 15, 30, 0.6);
  border-style: dashed;
}

.strength-trophy-card.locked:hover {
  opacity: 0.9;
  filter: grayscale(0.2);
}

.strength-trophy-card.active-highest {
  border-width: 2px;
  border-color: var(--trophy-color, #fbbf24);
  box-shadow: 0 0 18px var(--trophy-glow, rgba(251, 191, 36, 0.5));
}

.strength-trophy-emblem {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 2px;
  position: relative;
  transition: transform 0.2s ease;
}

.strength-trophy-card:hover .strength-trophy-emblem {
  transform: scale(1.08);
}

.strength-trophy-club-name {
  font-size: 12px;
  font-weight: 800;
  color: white;
  margin: 0;
  line-height: 1.2;
}

.strength-trophy-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--trophy-color, #a5b4fc);
  line-height: 1.2;
}

.strength-trophy-req {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.strength-trophy-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.strength-trophy-badge.unlocked {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.strength-trophy-badge.locked {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 500kg & 1000kg Special Pulsing Effects */
.strength-trophy-card.tier-500.unlocked .strength-trophy-emblem {
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.6);
  animation: goldPulse 3s ease-in-out infinite alternate;
}

@keyframes goldPulse {
  0% { box-shadow: 0 0 10px rgba(250, 204, 21, 0.4); }
  100% { box-shadow: 0 0 22px rgba(250, 204, 21, 0.8); }
}

.strength-trophy-card.tier-1000.unlocked .strength-trophy-emblem {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
  animation: apexSovereignPulse 3s ease-in-out infinite alternate;
}

@keyframes apexSovereignPulse {
  0% { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6)); }
  50% { filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.8)); }
  100% { filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.8)); }
}

/* Trophy Detail Inspector Modal Styling */
.trophy-inspector-badge-box {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.trophy-inspector-quote {
  font-style: italic;
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--accent-primary);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin: 8px 0;
}

/* ==========================================================================
   ROUTINE ARCHITECT BOOTCAMP & TUTORIAL SYSTEM STYLES
   ========================================================================== */

.routine-tutorial-section {
  position: relative;
  padding: 20px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(99, 102, 241, 0.09) 0%, rgba(139, 92, 246, 0.04) 50%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px -4px rgba(99, 102, 241, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.routine-tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.routine-tutorial-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.routine-tutorial-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.routine-tutorial-progress-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
  letter-spacing: 0.2px;
}

.routine-tutorial-skip-btn {
  padding: 6px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s ease !important;
}

.routine-tutorial-skip-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.routine-tutorial-progress-bg {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.routine-tutorial-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.routine-tutorial-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

/* Compact Horizontal Step List for Routine Architect Bootcamp */
.routine-tutorial-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.routine-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
  position: relative;
  gap: 12px;
  animation: slideDownFade 0.25s ease;
}

.routine-step-row:hover {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(255, 255, 255, 0.16);
}

.routine-step-row.active {
  background: rgba(99, 102, 241, 0.09);
  border-color: rgba(99, 102, 241, 0.5);
  border-left: 3px solid #818cf8;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.routine-step-row.completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
  border-left: 3px solid #34d399;
}

.routine-step-row.locked {
  opacity: 0.55;
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
}

.routine-step-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.routine-step-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.routine-step-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.routine-step-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.routine-step-row .routine-step-badge,
.routine-tutorial-step-badge {
  width: auto !important;
  height: auto !important;
  min-width: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  flex-shrink: 0;
}

.routine-step-row.completed .routine-step-badge,
.routine-step-row.completed .routine-tutorial-step-badge {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.routine-step-row.active .routine-step-badge,
.routine-step-row.active .routine-tutorial-step-badge {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #a5b4fc !important;
  border: 1px solid rgba(99, 102, 241, 0.4) !important;
}

.routine-step-skip-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 5px 8px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.2s ease;
}

.routine-step-skip-btn:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.routine-step-row .routine-step-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.routine-step-row.completed .routine-step-icon-box {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.routine-step-row .routine-step-icon-box i,
.routine-step-row .routine-step-icon-box svg {
  width: 16px;
  height: 16px;
}

.routine-step-row .routine-step-btn {
  width: auto !important;
  min-width: 110px;
  padding: 6px 12px !important;
  font-size: 11.5px !important;
  white-space: nowrap;
}

/* === Routine Architect Bootcamp Footer & Unlock CTA === */
.routine-tutorial-footer {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.routine-finish-btn {
  padding: 10px 28px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  min-width: 220px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border-radius: var(--border-radius-md) !important;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.routine-finish-btn:disabled,
.routine-finish-btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.4);
  pointer-events: none;
}

@media (max-width: 1100px) {
  .routine-tutorial-steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .routine-tutorial-steps-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .routine-step-card {
    min-width: 220px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.routine-step-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.25s ease;
  position: relative;
  min-height: 160px;
}

.routine-step-card:hover {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.routine-step-card.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.2);
}

.routine-step-card.completed {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.35);
}

.routine-step-card.locked {
  opacity: 0.55;
  background: rgba(15, 23, 42, 0.25);
  border-color: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
}

.routine-step-card.locked:hover {
  transform: none;
  background: rgba(15, 23, 42, 0.25);
}

.routine-step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.routine-step-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.routine-step-num-badge.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.routine-step-card.active .routine-step-num-badge {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
}

.routine-step-card-status {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.routine-step-card.completed .routine-step-card-status {
  color: #34d399;
}

.routine-step-card.active .routine-step-card-status {
  color: #a5b4fc;
}

.routine-step-card-body {
  flex: 1;
  margin-bottom: 12px;
}

.routine-step-title {
  margin: 0 0 4px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.routine-step-desc {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.routine-step-card-footer {
  margin-top: auto;
}

.routine-step-btn {
  width: 100%;
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: var(--border-radius-sm) !important;
}

.routine-step-btn.done {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #e2e8f0 !important;
}

.routine-step-btn.locked {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

/* In-Modal Tutorial Hint Banner */
.routine-builder-hint-banner {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--border-radius-sm);
  padding: 8px 14px;
  margin: 12px 24px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: slideDownFade 0.25s ease;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   NUTRITION ONBOARDING TUTORIAL & QUICK GUIDE
   ========================================================================== */

.nutrition-tutorial-section {
  padding: 16px;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.75) 70%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  animation: slideDownFade 0.3s ease;
}

.nutrition-tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.nutrition-tutorial-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.nutrition-tutorial-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.nutrition-tutorial-progress-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nutrition-tutorial-progress-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

.nutrition-tutorial-progress-bg {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.nutrition-tutorial-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f97316 0%, #eab308 50%, #10b981 100%);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nutrition-tutorial-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

/* Compact Horizontal Step List for Nutrition Setup Guide */
.nutrition-tutorial-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.nutrition-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
  position: relative;
  gap: 12px;
  animation: slideDownFade 0.25s ease;
}

.nutrition-step-row:hover {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(255, 255, 255, 0.16);
}

.nutrition-step-row[data-step="1"] { --step-color: #f59e0b; --step-color-rgb: 245, 158, 11; }
.nutrition-step-row[data-step="2"] { --step-color: #10b981; --step-color-rgb: 16, 185, 129; }
.nutrition-step-row[data-step="3"] { --step-color: #38bdf8; --step-color-rgb: 56, 189, 248; }
.nutrition-step-row[data-step="4"] { --step-color: #f97316; --step-color-rgb: 249, 115, 22; }
.nutrition-step-row[data-step="5"] { --step-color: #06b6d4; --step-color-rgb: 6, 182, 212; }

.nutrition-step-row.active {
  box-shadow: 0 0 16px rgba(var(--step-color-rgb), 0.2);
  border-color: rgba(var(--step-color-rgb), 0.5);
  border-left: 3px solid var(--step-color);
}

.nutrition-step-row.completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
  border-left: 3px solid #34d399;
}

.nutrition-step-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.nutrition-step-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nutrition-step-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.nutrition-step-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nutrition-step-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.nutrition-step-row.completed .nutrition-step-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.nutrition-step-row.active .nutrition-step-badge {
  background: rgba(var(--step-color-rgb), 0.18);
  color: var(--step-color);
}

.nutrition-step-skip-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 5px 8px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.2s ease;
}

.nutrition-step-skip-btn:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.nutrition-step-row .nutrition-step-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  background: rgba(var(--step-color-rgb), 0.15);
  border: 1px solid rgba(var(--step-color-rgb), 0.3);
  color: var(--step-color);
}

.nutrition-step-row.completed .nutrition-step-icon-box {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.nutrition-step-row .nutrition-step-icon-box i,
.nutrition-step-row .nutrition-step-icon-box svg {
  width: 16px;
  height: 16px;
}

.nutrition-step-row .nutrition-step-btn {
  width: auto !important;
  min-width: 105px;
  padding: 6px 12px !important;
  font-size: 11.5px !important;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .nutrition-tutorial-steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .nutrition-tutorial-steps-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .nutrition-step-card {
    min-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

/* === Per-step color theming via data-step attribute === */
.nutrition-step-card[data-step="1"] { --step-color: #f59e0b; --step-color-rgb: 245, 158, 11; }
.nutrition-step-card[data-step="2"] { --step-color: #10b981; --step-color-rgb: 16, 185, 129; }
.nutrition-step-card[data-step="3"] { --step-color: #38bdf8; --step-color-rgb: 56, 189, 248; }
.nutrition-step-card[data-step="4"] { --step-color: #f97316; --step-color-rgb: 249, 115, 22; }
.nutrition-step-card[data-step="5"] { --step-color: #06b6d4; --step-color-rgb: 6, 182, 212; }

.nutrition-step-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 12px;
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.25s ease;
  position: relative;
  min-height: 220px;
  text-align: center;
}

.nutrition-step-card:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Step 1 required: amber left-border accent */
.nutrition-step-card[data-step="1"]:not(.completed) {
  border-left: 3px solid rgba(245, 158, 11, 0.85);
}

.nutrition-step-card.active {
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25);
}

.nutrition-step-card.completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.35);
}

.nutrition-step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.nutrition-step-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nutrition-step-num-badge.completed {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.nutrition-step-card.active .nutrition-step-num-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.nutrition-step-card-status {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.nutrition-step-card.completed .nutrition-step-card-status {
  color: #34d399;
}

.nutrition-step-card.active .nutrition-step-card-status {
  color: #fde68a;
}

.nutrition-step-card-body {
  flex: 1;
  margin-bottom: 12px;
}

.nutrition-step-title {
  margin: 0 0 5px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.nutrition-step-desc {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.nutrition-step-card-footer {
  margin-top: auto;
}

.nutrition-step-btn {
  width: 100%;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: var(--border-radius-sm) !important;
}

.nutrition-step-btn.done {
  background: rgba(16, 185, 129, 0.09) !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  color: #a7f3d0 !important;
}

/* === Large centered icon per step card === */
.nutrition-step-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  background: rgba(var(--step-color-rgb), 0.13);
  border: 1px solid rgba(var(--step-color-rgb), 0.28);
  box-shadow: 0 0 16px rgba(var(--step-color-rgb), 0.18);
  color: var(--step-color);
  flex-shrink: 0;
  transition: box-shadow 0.25s ease;
}

.nutrition-step-icon-box i,
.nutrition-step-icon-box svg {
  width: 22px;
  height: 22px;
}

.nutrition-step-card:hover .nutrition-step-icon-box {
  box-shadow: 0 0 24px rgba(var(--step-color-rgb), 0.32);
}

.nutrition-step-card.completed .nutrition-step-icon-box {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* === Tutorial footer: Finish & Unlock CTA === */
.nutrition-tutorial-footer {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nutrition-finish-btn {
  padding: 10px 28px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  min-width: 220px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border-radius: var(--border-radius-md) !important;
  letter-spacing: 0.1px;
}

.nutrition-finish-btn:disabled,
.nutrition-finish-btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.4);
  pointer-events: none;
}

/* === Responsive rules for Compact Horizontal Tutorial Step Rows === */
@media (max-width: 640px) {
  .routine-step-row,
  .nutrition-step-row {
    padding: 8px 10px;
    gap: 8px;
  }
  .routine-step-desc,
  .nutrition-step-desc {
    font-size: 10px;
    line-height: 1.25;
  }
  .routine-step-row .routine-step-btn,
  .nutrition-step-row .nutrition-step-btn {
    min-width: 88px;
    padding: 5px 8px !important;
    font-size: 11px !important;
  }
  .routine-step-skip-btn,
  .nutrition-step-skip-btn {
    font-size: 10px !important;
    padding: 4px 6px !important;
  }
}

@media (max-width: 440px) {
  .routine-step-desc,
  .nutrition-step-desc {
    display: none;
  }
}

/* Light Theme for Step Rows */
body.light-theme .routine-step-row,
body.light-theme .nutrition-step-row {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .routine-step-row:hover,
body.light-theme .nutrition-step-row:hover {
  background: #ffffff;
}
body.light-theme .routine-step-skip-btn,
body.light-theme .nutrition-step-skip-btn {
  color: #64748b !important;
}
body.light-theme .routine-step-skip-btn:hover,
body.light-theme .nutrition-step-skip-btn:hover {
  color: #0f172a !important;
}


.nutrition-guide-steps-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  gap: 8px;
}

.nutrition-guide-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nutrition-guide-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #f59e0b;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nutrition-guide-step-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.nutrition-guide-step-sub {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.2;
}

.nutrition-guide-step-arrow {
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
  flex-shrink: 0;
}

@media (max-width: 580px) {
  .nutrition-guide-steps-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .nutrition-guide-step-arrow {
    display: none;
  }
}

.nutrition-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

@media (max-width: 580px) {
  .nutrition-guide-grid {
    grid-template-columns: 1fr;
  }
}

.nutrition-guide-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nutrition-guide-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nutrition-guide-card.highlight-orange {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-red {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-blue {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-green {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-purple {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nutrition-guide-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.nutrition-guide-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.nutrition-guide-card-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.nutrition-guide-key-point {
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 2px solid var(--macro-cals, #f97316);
  line-height: 1.4;
}

.nutrition-guide-card-action {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   AVATAR PHOTO CROPPER MODAL & INTERACTIVE STAGE
   ========================================================================== */

.avatar-crop-stage-container {
  position: relative;
  width: 100%;
  height: 270px;
  background: #090d16;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-crop-stage-container:active {
  cursor: grabbing;
}

#avatar-crop-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-crop-reticle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-crop-circle-guide {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(10, 15, 28, 0.72);
  border: 2px solid #f59e0b;
  position: relative;
  box-sizing: border-box;
}

.avatar-crop-circle-guide::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.avatar-crop-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.6);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar-crop-tool-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #e2e8f0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.avatar-crop-tool-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  transform: scale(1.05);
}

.avatar-crop-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
}

.avatar-crop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  cursor: pointer;
  border: 2px solid #0f172a;
}

.avatar-crop-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  cursor: pointer;
  border: 2px solid #0f172a;
}

.avatar-crop-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.45);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar-crop-preview-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
  background: #090d16;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-crop-preview-circle canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-avatar-uploader {
  position: relative !important;
  overflow: hidden !important;
}

.profile-avatar-hover-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  border-radius: 50%;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.profile-avatar-uploader:hover .profile-avatar-hover-hint {
  opacity: 1;
}

/* ==========================================================================
   Hypertrophy Volume EXP Multiplier Styles & Animations
   ========================================================================== */

.heatmap-metric-badge.badge-rpg-multiplier {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
  transition: all 0.2s ease;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 11.5px;
}

.heatmap-metric-badge.badge-rpg-multiplier:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(245, 158, 11, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.rpg-sidebar-volume-box {
  cursor: pointer;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.rpg-sidebar-volume-box:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.hypertrophy-admin-muscle-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  font-size: 11px;
}

.hypertrophy-admin-muscle-row:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(99, 102, 241, 0.3);
}

.hypertrophy-tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hypertrophy-tier-pill.tier-active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.hypertrophy-tier-pill.tier-inactive {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========================================== */
/* --- STRIPE PAYMENT GATEWAY & INVOICE CSS - */
/* ========================================== */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

.btn-loading {
  opacity: 0.75;
  pointer-events: none;
  cursor: wait !important;
}

.stripe-badge-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stripe-pay-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.invoice-badge-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.invoice-badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Settings Export & Database Panels Spacing & Padding */
#settings-export-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* ========================================== */
/* --- TEMPO FUNCTION & CADENCE ASSISTANT CSS */
/* ========================================== */

.tempo-target-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.tempo-target-badge:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.tempo-target-badge.empty-tempo {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
}

.tempo-target-badge.empty-tempo:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.tempo-pill-ecc {
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.tempo-pill-iso {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

/* Per-Set Target Scope Selector inside #tempo-target-modal */
.tempo-set-selector-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
}

.tempo-set-selector-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
}

.tempo-set-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 64px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.tempo-set-pill:hover {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.4);
  color: #e2e8f0;
}

.tempo-set-pill.has-tempo {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(6, 182, 212, 0.08);
  color: #e0f2fe;
}

.tempo-set-pill.active {
  background: rgba(99, 102, 241, 0.24);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35), 0 2px 8px rgba(99, 102, 241, 0.25);
}

.tempo-set-pill-top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.1;
}

.tempo-set-pill-sub {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.1;
  white-space: nowrap;
}

.tempo-set-pill.has-tempo .tempo-set-pill-sub {
  color: #38bdf8;
}

.tempo-set-pill.active .tempo-set-pill-sub {
  color: #c7d2fe;
}

/* Inline Set-Row Tempo Chip (Live Logger & Program Session Builder) */
.set-row-tempo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
  transition: all 0.15s ease;
}

.set-row-tempo-chip:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.set-row-tempo-chip.is-empty {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-weight: 600;
}

.set-row-tempo-chip.is-empty:hover {
  border-color: var(--accent-primary);
  color: #c7d2fe;
}

body.light-theme .tempo-set-selector-box {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.12);
}

body.light-theme .tempo-set-pill {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  color: #334155;
}

body.light-theme .tempo-set-pill.has-tempo {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(8, 145, 178, 0.4);
  color: #0e7490;
}

body.light-theme .tempo-set-pill.has-tempo .tempo-set-pill-sub {
  color: #0891b2;
}

body.light-theme .tempo-set-pill.active {
  background: rgba(79, 70, 229, 0.12);
  border-color: var(--accent-primary);
  color: #312e81;
}

body.light-theme .tempo-set-pill.active .tempo-set-pill-sub {
  color: #4338ca;
}

body.light-theme .set-row-tempo-chip {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(8, 145, 178, 0.4);
  color: #0e7490;
}

/* In-Set Cadence Metronome Container */
.cadence-assistant-container {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(8, 12, 24, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cadence-visual-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
  text-align: center;
}

.cadence-phase-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.cadence-phase-title.phase-ecc {
  color: #22d3ee;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}

.cadence-phase-title.phase-iso {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.cadence-phase-title.phase-con {
  color: #34d399;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.cadence-number-counter {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.cadence-cue-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.cadence-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 8px;
}

.cadence-progress-fill {
  height: 100%;
  transition: width 0.25s linear;
}

.cadence-progress-fill.fill-ecc {
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
}

.cadence-progress-fill.fill-iso {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.cadence-progress-fill.fill-con {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

/* ========================================================================= */
/* --- RESPONSIVE MOBILE OVERLAP RESOLUTIONS (< 600px) --------------------- */
/* ========================================================================= */

@media (max-width: 600px) {
  /* Profile Card Padding Reclaim */
  .profile-card,
  .profile-card.glass-panel {
    padding: 16px 14px !important;
  }

  /* Profile Header Architecture on Mobile */
  .profile-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .profile-header-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .profile-header-main {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .profile-info {
    min-width: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  #profile-name,
  #manage-profile-name {
    font-size: 18px !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
  }

  /* Compact Top-Right Glass Icon Controls on Mobile */
  .profile-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    width: auto !important;
    padding-top: 0 !important;
    border-top: none !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
  }

  .profile-header-actions .btn-glass-icon {
    flex: none !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  /* Single-Row Horizontal Scroll Ribbon Preservation on Mobile */
  .profile-goals-scroll-ribbon {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    padding: 2px 0 4px 0 !important;
    margin-top: 2px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .profile-goals-scroll-ribbon .metadata-pill-badge {
    max-width: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    font-size: 11.5px !important;
    padding: 4px 10px !important;
    border-radius: 9999px !important;
  }

  /* Floating Assistant Trigger (FAB) Compact Mode on Other Tabs */
  .vea-fab-trigger {
    padding: 6px !important;
    border-radius: 50% !important;
    bottom: 78px !important;
    right: 14px !important;
  }

  /* Override mobile default bottom position when workout dock is active */
  body.has-minimized-workout .vea-fab-trigger,
  body:has(#live-workout-bar:not([style*="display: none"])) .vea-fab-trigger {
    bottom: 148px !important;
  }

  body.has-minimized-workout .app-shell {
    padding-bottom: var(--app-scroll-padding-bottom-workout, calc(204px + env(safe-area-inset-bottom, 0px))) !important;
  }

  .vea-fab-label {
    display: none !important;
  }
}

/* Weekly Consistency 7-Day Dome Grid Responsiveness (< 420px) */
@media (max-width: 420px) {
  .day-domes-grid {
    gap: 4px !important;
  }

  .dome-button {
    width: 32px !important;
    height: 32px !important;
    font-size: 11px !important;
  }

  .day-dome-cell {
    gap: 4px !important;
  }

  .day-dome-cell span {
    font-size: 10px !important;
  }
}

/* Floating Assistant FAB & Minimized Workout Bar: Dynamic Collision Avoidance with Active Expanded Workouts */
body.in-expanded-workout #live-workout-bar,
body:has(.view-container.active #live-workout-tab-container:not([style*="display: none"])) #live-workout-bar {
  display: none !important;
}

body.in-profile-view .vea-fab-trigger,
body:has(#view-profile.active) #vea-floating-trigger,
body:has(#view-profile.active) .vea-fab-trigger,
.view-container#view-profile.active ~ #vea-floating-trigger,
body.in-expanded-workout #vea-floating-trigger,
body.in-expanded-workout .vea-fab-trigger,
body:has(#live-workout-tab-container:not([style*="display: none"])) #vea-floating-trigger,
body:has(#live-workout-tab-container:not([style*="display: none"])) .vea-fab-trigger {
  display: none !important;
}

/* ================= EXERCISE HISTORY IMPORT STYLES ================= */
#custom-ex-import-history-banner {
  transition: all 0.25s ease-in-out;
}

.imported-history-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-weight: 700;
  vertical-align: middle;
}

/* ================= CLASS SELECTION TUTORIAL & SIMULATION STYLES ================= */
.tutorial-class-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  user-select: none;
}

.tutorial-class-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

body.light-theme .tutorial-class-card:hover {
  border-color: rgba(15, 23, 42, 0.3);
}

.tutorial-class-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-primary-shadow, rgba(225, 29, 72, 0.3));
  background: rgba(225, 29, 72, 0.08);
}

body.light-theme .tutorial-class-card.selected {
  background: rgba(220, 38, 38, 0.06);
  border-color: var(--accent-primary);
}

.tutorial-class-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-class-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.tutorial-class-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-cultivator {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag-player {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.tag-adventurer {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tutorial-class-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tutorial-class-specs {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}


/* ================= SETTINGS SECTION GROUPS & PILLS ================= */
.settings-category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.settings-category-pills::-webkit-scrollbar {
  display: none;
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  background: rgba(30, 41, 59, 0.65);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.settings-pill:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.25);
}

.settings-pill.active {
  background: var(--accent-primary, #e11d48);
  color: #ffffff;
  border-color: var(--accent-primary, #e11d48);
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.35);
}

body.light-theme .settings-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

body.light-theme .settings-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .settings-pill.active {
  background: var(--accent-primary, #e11d48);
  color: #ffffff;
  border-color: var(--accent-primary, #e11d48);
}

.settings-section-group {
  margin-bottom: 28px;
  transition: opacity 0.2s ease;
}

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .settings-section-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.settings-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.light-theme .settings-section-title {
  color: #334155;
}

.settings-section-icon {
  width: 17px;
  height: 17px;
}

.icon-emerald { color: #34d399; }
.icon-indigo  { color: #818cf8; }
.icon-rose    { color: #fb7185; }
.icon-cyan    { color: #38bdf8; }
.icon-slate   { color: #94a3b8; }
.icon-amber   { color: #fbbf24; }

.settings-section-group .settings-modules-grid {
  margin-bottom: 0;
}

/* ================= SETTINGS MODULE DASHBOARD TILES ================= */
.settings-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .settings-modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .settings-modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.settings-module-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  padding: 16px;
  border-radius: var(--border-radius-lg, 16px);
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.75) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.settings-module-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 29, 72, 0.4);
  box-shadow: 0 10px 24px -4px rgba(225, 29, 72, 0.18), 0 0 0 1px rgba(225, 29, 72, 0.2);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.settings-module-tile:active {
  transform: translateY(-1px) scale(0.99);
}

body.light-theme .settings-module-tile {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body.light-theme .settings-module-tile:hover {
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 8px 20px -4px rgba(220, 38, 38, 0.12);
  background: #ffffff;
}

.settings-tile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.settings-tile-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  position: relative;
  overflow: visible;
}

.tile-exclamation-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: 1.5px solid #090d16;
  color: #ffffff !important;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 10px rgba(239, 68, 68, 0.85);
  pointer-events: none;
  z-index: 6;
  box-sizing: border-box;
  animation: tileExclamationPulse 1.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  @media (prefers-reduced-motion: reduce) {
    animation: none;
  }
}

body.light-theme .tile-exclamation-badge {
  border-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18), 0 0 8px rgba(239, 68, 68, 0.7);
}

@keyframes tileExclamationPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 8px rgba(239, 68, 68, 0.8);
  }
  30% {
    transform: translateY(-2.5px) scale(1.16);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.5), 0 0 14px rgba(239, 68, 68, 1);
  }
  55% {
    transform: translateY(0) scale(0.96);
  }
  75% {
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.45), 0 0 12px rgba(239, 68, 68, 0.9);
  }
}

.settings-module-tile:hover .settings-tile-icon-box {
  transform: scale(1.08);
}

.settings-tile-icon-box i,
.settings-tile-icon-box svg {
  width: 20px;
  height: 20px;
}

/* Specific module icon color accents */
.tile-icon-theme {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: var(--accent-primary);
}
.tile-icon-tutorials {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}
.tile-icon-notifications {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.tile-icon-cloud {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}
.tile-icon-gcal {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}
.tile-icon-sheets {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}
.tile-icon-coach {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.tile-icon-blocklist {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}
.tile-icon-privacy {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}
.tile-icon-backup {
  background: rgba(225, 29, 72, 0.18);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #f43f5e;
}
.tile-icon-config {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}
.tile-icon-tasks {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.tile-icon-biofeedback {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}
.tile-icon-locations {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: var(--accent-primary);
}
.tile-icon-nutrition {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.tile-icon-analytics {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}
.tile-icon-social {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.settings-tile-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-rose {
  background: rgba(225, 29, 72, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(225, 29, 72, 0.3);
}
.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-cyan {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-slate {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.settings-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-tile-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: color 0.2s ease;
}

.settings-module-tile:hover .settings-tile-title {
  color: var(--accent-primary);
}

.settings-tile-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  opacity: 0.6;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.settings-module-tile:hover .settings-tile-arrow {
  opacity: 1;
  color: var(--accent-primary);
  transform: translateX(2px);
}

.settings-tile-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .settings-module-tile {
    min-height: 102px;
    padding: 10px;
    border-radius: var(--border-radius-md, 12px);
  }

  .settings-tile-header {
    margin-bottom: 6px;
    gap: 6px;
  }

  .settings-tile-icon-box {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .settings-tile-icon-box i,
  .settings-tile-icon-box svg {
    width: 14px;
    height: 14px;
  }

  .settings-tile-badge {
    font-size: 9px;
    padding: 2px 6px;
    max-width: 82px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .settings-tile-title {
    font-size: 12px;
    line-height: 1.25;
    gap: 4px;
  }

  .settings-tile-arrow {
    width: 12px;
    height: 12px;
  }

  .settings-tile-desc {
    font-size: 9.5px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 380px) {
  .settings-module-tile {
    min-height: 94px;
    padding: 8px;
  }

  .settings-tile-header {
    margin-bottom: 5px;
    gap: 4px;
  }

  .settings-tile-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .settings-tile-icon-box i,
  .settings-tile-icon-box svg {
    width: 13px;
    height: 13px;
  }

  .settings-tile-badge {
    font-size: 8.5px;
    padding: 1.5px 4px;
    max-width: 70px;
  }

  .settings-tile-title {
    font-size: 11px;
  }

  .settings-tile-desc {
    font-size: 9px;
  }
}

/* ================= USER DASHBOARD 3x2 ACTION MODULES GRID ================= */
.dashboard-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-modules-grid .settings-module-tile {
  container: dash-tile / inline-size;
  min-height: 122px;
  padding: 12px;
  gap: 8px;
  justify-content: space-between;
}

.dashboard-modules-grid .settings-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
  width: 100%;
}

.dashboard-modules-grid .settings-tile-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
}

.dashboard-modules-grid .settings-tile-icon-box i,
.dashboard-modules-grid .settings-tile-icon-box svg {
  width: 16px;
  height: 16px;
}

.dashboard-modules-grid .settings-tile-badge {
  font-size: 9px;
  padding: 2px 6px;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}

.dashboard-modules-grid .settings-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.dashboard-modules-grid .settings-tile-title {
  font-size: 12.5px;
  line-height: 1.25;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.dashboard-modules-grid .settings-tile-title-text {
  min-width: 0;
  flex: 1;
  overflow-wrap: break-word;
  word-break: break-word;
}

.dashboard-modules-grid .settings-tile-arrow {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex-shrink: 0;
}

.dashboard-modules-grid .settings-tile-desc {
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .dashboard-modules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-modules-grid .settings-module-tile {
    min-height: 106px;
    padding: 9px;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .dashboard-modules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .dashboard-modules-grid .settings-module-tile {
    min-height: 98px;
    padding: 8px;
    gap: 5px;
  }
}

@container dash-tile (max-width: 150px) {
  .dashboard-modules-grid .settings-tile-header {
    gap: 4px;
    margin-bottom: 2px;
  }

  .dashboard-modules-grid .settings-tile-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .dashboard-modules-grid .tile-exclamation-badge {
    width: 14px;
    height: 14px;
    top: -4px;
    right: -4px;
    font-size: 9px;
  }

  .dashboard-modules-grid .settings-tile-icon-box i,
  .dashboard-modules-grid .settings-tile-icon-box svg {
    width: 13px;
    height: 13px;
  }

  .dashboard-modules-grid .settings-tile-badge {
    font-size: 8px;
    padding: 1.5px 5px;
    max-width: 100%;
  }

  .dashboard-modules-grid .settings-tile-title {
    font-size: 11px;
    line-height: 1.2;
  }

  .dashboard-modules-grid .settings-tile-desc {
    font-size: 9.5px;
    line-height: 1.25;
  }
}

@container dash-tile (max-width: 118px) {
  .dashboard-modules-grid .settings-tile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .dashboard-modules-grid .settings-tile-title {
    font-size: 10.5px;
    line-height: 1.2;
  }

  .dashboard-modules-grid .settings-tile-arrow {
    width: 10px;
    height: 10px;
  }

  .dashboard-modules-grid .settings-tile-desc {
    font-size: 9px;
    line-height: 1.22;
  }
}

/* ================= CLIENT MANAGEMENT WORKSPACE MODULE DASHBOARD TILES ================= */
.manage-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .manage-modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
}

.manage-module-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 125px;
  padding: 14px;
  border-radius: var(--border-radius-lg, 16px);
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.75) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
  text-align: left;
  box-sizing: border-box;
}

.manage-module-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(225, 29, 72, 0.4);
  box-shadow: 0 8px 20px -4px rgba(225, 29, 72, 0.18), 0 0 0 1px rgba(225, 29, 72, 0.2);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.manage-module-tile:active {
  transform: translateY(0px) scale(0.99);
}

.manage-module-tile.active {
  border-color: var(--accent-primary, #e11d48);
  box-shadow: 0 0 0 1.5px rgba(225, 29, 72, 0.35), 0 8px 24px rgba(225, 29, 72, 0.22);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.15) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.manage-module-tile.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-primary-gradient, linear-gradient(90deg, #e11d48, #f43f5e));
}

.manage-module-tile .settings-tile-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.manage-module-tile .settings-tile-icon-box i,
.manage-module-tile .settings-tile-icon-box svg {
  width: 18px;
  height: 18px;
}

.manage-module-tile .settings-tile-title {
  font-size: 13.5px;
}

.manage-module-tile .settings-tile-desc {
  font-size: 11px;
  line-height: 1.35;
}

/* Light Theme Overrides for Manage Module Tiles */
body.light-theme .manage-module-tile {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body.light-theme .manage-module-tile:hover {
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 8px 20px -4px rgba(220, 38, 38, 0.12);
  background: #ffffff;
}

body.light-theme .manage-module-tile.active {
  border-color: #dc2626;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.06) 0%, #ffffff 100%);
  box-shadow: 0 0 0 1.5px rgba(220, 38, 38, 0.3), 0 8px 20px -4px rgba(220, 38, 38, 0.15);
}

.tile-icon-scheduler {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}
.tile-icon-overview {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: var(--accent-primary);
}
.tile-icon-program {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}
.tile-icon-analytics {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}
.tile-icon-admin {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}
.training-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .training-quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .training-quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
  }
}

.training-action-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 104px;
  padding: 14px 16px;
  border-radius: var(--border-radius-lg, 16px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.training-action-tile:hover {
  transform: translateY(-2px);
}

.training-action-tile:active {
  transform: translateY(0px) scale(0.99);
}

/* Start Self Workout - Emerald Theme */
.training-action-tile-start {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.26) 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.training-action-tile-start:hover {
  border-color: rgba(16, 185, 129, 0.85);
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.35), 0 0 0 1px rgba(16, 185, 129, 0.25);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.38) 100%);
}

.training-action-tile-start .training-action-title {
  color: #ffffff;
}

.training-action-tile-start:hover .training-action-title {
  color: #34d399;
}

/* Create New Routine - Rose / Primary Theme */
.training-action-tile-create {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.16) 0%, rgba(190, 18, 60, 0.26) 100%);
  border: 1px solid rgba(225, 29, 72, 0.45);
}

.training-action-tile-create:hover {
  border-color: rgba(225, 29, 72, 0.85);
  box-shadow: 0 8px 24px -4px rgba(225, 29, 72, 0.35), 0 0 0 1px rgba(225, 29, 72, 0.25);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.25) 0%, rgba(190, 18, 60, 0.38) 100%);
}

.training-action-tile-create .training-action-title {
  color: #ffffff;
}

.training-action-tile-create:hover .training-action-title {
  color: #fb7185;
}

/* Light theme for Training Quick Actions */
body.light-theme .training-action-tile-start {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.22) 100%);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

body.light-theme .training-action-tile-start:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.3) 100%);
  border-color: #059669;
}

body.light-theme .training-action-tile-start .training-action-title {
  color: #065f46;
}

body.light-theme .training-action-tile-create {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.1) 0%, rgba(225, 29, 72, 0.2) 100%);
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
}

body.light-theme .training-action-tile-create:hover {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.18) 0%, rgba(225, 29, 72, 0.28) 100%);
  border-color: #be123c;
}

body.light-theme .training-action-tile-create .training-action-title {
  color: #9f1239;
}

.training-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.training-action-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.training-action-tile:hover .training-action-icon-box {
  transform: scale(1.1);
}

.training-action-icon-box i,
.training-action-icon-box svg {
  width: 16px;
  height: 16px;
}

.training-action-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: color 0.2s ease;
}

.training-action-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .training-action-tile {
    min-height: 72px;
    padding: 10px;
    border-radius: var(--border-radius-md, 12px);
  }

  .training-action-header {
    margin-bottom: 6px;
  }

  .training-action-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .training-action-icon-box i,
  .training-action-icon-box svg {
    width: 14px;
    height: 14px;
  }

  .training-action-tile .settings-tile-badge {
    font-size: 9.5px;
    padding: 2px 6px;
  }

  .training-action-title {
    font-size: 12px;
    line-height: 1.25;
    gap: 4px;
  }

  .training-action-title .settings-tile-arrow {
    width: 12px;
    height: 12px;
  }

  .training-action-desc {
    font-size: 9.5px;
    line-height: 1.2;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 380px) {
  .training-action-tile {
    min-height: 68px;
    padding: 8px;
  }

  .training-action-header {
    margin-bottom: 5px;
  }

  .training-action-icon-box {
    width: 25px;
    height: 25px;
    border-radius: 7px;
  }

  .training-action-icon-box i,
  .training-action-icon-box svg {
    width: 12px;
    height: 12px;
  }

  .training-action-title {
    font-size: 11px;
  }

  .training-action-desc {
    font-size: 9px;
  }
}

.training-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .training-modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .training-modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
}

#manage-program-modal .training-modules-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 4px;
}

.manage-modal-back-btn {
  background: rgba(99, 102, 241, 0.14) !important;
  border: 1px solid rgba(99, 102, 241, 0.4) !important;
  color: #c7d2fe !important;
  transition: all 0.18s ease;
}

.manage-modal-back-btn:hover {
  background: rgba(99, 102, 241, 0.26) !important;
  border-color: rgba(129, 140, 248, 0.65) !important;
  color: #ffffff !important;
  transform: translateX(-1px);
}

.tile-icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.tile-icon-purple {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.tile-icon-gold {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.tile-icon-slate {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(100, 116, 139, 0.4);
  color: #cbd5e1;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Compact Modal Header Stat Badge */
.modal-header-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.22) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-success, #34d399);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  transition: all 0.2s ease;
}

.modal-header-stat-badge .stat-badge-unit {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.85;
}

.modal-header-stat-badge:hover {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

body.light-theme .modal-header-stat-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.22) 100%);
  border-color: rgba(16, 185, 129, 0.5);
  color: #065f46;
}



/* ================= SETTINGS THEME PICKER STYLES ================= */
.settings-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .settings-theme-grid {
    grid-template-columns: 1fr;
  }
}

.settings-theme-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-align: left;
}

.settings-theme-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

body.light-theme .settings-theme-card:hover {
  border-color: rgba(15, 23, 42, 0.25);
}

.settings-theme-card.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-primary-shadow, rgba(225, 29, 72, 0.3));
  background: rgba(225, 29, 72, 0.08);
}

body.light-theme .settings-theme-card.active {
  background: rgba(220, 38, 38, 0.06);
  border-color: var(--accent-primary);
}

.settings-theme-card-preview {
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.preview-dark {
  background: #07070a;
  color: #f8fafc;
}

.preview-light {
  background: #f4f5f9;
  color: #09090b;
  border-color: rgba(15, 23, 42, 0.15);
}

.settings-theme-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-theme-card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.settings-theme-check-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.settings-theme-card.active .settings-theme-check-icon {
  color: var(--accent-primary);
}

.settings-theme-card-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}


/* ==========================================================================
   ADMIN MASTER WORKOUT DATABASE STUDIO WORKSPACE MODAL
   ========================================================================== */
.admin-master-db-workspace {
  max-width: 1200px !important;
  width: 96vw !important;
  height: 90vh !important;
  max-height: 880px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #111726 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
}

.admin-master-modal-header {
  padding: 12px 20px;
  background: #161f36;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.admin-master-header-kpis {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
}

.admin-master-mobile-nav {
  display: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141a29;
  padding: 6px 12px;
  gap: 8px;
}

.admin-master-mobile-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.5);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-master-mobile-tab-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: transparent;
}

.admin-master-workspace-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Left Users Directory Panel */
.admin-master-users-panel {
  width: 340px;
  min-width: 300px;
  max-width: 380px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1424;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-master-panel-search-box {
  padding: 12px;
  background: #121a2d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-master-role-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.admin-master-role-btn {
  flex: 1;
  padding: 4px 6px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.admin-master-role-btn.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.admin-master-users-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-master-user-card {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-master-user-card:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.admin-master-user-card.active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.admin-master-users-footer {
  padding: 8px 12px;
  background: #0b101d;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Right Workout Logs Inspector Panel */
.admin-master-logs-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0b0f19;
  min-width: 0;
  overflow: hidden;
}

.admin-master-athlete-banner {
  padding: 14px 20px;
  background: linear-gradient(90deg, #141b2f 0%, #101728 50%, #0b0f19 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  flex-shrink: 0;
}

.admin-master-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.admin-master-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-master-banner-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-master-mini-stat {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
  min-width: 80px;
}

.admin-master-mini-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-master-mini-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-top: 2px;
}

.admin-master-logs-toolbar {
  padding: 8px 18px;
  background: #0e1424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.admin-master-logs-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-master-log-card {
  background: #12192c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.admin-master-log-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-master-log-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.admin-master-exercise-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-master-set-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  font-family: monospace;
}

.admin-master-set-pill.warmup {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.admin-master-set-pill.dropset {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

/* Responsive breakpoint for mobile */
@media (max-width: 768px) {
  .admin-master-header-kpis {
    display: none;
  }
  .admin-master-mobile-nav {
    display: flex;
  }
  .admin-master-workspace-body {
    position: relative;
  }
  .admin-master-users-panel {
    width: 100%;
    max-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
  }
  .admin-master-logs-panel {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
  }
  .admin-master-users-panel.mobile-hidden {
    display: none !important;
  }
  .admin-master-logs-panel.mobile-hidden {
    display: none !important;
  }
}

/* ==========================================================================
   WEEKLY BIOFEEDBACK DASHBOARD CARD & HISTORY MODAL
   ========================================================================== */
#profile-biofeedback-card {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#biofeedback-summary-container .glass-panel,
#biofeedback-history-list .glass-panel {
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

#biofeedback-summary-container .glass-panel:hover,
#biofeedback-history-list .glass-panel:hover {
  border-color: rgba(52, 211, 153, 0.25);
}

@media (max-width: 480px) {
  #biofeedback-summary-container [style*="grid-template-columns"],
  #biofeedback-history-list [style*="grid-template-columns"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Rest Duration Pills and Exercise Rest Badge */
.rest-duration-pill {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rest-duration-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.rest-duration-pill:active {
  transform: scale(0.95);
}

.rest-duration-pill.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.badge-exercise-rest {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.badge-exercise-rest:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.exercise-rest-settings-card {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   AMRAP & EMOM PROTOCOLS: RUNNERS & CONFIG MODAL STYLES
   ========================================================================== */
.amrap-runner-container,
.emom-runner-container {
  margin: 10px 0;
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 12, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.amrap-runner-container {
  border-color: rgba(249, 115, 22, 0.35);
}

.emom-runner-container {
  border-color: rgba(16, 185, 129, 0.35);
}

.amrap-timer-digits,
.emom-timer-digits {
  font-size: 42px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1;
  letter-spacing: 1px;
}

.amrap-timer-digits {
  color: #fb923c;
  text-shadow: 0 0 16px rgba(249, 115, 22, 0.4);
}

.emom-timer-digits {
  color: #34d399;
  text-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.emom-phase-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.emom-phase-banner.phase-work {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.emom-phase-banner.phase-rest {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.emom-round-dots-track {
  display: flex;
  gap: 4px;
  width: 100%;
}

.emom-round-dot {
  height: 6px;
  flex: 1;
  border-radius: 9999px;
  background: #334155;
  transition: all 0.2s ease;
}

.emom-round-dot.completed {
  background: #10b981;
}

.emom-round-dot.active {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: pulse-emom-dot 1.2s infinite;
}

@keyframes pulse-emom-dot {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(1.4); opacity: 0.7; }
}

.amrap-emom-chip-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.amrap-emom-chip-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.amrap-emom-chip-btn.selected {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #c7d2fe;
}

.amrap-emom-chip-btn.selected-amrap {
  background: rgba(249, 115, 22, 0.25);
  border-color: #fb923c;
  color: #fed7aa;
}

.amrap-emom-chip-btn.selected-emom {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #a7f3d0;
}

.set-protocol-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.set-protocol-pill.pill-amrap {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #fb923c;
}

.set-protocol-pill.pill-amrap:hover {
  background: rgba(249, 115, 22, 0.22);
}

.set-protocol-pill.pill-emom {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.set-protocol-pill.pill-emom:hover {
  background: rgba(16, 185, 129, 0.22);
}

/* ==========================================================================
   PERIODIZATION & MESOCYCLE PLANNING STYLES
   ========================================================================== */

.periodization-program-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.periodization-program-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.periodization-goal-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.periodization-timeline-bar {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.timeline-phase-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  transition: all 0.15s ease;
  cursor: pointer;
  padding: 0 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  border-right: 1px solid rgba(0, 0, 0, 0.25);
}

.timeline-phase-segment:hover {
  filter: brightness(1.18);
}

.timeline-phase-segment:last-child {
  border-right: none;
}

/* Phase Badges & Preset Accents */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.phase-badge-strength, .timeline-seg-strength {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.timeline-seg-strength {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #1c1917;
}

.phase-badge-hypertrophy, .timeline-seg-hypertrophy {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
}
.timeline-seg-hypertrophy {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: #ffffff;
}

.phase-badge-conditioning, .timeline-seg-conditioning {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.timeline-seg-conditioning {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}

.phase-badge-deload, .timeline-seg-deload {
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}
.timeline-seg-deload {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
}

.phase-badge-peak, .timeline-seg-peak {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}
.timeline-seg-peak {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #ffffff;
}

.phase-badge-custom, .timeline-seg-custom {
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}
.timeline-seg-custom {
  background: linear-gradient(135deg, #475569, #64748b);
  color: #ffffff;
}

/* Week Navigator Strip */
.week-nav-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 8px 2px;
  scrollbar-width: thin;
}

.week-nav-pill {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.week-nav-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.week-nav-pill.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.week-nav-pill .week-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Week Details & History Tie-in */
.week-detail-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adherence-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
}

.adherence-badge-pill.full {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.adherence-badge-pill.partial {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.adherence-badge-pill.empty {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Dynamic Phase Block Builder */
.phase-builder-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.15s ease;
}

.phase-builder-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.phase-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Periodization Tutorial Styles */
.periodization-tutorial-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   BIOFEEDBACK & MUSCLE RECOVERY ANATOMICAL STYLES
   ========================================================================== */

.anatomy-svg-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.anatomy-body-svg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  user-select: none;
}

.muscle-path {
  cursor: pointer;
  fill: rgba(148, 163, 184, 0.16);
  stroke: rgba(148, 163, 184, 0.4);
  stroke-width: 1.2px;
  stroke-linejoin: round;
  transition: fill 0.22s ease, stroke 0.22s ease, filter 0.22s ease, transform 0.15s ease;
  transform-origin: center;
}

.muscle-path:hover {
  fill: rgba(56, 189, 248, 0.45) !important;
  stroke: #38bdf8 !important;
  stroke-width: 2px !important;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.8)) !important;
}

/* Floating Anatomy Hover Stat Bubble (HUD Tooltip) */
.anatomy-stat-bubble {
  min-width: 230px;
  max-width: 290px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.25);
  color: white;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, left, top;
}

.anatomy-stat-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.anatomy-stat-bubble .stat-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.anatomy-stat-bubble .stat-bubble-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.anatomy-stat-bubble .stat-bubble-tier {
  font-size: 9.5px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.anatomy-stat-bubble .stat-bubble-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 6px 0;
}

.anatomy-stat-bubble .stat-bubble-cell {
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.anatomy-stat-bubble .stat-bubble-cell-header {
  font-size: 9px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace, sans-serif;
}

.anatomy-stat-bubble .stat-bubble-bar-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 2px;
  overflow: hidden;
}

.anatomy-stat-bubble .stat-bubble-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.2s ease;
}

.anatomy-stat-bubble .stat-bubble-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 9.5px;
}

.muscle-path.not-recovered {
  fill: rgba(239, 68, 68, 0.55) !important;
  stroke: #ef4444 !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.75)) !important;
}

.muscle-path.recovered {
  fill: rgba(16, 185, 129, 0.55) !important;
  stroke: #10b981 !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.75)) !important;
}

/* Muscle Recovery Interactive Chips / Pills */
.muscle-recovery-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.muscle-recovery-pill:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.muscle-recovery-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.2s ease;
}

.muscle-recovery-pill.not-recovered {
  border-color: rgba(239, 68, 68, 0.55) !important;
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.muscle-recovery-pill.not-recovered .status-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 6px #ef4444;
}

.muscle-recovery-pill.recovered {
  border-color: rgba(16, 185, 129, 0.55) !important;
  background: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.muscle-recovery-pill.recovered .status-dot {
  background: #10b981 !important;
  box-shadow: 0 0 6px #10b981;
}

/* Collapsible Individual Muscle Recovery Map Section */
.muscle-recovery-collapsible-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.muscle-recovery-collapsible-card.is-expanded {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.muscle-recovery-collapsible-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: background 0.2s ease;
}

.muscle-recovery-collapsible-header:hover {
  background: rgba(30, 41, 59, 0.55);
}

.muscle-recovery-collapsible-header:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: -2px;
}

.muscle-recovery-header-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.muscle-recovery-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.muscle-recovery-mini-counts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
}

.muscle-recovery-toggle-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.muscle-recovery-collapsible-card.is-expanded .muscle-recovery-toggle-pill {
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

.muscle-recovery-chevron {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  flex-shrink: 0;
}

.muscle-recovery-collapsible-card.is-expanded .muscle-recovery-chevron {
  transform: rotate(180deg);
  color: #34d399;
}

.muscle-recovery-collapsible-drawer {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  animation: fadeInMuscleDrawer 0.2s ease-out;
}

@keyframes fadeInMuscleDrawer {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 540px) {
  .biofeedback-anatomy-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .muscle-recovery-collapsible-header {
    flex-wrap: wrap;
  }
  .muscle-recovery-header-right {
    width: 100%;
    justify-content: flex-end;
    padding-top: 4px;
  }
}

/* ==========================================================================
   COACH MEAL PLAN PRESCRIPTION & CLIENT DASHBOARD STYLES
   ========================================================================== */

.pmp-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary, #94a3b8);
  padding: 12px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.pmp-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}

.pmp-tab-btn.active {
  color: #f59e0b;
  border-bottom-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.pmp-template-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
}

.pmp-template-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.pmp-template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.pmp-template-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
}

.pmp-category-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pmp-category-badge.cutting {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.pmp-category-badge.bulking {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.pmp-category-badge.recomposition {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.pmp-category-badge.maintenance,
.pmp-category-badge.performance {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.pmp-macro-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.pmp-macro-chip {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.pmp-bucket-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pmp-bucket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.pmp-bucket-macro-pill {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.pmp-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pmp-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 10px;
  gap: 8px;
  font-size: 12px;
}

.pmp-item-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.pmp-item-row-name {
  font-weight: 700;
  color: #ffffff;
}

.pmp-item-row-meta {
  font-size: 10.5px;
  color: var(--text-secondary, #94a3b8);
}

/* Client Dashboard Prescribed Meal Plan Styles */
.client-pmp-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.client-pmp-bucket-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-pmp-bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.client-pmp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.client-pmp-adherence-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary, #94a3b8);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.client-pmp-adherence-btn.followed {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
}

/* ==========================================================================
   BATTLEON MODULAR PAPER-DOLL CHARACTER CUSTOMIZER & TUTORIAL STYLES
   ========================================================================== */

/* Paper-Doll SVG Base Stance */
.paper-doll-svg {
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

/* Kinematic Step-In Strike Lunge Animation */
@keyframes combat-lunge-anim {
  0% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(65px) scale(1.06);
  }
  70% {
    transform: translateX(50px) scale(1.02);
  }
  100% {
    transform: translateX(0);
  }
}

.combat-step-in-lunge {
  animation: combat-lunge-anim 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Floating Combat Text Animation */
@keyframes float-damage-up {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateY(-10px) scale(1.25);
  }
  75% {
    opacity: 1;
    transform: translateY(-32px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
}

.floating-damage-text {
  animation: float-damage-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Dummy Target Hit-Shake Animation */
@keyframes dummy-shake-anim {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(8px) rotate(4deg);
  }
  40% {
    transform: translateX(-8px) rotate(-4deg);
  }
  60% {
    transform: translateX(5px) rotate(2deg);
  }
  80% {
    transform: translateX(-5px) rotate(-2deg);
  }
}

.combat-hit-shake {
  animation: dummy-shake-anim 0.35s ease;
}

/* Customizer Tab Buttons */
.customizer-tab-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #94a3b8);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.customizer-tab-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: white;
}

.customizer-tab-btn.active {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: white;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* BattleOn Carousel & Swatch Controls */
.customizer-carousel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.carousel-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #38bdf8;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.carousel-nav-btn:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: #38bdf8;
  color: white;
  transform: scale(1.06);
}

.carousel-nav-btn:active {
  transform: scale(0.95);
}

.carousel-value-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.carousel-counter {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.5px;
}

.customizer-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Swatch Grids */
.customizer-swatch-grid {
  display: grid;
  gap: 6px;
}

.customizer-swatch-grid.skin-grid {
  grid-template-columns: repeat(5, 1fr);
}

.customizer-swatch-grid.hair-grid {
  grid-template-columns: repeat(10, 1fr);
}

@media (max-width: 520px) {
  .customizer-swatch-grid.hair-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.skin-swatch-tile {
  height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.skin-swatch-tile:hover {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.4);
}

.skin-swatch-tile.selected {
  border-color: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
  transform: scale(1.05);
}

.hair-swatch-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  margin: 0 auto;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hair-swatch-circle:hover {
  transform: scale(1.15);
  border-color: white;
}

.hair-swatch-circle.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  transform: scale(1.15);
}

.eye-swatch-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.eye-swatch-circle:hover {
  transform: scale(1.12);
  border-color: white;
}

.eye-swatch-circle.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
  transform: scale(1.15);
}

/* Stat Priority Selection Cards */
.stat-priority-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.stat-priority-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.stat-priority-card.selected {
  transform: translateY(-2px);
}

/* ==========================================================================
   2D PAPER-DOLL BATTLE ARENA (BATTLEON / ADVENTUREQUEST STYLE)
   ========================================================================== */

.aq-battle-arena {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(circle at 50% 20%, #151a30 0%, #080b14 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  user-select: none;
}

/* Arena Header */
.aq-battle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.aq-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.aq-pill-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.aq-pill-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #ffffff;
}

.aq-pill-btn.active {
  background: #6366f1;
  border-color: #818cf8;
  color: #ffffff;
}

/* Status Overview Gauges Bar */
.aq-combat-status-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 4px;
}

.aq-combatant-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aq-combatant-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
}

.aq-gauge-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.aq-gauge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
}

.aq-gauge-track {
  flex: 1;
  height: 9px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.aq-gauge-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.aq-gauge-fill.hp-fill {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.aq-gauge-fill.mp-fill {
  background: linear-gradient(90deg, #06b6d4, #6366f1);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.aq-gauge-fill.resolve-fill {
  background: linear-gradient(90deg, #f59e0b, #ef4444, #ec4899);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* 2D Battle Stage Canvas */
.aq-stage-canvas {
  position: relative;
  width: 100%;
  min-height: 240px;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.8) 0%, rgba(26, 32, 56, 0.9) 70%, rgba(15, 23, 42, 1) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 24px 20px 24px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7);
}

/* Background floating cosmic particles */
.aq-cosmic-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
                    radial-gradient(1.5px 1.5px at 120px 80px, #38bdf8, rgba(0,0,0,0)),
                    radial-gradient(1px 1px at 240px 40px, #f59e0b, rgba(0,0,0,0)),
                    radial-gradient(2px 2px at 340px 110px, #a855f7, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 400px 200px;
  opacity: 0.6;
  animation: aq-star-drift 20s linear infinite;
}

@keyframes aq-star-drift {
  0% { background-position: 0 0; }
  100% { background-position: 400px 200px; }
}

/* Pedestals */
.aq-pedestal {
  position: absolute;
  bottom: 12px;
  width: 120px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.35) 0%, rgba(15, 23, 42, 0.8) 60%, transparent 100%);
  border-bottom: 2px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
  pointer-events: none;
}

.aq-pedestal-hero {
  left: 50px;
}

.aq-pedestal-monster {
  right: 50px;
}

/* Hero Stage Placement */
.aq-hero-unit-wrap {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
  transition: transform 0.2s ease;
}

/* Familiar Placement */
.aq-familiar-flank {
  position: absolute;
  left: -48px;
  bottom: 30px;
  width: 58px;
  height: 58px;
  z-index: 4;
  animation: familiar-battle-bob 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  cursor: pointer;
  transition: transform 0.2s ease;
}

.aq-familiar-flank:hover {
  transform: scale(1.1);
}

@keyframes familiar-battle-bob {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
}

/* Monster Stage Placement */
.aq-monster-unit-wrap {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
  transition: transform 0.2s ease;
}

/* Monster Idle Sway */
.aq-monster-breathing {
  animation: monster-idle-sway 3.2s ease-in-out infinite;
}

@keyframes monster-idle-sway {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.02, 0.98); }
}

/* ==========================================================================
   COMBAT CHOREOGRAPHY ANIMATIONS
   ========================================================================== */

/* Hero Lunging Across Arena (AdventureQuest Step-In) */
@keyframes hero-aq-slash {
  0% {
    transform: translateX(0) scale(1);
  }
  30% {
    transform: translateX(110px) scale(1.08);
  }
  50% {
    transform: translateX(130px) scale(1.12);
  }
  75% {
    transform: translateX(90px) scale(1.04);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

.aq-hero-lunge {
  animation: hero-aq-slash 0.52s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Monster Forward Attack */
@keyframes monster-aq-attack {
  0% {
    transform: translateX(0) scale(1);
  }
  35% {
    transform: translateX(-95px) scale(1.08);
  }
  60% {
    transform: translateX(-115px) scale(1.12);
  }
  80% {
    transform: translateX(-70px) scale(1.04);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

.aq-monster-lunge {
  animation: monster-aq-attack 0.52s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Familiar Burst Dash */
@keyframes familiar-aq-burst {
  0% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(140px, -20px) scale(1.3);
  }
  70% {
    transform: translate(130px, -15px) scale(1.15);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

.aq-familiar-lunge {
  animation: familiar-aq-burst 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Target Impact Hit Shake (Red Flash + Rapid Vibration) */
@keyframes aq-hit-shake {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  15% { transform: translateX(-12px) rotate(-3deg); filter: brightness(2.2) drop-shadow(0 0 12px #ef4444); }
  35% { transform: translateX(12px) rotate(3deg); filter: brightness(2) drop-shadow(0 0 10px #ef4444); }
  55% { transform: translateX(-8px) rotate(-2deg); filter: brightness(1.6); }
  75% { transform: translateX(6px) rotate(1deg); filter: brightness(1.3); }
}

.aq-hit-shake {
  animation: aq-hit-shake 0.38s ease forwards;
}

/* Screen Shake on Critical Strikes */
@keyframes aq-crit-screenshake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 4px); }
  40% { transform: translate(5px, -5px); }
  60% { transform: translate(-4px, 3px); }
  80% { transform: translate(3px, -2px); }
}

.aq-screen-shake {
  animation: aq-crit-screenshake 0.32s ease forwards;
}

/* Slashing Arc FX Overlay */
.aq-slash-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
}

@keyframes aq-slash-arc-play {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) rotate(-25deg);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.4) rotate(25deg);
  }
}

.aq-slash-overlay.active {
  animation: aq-slash-arc-play 0.35s ease-out forwards;
}

/* Monster Defeat Dissolve */
@keyframes aq-monster-defeat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1.5);
  }
  50% {
    opacity: 0.6;
    transform: translateY(15px) scale(0.9);
    filter: brightness(2) drop-shadow(0 0 15px #f59e0b);
  }
  100% {
    opacity: 0;
    transform: translateY(35px) scale(0.7);
    filter: blur(8px);
  }
}

.aq-monster-defeated {
  animation: aq-monster-defeat 0.8s ease-out forwards;
}

/* Hero Victory Celebration */
@keyframes aq-hero-victory {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-14px) scale(1.08);
  }
  60% {
    transform: translateY(-8px) scale(1.05);
  }
}

.aq-hero-celebrating {
  animation: aq-hero-victory 0.7s ease-in-out infinite;
}

/* ==========================================================================
   FLOATING COMBAT TEXT (AQ COMIC RETRO POPUPS)
   ========================================================================== */

.aq-float-anchor {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

@keyframes aq-float-up {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translateY(-5px) scale(1.3);
  }
  60% {
    opacity: 1;
    transform: translateY(-30px) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateY(-52px) scale(0.9);
  }
}

.aq-float-number {
  font-family: 'Impact', 'Arial Black', sans-serif;
  letter-spacing: 0.5px;
  animation: aq-float-up 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  white-space: nowrap;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.9));
}

.aq-float-number.crit {
  color: #fbbf24;
  font-size: 24px;
  font-style: italic;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.8), 0 0 2px #000;
}

.aq-float-number.dmg {
  color: #f87171;
  font-size: 18px;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.6), 0 0 2px #000;
}

.aq-float-number.heal {
  color: #34d399;
  font-size: 19px;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.6), 0 0 2px #000;
}

.aq-float-number.mana {
  color: #38bdf8;
  font-size: 17px;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6), 0 0 2px #000;
}

.aq-float-number.special {
  color: #c084fc;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.8), 0 0 2px #000;
}

/* ==========================================================================
   ADVENTUREQUEST COMMAND CONSOLE (BOTTOM CONTROLS)
   ========================================================================== */

.aq-console-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Narrative Action Log Ticker */
.aq-narrative-ticker {
  background: rgba(8, 12, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: #a3e635;
  line-height: 1.4;
  min-height: 48px;
  max-height: 72px;
  overflow-y: auto;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

/* Main Command Category Grid */
.aq-command-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 580px) {
  .aq-command-palette {
    grid-template-columns: repeat(2, 1fr);
  }
}

.aq-action-btn {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.aq-action-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(99, 102, 241, 0.3);
}

.aq-action-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.aq-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.aq-action-btn.active-tab {
  border-color: #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.25) 0%, #0f172a 100%);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.aq-action-btn.limit-break-btn {
  background: linear-gradient(135deg, #ef4444, #f59e0b, #ec4899);
  border-color: #fde047;
  color: #ffffff;
  animation: aq-limit-break-pulse 1.4s ease-in-out infinite;
}

@keyframes aq-limit-break-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 20px rgba(253, 224, 71, 0.9); }
}

/* Sub-drawer for Skills, Spells, Items */
.aq-subdrawer {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  animation: aq-drawer-slide 0.2s ease-out;
}

@keyframes aq-drawer-slide {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.aq-sub-item-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aq-sub-item-card:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
}

.aq-sub-item-name {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aq-sub-item-cost {
  font-size: 9.5px;
  font-weight: 700;
  color: #38bdf8;
}

.aq-sub-item-desc {
  font-size: 9px;
  color: #94a3b8;
  line-height: 1.3;
}

/* Victory / Defeat Modal Overlay inside Arena */
.aq-battle-end-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(6px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  animation: aq-drawer-slide 0.3s ease-out;
}

.aq-end-title {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 6px 0;
  letter-spacing: 1px;
}

.aq-end-title.victory {
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.6);
}

.aq-end-title.defeat {
  color: #f43f5e;
  text-shadow: 0 0 16px rgba(244, 63, 94, 0.6);
}

.aq-rewards-grid {
  display: flex;
  gap: 12px;
  margin: 14px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.aq-reward-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pokemon-Style 4-Box Command Deck */
.aq-pokemon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.aq-pkmn-btn {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.aq-pkmn-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.aq-pkmn-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.aq-pkmn-btn.fight {
  border-color: rgba(244, 63, 94, 0.4);
}
.aq-pkmn-btn.fight:hover:not(:disabled) {
  border-color: #f43f5e;
  background: linear-gradient(180deg, #2d1622 0%, #0f172a 100%);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.35);
}

.aq-pkmn-btn.bag {
  border-color: rgba(245, 158, 11, 0.4);
}
.aq-pkmn-btn.bag:hover:not(:disabled) {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #2a1f11 0%, #0f172a 100%);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.aq-pkmn-btn.familiar {
  border-color: rgba(56, 189, 248, 0.4);
}
.aq-pkmn-btn.familiar:hover:not(:disabled) {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #112638 0%, #0f172a 100%);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.aq-pkmn-btn.run {
  border-color: rgba(148, 163, 184, 0.3);
}
.aq-pkmn-btn.run:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.aq-pkmn-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

/* FGO Noble Phantasm Full-Width Bar */
.aq-noble-phantasm-bar {
  width: 100%;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.aq-noble-phantasm-bar.ready {
  background: linear-gradient(90deg, #f59e0b, #ef4444, #a855f7, #f59e0b);
  background-size: 300% 100%;
  animation: aq-np-shimmer 2.5s ease infinite;
  border: 1.5px solid #fef08a;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.7);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.aq-noble-phantasm-bar.charging {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  color: #94a3b8;
  cursor: default;
}

@keyframes aq-np-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* FGO Boss Break Bar Diamonds */
.aq-break-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.aq-break-diamond {
  font-size: 11px;
  font-weight: 900;
  transition: all 0.3s ease;
}

.aq-break-diamond.active {
  color: #38bdf8;
  text-shadow: 0 0 8px #38bdf8;
}

.aq-break-diamond.shattered {
  color: #475569;
  opacity: 0.5;
}

/* Boss Enraged Aura Pulse */
@keyframes boss-enrage-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6)) drop-shadow(0 0 20px rgba(245, 158, 11, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(239, 68, 68, 0.9)) drop-shadow(0 0 35px rgba(245, 158, 11, 0.7));
  }
}

.aq-boss-enraged {
  animation: boss-enrage-pulse 1.5s ease-in-out infinite;
}

/* Cinematic Full-Screen Flash on Noble Phantasm */
.aq-np-flash-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.9) 0%, rgba(245, 158, 11, 0.7) 40%, rgba(239, 68, 68, 0.8) 100%);
  pointer-events: none;
  z-index: 50;
  opacity: 0;
}

@keyframes aq-np-flash-anim {
  0% { opacity: 0; }
  25% { opacity: 0.9; }
  60% { opacity: 0.7; }
  100% { opacity: 0; }
}

.aq-np-flash-overlay.active {
  animation: aq-np-flash-anim 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   CLIENT FUNCTIONS ONBOARDING GUIDED TUTORIAL
   ========================================================================== */

#client-app-tutorial-modal.modal-overlay {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  pointer-events: auto;
  overflow: hidden;
}

#client-app-tutorial-modal.active {
  display: flex !important;
}

.client-tutorial-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  mask: url(#tutorial-spotlight-mask);
  -webkit-mask: url(#tutorial-spotlight-mask);
  pointer-events: auto;
  z-index: 10000;
  transition: opacity 0.3s ease;
}

.client-tutorial-spotlight {
  position: fixed;
  box-sizing: border-box;
  border-radius: 12px;
  pointer-events: none;
  background: rgba(99, 102, 241, 0.04);
  box-shadow: 0 0 25px 4px rgba(99, 102, 241, 0.85),
              inset 0 0 16px rgba(99, 102, 241, 0.35);
  border: 2px solid rgba(129, 140, 248, 0.95);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10001;
}

.client-tutorial-spotlight.is-panning,
.client-tutorial-card.is-panning {
  transition: none !important;
}

.client-tutorial-card {
  position: fixed;
  max-width: 520px;
  width: calc(100% - 24px);
  max-height: min(540px, calc(100vh - 24px));
  max-height: min(540px, calc(100dvh - 24px));
  display: flex !important;
  flex-direction: column !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(99, 102, 241, 0.45) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.25) !important;
  padding: 18px 20px 16px 20px !important;
  z-index: 10002;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#client-app-tutorial-modal .client-tutorial-card {
  box-sizing: border-box !important;
  margin: 0 auto;
}

.client-tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  flex-shrink: 0 !important;
}

.client-tutorial-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-tutorial-category-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(129, 140, 248, 0.5);
  color: #a5b4fc;
}

.client-tutorial-step-counter {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
}

.jan-tutorial-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  margin-right: -4px;
  margin-bottom: 6px;
}

.jan-tutorial-body-scroll::-webkit-scrollbar {
  width: 5px;
}

.jan-tutorial-body-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.jan-tutorial-body-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 4px;
}

.jan-tutorial-body-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
}

.client-tutorial-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.client-tutorial-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  font-size: 17px;
  flex-shrink: 0;
}

.client-tutorial-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.client-tutorial-desc {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.client-tutorial-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-tutorial-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
}

.client-tutorial-bullet-item i {
  color: #10b981;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.client-tutorial-progress-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  margin: 6px 0 6px 0;
  flex-shrink: 0 !important;
}

.client-tutorial-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  cursor: pointer;
}

.client-tutorial-dot.active {
  width: 22px;
  border-radius: 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

.client-tutorial-dot.completed {
  background: #10b981;
}

.client-tutorial-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: auto;
  flex-shrink: 0 !important;
}

.client-tutorial-skip-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #64748b);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.client-tutorial-skip-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Jan Mascot Avatar Responsive Sizing (PC & Phone Conditions)
   ========================================================================== */

/* Base Default / PC Screen Dimensions (> 640px) */
.jan-tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  flex-shrink: 0 !important;
}

.jan-mascot-badge-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.jan-mascot-avatar-container {
  position: relative;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 50%;
}

.client-tutorial-card.is-welcome-step .jan-mascot-avatar-container {
  width: 84px;
  height: 84px;
}

.jan-mascot-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #818cf8;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.55), 0 0 28px rgba(168, 85, 247, 0.2);
  animation: janAvatarGlow 3s infinite ease-in-out;
  background: rgba(15, 23, 42, 0.8);
}

@keyframes janAvatarGlow {
  0%, 100% {
    border-color: #818cf8;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.55), 0 0 24px rgba(168, 85, 247, 0.2);
    transform: scale(1);
  }
  50% {
    border-color: #ec4899;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.7), 0 0 32px rgba(168, 85, 247, 0.35);
    transform: scale(1.03);
  }
}

.jan-mascot-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  background: #10b981;
  border: 2.5px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.jan-mascot-name {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.jan-mascot-role-pill {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
}

.client-tutorial-card.is-welcome-step .client-tutorial-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #e2e8f0;
  margin: 6px 0 12px 0;
}

/* --------------------------------------------------------------------------
   Phone Screen Dimensions (<= 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .jan-tutorial-header {
    margin-bottom: 9px;
    padding-bottom: 9px;
  }

  .jan-mascot-badge-group {
    gap: 10px;
  }

  .jan-mascot-avatar-container {
    width: 60px;
    height: 60px;
  }

  .client-tutorial-card.is-welcome-step .jan-mascot-avatar-container {
    width: 64px;
    height: 64px;
  }

  .jan-mascot-avatar-img {
    border-width: 2px;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
  }

  .jan-mascot-online-dot {
    width: 13px;
    height: 13px;
    bottom: 1px;
    right: 1px;
    border-width: 2px;
  }

  .jan-mascot-name {
    font-size: 14.5px;
  }

  .jan-mascot-role-pill {
    font-size: 8.5px;
    padding: 2px 6px;
  }

  .client-tutorial-category-badge {
    font-size: 9px;
    padding: 2px 8px;
  }

  .client-tutorial-card {
    padding: 14px 14px 12px 14px !important;
  }

  .client-tutorial-card.is-welcome-step .client-tutorial-desc {
    font-size: 12.5px;
    line-height: 1.5;
    margin: 4px 0 10px 0;
  }
}

/* --------------------------------------------------------------------------
   Compact Phone Screen Dimensions (<= 380px)
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .jan-mascot-badge-group {
    gap: 8px;
  }

  .jan-mascot-avatar-container {
    width: 52px;
    height: 52px;
  }

  .client-tutorial-card.is-welcome-step .jan-mascot-avatar-container {
    width: 56px;
    height: 56px;
  }

  .jan-mascot-online-dot {
    width: 11px;
    height: 11px;
  }

  .jan-mascot-name {
    font-size: 13.5px;
  }

  .jan-mascot-role-pill {
    font-size: 8px;
    padding: 2px 5px;
  }

  .client-tutorial-category-badge {
    font-size: 8.5px;
    padding: 2px 6px;
  }
}

.jan-protip-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0 10px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.jan-protip-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.jan-protip-content {
  font-size: 11px;
  line-height: 1.45;
  color: #e2e8f0;
}

.jan-protip-label {
  color: #fbbf24;
  font-weight: 700;
  margin-right: 4px;
}

.jan-protip-text {
  color: #f1f5f9;
}

body.light-theme .jan-tutorial-header {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .jan-mascot-name {
  color: #0f172a !important;
}

body.light-theme .jan-mascot-avatar-container .jan-mascot-online-dot {
  border-color: #ffffff !important;
}

body.light-theme .jan-protip-box {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(217, 119, 6, 0.4) !important;
}

body.light-theme .jan-protip-content {
  color: #334155 !important;
}

body.light-theme .jan-protip-text {
  color: #1e293b !important;
}

body.light-theme .jan-protip-label {
  color: #b45309 !important;
}

body.light-theme .client-tutorial-backdrop {
  background: rgba(15, 23, 42, 0.55) !important;
}

body.light-theme .client-tutorial-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 20px rgba(99, 102, 241, 0.15) !important;
}

body.light-theme .client-tutorial-title {
  color: #0f172a !important;
}

body.light-theme .client-tutorial-desc {
  color: #334155 !important;
}

body.light-theme .client-tutorial-bullet-item {
  color: #475569 !important;
}

body.light-theme .client-tutorial-header {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .client-tutorial-actions {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

@media (max-width: 640px) {
  .client-tutorial-card,
  #client-app-tutorial-modal .client-tutorial-card {
    max-width: calc(100vw - 20px) !important;
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 14px 14px 12px 14px !important;
    border-radius: 14px !important;
    margin: 0 auto;
  }
  .jan-close-btn {
    min-width: 36px !important;
    min-height: 36px !important;
  }
  .jan-action-btn,
  .jan-action-btn-primary {
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .client-tutorial-title {
    font-size: 15px !important;
  }
  .client-tutorial-desc {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }
  .jan-protip-box {
    padding: 6px 8px !important;
    margin: 6px 0 8px 0 !important;
  }
  .client-tutorial-card.in-game-dock {
    padding: 11px 13px 10px 13px !important;
    border-radius: 14px !important;
  }
  .client-tutorial-card.in-game-dock .jan-tutorial-header {
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
  }
  .client-tutorial-card.in-game-dock .client-tutorial-title-row {
    margin-bottom: 5px !important;
  }
  .client-tutorial-card.in-game-dock .client-tutorial-desc {
    margin-bottom: 6px !important;
  }
  .client-tutorial-card.in-game-dock .client-tutorial-actions {
    padding-top: 8px !important;
    margin-top: 6px !important;
  }
}

.client-tutorial-card.in-game-dock {
  border-color: rgba(99, 102, 241, 0.65) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 24px rgba(99, 102, 241, 0.3) !important;
}

/* ==========================================================================
   Full-Screen Game Loading Screen (Bleach Spiritual Reiatsu - Crimson / Dark Pink Theme)
   ========================================================================== */

.reiatsu-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 10100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #20040b 0%, #0d0105 50%, #020002 100%);
  color: #ffffff;
  box-sizing: border-box;
  padding: 24px 16px;
  overflow: hidden;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.reiatsu-loading-overlay.dissipate {
  opacity: 0 !important;
  transform: scale(1.04);
  pointer-events: none !important;
}

/* Ambient Reiatsu Spiritual Flames & Vignette */
.reiatsu-ambient-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 30, 86, 0.28) 0%, rgba(179, 0, 45, 0.15) 45%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: reiatsuAuraPulse 4s ease-in-out infinite alternate;
  z-index: 1;
}

.reiatsu-flames-backdrop {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(255, 30, 86, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255, 77, 121, 0.09), transparent);
  pointer-events: none;
  z-index: 1;
}

@keyframes reiatsuAuraPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* Main Container */
.reiatsu-loader-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 560px;
  height: 100%;
  max-height: 720px;
  margin: auto;
  box-sizing: border-box;
}

/* Header Brand Lockup */
.reiatsu-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.reiatsu-title {
  margin: 0;
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(26px, 6.5vw, 42px);
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.reiatsu-word-fitness-god {
  background: linear-gradient(180deg, #ffffff 0%, #ffa3b8 30%, #ff1e56 70%, #a30029 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 30, 86, 0.75));
  letter-spacing: 0.02em;
}

.reiatsu-word-quest {
  font-size: 0.38em;
  font-weight: 900;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 60%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.55));
  line-height: 1;
  text-transform: uppercase;
}

/* Fallback legacy classes */
.reiatsu-word-fitness {
  background: linear-gradient(180deg, #ffffff 20%, #fbcfe8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.reiatsu-word-god {
  margin-left: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #ffa3b8 20%, #ff1e56 60%, #a30029 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 30, 86, 0.7));
}

/* 2. Spirit Familiar & Summoning Array Stage */
.reiatsu-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  margin: 8px 0;
}

.reiatsu-magic-circle {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  animation: magicCircleRotate 20s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reiatsu-circle-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(255, 30, 86, 0.65));
}

@keyframes magicCircleRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.reiatsu-companion-wrapper {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: reiatsuFloat 3.8s ease-in-out infinite;
}

@keyframes reiatsuFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

.reiatsu-avatar-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 4, 11, 0.9) 0%, rgba(10, 1, 4, 0.98) 100%);
  border: 2px solid rgba(255, 77, 121, 0.6);
  box-shadow: 0 0 28px rgba(255, 30, 86, 0.5), inset 0 0 18px rgba(255, 30, 86, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
}

.reiatsu-companion-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 14px rgba(255, 30, 86, 0.5));
}

.reiatsu-companion-badge {
  margin-top: 10px;
  padding: 3px 12px;
  border-radius: 9999px;
  background: rgba(24, 3, 8, 0.92);
  border: 1px solid rgba(255, 77, 121, 0.5);
  font-family: var(--font-heading, sans-serif);
  font-size: 11px;
  font-weight: 700;
  color: #ff6b8b;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(255, 30, 86, 0.4);
}

.reiatsu-badge-sub {
  color: #fda4af;
  font-weight: 500;
  margin-left: 4px;
}

/* 3. Energy Progress Gauge Section */
.reiatsu-gauge-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reiatsu-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reiatsu-status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fce7f3;
}

.reiatsu-flame-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff1e56;
  box-shadow: 0 0 10px #ff1e56, 0 0 22px #b3002d;
  animation: reiatsuDotPulse 1.2s infinite alternate;
}

@keyframes reiatsuDotPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.reiatsu-percent {
  font-family: var(--font-heading, sans-serif);
  font-size: 14px;
  font-weight: 900;
  color: #ff6b8b;
  text-shadow: 0 0 12px rgba(255, 30, 86, 0.75);
}

.reiatsu-gauge-track {
  width: 100%;
  height: 14px;
  background: rgba(10, 1, 4, 0.9);
  border: 1px solid rgba(255, 77, 121, 0.55);
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 30, 86, 0.3);
  padding: 2px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.reiatsu-gauge-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #990024 0%, #ff1e56 50%, #ff7597 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 18px rgba(255, 30, 86, 0.9), 0 0 32px rgba(255, 107, 139, 0.5);
  position: relative;
  transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  animation: reiatsuFillShimmer 2.4s linear infinite;
}

@keyframes reiatsuFillShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.reiatsu-gauge-flare {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 16px;
  background: #ffffff;
  filter: blur(3px);
  opacity: 0.9;
}

/* 4. Timeout / Offline Fallback */
.reiatsu-timeout-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  text-align: center;
}

.reiatsu-timeout-msg {
  font-size: 11px;
  color: #fbcfe8;
}

.reiatsu-continue-btn {
  font-size: 12px !important;
  padding: 6px 14px !important;
  background: linear-gradient(135deg, rgba(255, 30, 86, 0.22), rgba(179, 0, 45, 0.32)) !important;
  border-color: rgba(255, 77, 121, 0.55) !important;
  color: #ffa3b8 !important;
  box-shadow: 0 0 14px rgba(255, 30, 86, 0.3);
}

.reiatsu-continue-btn:hover {
  background: linear-gradient(135deg, rgba(255, 30, 86, 0.35), rgba(179, 0, 45, 0.45)) !important;
}

@media (max-width: 480px) {
  .reiatsu-loading-overlay {
    padding: 18px 12px;
  }
  .reiatsu-stage {
    min-height: 160px;
    margin: 8px 0;
  }
  .reiatsu-avatar-ring {
    width: 88px;
    height: 88px;
    padding: 10px;
  }
  .reiatsu-magic-circle {
    width: 170px;
    height: 170px;
  }
}

/* ================= PARTNER LOCATIONS REGISTRY REDESIGN ================= */
.partner-locations-modal-container {
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: var(--border-radius-lg, 16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(225, 29, 72, 0.1);
}

.partner-modal-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 0;
}

.partner-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary, #e11d48);
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.2);
  flex-shrink: 0;
}

.partner-search-toolbar {
  padding: 12px 20px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.partner-search-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.partner-search-icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
}

.partner-search-input {
  width: 100%;
  padding: 8px 34px 8px 36px !important;
  font-size: 12.5px !important;
  height: 36px !important;
  border-radius: var(--border-radius-md, 8px) !important;
  background: rgba(20, 24, 33, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-main, #ffffff) !important;
  transition: all 0.2s ease;
}

.partner-search-input:focus {
  border-color: var(--accent-primary, #e11d48) !important;
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.25) !important;
}

.partner-search-clear {
  position: absolute;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.partner-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.partner-filter-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
}

.partner-tab {
  padding: 4px 12px !important;
  font-size: 11.5px !important;
  border-radius: 20px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary, #94a3b8) !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

.partner-tab:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-main, #ffffff) !important;
}

.partner-tab.active {
  background: rgba(225, 29, 72, 0.16) !important;
  border-color: var(--accent-primary, #e11d48) !important;
  color: white !important;
  font-weight: 600 !important;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.2) !important;
}

.partner-tab.active.selected-tab {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2) !important;
}

.partner-registry-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  max-height: 52vh;
}

.partner-gym-card {
  padding: 14px;
  border-radius: var(--border-radius-md, 10px);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.partner-gym-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.partner-gym-card.is-selected {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}

.partner-gym-card.is-selected:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.5);
}

.partner-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.partner-gym-brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.partner-gym-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary, #e11d48);
  flex-shrink: 0;
  margin-top: 1px;
}

.partner-gym-card.is-selected .partner-gym-avatar {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.partner-gym-info {
  flex: 1;
}

.partner-gym-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.partner-gym-name {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.partner-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.partner-meta-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.partner-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-secondary, #94a3b8);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.partner-meta-pill.highlight {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

.partner-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.partner-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #64748b);
}

.partner-equipment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.partner-eq-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  color: #e2e8f0;
}

.partner-eq-tag .eq-tag-brand {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.partner-expand-toggle {
  background: none;
  border: none;
  padding: 2px 4px;
  color: var(--text-muted, #94a3b8);
  font-size: 10.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  transition: color 0.15s ease;
  margin-top: 2px;
}

.partner-expand-toggle:hover {
  color: #ffffff;
}

.partner-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 2px;
  flex-wrap: wrap;
}

.partner-preview-btn {
  padding: 5px 11px !important;
  font-size: 11px !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
  background: rgba(99, 102, 241, 0.08) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  border-radius: var(--border-radius-sm, 6px) !important;
}

.partner-preview-btn:hover {
  background: rgba(99, 102, 241, 0.18) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
  color: #ffffff !important;
}

.partner-toggle-btn {
  padding: 5px 13px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  border-radius: var(--border-radius-sm, 6px) !important;
}

.partner-toggle-btn.is-added {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.partner-toggle-btn.is-added:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.partner-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
}

.partner-footer-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
}

.partner-footer-stats .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

/* ==========================================================================
   FITNESS GOD QUEST — IDLE GAME MODULE & HUD SHADERS
   ========================================================================== */

/* Full-Screen Consumable HUD Shaders */
body.shader-dry-scoop {
  position: relative;
}

body.shader-dry-scoop::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 99998;
  box-shadow: inset 0 0 60px rgba(239, 68, 68, 0.45);
  animation: pulseDryScoop 1.2s infinite ease-in-out;
}

@keyframes pulseDryScoop {
  0%, 100% {
    box-shadow: inset 0 0 40px rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: inset 0 0 90px rgba(239, 68, 68, 0.65);
  }
}

body.shader-cold-plunge::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 99998;
  box-shadow: inset 0 0 70px rgba(56, 189, 248, 0.5);
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(56, 189, 248, 0.15) 100%);
  animation: pulseColdPlunge 2s infinite ease-in-out;
}

@keyframes pulseColdPlunge {
  0%, 100% {
    box-shadow: inset 0 0 50px rgba(56, 189, 248, 0.35);
  }
  50% {
    box-shadow: inset 0 0 85px rgba(56, 189, 248, 0.6);
  }
}

body.shader-salts::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 99998;
  background: rgba(251, 191, 36, 0.12);
  box-shadow: inset 0 0 80px rgba(245, 158, 11, 0.6);
  animation: shockwaveSalts 0.3s ease-out;
}

@keyframes shockwaveSalts {
  0% { opacity: 0; transform: scale(1.02); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.8; }
}

/* Idle Game Canvas and Floating Elements */
#idle-gym-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
}

.idle-dashboard-wrapper {
  animation: fadeInIdle 0.3s ease;
}

.idle-canvas-container.rpg-scroller-wrapper {
  position: relative;
  width: 100%;
  height: clamp(560px, 72vh, 660px);
  height: clamp(560px, 72dvh, 660px);
  min-height: 560px;
  background: #090d16;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(0, 0, 0, 0.85);
  user-select: none;
  transition: height 0.22s ease;
}

/* Responsive Active Workout Bar Avoidance for Game Viewport */
body.has-minimized-workout .idle-canvas-container.rpg-scroller-wrapper,
body:has(#live-workout-bar:not([style*="display: none"])) .idle-canvas-container.rpg-scroller-wrapper {
  height: clamp(480px, calc(72vh - 68px), 592px);
  height: clamp(480px, calc(72dvh - 68px), 592px);
  min-height: 480px;
}

.idle-topbar-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  min-height: 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* ==========================================================================
   MODERN MOBILE IDLE IN-CANVAS FLOATING HUD & ACTION RAILS
   ========================================================================== */

/* Left and Right Floating Action Rails */
.idle-floating-rail-left,
.idle-floating-rail-right {
  position: absolute;
  top: 160px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.idle-floating-rail-left {
  left: 8px;
}

.idle-floating-rail-right {
  right: 8px;
}

.idle-floating-rail-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  outline: none;
}

.idle-floating-rail-btn:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.idle-floating-rail-btn:active {
  transform: scale(0.92);
}

.idle-rail-icon {
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idle-rail-label {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-top: 2px;
  line-height: 1;
}

.idle-rail-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ec4899;
  color: white;
  border-radius: 10px;
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 4px;
  border: 1px solid white;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.6);
}

/* Individual Rail Button Themes */
.idle-rail-wod,
.idle-rail-ccc {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(236, 72, 153, 0.25), rgba(15, 23, 42, 0.95));
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
  position: relative;
}
.idle-rail-wod .idle-rail-label,
.idle-rail-ccc .idle-rail-label {
  color: #6ee7b7;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.idle-rail-wod:hover,
.idle-rail-ccc:hover {
  border-color: #34d399;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.6), 0 0 24px rgba(236, 72, 153, 0.4);
}

@keyframes cccRailUnveil {
  0% {
    opacity: 0;
    transform: scale(0.6) translateX(-10px);
  }
  60% {
    transform: scale(1.08) translateX(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

.idle-rail-ccc.ccc-unveiled {
  animation: cccRailUnveil 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.idle-rail-sweep {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.9));
  border-color: rgba(245, 158, 11, 0.45);
}
.idle-rail-sweep .idle-rail-label { color: #fbbf24; }
.idle-rail-sweep:hover { border-color: #f59e0b; box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }

.idle-rail-pvp {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(15, 23, 42, 0.9));
  border-color: rgba(239, 68, 68, 0.45);
}
.idle-rail-pvp .idle-rail-label { color: #f87171; }
.idle-rail-pvp:hover { border-color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }

.idle-rail-spec {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(15, 23, 42, 0.9));
  border-color: rgba(168, 85, 247, 0.45);
}
.idle-rail-spec .idle-rail-label { color: #c084fc; }
.idle-rail-spec:hover { border-color: #a855f7; box-shadow: 0 0 12px rgba(168, 85, 247, 0.5); }

.idle-rail-autotrainer {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(15, 23, 42, 0.9));
  border-color: rgba(16, 185, 129, 0.45);
}
.idle-rail-autotrainer .idle-rail-label { color: #6ee7b7; }
.idle-rail-autotrainer:hover { border-color: #10b981; box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }

.idle-rail-anvil {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.9));
  border-color: rgba(245, 158, 11, 0.35);
}
.idle-rail-anvil .idle-rail-label { color: #fde047; }
.idle-rail-anvil:hover { border-color: #eab308; box-shadow: 0 0 12px rgba(234, 179, 8, 0.4); }

.idle-rail-relic {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(15, 23, 42, 0.9));
  border-color: rgba(234, 179, 8, 0.35);
}
.idle-rail-relic .idle-rail-label { color: #fef08a; }
.idle-rail-relic:hover { border-color: #eab308; box-shadow: 0 0 12px rgba(234, 179, 8, 0.4); }

.idle-rail-deload {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(15, 23, 42, 0.9));
  border-color: rgba(239, 68, 68, 0.35);
}
.idle-rail-deload .idle-rail-label { color: #fca5a5; }
.idle-rail-deload:hover { border-color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.4); }

.idle-rail-codex {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(15, 23, 42, 0.9));
  border-color: rgba(6, 182, 212, 0.4);
}
.idle-rail-codex .idle-rail-label { color: #67e8f9; }
.idle-rail-codex:hover { border-color: #06b6d4; box-shadow: 0 0 14px rgba(6, 182, 212, 0.5); }

.idle-rail-buffs {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(15, 23, 42, 0.9));
  border-color: rgba(168, 85, 247, 0.45);
}
.idle-rail-buffs .idle-rail-label { color: #c084fc; }
.idle-rail-buffs:hover { border-color: #a855f7; box-shadow: 0 0 14px rgba(168, 85, 247, 0.5); }


/* Breakthrough & Top In-Canvas HUD */
.idle-canvas-breakthrough-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.idle-canvas-breakthrough-pill:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
}

.idle-canvas-breakthrough-pill.ready {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fbbf24;
  color: white;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
  animation: pulseGlow 1.5s infinite alternate;
}

.idle-canvas-breakthrough-pill.max {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  cursor: default;
}

/* Bottom Canvas Controls & Combined Stage Radar Dock */
.idle-bottom-canvas-dock {
  position: absolute;
  bottom: calc(14px + var(--idle-workout-bar-overlap, 0px));
  left: 8px;
  right: 8px;
  z-index: 23;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  transition: bottom 0.2s ease;
}

/* In-game Floating Proximity Prompt & Subtab Viewport Clearance */
#gym-scroller-prompt {
  bottom: calc(84px + var(--idle-workout-bar-overlap, 0px));
  transition: bottom 0.2s ease;
}

#idle-subtab-viewport {
  bottom: calc(8px + var(--idle-workout-bar-overlap, 0px));
  transition: bottom 0.2s ease;
}

.idle-canvas-top-hud {
  position: absolute;
  top: 104px;
  right: 8px;
  z-index: 24;
  pointer-events: auto;
}

/* On-Demand Idle Accrual Claims Pill (Stacked directly above Minimap Dock) */
.idle-minimap-claim-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  min-height: 28px;
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 10px rgba(245, 158, 11, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.idle-minimap-claim-pill:hover {
  border-color: rgba(245, 158, 11, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px) scale(1.02);
}

.idle-minimap-claim-pill:active {
  transform: scale(0.98);
}

.idle-minimap-claim-pill.has-gains {
  border-color: rgba(245, 158, 11, 0.75);
  animation: minimapGlowPulse 2.4s infinite alternate;
}

.idle-minimap-claim-pill.is-capped {
  border-color: rgba(239, 68, 68, 0.85);
  background: rgba(28, 14, 20, 0.96);
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.4), 0 0 16px rgba(239, 68, 68, 0.3);
  animation: capAlertPulse 1.4s infinite alternate;
}

@keyframes capAlertPulse {
  0% {
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3), 0 0 10px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
  }
  100% {
    box-shadow: 0 4px 22px rgba(239, 68, 68, 0.7), 0 0 20px rgba(239, 68, 68, 0.5);
    border-color: #ef4444;
  }
}

@keyframes minimapGlowPulse {
  0% {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 10px rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
  }
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.5);
    border-color: rgba(245, 158, 11, 0.9);
  }
}

.idle-claim-pill-icon {
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.idle-claim-pill-icon.icon-alert {
  font-size: 12.5px;
  font-weight: 900;
  color: #ef4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.9));
  animation: alertBounce 1.1s infinite ease-in-out;
}

@keyframes alertBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.idle-claim-pill-val-juice {
  font-size: 10.5px;
  font-weight: 800;
  color: #ffffff;
}

.idle-claim-pill-val-sauce {
  font-size: 10.5px;
  font-weight: 800;
  color: #38bdf8;
}

.idle-claim-cap-badge {
  font-size: 9px;
  font-weight: 800;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 1px 5px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

.idle-claim-cap-badge.cap-full {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  animation: capFullPulse 1.2s infinite alternate;
}

@keyframes capFullPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Combined Stage Navigator & Radar Pill */
.idle-stage-radar-dock {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(99, 102, 241, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.idle-stage-radar-dock:hover {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(99, 102, 241, 0.4);
}

.idle-stage-arrow-btn {
  padding: 0;
  width: 24px;
  height: 26px;
  min-width: 24px;
  font-size: 11px;
  color: #a5b4fc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
}

.idle-stage-arrow-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  transform: scale(1.08);
}

.idle-stage-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.idle-stage-radar-trigger-btn {
  background: transparent;
  border: none;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: white;
  border-radius: 8px;
  transition: background 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.idle-stage-radar-trigger-btn:hover {
  background: rgba(99, 102, 241, 0.18);
  transform: translateY(-1px);
}

.idle-stage-radar-trigger-btn:active {
  transform: scale(0.97);
}

.idle-stage-radar-icon {
  font-size: 13px;
  line-height: 1;
}

.idle-stage-name-text {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.idle-radar-expand-badge {
  font-size: 10px;
  font-weight: 900;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: 4px;
  padding: 1px 4px;
  line-height: 1;
  transition: all 0.15s ease;
}

.idle-stage-radar-trigger-btn:hover .idle-radar-expand-badge {
  background: rgba(99, 102, 241, 0.45);
  border-color: #818cf8;
  color: #ffffff;
}

/* ==========================================================================
   FUN WORLD MICRO LOADING BAR & CLOUD SYNC STATUS SYSTEM
   ========================================================================== */

.idle-micro-loading-container {
  position: absolute;
  bottom: var(--idle-workout-bar-overlap, 0px);
  left: 0;
  right: 0;
  z-index: 35;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: opacity 0.25s ease, bottom 0.2s ease;
}

.idle-micro-loading-line-wrap {
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

.idle-micro-loading-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc, #ec4899, #38bdf8);
  background-size: 200% 100%;
  animation: microLoadingShimmer 1.4s infinite linear;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.idle-micro-loading-bar.success {
  background: linear-gradient(90deg, #10b981, #34d399, #10b981);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: none;
}

.idle-micro-loading-bar.error {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  animation: none;
}

.idle-micro-loading-pill {
  pointer-events: auto;
  margin-left: 12px;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, border-color 0.2s ease;
}

.idle-micro-loading-pill.hidden {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.idle-micro-loading-pill.success {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(16, 185, 129, 0.35);
}

.idle-micro-loading-pill.error {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(245, 158, 11, 0.35);
}

.idle-micro-loading-icon {
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  animation: microPillPulse 1.2s infinite ease-in-out;
}

.idle-micro-loading-pill.success .idle-micro-loading-icon,
.idle-micro-loading-pill.error .idle-micro-loading-icon {
  animation: none;
}

.idle-micro-loading-label {
  font-size: 10px;
  font-weight: 800;
  color: #e0f2fe;
  font-family: inherit;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.idle-micro-loading-pill.success .idle-micro-loading-label {
  color: #a7f3d0;
}

.idle-micro-loading-pill.error .idle-micro-loading-label {
  color: #fde68a;
}

/* Modal-level micro loading lines */
.modal-micro-loading-bar,
.customizer-modal-micro-bar {
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc, #ec4899, #38bdf8);
  background-size: 200% 100%;
  animation: microLoadingShimmer 1.4s infinite linear;
  border-radius: 2px;
  margin-top: 6px;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

@keyframes microLoadingShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes microPillPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .idle-micro-loading-bar,
  .modal-micro-loading-bar,
  .customizer-modal-micro-bar {
    animation: none;
    background-position: 0 0;
  }
  .idle-micro-loading-icon {
    animation: none;
  }
}

@media (max-width: 480px) {
  .idle-canvas-container.rpg-scroller-wrapper {
    height: clamp(520px, 75vh, 600px);
    height: clamp(520px, 75dvh, 600px);
    min-height: 520px;
  }

  body.has-minimized-workout .idle-canvas-container.rpg-scroller-wrapper,
  body:has(#live-workout-bar:not([style*="display: none"])) .idle-canvas-container.rpg-scroller-wrapper {
    height: clamp(430px, calc(100vh - 208px), 532px);
    height: clamp(430px, calc(100dvh - 208px), 532px);
    min-height: 430px;
  }

  .idle-floating-rail-left,
  .idle-floating-rail-right {
    top: 154px;
  }
  .idle-floating-rail-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .idle-rail-icon {
    font-size: 14px;
  }
  .idle-rail-label {
    font-size: 7.5px;
  }
  .idle-bottom-canvas-dock {
    bottom: calc(12px + var(--idle-workout-bar-overlap, 0px));
    left: 6px;
    right: 6px;
  }
  .idle-stage-name-text {
    max-width: 120px;
    font-size: 10px;
  }
  .idle-stage-arrow-btn {
    width: 22px;
    height: 24px;
    min-width: 22px;
    font-size: 10px;
  }
}

.idle-topbar-hud::-webkit-scrollbar {
  display: none;
}

.idle-topbar-pill {
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  user-select: none;
  flex-shrink: 0;
}

.idle-topbar-pill:hover {
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .idle-topbar-hud {
    padding: 3px 6px;
    gap: 4px;
  }
}

.idle-subnav-hub-wrapper {
  animation: fadeInIdle 0.2s ease;
}

/* ==========================================================================
   IDLE GAME: MICRO HUB & SUBTAB EXPANDABLE NAVIGATION BUTTONS
   ========================================================================== */
.idle-micro-dock-wrapper {
  animation: fadeInIdle 0.2s ease;
  user-select: none;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.idle-micro-hub-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  width: 100%;
}

.idle-micro-subtab-row {
  display: flex;
  align-items: center;
  justify-content: safe center;
  gap: 4px;
  overflow-x: auto;
  padding: 1px 0;
  max-width: 100%;
  scrollbar-width: none;
}

.idle-micro-subtab-row::-webkit-scrollbar {
  display: none;
}

.idle-micro-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 28px;
  min-width: 28px;
  max-width: 28px;
  padding: 0 7px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  transition: 
    max-width 0.26s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.26s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
  flex-shrink: 0;
}

.idle-micro-nav-btn .micro-btn-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.idle-micro-nav-btn .micro-btn-icon i,
.idle-micro-nav-btn .micro-btn-icon svg {
  width: 13px;
  height: 13px;
  display: block;
}

.idle-micro-nav-btn .micro-btn-label {
  opacity: 0;
  max-width: 0;
  transform: translateX(-4px);
  margin-left: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #f8fafc;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
  transition: 
    opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.26s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    margin-left 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Expansion Behavior */
.idle-micro-nav-btn:hover {
  max-width: 180px;
  padding: 0 9px 0 7px;
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(168, 85, 247, 0.25);
  transform: translateY(-1px);
  z-index: 5;
}

.idle-micro-nav-btn:hover .micro-btn-label {
  opacity: 1;
  max-width: 140px;
  transform: translateX(0);
  margin-left: 6px;
}

.idle-micro-nav-btn:hover .micro-btn-icon {
  transform: scale(1.1);
  color: #c084fc;
}

/* Active Category State */
.idle-micro-nav-btn.active-category {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.4));
  border: 1.5px solid #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
  color: #ffffff;
}

.idle-micro-nav-btn.active-category .micro-btn-icon {
  color: #f3e8ff;
}

/* Subtab Micro Button Adjustments */
.idle-micro-nav-btn.idle-micro-sub-btn {
  height: 25px;
  min-width: 25px;
  max-width: 25px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.idle-micro-nav-btn.idle-micro-sub-btn .micro-btn-icon {
  width: 11.5px;
  height: 11.5px;
  color: #94a3b8;
}

.idle-micro-nav-btn.idle-micro-sub-btn .micro-btn-icon i,
.idle-micro-nav-btn.idle-micro-sub-btn .micro-btn-icon svg {
  width: 11.5px;
  height: 11.5px;
  display: block;
}

.idle-micro-nav-btn.idle-micro-sub-btn .micro-btn-label {
  font-size: 10px;
  font-weight: 700;
}

.idle-micro-nav-btn.idle-micro-sub-btn:hover {
  max-width: 170px;
  padding: 0 8px 0 6px;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 0 8px rgba(56, 189, 248, 0.25);
}

.idle-micro-nav-btn.idle-micro-sub-btn:hover .micro-btn-icon {
  color: #38bdf8;
}

/* Active Subtab State */
.idle-micro-nav-btn.idle-micro-sub-btn.active-subtab {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.3));
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
  color: #f8fafc;
}

.idle-micro-nav-btn.idle-micro-sub-btn.active-subtab .micro-btn-icon {
  color: #38bdf8;
}

@media (prefers-reduced-motion: reduce) {
  .idle-micro-nav-btn,
  .idle-micro-nav-btn .micro-btn-label,
  .idle-micro-nav-btn .micro-btn-icon {
    transition: none !important;
  }
}

.idle-hub-category-grid button {
  transition: all 0.18s ease;
}

.idle-hub-category-grid button:hover {
  transform: translateY(-1px);
}

.idle-hub-subswitcher button {
  transition: all 0.18s ease;
}

.idle-hub-subswitcher button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.idle-physio-core-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.idle-physio-tile {
  user-select: none;
}

.idle-physio-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.6);
}

@media (max-width: 480px) {
  .idle-physio-core-grid {
    gap: 8px;
  }
  .idle-physio-tile {
    padding: 10px !important;
  }
}

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

/* ==========================================================================
   FULL BODY MUSCLE DIAGRAM, SUB-STATS & PHYSIOLOGICAL HEALTH STYLES
   ========================================================================== */

.muscle-diagram-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInIdle 0.25s ease-out;
}

.anatomy-svg-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 10px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.anatomy-body-svg .muscle-path {
  cursor: pointer;
  stroke-width: 1.2;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.anatomy-body-svg .muscle-path:hover {
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9)) brightness(1.28);
  stroke: #ffffff !important;
  stroke-width: 1.8 !important;
}

.anatomy-body-svg .organ-hotspot-brain {
  cursor: pointer;
  animation: pulseBrainGlow 2.4s infinite ease-in-out;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.anatomy-body-svg .organ-hotspot-brain:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 12px #8b5cf6) brightness(1.3);
}

@keyframes pulseBrainGlow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.5));
    opacity: 0.88;
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.95));
    opacity: 1;
  }
}

.anatomy-body-svg .organ-hotspot-heart {
  cursor: pointer;
  animation: pulseHeartBeat 1.4s infinite ease-in-out;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.anatomy-body-svg .organ-hotspot-heart:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 14px #ef4444) brightness(1.35);
}

@keyframes pulseHeartBeat {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.5));
  }
  15% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.9));
  }
  30% {
    transform: scale(1.02);
  }
  45% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 16px rgba(239, 68, 68, 1));
  }
  60% {
    transform: scale(1);
  }
}

/* Sub-stat Upgrade Progression Cards */
.substat-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.substat-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Exercise Progression Ladder */
.exercise-ladder-item {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.55);
  transition: all 0.2s ease;
}

.exercise-ladder-item.unlocked:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
}

.exercise-ladder-item.locked {
  opacity: 0.65;
  border-style: dashed;
  background: rgba(15, 23, 42, 0.35);
}

.exercise-ladder-item.active-exercise {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

/* Cognitive & Cardio HUD Cards */
.neuro-cardio-hud-card {
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.neuro-cardio-hud-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   FGQ AVATAR STATIC IDLE DISPLAY SYSTEM
   ========================================================================== */
.fgq-animated-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 350px;
  max-height: 512px;
  margin: 0 auto;
}

.fgq-avatar-frame {
  position: relative;
  height: 100%;
  aspect-ratio: 1376 / 3084;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.fgq-avatar-idle-img {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Interactive Gender Selection Cards (Onboarding & FUN World Modal) */
.fgq-gender-card {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.fgq-gender-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.fgq-gender-card.selected {
  border-color: var(--accent-primary, #6366f1) !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4), inset 0 0 15px rgba(99, 102, 241, 0.15) !important;
}

.fgq-gender-card .fgq-gender-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.fgq-gender-card.selected .fgq-gender-badge {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
}

.fgq-gender-card .fgq-gender-check-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 11px;
  font-weight: 900;
  transition: all 0.2s ease;
}

.fgq-gender-card.selected .fgq-gender-check-icon {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: white;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.fgq-gender-preview-box {
  width: 100%;
  height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.95) 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Composite Avatar Overlay & Eye Customization Styles */
.fgq-composite-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fgq-avatar-top-overlay-wrap {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fgq-avatar-top-img {
  width: 100%;
  object-fit: contain;
  display: block;
}

.fgq-avatar-eye-overlay-wrap {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  transition: all 0.25s ease;
}

.fgq-avatar-eye-img {
  width: 100%;
  object-fit: contain;
  display: block;
}

.fgq-avatar-mouth-img {
  width: 100%;
  object-fit: contain;
  display: block;
}

/* Athlete Equipment Subtab & Modal Layouts */
.athlete-equipment-subtab-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.athlete-equipment-avatar-hero {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  width: 100%;
  box-sizing: border-box;
}

/* Character Appearance Customizer Portrait Modal Styles */
.character-customizer-modal-content {
  width: 95% !important;
  max-width: 480px !important;
  max-height: min(90vh, 640px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 14px 14px 8px 14px !important;
  border-radius: var(--border-radius-lg, 16px) !important;
  text-align: left !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.customizer-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  padding-bottom: 8px;
  margin-bottom: 2px;
}

.customizer-modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customizer-modal-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.customizer-modal-title {
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  color: white;
  line-height: 1.2;
}

.customizer-modal-subtitle {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  display: block;
  margin-top: 1px;
}

/* Split Hero Preview Banner */
.customizer-portrait-hero {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  align-items: center;
  box-sizing: border-box;
}

.customizer-avatar-preview-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.customizer-avatar-mini-box {
  width: 92px;
  height: 124px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}

.customizer-zoom-toggle-btn {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  z-index: 8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.customizer-zoom-toggle-btn:hover,
.customizer-zoom-toggle-btn.active {
  background: rgba(6, 182, 212, 0.25);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.5);
}

.customizer-hero-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.customizer-hero-tag-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.customizer-badge-base {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  background: rgba(99, 102, 241, 0.18) !important;
  color: #a5b4fc !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  padding: 2px 7px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  max-width: 100% !important;
}

.customizer-badge-eye {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  background: rgba(6, 182, 212, 0.18) !important;
  color: #67e8f9 !important;
  border: 1px solid rgba(6, 182, 212, 0.35) !important;
  padding: 2px 7px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  max-width: 100% !important;
}

.customizer-badge-mouth {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  background: rgba(168, 85, 247, 0.18) !important;
  color: #d8b4fe !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  padding: 2px 7px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  max-width: 100% !important;
}

.customizer-gear-shortcut-btn {
  padding: 5px 8px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: rgba(225, 29, 72, 0.14) !important;
  border: 1px solid rgba(225, 29, 72, 0.32) !important;
  color: #fda4af !important;
  border-radius: 6px !important;
  margin-top: 2px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.customizer-gear-shortcut-btn:hover {
  background: rgba(225, 29, 72, 0.25) !important;
  color: #fff !important;
}

/* Controls Container */
.customizer-controls-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customizer-feature-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.customizer-feature-btn {
  padding: 7px 8px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: 8px !important;
}

.customizer-panel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customizer-cat-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}

.customizer-cat-pill {
  padding: 4px 6px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  border-radius: 6px !important;
}

.customizer-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.customizer-grid-label {
  font-size: 10.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-weight: 700 !important;
  color: var(--text-secondary, #94a3b8) !important;
  margin: 0 !important;
}

.customizer-active-archetype-tag {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  max-width: 140px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.customizer-active-archetype-tag.eye-tag {
  color: #38bdf8 !important;
  background: rgba(6, 182, 212, 0.15) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

.customizer-active-archetype-tag.mouth-tag {
  color: #c084fc !important;
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

/* Options Grid */
.customizer-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-height: 185px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  box-sizing: border-box;
  touch-action: pan-y;
}

.customizer-options-grid::-webkit-scrollbar {
  width: 4px;
}

.customizer-options-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.customizer-options-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.customizer-desc-box {
  font-size: 10.5px !important;
  color: var(--text-secondary, #94a3b8) !important;
  font-style: italic !important;
  background: rgba(255, 255, 255, 0.03) !important;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  min-height: 18px !important;
  line-height: 1.3 !important;
}

/* Footer Actions */
.customizer-modal-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
  position: sticky;
  bottom: -8px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.98) 40%, rgba(15, 23, 42, 1) 100%);
  backdrop-filter: blur(8px);
  padding-top: 6px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  z-index: 10;
}

.customizer-cancel-btn {
  flex: 1 !important;
  padding: 9px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.customizer-save-btn {
  flex: 2 !important;
  padding: 9px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
}

/* Athlete Equipment Modal & Slot Cards */
.athlete-equipment-avatar-hero {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.athlete-equipment-stage-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  min-height: 270px;
  margin: 0 auto;
  box-sizing: border-box;
}

.athlete-equipment-avatar-box {
  width: 110px !important;
  height: 230px !important;
  max-width: 110px !important;
  max-height: 230px !important;
  min-height: 230px !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  z-index: 5 !important;
  align-self: center !important;
  margin-left: 2px !important;
}

.athlete-equipment-avatar-box .fgq-composite-avatar {
  width: 100% !important;
  height: 100% !important;
  max-height: 230px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.athlete-equipment-avatar-box .fgq-avatar-frame {
  height: 230px !important;
  max-height: 230px !important;
  aspect-ratio: 1376 / 3084 !important;
  width: auto !important;
  max-width: 110px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
}

.athlete-equipment-avatar-box .fgq-avatar-idle-img {
  height: 230px !important;
  max-height: 230px !important;
  width: auto !important;
  max-width: 110px !important;
  object-fit: contain !important;
}

.equipment-slot-dock {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 15;
  width: 36px;
  flex-shrink: 0;
  align-self: center;
}

.equipment-slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  padding: 0;
  height: 34px;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
  box-sizing: border-box;
  outline: none;
}

.equipment-slot-btn:hover,
.equipment-slot-btn:focus-visible {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(99, 102, 241, 0.6);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
  z-index: 20;
}

.equipment-slot-btn.active-slot {
  border-color: #818cf8;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45) 0%, rgba(168, 85, 247, 0.35) 100%);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.5), inset 0 0 8px rgba(99, 102, 241, 0.3);
  transform: scale(1.1);
}

.equipment-slot-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  font-size: 15px;
}

.equipment-slot-btn.active-slot .equipment-slot-btn-icon {
  color: #ffffff;
}

/* Right Side Inventory Side Panel */
.equipment-inventory-side-panel {
  flex: 1;
  min-width: 0;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 250px;
  max-height: 270px;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.equipment-inventory-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
  flex-shrink: 0;
}

.equipment-inventory-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.equipment-inventory-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.equipment-star-filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.star-filter-btn {
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
}

.star-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.star-filter-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #e0e7ff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

/* Inventory Item Icons Grid */
.equipment-icon-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)) !important;
  gap: 8px !important;
  max-height: 190px !important;
  overflow-y: auto !important;
  padding-right: 2px !important;
  align-content: start !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.equipment-icon-grid::-webkit-scrollbar {
  width: 4px;
}
.equipment-icon-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.equipment-icon-tile {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  max-width: 64px !important;
  max-height: 64px !important;
  background: rgba(30, 41, 59, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  padding: 4px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  min-width: 0 !important;
  touch-action: manipulation !important;
}

.equipment-icon-tile:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.equipment-icon-tile.is-equipped {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.equipment-icon-tile-thumb {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.equipment-icon-tile-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: 82% !important;
  max-height: 82% !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.equipment-icon-tile-stars {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7.5px;
  color: #fbbf24;
  letter-spacing: -1px;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  pointer-events: none;
}

.equipment-icon-tile-equipped-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  pointer-events: none;
}

/* Exploded Item Detail View */
.equipment-exploded-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  justify-content: space-between;
  animation: fadeIn 0.2s ease-out;
  overflow: hidden;
}

.equipment-exploded-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
  flex-shrink: 0;
}

.equipment-exploded-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.equipment-exploded-back-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
}

.equipment-exploded-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.equipment-exploded-thumb {
  width: 52px !important;
  height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  font-size: 24px;
  overflow: hidden !important;
  box-sizing: border-box;
}

.equipment-exploded-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: 84% !important;
  max-height: 84% !important;
  object-fit: contain !important;
  display: block !important;
}

.equipment-exploded-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.equipment-exploded-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipment-exploded-stars {
  color: #fbbf24;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.equipment-exploded-bonus {
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
}

.equipment-exploded-desc {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
  margin: 0;
  overflow-y: auto;
  max-height: 60px;
}

.equipment-exploded-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  flex-shrink: 0;
}

@media (max-width: 580px) {
  .athlete-equipment-stage-wrapper {
    flex-wrap: wrap;
    justify-content: center;
  }
  .equipment-inventory-side-panel {
    width: 100%;
    min-width: 100%;
  }
}

.equipment-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 440px) {
  .equipment-slots-grid {
    grid-template-columns: 1fr;
  }
}

.equipment-slot-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
  min-width: 0;
  box-sizing: border-box;
}

.equipment-slot-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.equipment-slot-card.active-slot {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.15) 100%);
  border-color: #818cf8;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.equipment-slot-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #a5b4fc;
  flex-shrink: 0;
}

.equipment-slot-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.equipment-slot-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.equipment-slot-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipment-items-drawer {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.equipment-item-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
}

.equipment-item-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.equipment-item-card.is-equipped {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
}

.equipment-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.equipment-item-thumb img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.equipment-rarity-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.rarity-common {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.rarity-uncommon {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.rarity-rare {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.rarity-epic {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.rarity-legendary {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Onboarding Eye & Mouth Chips / Grid */
.onboard-eye-chips-grid,
.onboard-mouth-chips-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 540px) {
  .onboard-eye-chips-grid,
  .onboard-mouth-chips-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.onboard-eye-chip,
.onboard-mouth-chip {
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.onboard-eye-chip:hover,
.onboard-mouth-chip:hover {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-2px);
}

.onboard-eye-chip.selected,
.onboard-mouth-chip.selected {
  border-color: #06b6d4 !important;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.45) !important;
}

.onboard-eye-chip-img-box,
.onboard-mouth-chip-img-box {
  width: 100%;
  height: 28px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px 4px;
}

.onboard-eye-chip-img-box img,
.onboard-mouth-chip-img-box img {
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.onboard-eye-chip-label,
.onboard-mouth-chip-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.onboard-eye-chip.selected .onboard-eye-chip-label,
.onboard-mouth-chip.selected .onboard-mouth-chip-label {
  color: #67e8f9;
}

/* Customizer Modal Eye & Mouth Option Cards (Compact Portrait 3-Column / Mobile 2-Column) */
.customizer-eye-card,
.customizer-mouth-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 5px 4px 6px 4px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-sizing: border-box;
  min-width: 0;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.customizer-eye-card:hover,
.customizer-mouth-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.08);
}

.customizer-eye-card.selected {
  border-color: #06b6d4 !important;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4) !important;
}

.customizer-mouth-card.selected {
  border-color: #c084fc !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4) !important;
}

.customizer-card-check-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #06b6d4;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.customizer-mouth-card.selected .customizer-card-check-badge {
  background: #c084fc;
  color: #0f172a;
}

.customizer-eye-card-preview,
.customizer-mouth-card-preview {
  width: 100%;
  height: 42px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 4px;
  padding: 2px;
  box-sizing: border-box;
  position: relative;
}

.customizer-eye-card-preview img {
  width: 90%;
  max-height: 36px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.customizer-mouth-card-preview img {
  width: 140%;
  max-width: none;
  height: auto;
  object-fit: contain;
  transform: scale(1.65) translateY(-2%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.customizer-card-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.customizer-card-subtitle {
  font-size: 8.5px;
  color: var(--text-muted, #94a3b8);
  text-align: center;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Mobile responsive adjustments for ultra-compact devices */
@media (max-width: 380px) {
  .customizer-options-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  .customizer-portrait-hero {
    grid-template-columns: 86px 1fr !important;
    gap: 8px !important;
    padding: 6px 8px !important;
  }
  .customizer-avatar-mini-box {
    width: 80px !important;
    height: 110px !important;
  }
  .customizer-eye-card-preview,
  .customizer-mouth-card-preview {
    height: 38px !important;
  }
  .customizer-card-title {
    font-size: 9.5px !important;
  }
}

/* ==========================================================================
   SUPPLY DROP OPENING ANIMATION SEQUENCE SYSTEM
   ========================================================================== */

.supply-drop-stage-wrapper {
  position: relative;
  width: 100%;
  min-height: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 20px;
  user-select: none;
}

/* Theme Backgrounds */
.supply-drop-theme-codex {
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.3) 0%, rgba(236, 72, 153, 0.18) 45%, #0d061a 100%);
}
.supply-drop-theme-resident {
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.25) 0%, rgba(245, 158, 11, 0.15) 45%, #140d04 100%);
}
.supply-drop-theme-companion {
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.15) 45%, #080718 100%);
}
.supply-drop-theme-gear {
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.25) 0%, rgba(245, 158, 11, 0.15) 50%, #100806 100%);
}
.supply-drop-theme-dispensary {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.15) 50%, #03140f 100%);
}
.supply-drop-theme-addon {
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.3) 0%, rgba(59, 130, 246, 0.18) 45%, #04101a 100%);
}

.addon-vortex-portal {
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.35);
  animation: addonPortalPulse 3s infinite ease-in-out;
}
@keyframes addonPortalPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.4)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 22px rgba(59, 130, 246, 0.6)); }
}

.codex-vortex-portal {
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.35);
  animation: codexPortalPulse 3s infinite ease-in-out;
}
@keyframes codexPortalPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.4)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 22px rgba(236, 72, 153, 0.6)); }
}

/* Top HUD */
.supply-drop-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  gap: 10px;
}
.supply-drop-hud-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.supply-drop-hud-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
.supply-drop-pity-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.supply-drop-skip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.supply-drop-skip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Center Animation Core */
.supply-drop-center-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 320px;
  margin: 14px 0;
}

/* Screen Shake Effect */
.supply-drop-screen-shake {
  animation: supplyDropShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes supplyDropShake {
  10%, 90% { transform: translate3d(-2px, 0, 0) scale(1.01); }
  20%, 80% { transform: translate3d(3px, -2px, 0) scale(1.02); }
  30%, 50%, 70% { transform: translate3d(-5px, 3px, 0) scale(1.03); }
  40%, 60% { transform: translate3d(5px, -3px, 0) scale(1.01); }
}

/* 1. Companion Portal */
.vortex-portal-container {
  width: 240px;
  height: 240px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.vortex-portal-container:hover {
  transform: scale(1.05);
}
.vortex-ring-outer {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 2px dashed rgba(192, 132, 252, 0.6);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
  animation: vortexSpinClockwise 20s linear infinite;
}
.vortex-ring-inner {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.7);
  border-top-color: transparent;
  border-bottom-color: transparent;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
  animation: vortexSpinCounter 12s linear infinite;
}
.vortex-portal-core {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #c084fc 35%, #6366f1 70%, transparent 100%);
  box-shadow: 0 0 40px rgba(192, 132, 252, 0.9), inset 0 0 20px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  animation: vortexCorePulse 2.5s ease-in-out infinite alternate;
  z-index: 2;
}
.vortex-star-mote {
  position: absolute;
  font-size: 14px;
  color: #fde047;
  filter: drop-shadow(0 0 6px #fde047);
  animation: vortexMoteFloat 3s ease-in-out infinite alternate;
}
@keyframes vortexSpinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes vortexSpinCounter {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
@keyframes vortexCorePulse {
  0% { transform: scale(0.92); box-shadow: 0 0 30px rgba(192, 132, 252, 0.6); }
  100% { transform: scale(1.08); box-shadow: 0 0 55px rgba(192, 132, 252, 1), 0 0 80px rgba(99, 102, 241, 0.6); }
}
@keyframes vortexMoteFloat {
  0% { transform: translateY(-8px) scale(0.9); opacity: 0.6; }
  100% { transform: translateY(8px) scale(1.1); opacity: 1; }
}

/* 2. Mystery Gear Crate */
.gear-crate-container {
  width: 220px;
  height: 200px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.gear-crate-container:hover {
  transform: scale(1.04) translateY(-3px);
}
.gear-crate-body {
  width: 180px;
  height: 140px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid rgba(239, 68, 68, 0.6);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(239, 68, 68, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gear-crate-hazard-stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 14px;
  background: repeating-linear-gradient(45deg, #f59e0b, #f59e0b 10px, #000 10px, #000 20px);
  opacity: 0.85;
}
.gear-crate-locks {
  position: absolute;
  top: 24px;
  display: flex;
  gap: 12px;
}
.gear-crate-lock-led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: crateLedBlink 1s infinite alternate;
}
.gear-crate-icon {
  font-size: 52px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
  animation: crateHover 2.5s ease-in-out infinite alternate;
}
.gear-crate-steam-vent {
  position: absolute;
  bottom: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1px;
  text-transform: uppercase;
}
@keyframes crateLedBlink {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}
@keyframes crateHover {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* 3. Supplement Dispensary */
.dispensary-reactor-container {
  width: 220px;
  height: 220px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.dispensary-reactor-container:hover {
  transform: scale(1.04);
}
.dispensary-capsule-glass {
  width: 150px;
  height: 160px;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.4) 0%, rgba(6, 182, 212, 0.2) 60%, rgba(15, 23, 42, 0.9) 100%);
  border: 2px solid rgba(16, 185, 129, 0.6);
  border-radius: 30px;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.4), inset 0 0 20px rgba(16, 185, 129, 0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dispensary-reels-row {
  display: flex;
  gap: 8px;
  font-size: 26px;
  z-index: 2;
}
.dispensary-reel-item {
  width: 36px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 8px rgba(16, 185, 129, 0.4);
}
.dispensary-bubbles-emitter {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.5) 0%, transparent 60%);
  animation: dispensaryFluidFlow 2s linear infinite alternate;
}
@keyframes dispensaryFluidFlow {
  0% { transform: translateY(4px); opacity: 0.7; }
  100% { transform: translateY(-4px); opacity: 1; }
}

/* Prompt Button */
.supply-drop-tap-btn {
  margin-top: 18px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: promptPulse 1.8s ease-in-out infinite;
}
@keyframes promptPulse {
  0% { transform: scale(0.97); box-shadow: 0 0 15px rgba(255, 255, 255, 0.2); }
  50% { transform: scale(1.03); box-shadow: 0 0 30px rgba(255, 255, 255, 0.4); }
  100% { transform: scale(0.97); box-shadow: 0 0 15px rgba(255, 255, 255, 0.2); }
}

/* Flash Overlay */
.supply-drop-flash-bang {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 50;
  pointer-events: none;
  animation: flashBangFade 0.7s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}
@keyframes flashBangFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* ==========================================================================
   GACHA REVEAL CARDS (1x & 10x)
   ========================================================================== */

.gacha-reveal-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

/* 1x Single Hero Card */
.gacha-hero-card-container {
  width: 100%;
  max-width: 320px;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  margin: 10px auto;
}
.gacha-hero-card {
  width: 100%;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  animation: heroCardEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes heroCardEnter {
  0% { transform: scale(0.6) translateY(40px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* 10x Multi-Card Grid */
.gacha-multi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  margin: 10px 0;
}
@media (max-width: 640px) {
  .gacha-multi-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
  }
}

.gacha-grid-card-wrap {
  perspective: 800px;
  height: 140px;
  cursor: pointer;
}
.gacha-grid-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gacha-grid-card-inner.flipped {
  transform: rotateY(180deg);
}
.gacha-grid-card-back,
.gacha-grid-card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.gacha-grid-card-back {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.gacha-grid-card-front {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
}

/* Rarity Tiers */
.rarity-border-common {
  border: 1.5px solid #64748b !important;
  box-shadow: 0 0 10px rgba(100, 116, 139, 0.3) !important;
}
.rarity-border-rare {
  border: 1.5px solid #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45) !important;
}
.rarity-border-epic {
  border: 2px solid #c084fc !important;
  box-shadow: 0 0 24px rgba(192, 132, 252, 0.6) !important;
  animation: epicPulseBorder 2s infinite alternate;
}
.rarity-border-legendary {
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.8), inset 0 0 15px rgba(251, 191, 36, 0.25) !important;
  animation: legendaryGlow 1.8s infinite alternate;
}
@keyframes epicPulseBorder {
  0% { box-shadow: 0 0 14px rgba(192, 132, 252, 0.4); }
  100% { box-shadow: 0 0 28px rgba(192, 132, 252, 0.8); }
}
@keyframes legendaryGlow {
  0% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.5); }
  100% { box-shadow: 0 0 40px rgba(251, 191, 36, 1), 0 0 60px rgba(245, 158, 11, 0.5); }
}

.rarity-badge-tag {
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 12px;
}
.badge-common { background: rgba(100, 116, 139, 0.25); color: #cbd5e1; border: 1px solid #64748b; }
.badge-rare { background: rgba(56, 189, 248, 0.25); color: #38bdf8; border: 1px solid #38bdf8; }
.badge-epic { background: rgba(192, 132, 252, 0.25); color: #c084fc; border: 1px solid #c084fc; }
.badge-legendary { background: rgba(251, 191, 36, 0.25); color: #fbbf24; border: 1px solid #fbbf24; }

.new-unlock-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  letter-spacing: 0.5px;
}

/* Action Footer */
.supply-drop-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   2.5D SIDESCROLLER GYM FLOOR CONTROLS & HUD
   ========================================================================== */
.rpg-scroller-wrapper {
  position: relative;
  touch-action: none;
}

/* ==========================================================================
   ATHLETIC FACTIONS & DISCIPLINE ALLEGIANCE STYLING (STAGE 5+)
   ========================================================================== */

.faction-hall-locked-container,
.faction-hall-pledge-pavilion,
.faction-hall-active-dashboard {
  animation: fadeIn 0.25s ease-out;
}

.faction-card-interactive {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.faction-card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.faction-pill-glow {
  transition: filter 0.2s ease;
}

.faction-pill-glow:hover {
  filter: brightness(1.15);
}

/* ==========================================================================
   PURE IN-GAME DAILY & WEEKLY MISSIONS & MILESTONE BOUNTIES STYLING
   ========================================================================== */

.idle-missions-subtab-wrapper {
  animation: fadeIn 0.25s ease-out;
}

.mission-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.mission-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.mission-card-ready {
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2) !important;
}

.mission-card-ready:hover {
  border-color: rgba(16, 185, 129, 0.9) !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35) !important;
}

.mission-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.mission-reward-chip.juice {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.mission-reward-chip.sauce {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.mission-reward-chip.gems {
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.mission-reward-chip.gold {
  background: rgba(234, 179, 8, 0.12);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.mission-reward-chip.dust {
  background: rgba(244, 114, 182, 0.12);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.mission-reward-chip.ticket {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.mission-reward-chip.core {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.mission-reward-chip.xp {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.milestone-chest-box {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.milestone-chest-box:hover {
  transform: translateY(-2px);
}

.chest-ready-pulse {
  animation: chestGlowPulse 1.8s infinite alternate;
}

@keyframes chestGlowPulse {
  0% {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3), inset 0 0 8px rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.6);
  }
  100% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.7), inset 0 0 18px rgba(245, 158, 11, 0.25);
    border-color: rgba(251, 191, 36, 1);
  }
}

.mission-claim-pulse {
  animation: claimButtonPulse 1.5s infinite alternate;
}

@keyframes claimButtonPulse {
  0% {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.85);
    transform: scale(1.02);
  }
}

/* Cyclical LiveOps & Manufactured Scarcity Animations */
.near-miss-pulse {
  animation: nearMissAlertPulse 2s infinite ease-in-out;
}

@keyframes nearMissAlertPulse {
  0% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4), inset 0 0 6px rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.6);
  }
  50% {
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.8), inset 0 0 14px rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.9);
  }
  100% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4), inset 0 0 6px rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.6);
  }
}

/* ==========================================================================
   HORIZONTAL STAT SINKS & ORTHOGONAL PROGRESSION STYLES
   ========================================================================== */

/* 1. Gear Reforging & Substat Affix Badges */
.reforge-slot-tab {
  padding: 8px 4px;
  text-align: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
  font-weight: 700;
}
.reforge-slot-tab.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
  border-color: #8b5cf6;
  color: white;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

.reforge-affix-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
.reforge-affix-card.locked {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.tier-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}
.tier-badge-D { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid #94a3b8; }
.tier-badge-C { background: rgba(34, 197, 94, 0.2); color: #22c55e; border: 1px solid #22c55e; }
.tier-badge-B { background: rgba(14, 165, 233, 0.2); color: #0ea5e9; border: 1px solid #0ea5e9; }
.tier-badge-A { background: rgba(168, 85, 247, 0.2); color: #a855f7; border: 1px solid #a855f7; }
.tier-badge-S { background: rgba(245, 158, 11, 0.25); color: #f59e0b; border: 1px solid #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
.tier-badge-SS { background: rgba(239, 68, 68, 0.3); color: #ef4444; border: 1px solid #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }
.tier-badge-SSS { 
  background: linear-gradient(135deg, #f43f5e, #eab308); 
  color: white; 
  border: 1px solid #fff; 
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.7);
  animation: sssGlowPulse 1.5s infinite alternate;
}

@keyframes sssGlowPulse {
  0% { box-shadow: 0 0 10px rgba(244, 63, 94, 0.6); transform: scale(1); }
  100% { box-shadow: 0 0 20px rgba(234, 179, 8, 0.9); transform: scale(1.05); }
}

/* 2. Relic Sanctum Altars & Cards */
.relic-altar-pedestal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  cursor: pointer;
  min-height: 100px;
  transition: all 0.25s ease;
  position: relative;
}
.relic-altar-pedestal.occupied {
  border: 2px solid #eab308;
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.15), rgba(0, 0, 0, 0.5));
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.25);
}
.relic-altar-pedestal:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

.relic-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}
.relic-card.unlocked {
  border-color: rgba(255, 255, 255, 0.2);
}
.relic-card.locked {
  opacity: 0.5;
  filter: grayscale(0.6);
}

.relic-set-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid #eab308;
  color: #fde047;
}

/* 3. Deload Protocol & Tech Lab */
.deload-yield-box {
  background: radial-gradient(circle at top, rgba(239, 68, 68, 0.2), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.deload-tech-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}



/* 5. Synergy Pill Badges */
.synergy-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* ==========================================================================
   ANALYTICS & PERFORMANCE MODAL MINI-TABS
   ========================================================================== */

.analytics-modal-tabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  box-sizing: border-box;
}

.analytics-modal-tabs-bar::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.analytics-modal-tab-btn {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm, 7px);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.analytics-modal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.analytics-modal-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(79, 70, 229, 0.4) 100%);
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.analytics-modal-tab-btn i,
.analytics-modal-tab-btn svg,
.analytics-modal-tab-btn span {
  pointer-events: none;
}

.analytics-modal-tab-btn i,
.analytics-modal-tab-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.analytics-tab-panel {
  display: flex;
  flex-direction: column;
  animation: analyticsTabFadeIn 0.2s ease-out forwards;
  width: 100%;
}

.analytics-tab-panel.hidden-panel {
  display: none !important;
}

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

/* Flex scroll bottom buffer prevents mobile WebKit/Blink from collapsing bottom scroll padding */
.analytics-modal-panels-container::after,
.daily-tasks-tab-panel::after,
.edit-profile-modal-body::after,
.vea-hub-body::after {
  content: '';
  display: block;
  min-height: 28px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .analytics-modal-tabs-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .analytics-modal-tab-btn {
    min-width: 0;
    padding: 7px 6px;
    font-size: 11px;
    gap: 4px;
  }
}

/* ==========================================================================
   DAILY TASKS MODAL MINI-TABS (HABIT CHECKLIST & WEIGHT TRACKER)
   ========================================================================== */

.daily-tasks-modal-tabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  box-sizing: border-box;
}

.daily-tasks-modal-tabs-bar::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.daily-tasks-modal-tab-btn {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm, 7px);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.daily-tasks-modal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.daily-tasks-modal-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.4) 100%);
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.daily-tasks-modal-tab-btn i,
.daily-tasks-modal-tab-btn svg,
.daily-tasks-modal-tab-btn span {
  pointer-events: none;
}

.daily-tasks-modal-tab-btn i,
.daily-tasks-modal-tab-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.daily-tasks-tab-panel {
  display: flex;
  flex-direction: column;
  animation: dailyTasksTabFadeIn 0.2s ease-out forwards;
  width: 100%;
}

.daily-tasks-tab-panel.hidden-panel {
  display: none !important;
}

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

@media (max-width: 640px) {
  .daily-tasks-modal-tabs-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .daily-tasks-modal-tab-btn {
    min-width: 0;
    padding: 7px 6px;
    font-size: 11.5px;
    gap: 5px;
  }
}

/* ==========================================================================
   SOCIAL & COMMUNITY MODAL MINI-TABS (FRIENDS & REFERRALS)
   ========================================================================== */

.social-modal-tabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  box-sizing: border-box;
}

.social-modal-tabs-bar::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.social-modal-tab-btn {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm, 7px);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-modal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.social-modal-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(147, 51, 234, 0.4) 100%);
  border-color: rgba(192, 132, 252, 0.55);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.25);
}

.social-modal-tab-btn i,
.social-modal-tab-btn svg,
.social-modal-tab-btn span {
  pointer-events: none;
}

.social-modal-tab-btn i,
.social-modal-tab-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.social-tab-panel {
  display: flex;
  flex-direction: column;
  animation: socialTabFadeIn 0.2s ease-out forwards;
  width: 100%;
}

.social-tab-panel.hidden-panel {
  display: none !important;
}

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

@media (max-width: 640px) {
  .social-modal-tabs-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .social-modal-tab-btn {
    min-width: 0;
    padding: 7px 6px;
    font-size: 11.5px;
    gap: 5px;
  }
}

body.light-theme .social-modal-tabs-bar {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(203, 213, 225, 0.8);
}

body.light-theme .social-modal-tab-btn {
  color: #64748b;
}

body.light-theme .social-modal-tab-btn.active {
  color: #ffffff;
}

/* ==========================================================================
   TRAINING SETTINGS MODAL MINI-TABS
   ========================================================================== */

.training-settings-modal-tabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  box-sizing: border-box;
}

.training-settings-modal-tabs-bar::-webkit-scrollbar {
  display: none;
}

.training-settings-tab-btn,
.training-settings-modal-tab-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--border-radius-sm, 7px);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.training-settings-tab-btn:hover,
.training-settings-modal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.training-settings-tab-btn.active,
.training-settings-modal-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(79, 70, 229, 0.4) 100%);
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.training-settings-tab-btn i,
.training-settings-tab-btn svg,
.training-settings-modal-tab-btn i,
.training-settings-modal-tab-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.training-settings-tab-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1.2;
  transition: all 0.2s ease;
}

.training-settings-tab-badge.badge-mastered {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-success, #10b981);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.training-settings-tab-badge.badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-warning, #fbbf24);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.training-settings-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: trainingSettingsTabFadeIn 0.2s ease-out forwards;
  width: 100%;
}

.training-settings-tab-pane.hidden-pane {
  display: none !important;
}

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

@media (max-width: 480px) {
  .training-settings-tab-btn,
  .training-settings-modal-tab-btn {
    padding: 7px 6px;
    font-size: 11px;
    gap: 4px;
  }
  .training-settings-tab-btn i,
  .training-settings-tab-btn svg,
  .training-settings-modal-tab-btn i,
  .training-settings-modal-tab-btn svg {
    width: 13px;
    height: 13px;
  }
}

body.light-theme .training-settings-modal-tabs-bar {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(203, 213, 225, 0.8);
}

body.light-theme .training-settings-tab-btn,
body.light-theme .training-settings-modal-tab-btn {
  color: #64748b;
}

body.light-theme .training-settings-tab-btn:hover,
body.light-theme .training-settings-modal-tab-btn:hover {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .training-settings-tab-btn.active,
body.light-theme .training-settings-modal-tab-btn.active {
  color: #4338ca;
  background: #e0e7ff;
  border-color: #a5b4fc;
}

/* ==========================================================================
   REWORKED IDLE GAME REFERRAL & ATHLETE RECRUITMENT SYSTEM STYLES
   ========================================================================== */

.referral-bounty-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.referral-bounty-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.referral-bounty-pill.juice {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.35);
  color: #fde047;
}

.referral-bounty-pill.gems {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}

.referral-bounty-pill.tickets {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.referral-bounty-pill.vip {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

/* Milestone Track Container */
.referral-milestone-wrapper {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referral-milestone-bar-bg {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.referral-milestone-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #fbbf24 100%);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Milestones Grid */
.referral-milestones-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

@media (max-width: 640px) {
  .referral-milestones-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
}

@media (max-width: 440px) {
  .referral-milestones-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}

.referral-milestone-card {
  position: relative;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: all 0.25s ease;
  user-select: none;
}

.referral-milestone-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.referral-milestone-card .milestone-target-badge {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.3px;
}

.referral-milestone-card .milestone-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.referral-milestone-card .milestone-title-text {
  font-size: 9px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.referral-milestone-card .milestone-rewards-preview {
  font-size: 8px;
  color: #cbd5e1;
  line-height: 1.2;
}

/* Card States */
.referral-milestone-card.ready {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.22), rgba(99, 102, 241, 0.22));
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  cursor: pointer;
}

.referral-milestone-card.ready .milestone-icon-box {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  animation: chestBounce 1.5s infinite ease-in-out;
}

.referral-milestone-card.ready .milestone-target-badge {
  color: #fde047;
}

.referral-milestone-card.claimed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  opacity: 0.7;
}

.referral-milestone-card.claimed::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  font-size: 8.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.referral-milestone-card.locked {
  opacity: 0.5;
}

/* Welcome Modal Item Grid */
.referral-welcome-item-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

@media (max-width: 480px) {
  .referral-welcome-item-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.referral-welcome-item-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.referral-welcome-item-card .item-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.referral-welcome-item-card .item-name {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

.referral-welcome-item-card .item-type {
  font-size: 9px;
  color: var(--text-muted, #94a3b8);
}

/* ==========================================================================
   FITNESS GOD QUEST — ASCENSION REBIRTH & CELESTIAL PERKS STYLING
   ========================================================================== */

@keyframes pulse-gold {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
  }
  100% {
    transform: scale(1.05);
    box-shadow: 0 0 22px rgba(234, 179, 8, 0.85);
  }
}

.ascension-pulse-btn {
  animation: pulse-gold 1.4s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.celestial-glow {
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.35);
  border-color: rgba(234, 179, 8, 0.6) !important;
}

.ascension-subtab-container {
  animation: fadeIn 0.25s ease-out;
}

/* ==========================================================================
   FITNESS GOD QUEST — FATE/GRAND ORDER (FGO) COLLECTIBLE UNIT CARDS & GRID
   ========================================================================== */

.fgo-unit-grid,
.gacha-tiles-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)) !important;
  gap: 10px !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 4px 2px !important;
}

@media (min-width: 480px) {
  .fgo-unit-grid,
  .gacha-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (min-width: 768px) {
  .fgo-unit-grid,
  .gacha-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)) !important;
    gap: 14px !important;
  }
}

.fgo-unit-card,
.gacha-char-tile {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  aspect-ratio: 3 / 4 !important;
  min-height: 124px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border-radius: 9px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  user-select: none !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  background: #090d16 !important;
  border: 2px solid #475569 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s ease, border-color 0.18s ease !important;
  touch-action: manipulation !important;
}

.fgo-unit-card:hover,
.gacha-char-tile:hover {
  transform: translateY(-3px) scale(1.03) !important;
  z-index: 5 !important;
}

.fgo-unit-card:active,
.gacha-char-tile:active {
  transform: scale(0.97) !important;
}

/* Metallic Rarity Frames */
.fgo-rarity-legendary,
.gacha-rarity-legendary {
  border-color: #f59e0b !important;
  border-image: linear-gradient(145deg, #fef08a 0%, #eab308 40%, #b45309 100%) 1 !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25), inset 0 0 0 1px rgba(254, 240, 138, 0.45) !important;
}
.fgo-rarity-legendary:hover,
.gacha-rarity-legendary:hover {
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45), inset 0 0 0 1px rgba(254, 240, 138, 0.6) !important;
}

.fgo-rarity-epic,
.gacha-rarity-epic {
  border-color: #a855f7 !important;
  border-image: linear-gradient(145deg, #e9d5ff 0%, #c084fc 40%, #7e22ce 100%) 1 !important;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.25), inset 0 0 0 1px rgba(233, 213, 255, 0.4) !important;
}
.fgo-rarity-epic:hover,
.gacha-rarity-epic:hover {
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.45), inset 0 0 0 1px rgba(233, 213, 255, 0.6) !important;
}

.fgo-rarity-rare,
.gacha-rarity-rare {
  border-color: #0284c7 !important;
  border-image: linear-gradient(145deg, #bae6fd 0%, #38bdf8 40%, #0369a1 100%) 1 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2), inset 0 0 0 1px rgba(186, 230, 253, 0.35) !important;
}
.fgo-rarity-rare:hover,
.gacha-rarity-rare:hover {
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4), inset 0 0 0 1px rgba(186, 230, 253, 0.55) !important;
}

.fgo-rarity-common,
.gacha-rarity-common {
  border-color: #64748b !important;
  border-image: linear-gradient(145deg, #cbd5e1 0%, #94a3b8 40%, #475569 100%) 1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(203, 213, 225, 0.2) !important;
}

/* Active / Equipped Outline */
.fgo-unit-active,
.gacha-tile-active {
  border-color: #10b981 !important;
  border-image: linear-gradient(145deg, #a7f3d0 0%, #10b981 50%, #047857 100%) 1 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.5), inset 0 0 10px rgba(16, 185, 129, 0.3) !important;
}

/* Top HUD: Class Badge (Left) & Level Chip (Right) */
.fgo-card-top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 4px 0 4px;
  z-index: 3;
  pointer-events: none;
}

.fgo-class-badge {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e293b, #0f172a);
  border: 1.5px solid #eab308;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 4px rgba(254, 240, 138, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  color: #fef08a;
}

.fgo-rarity-epic .fgo-class-badge {
  border-color: #c084fc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 4px rgba(233, 213, 255, 0.4);
}
.fgo-rarity-rare .fgo-class-badge {
  border-color: #38bdf8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 4px rgba(186, 230, 253, 0.4);
}
.fgo-rarity-common .fgo-class-badge {
  border-color: #94a3b8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 4px rgba(203, 213, 225, 0.3);
}

.fgo-level-badge {
  font-size: 8px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  color: #fef08a;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 4px;
  padding: 1px 4px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}

.fgo-rarity-epic .fgo-level-badge {
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, 0.4);
}
.fgo-rarity-rare .fgo-level-badge {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.4);
}
.fgo-rarity-common .fgo-level-badge {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.4);
}

/* Center Artwork Wrapper */
.fgo-card-art-wrap,
.gacha-tile-avatar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  z-index: 1 !important;
  padding: 18px 6px 30px 6px !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
}

.fgo-rarity-legendary .fgo-card-art-wrap,
.gacha-rarity-legendary .gacha-tile-avatar {
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.18) 0%, rgba(15, 23, 42, 0.95) 85%) !important;
}
.fgo-rarity-epic .fgo-card-art-wrap,
.gacha-rarity-epic .gacha-tile-avatar {
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.18) 0%, rgba(15, 23, 42, 0.95) 85%) !important;
}
.fgo-rarity-rare .fgo-card-art-wrap,
.gacha-rarity-rare .gacha-tile-avatar {
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.18) 0%, rgba(15, 23, 42, 0.95) 85%) !important;
}
.fgo-rarity-common .fgo-card-art-wrap,
.gacha-rarity-common .gacha-tile-avatar {
  background: radial-gradient(circle at center, rgba(148, 163, 184, 0.12) 0%, rgba(15, 23, 42, 0.95) 85%) !important;
}

.fgo-card-art-wrap img,
.gacha-tile-avatar img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65)) !important;
  pointer-events: none !important;
}

.fgo-card-art-wrap span,
.gacha-tile-avatar span {
  font-size: 28px !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65)) !important;
  pointer-events: none !important;
}

/* Status Ribbons */
.fgo-equipped-ribbon,
.gacha-tile-active-ribbon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  color: #ffffff;
  font-size: 7.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8), 0 2px 5px rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
}

.fgo-ascend-pip,
.gacha-tile-ascend-pip {
  position: absolute;
  top: 24px;
  right: 4px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  font-size: 8px;
  font-weight: 900;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.85);
  animation: pulse-gold 1.4s infinite alternate;
  z-index: 4;
  pointer-events: none;
}

/* Locked Card Mask */
.fgo-card-locked,
.gacha-tile-locked {
  filter: grayscale(0.85) brightness(0.65) !important;
  opacity: 0.75 !important;
}

.fgo-locked-overlay,
.gacha-tile-lock-icon {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.9));
}

/* Bottom HUD: Stars Cluster & Nameplate Banner */
.fgo-card-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 3;
  padding: 0 2px 2px 2px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(9, 13, 22, 0.95) 0%, rgba(9, 13, 22, 0.7) 70%, transparent 100%);
}

.fgo-card-stars,
.gacha-tile-stars {
  font-size: 8px;
  color: #facc15;
  line-height: 1;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 6px rgba(250, 204, 21, 0.6);
  margin-bottom: 2px;
  pointer-events: none;
}

.fgo-card-nameplate,
.gacha-tile-name {
  width: 100%;
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.2px;
  line-height: 1.15;
  box-sizing: border-box;
}

.fgo-rarity-legendary .fgo-card-nameplate {
  color: #fef08a;
  border-top-color: rgba(234, 179, 8, 0.4);
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.9) 0%, rgba(20, 16, 12, 0.95) 100%);
}
.fgo-rarity-epic .fgo-card-nameplate {
  color: #f3e8ff;
  border-top-color: rgba(192, 132, 252, 0.4);
  background: linear-gradient(180deg, rgba(46, 16, 68, 0.9) 0%, rgba(19, 9, 31, 0.95) 100%);
}
.fgo-rarity-rare .fgo-card-nameplate {
  color: #e0f2fe;
  border-top-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, rgba(12, 44, 73, 0.9) 0%, rgba(8, 26, 45, 0.95) 100%);
}

/* ==========================================================================
   COACH SPECIALTIES, CREDENTIALS, MARKETPLACE LEADS & ENQUIRY STYLES
   ========================================================================== */

.service-type-toggle-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.service-type-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.service-type-toggle-btn.active {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: var(--accent-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.coach-goal-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.coach-goal-card.active {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.credential-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.credential-status-badge.verified {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.credential-status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.credential-status-badge.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.credential-status-badge.unsubmitted {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.marketplace-lead-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.marketplace-lead-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5), 0 0 12px rgba(245, 158, 11, 0.15);
}

/* =========================================================================
   SUBSCRIPTION & MEMBERSHIP CENTER STYLES
   ========================================================================= */
.subscription-hero-container {
  container-type: inline-size;
  container-name: sub-hero;
  transition: all 0.3s ease;
}

.subscription-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@container sub-hero (min-width: 640px) {
  .subscription-hero-grid {
    grid-template-columns: 1.25fr 1fr auto;
    align-items: center;
  }
}

.sub-tier-card {
  position: relative;
  border-radius: var(--border-radius-md);
  padding: 22px 20px;
  background: radial-gradient(circle at top right, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sub-tier-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.15);
}

.sub-tier-card.featured-tier {
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.12);
}

.sub-tier-card.current-active-tier {
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.sub-matrix-row {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  align-items: center;
}

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

.sub-matrix-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.sub-matrix-header {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

/* =========================================================================
   Q&A PORTAL, KNOWLEDGE BASE & MENTORSHIP STYLES
   ========================================================================= */

.qna-category-pill {
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.qna-category-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #ffffff;
}

.qna-category-pill.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.qna-faq-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qna-faq-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.qna-faq-question-btn {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  color: white;
  text-align: left;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.qna-faq-question-btn:focus {
  outline: none;
}

.qna-faq-answer {
  padding: 0 20px 18px 20px;
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.qna-mentoring-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.qna-mentoring-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(168, 85, 247, 0.1);
}

.qna-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.qna-status-badge.open {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.qna-status-badge.answered {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.qna-status-badge.resolved {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.qna-mentee-batch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #d8b4fe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

/* ==========================================================================
   FUN WORLD — GYM SPACE ALLOCATION TILE GRID (COMPACT MOBILE 6-COL)
   ========================================================================== */

.gym-slots-tile-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.gym-slot-tile {
  position: relative;
  aspect-ratio: 1 / 1.05;
  min-height: 58px;
  max-height: 76px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 3px 5px 3px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.gym-slot-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(56, 189, 248, 0.25);
}

.gym-slot-tile:active {
  transform: scale(0.95);
}

/* Empty Slot Variant */
.gym-slot-tile.is-empty {
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.4);
}

.gym-slot-tile.is-empty:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(30, 41, 59, 0.5);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

/* Equipment Slot Variant */
.gym-slot-tile.is-equipment {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.gym-slot-tile.is-equipment:hover {
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.35);
}

/* Add-on Slot Variant */
.gym-slot-tile.is-addon {
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.35) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.gym-slot-tile.is-addon:hover {
  border-color: #34d399;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(52, 211, 153, 0.35);
}

/* Slot Tile Header: Index & Type / Rarity */
.gym-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2px;
  line-height: 1;
}

.gym-slot-index-badge {
  font-size: 8.5px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.2px;
}

.gym-slot-req-badge {
  font-size: 7.5px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 1px 3px;
  border-radius: 4px;
}

.gym-slot-star-badge {
  font-size: 8px;
  font-weight: 800;
  color: #fbbf24;
}

/* Center Icon */
.gym-slot-icon {
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1px 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.gym-slot-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* Bottom Tag */
.gym-slot-tag {
  font-size: 7.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1px;
  line-height: 1;
}

.gym-slot-tag.tag-equipment {
  color: #38bdf8;
}

.gym-slot-tag.tag-addon {
  color: #34d399;
}

.gym-slot-tag.tag-empty {
  color: #64748b;
  opacity: 0.7;
}

/* Responsive Breakpoints for Mobile */
@media (max-width: 480px) {
  .gym-slots-tile-grid {
    gap: 6px;
  }
  .gym-slot-tile {
    min-height: 54px;
    max-height: 70px;
    padding: 3px 2px 4px 2px;
  }
  .gym-slot-icon {
    font-size: 18px;
  }
  .gym-slot-index-badge {
    font-size: 8px;
  }
  .gym-slot-req-badge {
    font-size: 7px;
  }
  .gym-slot-tag {
    font-size: 7px;
  }
}

@media (max-width: 360px) {
  .gym-slots-tile-grid {
    gap: 4px;
  }
  .gym-slot-tile {
    min-height: 50px;
  }
  .gym-slot-icon {
    font-size: 16px;
  }
}

/* ==========================================================================
   ATHLETES UNIFIED GLOSSARY COMPENDIUM & SILHOUETTE SYSTEM
   ========================================================================== */

.glossary-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.glossary-header-telemetry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.glossary-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.glossary-telemetry-badge:hover {
  transform: translateY(-1px);
}

.glossary-section-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  width: 100%;
}

.glossary-section-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glossary-section-pill:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  color: #e2e8f0;
  transform: translateY(-1px);
}

.glossary-section-pill.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.35));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.2);
}

/* Blacked-out Silhouette Card Styling for Unobtained Pets & Residents */
.glossary-card-silhouette {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.18) !important;
  opacity: 0.82;
  cursor: default !important;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.glossary-card-silhouette:hover {
  opacity: 0.95;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.glossary-card-silhouette .fgo-card-art-wrap img,
.glossary-card-silhouette .glossary-avatar-preview img {
  filter: brightness(0) drop-shadow(0 0 2px rgba(255, 255, 255, 0.3)) !important;
}

.glossary-card-silhouette .fgo-card-art-wrap span,
.glossary-card-silhouette .glossary-avatar-preview span {
  filter: brightness(0) drop-shadow(0 0 2px rgba(255, 255, 255, 0.3)) !important;
  opacity: 0.4;
}

.glossary-card-silhouette .fgo-card-nameplate,
.glossary-card-silhouette .glossary-card-title {
  color: #94a3b8 !important;
  letter-spacing: 1.5px;
  font-weight: 800;
}

.glossary-card-silhouette .fgo-level-badge {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

/* Gym Nemeses Grid & Cards */
.glossary-nemeses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.glossary-nemesis-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border-radius: 12px;
  background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(239, 68, 68, 0.25);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.glossary-nemesis-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(239, 68, 68, 0.25);
}

.glossary-nemesis-card.nemesis-mastered {
  border-color: rgba(251, 191, 36, 0.45);
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.15) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.glossary-nemesis-card.nemesis-cleared {
  border-color: rgba(34, 197, 94, 0.4);
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.glossary-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.glossary-status-badge.badge-mastered {
  background: rgba(251, 191, 36, 0.2);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.5);
}

.glossary-status-badge.badge-cleared {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.glossary-status-badge.badge-unconquered {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   GYM NEMESIS SYSTEM — CYBERPUNK HUD & MODAL STYLING
   ========================================================================== */
.nemesis-dossier-card {
  background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.15) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.nemesis-dossier-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.nemesis-crime-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.nemesis-hostage-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.nemesis-disabled-resident-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.nemesis-ego-track {
  width: 100%;
  height: 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.nemesis-ego-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 70%, #fbbf24 100%);
  transition: width 0.4s ease;
}

.nemesis-matchup-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.nemesis-matchup-pill.weakness {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.nemesis-matchup-pill.resistance {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.nemesis-combat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 10px;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
}

.nemesis-resolution-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.nemesis-choice-card {
  padding: 16px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.nemesis-choice-card.banish-card {
  background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.15) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
}

.nemesis-choice-card.recruit-card {
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.15) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.nemesis-choice-card:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   DUAL-SIDED FRIEND POINTS (FP) ECONOMY & WORKOUT SHARING STYLES
   ========================================================================== */

.fp-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  background: radial-gradient(circle at top left, rgba(236, 72, 153, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(236, 72, 153, 0.45);
  color: #f472b6;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
  letter-spacing: 0.2px;
}

.fp-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.4);
  font-size: 11px;
  font-weight: 700;
  color: #f472b6;
}

.friend-feed-card {
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.friend-feed-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(236, 72, 153, 0.2);
}

.friend-feed-card.has-unclaimed-fp {
  border-color: rgba(236, 72, 153, 0.5);
  background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.18) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.friend-chat-workout-card {
  background: radial-gradient(circle at top left, rgba(236, 72, 153, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(236, 72, 153, 0.45);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.friend-chat-workout-card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.4);
}

.pulse-glow-pink {
  animation: pulsePinkGlow 2s infinite ease-in-out;
}

@keyframes pulsePinkGlow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.3);
  }
  50% {
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.6);
  }
}

/* ==========================================================================
   ATHLETE'S GRIMOIRE 5-SLOT & LEVELING SYSTEM STYLES
   ========================================================================== */
.grimoire-loadout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.grimoire-slot-card {
  border-radius: 10px;
  min-height: 105px;
  transition: all 0.2s ease;
}

.grimoire-slot-card:hover {
  transform: translateY(-2px);
}

.grimoire-slot-locked {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.grimoire-cost-pill {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.codex-level-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
}

/* ==========================================================================
   GYM EXERCISE STATION DASHBOARD & SWAP SYSTEM STYLES
   ========================================================================== */

.idle-rail-stations {
  border-color: rgba(245, 158, 11, 0.45) !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.95)) !important;
}

.idle-rail-stations:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5) !important;
}

.station-dashboard-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.station-dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 158, 11, 0.2);
}

.station-level-bar-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.station-origin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   WORKOUT LOGGER QUICK REFERENCE GUIDE COMPONENT
   ========================================================================== */
.workout-quick-guide-panel {
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: var(--border-radius-md, 10px);
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(15, 23, 42, 0.7) 100%);
  transition: all var(--transition-fast, 0.2s);
}

.workout-quick-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.workout-quick-guide-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workout-quick-guide-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.workout-quick-guide-icon-box i {
  width: 14px;
  height: 14px;
}

.workout-quick-guide-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.workout-quick-guide-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.workout-quick-guide-subtitle {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.workout-quick-guide-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.workout-quick-guide-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: white;
}

.workout-quick-guide-content {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-guide-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px 12px;
}

.quick-guide-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #e0e7ff;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-guide-icon {
  width: 13px;
  height: 13px;
  color: var(--accent-primary, #6366f1);
}

.quick-guide-pills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

@media (min-width: 640px) {
  .quick-guide-pills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quick-guide-pill-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.35;
}

.quick-guide-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  flex-shrink: 0;
}

.quick-guide-table-wrap {
  overflow-x: auto;
  margin-bottom: 6px;
}

.quick-guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.quick-guide-table th {
  padding: 4px 6px;
  color: var(--text-muted, #94a3b8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
}

.quick-guide-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.rpe-pill {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 10px;
}

.rpe-10 { background: rgba(239, 68, 68, 0.25); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.rpe-9  { background: rgba(245, 158, 11, 0.25); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.rpe-8  { background: rgba(59, 130, 246, 0.25); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.rpe-7  { background: rgba(16, 185, 129, 0.25); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.rpe-6  { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

.quick-guide-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #a5b4fc;
  margin-top: 4px;
  background: rgba(99, 102, 241, 0.1);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px dashed rgba(99, 102, 241, 0.3);
}

.quick-guide-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.45;
}

.quick-guide-list li {
  margin-bottom: 4px;
}

.quick-guide-utils-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-guide-util-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #cbd5e1;
}

.quick-guide-util-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
}

/* =========================================================================
   DAILY MINI-GAMES (CARB KILLER & PROTEIN PAYLOAD) STYLES
   ========================================================================= */

#wod-dungeon-hub-modal .modal-content,
.wod-dungeon-modal-content {
  max-width: 440px !important;
  width: min(94vw, 440px) !important;
  max-height: var(--modal-max-height, calc(100dvh - 116px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
  overflow-y: auto !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  #wod-dungeon-hub-modal .modal-content,
  .wod-dungeon-modal-content {
    width: 95% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    max-height: var(--modal-max-height, calc(100dvh - 116px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
  }
}

.mini-games-game-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mini-games-game-card:hover {
  transform: translateY(-2px);
}

.ck-turret-btn {
  transition: all 0.15s ease;
}

.ck-turret-btn:hover:not(.disabled) {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.ck-turret-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
}

.mg-stage-cell {
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.mg-stage-cell:hover:not(.locked) {
  transform: scale(1.02);
}

/* =========================================================================
   POULTRY PAYLOAD ON-SCREEN HUD & CONTROLS OVERLAY STYLES
   ========================================================================= */

.pl-screen-viewport {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: #0c4a6e;
  height: 450px;
  max-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pl-screen-top-hud {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pl-screen-hud-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 4px 8px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  flex-wrap: wrap;
}

.pl-screen-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  padding: 2px 4px;
  white-space: nowrap;
}

.pl-screen-bottom-hud {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  z-index: 12;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pl-aiming-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: none;
}

.pl-screen-stage-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  padding: 3px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.pl-screen-slam-cluster {
  margin-left: auto;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.pl-screen-btn {
  pointer-events: auto !important;
  touch-action: manipulation;
  user-select: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.pl-screen-btn:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(249, 115, 22, 0.65);
  transform: translateY(-1px);
}

.pl-screen-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.pl-screen-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed !important;
}

.pl-screen-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  padding: 4px 8px;
}

.pl-screen-pause-btn {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.5);
  color: #fdba74;
}

.pl-screen-upgrades-btn {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.88), rgba(234, 88, 12, 0.88));
  border: 1px solid #fdba74;
  color: #ffffff;
  padding: 6px 11px;
}

.pl-screen-upgrades-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: #fef08a;
}

.pl-screen-slam-btn {
  padding: 6px 12px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-radius: 9px !important;
  border: 1px solid #86efac !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.45) !important;
  color: #ffffff !important;
}

@media (max-width: 480px) {
  .pl-screen-viewport {
    height: 400px;
    max-height: 64vh;
  }
  .pl-screen-top-hud {
    top: 6px;
    left: 6px;
    right: 6px;
    gap: 4px;
  }
  .pl-screen-hud-cluster {
    padding: 3px 6px;
    gap: 4px;
  }
  .pl-screen-stat-pill {
    font-size: 10px;
    padding: 1px 3px;
  }
  .pl-screen-bottom-hud {
    bottom: 6px;
    left: 6px;
    right: 6px;
    gap: 5px;
  }
  .pl-screen-btn {
    padding: 4px 7px;
    font-size: 9.5px;
  }
  .pl-screen-slam-btn {
    padding: 5px 10px !important;
    font-size: 10px !important;
  }
}

/* =========================================================================
   AURA FARM PVP CLASH & BATTLE VISUALIZER STYLES
   ========================================================================= */

.aura-clash-stage {
  position: relative;
  width: 100%;
  height: 380px;
  max-height: 48vh;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 60%, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 75%, #050b14 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7), 0 8px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  box-sizing: border-box;
}

/* Arena Floor Grid & Ambient Dust */
.aura-clash-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.7) 100%);
  pointer-events: none;
  z-index: 1;
}

.aura-clash-floor::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.35), rgba(245, 158, 11, 0.35), transparent);
}

/* Combatant Staging Nodes */
.aura-combatant-node {
  position: relative;
  width: 130px;
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 5;
  transition: transform 0.3s ease;
}

.aura-combatant-node.attacker {
  left: 0;
}

.aura-combatant-node.defender {
  right: 0;
  transform: scaleX(-1); /* Face left towards center */
}

/* Class Aura Aura Backdrops */
.aura-glow-backdrop {
  position: absolute;
  width: 140px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(25px);
  opacity: 0.65;
  animation: auraGlowPulse 2.4s ease-in-out infinite alternate;
}

.aura-glow-backdrop.theme-adventurer {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.7) 0%, rgba(2, 132, 199, 0.1) 70%, transparent 100%);
}

.aura-glow-backdrop.theme-cultivator {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.7) 0%, rgba(217, 119, 6, 0.1) 70%, transparent 100%);
}

.aura-glow-backdrop.theme-player {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.7) 0%, rgba(126, 34, 206, 0.1) 70%, transparent 100%);
}

@keyframes auraGlowPulse {
  0% { transform: scale(0.92); opacity: 0.55; }
  100% { transform: scale(1.12); opacity: 0.85; }
}

/* Central Props Layer */
.aura-center-prop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 4;
}

/* Prop 1: Arm Wrestling Table */
.aura-prop-table {
  width: 140px;
  height: 120px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.aura-table-surface {
  width: 130px;
  height: 20px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  position: relative;
}

.aura-table-surface::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fde047;
  transform: translateX(-50%);
  box-shadow: 0 0 8px #fde047;
}

.aura-table-legs {
  width: 90px;
  height: 70px;
  border-left: 8px solid #0f172a;
  border-right: 8px solid #0f172a;
  background: rgba(0, 0, 0, 0.4);
}

/* Prop 2: Tug of War Mana Rope */
.aura-prop-rope-container {
  width: 280px;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aura-mana-rope {
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(45deg, #f59e0b, #f59e0b 8px, #d97706 8px, #d97706 16px);
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.aura-rope-ribbon {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 26px;
  background: #ef4444;
  border-radius: 3px;
  box-shadow: 0 0 10px #ef4444;
}

.aura-rope-hazard-line {
  position: absolute;
  height: 40px;
  width: 2px;
  background: rgba(255, 255, 255, 0.3);
  top: 10px;
}

/* Prop 3: Punching Machine Dynamometer */
.aura-prop-punch-machine {
  width: 130px;
  height: 200px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  box-sizing: border-box;
}

.aura-punch-dial-display {
  width: 90%;
  padding: 6px;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 6px;
  text-align: center;
  font-family: monospace;
  font-size: 20px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 2px;
  box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.3);
}

.aura-punch-target-pad {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ef4444 0%, #991b1b 80%);
  border: 3px solid #f87171;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);
  margin-top: 24px;
  transition: transform 0.15s ease;
}

/* Projected Aura Arms & SVG Canvas Overlay */
.aura-arms-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}

.aura-energy-arm {
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px currentColor);
  animation: auraArmFlow 1.2s linear infinite;
}

@keyframes auraArmFlow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -30; }
}

/* Outcome Emphatic Stamps (BIG W and BIG L) */
.aura-stamp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
  animation: stampImpactDrop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes stampImpactDrop {
  0% { transform: scale(3.2); opacity: 0; }
  70% { transform: scale(0.92); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.aura-stamp-title-w {
  font-size: 72px;
  font-weight: 950;
  letter-spacing: 4px;
  color: #fde047;
  text-shadow: 0 0 25px rgba(250, 204, 21, 0.9), 0 0 50px rgba(245, 158, 11, 0.6), 0 6px 0 #b45309;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

.aura-stamp-title-l {
  font-size: 72px;
  font-weight: 950;
  letter-spacing: 4px;
  color: #f87171;
  text-shadow: 0 0 25px rgba(239, 68, 68, 0.9), 0 0 50px rgba(185, 28, 28, 0.6), 0 6px 0 #7f1d1d;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

.aura-stamp-badge {
  margin-top: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.aura-stamp-badge.win {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.aura-stamp-badge.loss {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* =========================================================================
   AURA FARMING DOMINANCE STAGE (WINNER STANDING OVER LOSER)
   ========================================================================= */

.aura-farming-stage {
  position: relative;
  width: 100%;
  min-height: 340px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 40%, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 70%, #030712 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* Radiant Ascending Aura Beams */
.aura-farming-pillar {
  position: absolute;
  bottom: 0;
  width: 180px;
  height: 100%;
  background: linear-gradient(0deg, rgba(250, 204, 21, 0.35) 0%, rgba(245, 158, 11, 0.15) 60%, transparent 100%);
  pointer-events: none;
  filter: blur(20px);
  animation: auraPillarPulse 2s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes auraPillarPulse {
  0% { transform: scaleX(0.85); opacity: 0.5; }
  100% { transform: scaleX(1.15); opacity: 0.95; }
}

/* Dominant Winner Model */
.aura-dominant-winner-box {
  position: relative;
  width: 140px;
  height: 190px;
  transform: scale(1.12);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 20px rgba(250, 204, 21, 0.6));
}

/* Collapsed/Slumped Loser Model */
.aura-collapsed-loser-box {
  position: relative;
  width: 100px;
  height: 110px;
  transform: scale(0.78) translateY(10px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  filter: grayscale(0.5) brightness(0.65) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

/* Aura Points Harvested Banner */
.aura-harvest-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.45);
  font-size: 14px;
  font-weight: 900;
  color: #fde047;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  margin-top: 10px;
  z-index: 5;
}

/* League Progress Bar */
.aura-league-progress-track {
  width: 100%;
  max-width: 380px;
  height: 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  margin-top: 8px;
  z-index: 5;
}

.aura-league-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fde047);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================================
   AURA INTIMIDATION CREATURES (TORIKO APPETITE DEMON LOOM & CLASH)
   ========================================================================= */

.aura-intimidation-creature {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 170px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.84;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: intimidationLoom 3.6s ease-in-out infinite alternate;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease, opacity 0.3s ease;
}

.aura-intimidation-creature.attacker {
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.5));
}

.aura-intimidation-creature.defender {
  filter: drop-shadow(0 0 14px rgba(244, 63, 94, 0.5));
}

.aura-creature-banner {
  position: absolute;
  bottom: -6px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fde047;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.aura-combatant-node.defender .aura-creature-banner {
  transform: scaleX(-1);
}

.aura-beast-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: transform 0.25s ease;
}

.aura-intimidation-creature.intimidation-flare {
  animation: torikoIntimidationBurst 0.65s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards !important;
}

.aura-dominant-winner-box .aura-intimidation-creature.victor-loom {
  animation: intimidationLoom 3s ease-in-out infinite alternate;
  top: -55px;
  width: 210px;
  height: 210px;
}

@keyframes intimidationLoom {
  0% {
    transform: translateX(-50%) translateY(0px) scale(0.96);
  }
  50% {
    transform: translateX(-50%) translateY(-7px) scale(1.03);
  }
  100% {
    transform: translateX(-50%) translateY(0px) scale(0.96);
  }
}

@keyframes torikoIntimidationBurst {
  0% {
    transform: translateX(-50%) scale(0.85);
    opacity: 0.6;
    filter: brightness(1) drop-shadow(0 0 8px currentColor);
  }
  40% {
    transform: translateX(-50%) scale(1.38) translateY(-16px);
    opacity: 1;
    filter: brightness(2.2) contrast(1.3) drop-shadow(0 0 35px #fde047);
  }
  100% {
    transform: translateX(-50%) scale(1.05) translateY(-4px);
    opacity: 0.92;
    filter: brightness(1.2) drop-shadow(0 0 20px currentColor);
  }
}

/* ==========================================================================
   NUTTY HOLD'EM POKER LOUNGE & FELT STYLES
   ========================================================================== */
.poker-felt-table {
  user-select: none;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: 380px;
  max-height: 390px;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poker-table-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.75));
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.poker-seat {
  transition: all 0.25s ease;
}

@keyframes pokerPulseTurn {
  0%, 100% {
    box-shadow: 0 0 12px rgba(253, 224, 71, 0.6);
    border-color: #fde047;
  }
  50% {
    box-shadow: 0 0 24px rgba(253, 224, 71, 0.9);
    border-color: #ffffff;
  }
}

.poker-seat-acting {
  animation: pokerPulseTurn 1.4s infinite ease-in-out;
}

/* River / Community Cards PC Scaling (Default > 640px) */
#poker-community-cards,
.poker-community-cards-row {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 66px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.poker-comm-card-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 66px;
  flex-shrink: 0;
}

.poker-comm-card-empty {
  width: 48px;
  height: 66px;
  border-radius: 6px;
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.2);
}

.poker-river-card {
  width: 48px;
  height: 66px;
}

@media (max-width: 640px) {
  .poker-felt-table {
    height: 330px;
    max-height: 340px;
    border: none !important;
  }
  /* River / Community Cards Phone UI Scaling (<= 640px) */
  #poker-community-cards,
  .poker-community-cards-row {
    gap: 4px !important;
    min-height: 45px !important;
  }
  #poker-community-cards .poker-comm-card-slot,
  #poker-community-cards .poker-card-wrapper,
  .poker-comm-card-slot,
  .poker-comm-card-empty,
  .poker-river-card {
    width: 32px !important;
    height: 45px !important;
    border-radius: 5px !important;
  }
  .poker-comm-card-empty {
    font-size: 14px !important;
  }
  .poker-river-card .poker-card-rank {
    font-size: 10px !important;
  }
  .poker-river-card .poker-card-suit {
    font-size: 13px !important;
  }
  .poker-flying-card {
    width: 32px !important;
    height: 45px !important;
    font-size: 15px !important;
    border-radius: 5px !important;
  }
  #poker-seat-0 {
    bottom: -10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  #poker-seat-1 {
    left: 2% !important;
    bottom: 40px !important;
    transform: translateX(0) !important;
  }
  #poker-seat-2 {
    left: 2% !important;
    top: 28px !important;
    transform: translateX(0) !important;
  }
  #poker-seat-3 {
    top: -10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  #poker-seat-4 {
    right: 2% !important;
    top: 28px !important;
    transform: translateX(0) !important;
  }
}

@media (max-width: 380px) {
  #poker-community-cards,
  .poker-community-cards-row {
    gap: 3px !important;
    min-height: 40px !important;
  }
  #poker-community-cards .poker-comm-card-slot,
  #poker-community-cards .poker-card-wrapper,
  .poker-comm-card-slot,
  .poker-comm-card-empty,
  .poker-river-card {
    width: 28px !important;
    height: 40px !important;
    border-radius: 4px !important;
  }
  .poker-comm-card-empty {
    font-size: 12px !important;
  }
  .poker-river-card .poker-card-rank {
    font-size: 9px !important;
  }
  .poker-river-card .poker-card-suit {
    font-size: 11.5px !important;
  }
  .poker-flying-card {
    width: 28px !important;
    height: 40px !important;
    font-size: 13px !important;
    border-radius: 4px !important;
  }
}

/* ==========================================================================
   NUTTY HOLD'EM ENHANCED ANIMATIONS & COSMETICS
   ========================================================================== */

/* 1. Card Dealing Flying Animation */
.poker-flying-card {
  position: absolute;
  width: 48px;
  height: 66px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid #eab308;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 100;
  transform-origin: center center;
  transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.4, 1), opacity 0.34s ease;
}

/* 2. Floating Blind Deduction Notification */
@keyframes pokerDeductionFloat {
  0% {
    opacity: 0;
    transform: translateY(0px) scale(0.85);
  }
  20% {
    opacity: 1;
    transform: translateY(-8px) scale(1.05);
  }
  80% {
    opacity: 1;
    transform: translateY(-18px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-26px) scale(0.95);
  }
}

.poker-deduction-floater {
  position: absolute;
  top: -12px;
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 9.5px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 45;
  animation: pokerDeductionFloat 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.sb-deduction-badge {
  background: #78350f;
  border: 1px solid #f59e0b;
  color: #fde047;
}

.bb-deduction-badge {
  background: #312e81;
  border: 1px solid #818cf8;
  color: #c7d2fe;
}

/* 3. Indicator Chips Beside Player Name Box */
.poker-indicator-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 900;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.sb-indicator-chip {
  background: #f59e0b;
  color: #0f172a;
  border: 1.5px solid #fef08a;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.bb-indicator-chip {
  background: #6366f1;
  color: #ffffff;
  border: 1.5px solid #c7d2fe;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.6);
}

.dealer-indicator-chip {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #0f172a;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.poker-physics-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* 4. Sleek Center Pot & Player Bet Badges */
.poker-center-pot-pill {
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid #eab308;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 900;
  color: #fde047;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  z-index: 15;
}

.poker-pot-breakdown-panel {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 8px;
  padding: 5px 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
  z-index: 25;
  min-width: 116px;
  max-width: 135px;
  pointer-events: auto;
  contain: layout style;
}

@media (max-width: 640px) {
  .poker-pot-breakdown-panel {
    bottom: 8px;
    right: 6px;
    padding: 4px 6px;
    min-width: 102px;
  }
}

.poker-pot-nut-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}

.poker-seat-bet-badge {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #eab308;
  border-radius: 9999px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 900;
  color: #fde047;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  line-height: 1.2;
}

.nut-chip-stack-column {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  position: relative;
}

.nut-chip-png-token {
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65));
  pointer-events: none;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nut-chip-sm {
  width: 16px;
  height: 16px;
}

.nut-chip-lg {
  width: 22px;
  height: 22px;
}

.nut-chip-inline-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.poker-guide-nut-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  display: inline-block;
  vertical-align: middle;
}

.nut-chip-disc {
  width: 20px;
  height: 7px;
  border-radius: 9999px;
  margin-top: -4px;
  position: relative;
  box-shadow: 0 1.5px 2px rgba(0, 0, 0, 0.5);
  border-width: 1px;
  border-style: solid;
}

.nut-chip-disc:first-child {
  margin-top: 0;
}

.chip-pistachio {
  background: #7c3aed;
  border-color: #c084fc;
}

.chip-pecan {
  background: #1e293b;
  border-color: #fde047;
}

.chip-hazelnut {
  background: #047857;
  border-color: #34d399;
}

.chip-cashew {
  background: #1d4ed8;
  border-color: #60a5fa;
}

.chip-walnut {
  background: #b91c1c;
  border-color: #f87171;
}

.chip-almond {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* 5. Custom Table Felts & Rails - Rendered via high-definition illustrated PNG artwork */
.felt-classic-emerald, .felt-classic-green,
.felt-midnight-sapphire, .felt-midnight-blue,
.felt-high-stakes-ruby, .felt-crimson-lounge,
.felt-golden-acorn-suede,
.felt-charcoal-iron,
.felt-cardio-crimson-speedweave,
.felt-forest-moss-sanctuary,
.felt-rustic-pecan-leather,
.felt-starlight-astral-weave,
.felt-radiant-aura-gold,
.felt-void-eclipse-noir,
.felt-cyberpunk-neon-grid, .felt-cyber-matrix,
.felt-olympian-marble-gold, .felt-sovereign-gold,
.felt-glacial-frostbite,
.felt-dragon-flame-brocade,
.felt-zen-garden-bamboo-silk,
.felt-void-sovereign-amethyst,
.felt-prismatic-aurora-veil,
.felt-bloodmoon-berserker,
.felt-fitness-god-pantheonic {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 6. Showdown Winner Spotlight & Manual Next Hand Progression */
@keyframes pokerWinnerPulse {
  0% {
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.7), inset 0 0 4px rgba(250, 204, 21, 0.3);
    border-color: #eab308;
  }
  100% {
    box-shadow: 0 0 24px rgba(250, 204, 21, 1), inset 0 0 10px rgba(250, 204, 21, 0.6);
    border-color: #fef08a;
  }
}

.poker-next-hand-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 1.5px solid #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45) !important;
  transition: all 0.2s ease !important;
}

.poker-next-hand-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.7) !important;
  filter: brightness(1.1);
}

.poker-next-hand-btn:active {
  transform: translateY(1px) scale(0.99);
}

.poker-next-hand-btn.btn-warning {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%) !important;
  border-color: #fef08a !important;
  color: #1e1b4b !important;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.6) !important;
}

.poker-next-hand-btn.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border-color: #fca5a5 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5) !important;
}

/* 7. Classic Casino White Poker Card Image Rendering & High-Quality Visual Enhancements */
.poker-card-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
  border-radius: 6px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.poker-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
  border-radius: 6px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.poker-card-wrapper:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7)) brightness(1.05);
}

/* 8. 3D Card Live Preview & Flipper System */
.wardrobe-card-3d-flipper {
  cursor: pointer;
  width: 66px;
  height: 85px;
  perspective: 600px;
  user-select: none;
}

#wardrobe-preview-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.wardrobe-card-face-front,
.wardrobe-card-face-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
}

.wardrobe-card-face-front.is-image-asset,
.wardrobe-card-face-back.is-image-asset {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
}

.wardrobe-card-face-front.is-image-asset img,
.wardrobe-card-face-back.is-image-asset img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
}

/* =========================================================================
   CONTAMINATED CREATINE CATASTROPHE (CCC) & LEVEL 5 STORYLINE STYLING
   ========================================================================= */

.ccc-storyline-content {
  background: radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.98) 70%) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.4) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.25) !important;
}

.ccc-biohazard-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.ccc-scene-art-box {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #090d16 0%, #111827 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  min-height: 180px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
}

.ccc-reactor-core-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.8) 0%, rgba(16, 185, 129, 0.4) 50%, transparent 70%);
  filter: blur(16px);
  animation: cccPulse 2.4s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes cccPulse {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 0.9; }
}

@keyframes cccDrift {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.ccc-animated-mascot-dialogue {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ccc-mascot-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: 2px solid #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
  object-fit: cover;
  background: #0f172a;
}

.ccc-macro-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 480px) {
  .ccc-macro-cards-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.ccc-macro-card {
  border-radius: 10px;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ccc-macro-card:hover {
  transform: translateY(-2px);
}

.ccc-nav-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ccc-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
}

.ccc-nav-dot.active {
  background: #10b981;
  border-color: #34d399;
  box-shadow: 0 0 8px #10b981;
  transform: scale(1.25);
}

.ccc-locked-card {
  background: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.15), rgba(15, 23, 42, 0.95));
  border: 1.5px dashed rgba(239, 68, 68, 0.5);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* =========================================================================
   POKER LOUNGE REFACTORED MOBILE PORTRAIT & 3-ZONE VIEWPORT STYLES
   ========================================================================= */

/* Desktop wrapper (max-w-md centered container) & mobile portrait shell */
.poker-modal-container {
  max-width: 448px !important; /* max-w-md centered container */
  width: 100% !important;
  height: 92vh !important;
  max-height: 844px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: auto !important;
  border-radius: 24px !important;
  background: rgba(15, 23, 42, 0.96) !important;
  border: 1.5px solid rgba(234, 179, 8, 0.35) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(234, 179, 8, 0.15) !important;
  backdrop-filter: blur(20px) !important;
}

@media (max-width: 480px) {
  .poker-modal-container {
    max-width: 100% !important;
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }
}

/* Table Felt Tournament expansion mode */
.poker-modal-container.in-tournament {
  max-width: 560px !important;
  max-height: 94vh !important;
  border-radius: 16px !important;
}

.poker-modal-body-wrapper {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 3-Zone Architecture */
.nut-poker-lobby-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: #020617;
}

/* Zone 1: Fixed Top Bar */
.poker-zone-top {
  flex-shrink: 0;
  z-index: 30;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px 10px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(234, 179, 8, 0.25);
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.poker-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.poker-top-left-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 1;
}

.poker-lounge-title-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.3);
  min-width: 0;
  white-space: nowrap;
}

.poker-top-utility-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Compact Utility Buttons (40x40 desktop/tablet, scaled on narrow mobile) */
.poker-utility-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 12px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  flex-shrink: 0 !important;
}

@media (max-width: 440px) {
  .poker-zone-top {
    padding: 10px 10px 8px;
  }
  .poker-top-row {
    gap: 4px;
  }
  .poker-top-left-group {
    gap: 5px;
  }
  .poker-lounge-title-pill {
    padding: 4px 7px !important;
    gap: 4px !important;
  }
  .poker-top-utility-group {
    gap: 4px;
  }
  .poker-utility-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 350px) {
  .poker-utility-btn {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;
    max-width: 31px !important;
    max-height: 31px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }
  .poker-top-utility-group {
    gap: 3px;
  }
}

.poker-utility-btn:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  border-color: rgba(234, 179, 8, 0.4) !important;
  transform: translateY(-1px);
}

.poker-utility-btn:active {
  transform: scale(0.95);
  background: rgba(15, 23, 42, 0.95) !important;
}

.poker-close-btn:hover {
  background: rgba(225, 29, 72, 0.3) !important;
  border-color: rgba(244, 63, 94, 0.5) !important;
  color: #fecdd3 !important;
}

/* Currency Balances Row */
.poker-currency-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.poker-bankroll-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(234, 179, 8, 0.3);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
  min-width: 0;
  flex: 0 1 auto;
}

.poker-currency-nut-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  flex-shrink: 0;
}

.poker-currency-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.poker-currency-label {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fde047;
  letter-spacing: 0.5px;
  line-height: 1;
}

.poker-currency-value {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .poker-currency-value {
    font-size: 11.5px;
  }
  .poker-bankroll-pill,
  .poker-acorns-pill {
    padding: 5px 8px;
  }
}

/* (i) Info trigger button */
.poker-info-btn {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  border-radius: 50% !important;
  background: rgba(234, 179, 8, 0.2) !important;
  border: 1px solid rgba(234, 179, 8, 0.5) !important;
  color: #fde047 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  margin-left: 2px !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.poker-info-btn:hover {
  background: rgba(234, 179, 8, 0.4) !important;
  transform: scale(1.15);
}

.poker-info-btn:active {
  transform: scale(0.9);
}

.poker-acorns-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

/* Zone 2: Focused Scrollable Mid-Zone */
.poker-zone-mid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
}

/* Character Integration: Baron Montgomery von Squirrel Overlapping Bust */
.poker-baron-bust-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
  transition: transform 0.15s ease;
}

.poker-baron-bust-container:active {
  transform: scale(0.98);
}

.poker-baron-bust-wrapper {
  position: relative;
  width: 66px;
  height: 66px;
  flex-shrink: 0;
}

.poker-baron-avatar-ring {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.25) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid #facc15;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poker-baron-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.18) translateY(2px);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
}

.poker-baron-pill {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: #ca8a04;
  color: #0f172a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 1px 6px;
  border-radius: 9999px;
  border: 1px solid #fde047;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

/* Sleek Speech Bubble */
.poker-baron-speech-bubble {
  flex: 1;
  min-width: 0;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 14px;
  padding: 8px 12px;
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.poker-baron-speech-bubble::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -6px;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(15, 23, 42, 0.88);
  border-left: 1px solid rgba(250, 204, 21, 0.35);
  border-bottom: 1px solid rgba(250, 204, 21, 0.35);
}

.poker-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.poker-bubble-title {
  font-size: 11.5px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.2px;
}

.poker-bubble-advice-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  color: #fef08a;
}

.poker-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 6px #facc15;
  animation: pokerPulseDot 1.4s infinite ease-in-out;
}

@keyframes pokerPulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 6px #facc15;
  }
  50% {
    opacity: 0.3;
    transform: scale(1.35);
    box-shadow: 0 0 10px #facc15;
  }
}

.poker-bubble-text {
  font-size: 11px;
  line-height: 1.35;
  color: #fef08a;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Daily Stipend Banner */
.poker-stipend-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.poker-stipend-banner:hover {
  border-color: #34d399;
  transform: translateY(-1px);
}

.poker-stipend-banner:active {
  transform: scale(0.98);
}

/* Tournament Stakes Touch Carousel */
.poker-stakes-carousel {
  display: flex !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 12px !important;
  padding: 6px calc(50% - min(40vw, 138px)) 10px !important;
  scroll-padding-inline: calc(50% - min(40vw, 138px)) !important;
  margin: 0 -14px !important;
  scrollbar-width: none !important;
  box-sizing: border-box !important;
}

.poker-stakes-carousel::-webkit-scrollbar {
  display: none !important;
}

.poker-stake-card {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex-shrink: 0;
  width: min(80vw, 276px);
  max-width: 276px;
  cursor: pointer;
  user-select: none;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0.62;
  transform: scale(0.95);
}

.poker-stake-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(30, 41, 59, 0.8);
  opacity: 0.88;
}

/* Active Tier Selection State */
.poker-stake-card.active {
  opacity: 1 !important;
  transform: scale(1.01) !important;
  border: 2px solid #eab308 !important;
  box-shadow: 0 0 22px rgba(234, 179, 8, 0.4), inset 0 0 14px rgba(234, 179, 8, 0.12) !important;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95)) !important;
}

@media (prefers-reduced-motion: reduce) {
  .poker-stake-card,
  .poker-stake-card.active {
    transition: none !important;
    transform: none !important;
  }
}

/* Stakes Tier Pagination Dots */
.poker-stakes-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: -4px;
  padding: 2px 0;
}

.poker-stake-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.poker-stake-dot:hover {
  background: rgba(250, 204, 21, 0.55);
}

.poker-stake-dot.active {
  width: 24px;
  background: #eab308;
  border-color: #fde047;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
}

.poker-tier-badge {
  font-size: 9px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.poker-tier-badge.active {
  background: #facc15;
  color: #0f172a;
  border-color: #fde047;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}

.poker-hero-stack {
  font-size: 27px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

/* Zone 3: Sticky Bottom Safe-Area Footer */
.poker-zone-bottom {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 30;
  padding: 12px 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.96) 75%, transparent 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.poker-primary-cta {
  width: 100%;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.4px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.poker-primary-cta:not([disabled]) {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  border: 1.5px solid #fde047;
  color: #0f172a;
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.45);
}

.poker-primary-cta:not([disabled]):hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 24px rgba(234, 179, 8, 0.6);
  transform: translateY(-1px);
}

.poker-primary-cta:not([disabled]):active {
  transform: scale(0.98);
}

.poker-primary-cta[disabled] {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

/* Slide-Over Bottom-Sheet Modal (ChipValuationSheet) */
.poker-bottom-sheet-content {
  border-radius: 24px 24px 0 0 !important;
  max-width: 448px !important;
  width: 100% !important;
  max-height: 80vh !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding: 12px 16px 20px !important;
  border-bottom: none !important;
  background: rgba(15, 23, 42, 0.98) !important;
  border: 1.5px solid rgba(234, 179, 8, 0.35) !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(20px) !important;
}

@media (min-width: 641px) {
  .poker-bottom-sheet-content {
    border-radius: 24px !important;
    margin: auto !important;
    border: 1.5px solid rgba(234, 179, 8, 0.35) !important;
  }
}

.poker-sheet-grab-bar {
  width: 42px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  margin: 0 auto 10px auto;
}

.poker-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.poker-chip-row:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(234, 179, 8, 0.3);
}







/* ==========================================================================
   MOBILE TAP & OVERFLOW FIXES (CCC rail, Admin pill, Q&A entry points)
   ========================================================================== */
.idle-floating-rail-btn,
.idle-topbar-pill,
.metallic-pin,
.landing-nav-link {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
  /* Wrap the FUN World top bar so the Admin & Settings pills are never pushed off-screen */
  .idle-topbar-hud {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    row-gap: 4px;
  }
  .idle-topbar-hud > div {
    min-width: 0;
    max-width: 100%;
  }
  .idle-topbar-hud > div:last-child {
    margin-left: auto;
  }

  /* Landing navbar: wrap so Q&A Portal link is always reachable */
  .landing-navbar {
    flex-wrap: wrap !important;
    row-gap: 6px;
  }
}

@media (max-width: 390px) {
  /* Settings header Q&A button: compact text on narrow screens */
  #settings-header-qna-btn span {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .landing-navbar {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}

/* ==========================================================================
   IRON ACADEMY KNOWLEDGE QUIZ STYLING
   ========================================================================== */
.quiz-pip {
  flex: 1;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  transition: all 0.2s ease;
  user-select: none;
}
.quiz-pip.correct {
  background: rgba(34, 197, 94, 0.25);
  border: 1px solid #22c55e;
  color: #4ade80;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}
.quiz-pip.wrong {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid #ef4444;
  color: #f87171;
}
.quiz-pip.active {
  background: rgba(56, 189, 248, 0.25);
  border: 1.5px solid #38bdf8;
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  animation: pulseGlow 1.8s infinite alternate;
}
.quiz-pip.pending {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.quiz-option-btn:not(:disabled):hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateX(3px);
}
.quiz-option-btn:not(:disabled):active {
  transform: scale(0.99);
}

.quiz-option-letter {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #cbd5e1;
  transition: all 0.18s ease;
}

.quiz-option-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.35;
  flex: 1;
}

.quiz-option-btn.is-revealed-correct {
  background: rgba(34, 197, 94, 0.22) !important;
  border: 1.5px solid #22c55e !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.3) !important;
}
.quiz-option-btn.is-revealed-correct .quiz-option-letter {
  background: #22c55e !important;
  border-color: #4ade80 !important;
  color: #052e16 !important;
  font-weight: 900 !important;
}
.quiz-option-btn.is-revealed-correct .quiz-option-text {
  color: #86efac !important;
  font-weight: 800 !important;
}

.quiz-option-btn.is-wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1.5px solid #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25) !important;
}
.quiz-option-btn.is-wrong .quiz-option-letter {
  background: #ef4444 !important;
  border-color: #f87171 !important;
  color: white !important;
  font-weight: 900 !important;
}
.quiz-option-btn.is-wrong .quiz-option-text {
  color: #fca5a5 !important;
  text-decoration: line-through;
}

.quiz-option-btn.is-neutral-disabled {
  opacity: 0.55;
  cursor: default;
}

.quiz-explanation-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-left: 3.5px solid #38bdf8;
  border-radius: 8px;
  padding: 10px 12px;
}

/* ==========================================================================
   ROOKIE STARTER MISSIONS (POST-TOUR INTERACTIVE TUTORIALS)
   ========================================================================== */

.starter-missions-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.starter-missions-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
}

.starter-missions-highlight-pulse {
  animation: starterMissionsCardPulse 2s ease-in-out;
}

@keyframes starterMissionsCardPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(168, 85, 247, 0); }
  50% { transform: scale(1.015); box-shadow: 0 0 25px rgba(168, 85, 247, 0.5); border-color: #a855f7; }
  100% { transform: scale(1); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12); }
}

.starter-mission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-md, 10px);
  transition: all 0.2s ease;
}

.starter-mission-row:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateX(2px);
}

.starter-mission-row.is-completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  opacity: 0.88;
}

.starter-mission-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.starter-mission-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.starter-mission-status-icon.pending {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.starter-mission-status-icon.done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.starter-mission-status-icon i,
.starter-mission-status-icon svg {
  width: 16px;
  height: 16px;
}

.starter-mission-text {
  min-width: 0;
  flex: 1;
}

.starter-mission-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.starter-mission-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.starter-mission-row.is-completed .starter-mission-name {
  color: #e2e8f0;
}

.starter-mission-reward-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 1px 6px;
  border-radius: 8px;
}

.starter-mission-desc {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  margin-top: 2px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .starter-mission-desc {
    white-space: normal;
  }
}

.starter-mission-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.starter-mission-guide-btn {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: none;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
  color: #ffffff;
}

.starter-mission-guide-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.5);
}

.starter-mission-completed-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
}

.starter-mission-completed-tag i,
.starter-mission-completed-tag svg {
  width: 12px;
  height: 12px;
}

/* Floating mascot guidance prompt pill */
.jan-mission-floating-prompt {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: 90vw;
  width: max-content;
  padding: 8px 14px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid #a855f7;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 16px rgba(168, 85, 247, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  animation: janMissionFloatIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes janMissionFloatIn {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Temporary element pulse for guided targets */
.starter-mission-pulse-target {
  position: relative;
  z-index: 2700;
  outline: 2.5px solid #a855f7 !important;
  outline-offset: 3px;
  animation: starterTargetPulse 1.2s infinite alternate !important;
}

@keyframes starterTargetPulse {
  from {
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
  }
  to {
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.9), 0 0 35px rgba(99, 102, 241, 0.6);
  }
}

/* =========================================================================
   AUDIT REMEDIATION: OFF-SCREEN RENDERING & ACCESSIBLE TOUCH TARGETS
   ========================================================================= */

/* UI-04: Keep active-exercise-card unclipped for boundary-edge Up/Down buttons and above-the-fold rendering */
.active-exercise-card {
  content-visibility: visible;
  overflow: visible;
}

.catalog-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

/* UI-05 & UI-07: Keyboard focus-visible rings & mobile touch target sizing */
button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary, #38bdf8);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .set-badge-btn {
    min-width: 26px;
    min-height: 26px;
  }
  .modal-overlay .close-btn,
  .modal-header .icon-btn {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* =========================================================================
   MOBILE EXERCISE CARD UI/UX & CIRCUIT WORKFLOW OPTIMIZATION
   ========================================================================= */

/* 1. 2-Row Compact Exercise Card Header & Single-Line Utility Strip */
.active-exercise-card .active-ex-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
}

.active-exercise-card.collapsed .active-ex-header {
  margin-bottom: 0;
}

.active-exercise-card.collapsed .active-ex-utility-strip {
  display: none;
}

.active-ex-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.active-ex-header-top .active-ex-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.btn-ex-collapse {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ex-collapse:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #f8fafc;
}

.active-ex-title-text {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  text-decoration: underline dotted var(--accent-primary, #6366f1);
  text-underline-offset: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.active-ex-title-text:hover {
  color: var(--accent-primary, #818cf8);
}

.ex-history-count {
  color: #818cf8;
  font-weight: 800;
  font-size: 13px;
}

.active-ex-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-ex-more-menu {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-main, #e2e8f0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-ex-more-menu:hover,
.btn-ex-more-menu.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.55);
  color: #c7d2fe;
}

/* Row 2: Quick Utility Chip Strip */
.active-ex-utility-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  width: 100%;
}

.ex-util-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  height: 24px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-secondary, #cbd5e1);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ex-util-chip:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(148, 163, 184, 0.38);
  color: #ffffff;
}

.ex-util-chip.ex-plates-chip,
.ex-util-chip.ex-note-chip {
  background: rgba(129, 140, 248, 0.14);
  border-color: rgba(129, 140, 248, 0.36);
  color: #a5b4fc;
  font-weight: 700;
}

.ex-util-chip.ex-note-chip:hover {
  background: rgba(129, 140, 248, 0.24);
  border-color: rgba(129, 140, 248, 0.56);
  color: #e0e7ff;
}

.ex-util-chip.ex-note-chip.has-note,
.ex-util-chip.active-note-chip {
  background: rgba(99, 102, 241, 0.24);
  border-color: rgba(129, 140, 248, 0.58);
  color: #e0e7ff;
  font-weight: 700;
}

.ex-util-chip.ex-swap-chip {
  background: rgba(16, 185, 129, 0.13);
  border-color: rgba(16, 185, 129, 0.36);
  color: #34d399;
  font-weight: 700;
}

.ex-util-chip.ex-swap-chip:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(16, 185, 129, 0.56);
  color: #a7f3d0;
}

.ex-util-chip.ex-alt-chip {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.36);
  color: #fbbf24;
  font-weight: 700;
}

.ex-util-chip.ex-alt-chip:hover {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.56);
  color: #fde68a;
}

.ex-util-chip.ex-alt-chip.has-alt,
.ex-util-chip.active-alt-chip {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
  font-weight: 700;
}

.ex-util-chip.ex-tempo-chip {
  background: rgba(56, 189, 248, 0.13);
  border-color: rgba(56, 189, 248, 0.36);
  color: #38bdf8;
  font-weight: 700;
}

.ex-util-chip.ex-tempo-chip:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.56);
  color: #bae6fd;
}

.ex-util-chip.ex-tempo-chip.has-tempo,
.ex-util-chip.active-tempo-chip,
.ex-util-chip.active-cadence-chip {
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
  font-weight: 700;
}

body.light-theme .ex-util-chip {
  background: #f1f5f9;
  border-color: rgba(100, 116, 139, 0.28);
  color: #334155;
}

body.light-theme .ex-util-chip.ex-note-chip,
body.light-theme .ex-util-chip.ex-plates-chip {
  background: rgba(79, 70, 229, 0.10);
  border-color: rgba(79, 70, 229, 0.32);
  color: #4338ca;
}

body.light-theme .ex-util-chip.ex-note-chip.has-note,
body.light-theme .ex-util-chip.active-note-chip {
  background: rgba(79, 70, 229, 0.18);
  border-color: rgba(79, 70, 229, 0.50);
  color: #3730a3;
}

body.light-theme .ex-util-chip.ex-swap-chip {
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.34);
  color: #047857;
}

body.light-theme .ex-util-chip.ex-alt-chip,
body.light-theme .ex-util-chip.active-alt-chip {
  background: rgba(217, 119, 6, 0.11);
  border-color: rgba(217, 119, 6, 0.36);
  color: #b45309;
}

body.light-theme .ex-util-chip.ex-alt-chip.has-alt {
  background: rgba(217, 119, 6, 0.18);
  border-color: rgba(217, 119, 6, 0.52);
  color: #92400e;
}

body.light-theme .ex-util-chip.ex-tempo-chip,
body.light-theme .ex-util-chip.active-tempo-chip,
body.light-theme .ex-util-chip.active-cadence-chip {
  background: rgba(2, 132, 199, 0.10);
  border-color: rgba(2, 132, 199, 0.34);
  color: #0369a1;
}

body.light-theme .ex-util-chip.ex-tempo-chip.has-tempo {
  background: rgba(2, 132, 199, 0.18);
  border-color: rgba(2, 132, 199, 0.50);
  color: #075985;
}

/* Horizontally Offset Boundary-Edge Move Up (Right) & Move Down (Left-Offset) Buttons */
.btn-ex-edge-move {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: var(--text-main, #e2e8f0);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn-ex-edge-move.edge-up {
  top: -10px;
  right: 12px;
}

.btn-ex-edge-move.edge-down {
  bottom: -10px;
  right: 76px;
}

.btn-ex-edge-move:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(99, 102, 241, 0.65);
  color: #c7d2fe;
  transform: translateY(-1px);
}

.btn-ex-edge-move:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

body.light-theme .btn-ex-edge-move {
  background: #ffffff;
  border-color: rgba(100, 116, 139, 0.35);
  color: #1e293b;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12);
}

.ex-util-chip.ex-circuit-chip {
  margin-left: auto;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #34d399;
  font-weight: 700;
}

.ex-util-chip.ex-circuit-chip.is-selected {
  background: #10b981;
  border-color: #34d399;
  color: #022c22;
  font-weight: 800;
}

.ex-util-chip.ex-circuit-chip.is-grouped {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

/* 2. Station Badges & Contextual Rest Pills */
.ex-station-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  line-height: 1.1;
}

.ex-station-badge.is-circuit {
  background: #10b981;
  color: #022c22;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.ex-station-badge.is-superset {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
}

.ex-station-badge.is-selecting {
  background: #f59e0b;
  color: #0f172a;
  cursor: pointer;
}

.badge-station-next {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  color: #34d399;
  white-space: nowrap;
}

.badge-circuit-rest {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  cursor: pointer;
}

/* 3. Compact 2-Line Target Cell & Unclipped Set Footer */
.set-target-compact-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  gap: 2px;
}

.set-target-num-label {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  white-space: nowrap;
}

.btn-use-last-compact {
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.38);
  color: #c7d2fe;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 5px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-use-last-compact:hover {
  background: rgba(99, 102, 241, 0.28);
}

.btn-use-last-compact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-target-static-text {
  font-size: 9.5px;
  color: #a5b4fc;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.active-ex-set-footer-row {
  display: flex;
  gap: 6px;
  width: 100%;
  align-items: center;
}

.btn-remove-set-compact {
  padding: 6px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* 4. Circuit & Superset Container Wrapper, Connector Rail & Round Header */
.live-group-wrapper {
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.live-circuit-wrapper {
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.04);
}

.live-superset-wrapper {
  border: 1.5px solid rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.04);
}

.live-group-wrapper .active-exercise-card {
  margin-bottom: 0 !important;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.active-exercise-card.selected-for-grouping {
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.active-exercise-card.circuit-next-station-flash {
  border-color: #34d399 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.45) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.live-station-connector-rail {
  width: 3px;
  height: 10px;
  margin-left: 22px;
  border-radius: 2px;
}

.live-station-connector-rail.is-circuit {
  background: linear-gradient(180deg, #10b981, #34d399);
}

.live-station-connector-rail.is-superset {
  background: linear-gradient(180deg, #6366f1, #818cf8);
}

.live-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 4px 8px 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.live-group-header-left,
.live-group-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-group-type-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.live-group-type-pill.is-circuit {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.live-group-type-pill.is-superset {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #818cf8;
}

.live-group-round-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.live-group-round-pill.all-done {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.live-group-rest-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  cursor: pointer;
}

.live-group-ungroup-btn {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  cursor: pointer;
}

.live-group-ungroup-btn:hover {
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.4);
}

.live-circuit-rest-inline-editor {
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.live-circuit-rest-editor-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}

.live-circuit-rest-editor-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.live-group-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.live-group-add-station-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85);
  border: 1px dashed rgba(16, 185, 129, 0.45);
  color: #34d399;
  cursor: pointer;
}

.live-group-add-station-btn.is-superset {
  border-color: rgba(99, 102, 241, 0.45);
  color: #818cf8;
}

/* 5. Sticky Floating Circuit/Superset Grouping Bar (Above Finish Workout) */
.active-grouping-floating-bar {
  position: sticky;
  bottom: 72px;
  z-index: 85;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(16, 185, 129, 0.55);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.active-grouping-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.active-grouping-count-badge {
  font-size: 12px;
  font-weight: 800;
  color: #34d399;
}

.active-grouping-cancel-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
}

.active-grouping-cancel-btn:hover {
  color: #f8fafc;
}

.active-grouping-rest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.active-grouping-rest-label {
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
}

.active-grouping-rest-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.circuit-rest-preset-chip {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.circuit-rest-preset-chip.active {
  background: rgba(16, 185, 129, 0.24);
  border-color: #34d399;
  color: #6ee7b7;
}

.active-grouping-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-circuit-link {
  padding: 7px 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  background: #10b981 !important;
  border: 1px solid #34d399 !important;
  color: #022c22 !important;
  border-radius: 8px !important;
}

.btn-superset-link {
  padding: 7px 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  background: rgba(99, 102, 241, 0.22) !important;
  border: 1px solid rgba(99, 102, 241, 0.5) !important;
  color: #c7d2fe !important;
  border-radius: 8px !important;
}

/* 6. [⋯] Exercise Card Action Portal Dropdown */
.ex-card-action-dropdown {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  box-sizing: border-box;
}

.ex-card-action-header {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2px;
}

.ex-card-action-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ex-card-action-item:hover {
  background: rgba(51, 65, 85, 0.65);
}

.ex-card-action-item.is-circuit-item {
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
}

.ex-card-action-item.is-danger-item {
  color: #fca5a5;
}

.ex-card-action-item.is-danger-item:hover {
  background: rgba(239, 68, 68, 0.16);
}

.ex-card-action-sub {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}

.ex-card-action-move-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 2px 2px;
}

.ex-card-move-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.ex-card-move-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ex-card-action-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 2px 0;
}

/* 7. Container-Aware & Mobile Set Grid Rebalancing (Zero Right-Edge Clipping) */
.sets-table {
  container-type: inline-size;
  overflow-x: visible;
}

@media (max-width: 480px) {
  .active-exercise-card {
    padding: 10px 8px !important;
  }
  .live-group-wrapper {
    padding: 8px 6px !important;
  }
  .set-row-header.is-repetitive,
  .set-row.is-repetitive {
    grid-template-columns: 28px minmax(0, 1fr) 48px 40px 44px 32px !important;
    gap: 3px !important;
  }
  .set-row-header.is-repetitive.no-rpe,
  .set-row.is-repetitive.no-rpe {
    grid-template-columns: 28px minmax(0, 1fr) 56px 50px 32px !important;
    gap: 4px !important;
  }
  .set-row-header.is-cardio,
  .set-row.is-cardio {
    grid-template-columns: 28px minmax(0, 1fr) 52px 64px 32px !important;
    gap: 3px !important;
  }
  .set-row-header.is-time-movement,
  .set-row.is-time-movement {
    grid-template-columns: 28px minmax(0, 1fr) 52px 52px 32px !important;
    gap: 3px !important;
  }
  .set-row-header.is-general,
  .set-row.is-general {
    grid-template-columns: 28px minmax(0, 1fr) 56px 64px 32px !important;
    gap: 3px !important;
  }
}

@supports (container-type: inline-size) {
  @container (max-width: 360px) {
    .set-row-header.is-repetitive,
    .set-row.is-repetitive {
      grid-template-columns: 26px minmax(0, 1fr) 44px 38px 42px 30px !important;
      gap: 3px !important;
    }
    .set-badge-btn {
      width: 24px !important;
      height: 24px !important;
      min-width: 24px !important;
      min-height: 24px !important;
    }
    .set-completed-chk {
      width: 28px !important;
      height: 28px !important;
    }
  }
}

/* ==========================================================================
   NOTIFICATIONS CENTER — TODAY'S SCHEDULE SPECIAL SEGMENT
   ========================================================================== */
.notif-schedule-segment {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(15, 23, 42, 0.78) 100%);
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.notif-schedule-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.notif-schedule-summary::-webkit-details-marker,
.notif-schedule-summary::marker {
  display: none;
  content: "";
}

.notif-schedule-chevron {
  transition: transform 0.2s ease;
  color: #a5b4fc;
}

.notif-schedule-segment[open] .notif-schedule-chevron {
  transform: rotate(180deg);
}

.notif-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.notif-schedule-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}

.notif-schedule-item:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(30, 41, 59, 0.82);
}

.notif-schedule-client-pill {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* =========================================================================
   PROGRAM ROUTINE SESSION MODAL — TRAINING LOGGER PARITY & UNIFIED SCHEDULE
   ========================================================================= */

#program-session-modal .program-session-modal-content {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  padding: 16px 18px !important;
  max-height: min(86dvh, 780px, var(--modal-max-height, calc(100dvh - 108px))) !important;
}

#program-session-modal .program-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

#program-session-modal .program-session-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pinned Top Schedule + Save Toolbar */
.program-session-top-bar {
  flex-shrink: 0;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.program-session-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.program-datetime-trigger-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
}

.program-datetime-trigger-btn:hover,
.program-datetime-trigger-btn.active {
  border-color: var(--accent-primary, #6366f1);
  background: rgba(30, 41, 59, 0.92);
}

.program-datetime-trigger-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.program-dt-date-text {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.program-dt-sep {
  color: var(--text-muted, #64748b);
  font-weight: 700;
  flex-shrink: 0;
}

.program-dt-time-text {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  white-space: nowrap;
  flex-shrink: 0;
}

.program-dt-chevron {
  width: 15px;
  height: 15px;
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.program-datetime-trigger-btn.active .program-dt-chevron {
  transform: rotate(180deg);
  color: var(--accent-primary, #818cf8);
}

.program-save-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  height: auto;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Unified In-App Calendar & Time Drawer */
.program-datetime-drawer {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(10, 15, 29, 0.98);
  border: 1px solid rgba(99, 102, 241, 0.42);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  animation: fanoutMenuFadeIn 0.16s ease-out;
}

.program-datetime-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
  gap: 10px;
}

.program-cal-panel,
.program-time-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}

.program-time-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.program-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.program-cal-month-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
}

.program-cal-nav-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-main, #e2e8f0);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.program-cal-nav-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(99, 102, 241, 0.45);
}

.program-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 4px;
}

.program-cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}

.program-cal-day-btn {
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main, #e2e8f0);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  padding: 0;
}

.program-cal-day-btn:hover {
  background: rgba(51, 65, 85, 0.8);
}

.program-cal-day-btn.is-today {
  border-color: rgba(99, 102, 241, 0.55);
  color: #a5b4fc;
  font-weight: 800;
}

.program-cal-day-btn.is-selected {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}

.program-cal-quick-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.program-cal-quick-btn {
  flex: 1;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-secondary, #cbd5e1);
  cursor: pointer;
}

.program-cal-quick-btn.is-today {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

.program-cal-quick-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #ffffff;
}

/* Integrated Time Controls */
.program-time-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.program-time-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary, #cbd5e1);
}

.program-time-badge {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 800;
}

.program-time-stepper-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
}

.program-time-stepper-box {
  display: inline-flex;
  align-items: center;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 7px;
  padding: 2px;
}

.program-time-step-btn {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(30, 41, 59, 0.9);
  border: none;
  color: var(--text-main, #f8fafc);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.program-time-step-btn:hover {
  background: rgba(51, 65, 85, 1);
}

.program-time-val {
  width: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
}

.program-time-colon {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted, #94a3b8);
}

.program-time-ampm-group {
  display: inline-flex;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 7px;
  padding: 2px;
}

.program-time-ampm-btn {
  padding: 3px 7px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}

.program-time-ampm-btn.active {
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
}

.program-time-presets-label {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  margin-bottom: 5px;
}

.program-time-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.program-time-preset-chip {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text-secondary, #cbd5e1);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

.program-time-preset-chip:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  color: #ffffff;
}

.program-dt-done-btn {
  width: 100%;
  margin-top: 10px;
  padding: 6px 10px;
  height: auto;
  font-size: 11.5px;
  font-weight: 700;
}

/* Sole Scrollable Exercises Container */
#program-session-modal .program-session-scroll-body {
  flex: 1;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  padding: 4px 4px 12px 2px !important;
}

/* Program Exercise Card Table & Header Refinements */
#program-session-modal .program-ex-card {
  position: relative;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0;
}

#program-session-modal .program-set-header-grid,
#program-session-modal .program-set-row-grid {
  display: grid;
  gap: 6px;
  align-items: center;
}

#program-session-modal .program-set-header-grid.has-rpe,
#program-session-modal .program-set-row-grid.has-rpe {
  grid-template-columns: 32px 68px 1fr 1fr 64px;
}

#program-session-modal .program-set-header-grid.no-rpe,
#program-session-modal .program-set-row-grid.no-rpe {
  grid-template-columns: 32px 68px 1fr 1fr;
}

#program-session-modal .program-set-header-grid {
  padding-bottom: 5px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-align: center;
}

#program-session-modal .program-col-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  color: #818cf8;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: underline dotted rgba(129, 140, 248, 0.7);
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

#program-session-modal .program-col-toggle-btn:hover {
  color: #a5b4fc;
}

@media (max-width: 560px) {
  .program-datetime-grid {
    grid-template-columns: 1fr;
  }
  #program-session-modal .program-session-modal-content {
    padding: 12px 12px !important;
  }
  .program-save-top-btn {
    padding: 8px 10px;
    font-size: 11.5px;
  }
  .program-dt-date-text {
    font-size: 11.5px;
  }
  .program-dt-time-text {
    font-size: 11px;
  }
  #program-session-modal .program-set-header-grid.has-rpe,
  #program-session-modal .program-set-row-grid.has-rpe {
    grid-template-columns: 28px 56px 1fr 1fr 56px;
    gap: 4px;
  }
  #program-session-modal .program-set-header-grid.no-rpe,
  #program-session-modal .program-set-row-grid.no-rpe {
    grid-template-columns: 28px 56px 1fr 1fr;
    gap: 4px;
  }
}

/* Light Theme Support for Program Session Modal */
body.light-theme #program-session-modal .program-datetime-trigger-btn {
  background: #f8fafc;
  border-color: rgba(100, 116, 139, 0.3);
  color: #0f172a;
}

body.light-theme #program-session-modal .program-dt-date-text {
  color: #0f172a;
}

body.light-theme #program-session-modal .program-dt-time-text {
  color: #4f46e5;
}

body.light-theme #program-session-modal .program-datetime-drawer {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.14);
}

body.light-theme #program-session-modal .program-cal-panel,
body.light-theme #program-session-modal .program-time-panel {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.25);
}

body.light-theme #program-session-modal .program-cal-month-title,
body.light-theme #program-session-modal .program-cal-day-btn,
body.light-theme #program-session-modal .program-time-val {
  color: #0f172a;
}

body.light-theme #program-session-modal .program-cal-day-btn.is-selected {
  color: #ffffff;
}

/* Compact Horizontal Rep Range Entry Fields ([ min ] to [ max ]) */
#program-session-modal .program-rep-range-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

#program-session-modal .program-rep-range-wrap .reps-range-left,
#program-session-modal .program-rep-range-wrap .reps-range-right {
  flex: 1 1 0;
  width: 0 !important;
  min-width: 0 !important;
  padding: 5px 3px !important;
  text-align: center;
  font-size: 12px;
  box-sizing: border-box;
}

#program-session-modal .program-rep-range-sep {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
  line-height: 1;
  padding: 0 1px;
  user-select: none;
}

@media (max-width: 560px) {
  #program-session-modal .program-rep-range-wrap {
    gap: 3px;
  }
  #program-session-modal .program-rep-range-wrap .reps-range-left,
  #program-session-modal .program-rep-range-wrap .reps-range-right {
    padding: 5px 2px !important;
  }
  #program-session-modal .program-rep-range-sep {
    font-size: 9.5px;
    padding: 0;
  }
}

/* Disabled Conflict Styling in Exercise Swap / Alternative Selection Modal */
#swap-exercises-list .exercise-item-card.is-alt-conflict-disabled {
  opacity: 0.52;
  cursor: not-allowed;
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(15, 23, 42, 0.45);
}

#swap-exercises-list .exercise-item-card.is-alt-conflict-disabled:hover {
  transform: none;
  border-color: rgba(245, 158, 11, 0.48);
}

.alt-conflict-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.38);
  white-space: nowrap;
}

.alt-conflict-badge.reason-current_exercise {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.38);
}

body.light-theme #swap-exercises-list .exercise-item-card.is-alt-conflict-disabled {
  background: rgba(241, 245, 249, 0.65);
  border-color: rgba(217, 119, 6, 0.35);
}

body.light-theme .alt-conflict-badge {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.36);
}

body.light-theme .alt-conflict-badge.reason-current_exercise {
  background: rgba(220, 38, 38, 0.10);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.35);
}







