/* Utility: hide elements */
.hidden { display: none !important; }

/* Emotion wheel SVG text styles (overridden in main emotion section below) */
#emotionWheelSVG text {
  font-size: 9px;
  fill: #fff;
  dominant-baseline: middle;
  text-anchor: middle;
  paint-order: stroke fill;
  stroke: #000;
  stroke-width: 0.4px;
  pointer-events: none;
  user-select: none;
}

#emotion-map {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}
#emotion-wheel {
  position: relative;
  z-index: 1;
}
/* Water Intake Tracker */
#water-tracker {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

#water-meter-container {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 6px;
}

#water-meter-svg {
  width: 140px;
  height: 77px;
  filter: drop-shadow(0 0 8px #00bfff);
  animation: water-shimmer-effect 2.5s ease-in-out infinite;
}

@keyframes water-shimmer-effect {
  0%, 100% { filter: drop-shadow(0 0 8px #00bfff); }
  50% { filter: drop-shadow(0 0 22px #00e5ff); }
}

.water-drop-btn {
  font-size: 1.5rem;
  cursor: pointer;
  pointer-events: all;
  filter: drop-shadow(0 0 5px #00bfff);
  animation: water-drop-pulse 2s ease-in-out infinite;
  transition: filter 0.2s ease;
  line-height: 1;
  margin-bottom: 2px;
}

.water-drop-btn:hover {
  filter: drop-shadow(0 0 16px #00e5ff) brightness(1.4);
}

@keyframes water-drop-pulse {
  0%, 100% { filter: drop-shadow(0 0 5px #00bfff); transform: scale(1); }
  50% { filter: drop-shadow(0 0 14px #00e5ff); transform: scale(1.1); }
}

#water-drop-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#water-count-label {
  color: #00bfff;
  font-size: 0.75rem;
  text-shadow: 0 0 8px #00bfff, 0 0 14px #00e5ff;
  font-family: 'Bungee', cursive;
  pointer-events: none;
}

body.hide-icons #water-tracker {
  display: none !important;
}

/* Water Log Modal */
.water-log-modal {
  max-width: 380px;
  text-align: center;
}

.water-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.4rem;
}

.water-add-btn,
.water-remove-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: box-shadow 0.2s, transform 0.1s;
}

.water-add-btn {
  background: rgba(0, 58, 92, 0.8);
  color: #00e5ff;
  border-color: rgba(0, 191, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

.water-add-btn:hover {
  background: rgba(0, 191, 255, 0.25);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
  transform: translateY(-1px);
}

.water-remove-btn {
  background: rgba(26, 0, 51, 0.8);
  color: #cc99ff;
  border-color: rgba(119, 34, 204, 0.6);
  box-shadow: 0 0 10px rgba(119, 34, 204, 0.25);
}

.water-remove-btn:hover {
  background: rgba(119, 34, 204, 0.25);
  box-shadow: 0 0 18px rgba(119, 34, 204, 0.5);
  transform: translateY(-1px);
}

.water-modal-count-display {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0.5rem 0;
  color: #00e5ff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}

.water-modal-subtitle {
  text-align: center;
  color: #7ecfef;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#moon-icon {
  position: absolute;
  top: 9%;
  left: 50%;
  display: inline-block;
  width: 40px;
  height: 40px;
  font-size: 2rem;
  transform: translate(-50%, -50%);
  z-index: 100;
  color: #87fdb6;
  text-shadow: 0 0 16px #00ff66, 0 0 20px #00ff66, 0 0 50px #00ff66;
  cursor: pointer;
  text-align: center;
  line-height: 40px;
  --chakra-intensity: 0.2;
}
#emotion-icon {
  position: absolute;
  top: calc(36% - 20px);
  left: calc(50% - 20px);
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 100;
  color: #f4d03f;
  animation: shimmer-spin-y 6s linear infinite;
  filter: drop-shadow(0 0 6px #00e5ff);
  --chakra-intensity: 0.2;
}

#graph-icon {
  position: absolute;
  top: calc(14% - 20px);
  left: calc(50% - 20px);
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 100;
  color: #00e5ff;
  animation: shimmer-spin-y 6s linear infinite;
  filter: drop-shadow(0 0 6px #00e5ff);
  --chakra-intensity: 0.2;
}

/* Chakra placeholder icons */
.chakra-icon {
  position: absolute;
  left: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  transform: translate(-50%, -50%);
  z-index: 100;
  cursor: pointer;
  text-align: center;
  line-height: 40px;
  transition: text-shadow 0.3s ease, opacity 0.4s ease, filter 0.3s ease;
  --chakra-intensity: 0.2;
}
.chakra-icon:hover {
  filter: brightness(1.6) drop-shadow(0 0 8px currentColor);
}

#chakra-throat {
  top: 22%;
  color: #00bfff;
  text-shadow:
    0 0 calc(10px * var(--chakra-intensity, 0.2)) #00bfff,
    0 0 calc(30px * var(--chakra-intensity, 0.2)) #00bfff;
}
#chakra-heart {
  top: 30%;
  color: #00ff88;
  text-shadow:
    0 0 calc(10px * var(--chakra-intensity, 0.2)) #00ff88,
    0 0 calc(30px * var(--chakra-intensity, 0.2)) #00ff88;
}
#chakra-sacral {
  top: 44%;
  color: #ff8c00;
  text-shadow:
    0 0 calc(10px * var(--chakra-intensity, 0.2)) #ff8c00,
    0 0 calc(30px * var(--chakra-intensity, 0.2)) #ff8c00;
}
#chakra-root {
  top: 50%;
  color: #ff4444;
  text-shadow:
    0 0 calc(10px * var(--chakra-intensity, 0.2)) #ff4444,
    0 0 calc(30px * var(--chakra-intensity, 0.2)) #ff4444;
}

/* ── Chakra image icons (crown, third-eye, solar-plexus) ───────────────── */
#moon-icon,
#graph-icon,
#emotion-icon {
  --chakra-intensity: 0.2;
  transition: filter 0.3s ease, opacity 0.4s ease;
}

/* ── Chakra Aura Canvas overlay ─────────────────────────────────────────── */
#chakra-aura-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 90;
}

/* ── Keyframe animations ─────────────────────────────────────────────────── */
@keyframes chakra-breathe {
  0%, 100% { filter: brightness(0.7) drop-shadow(0 0 4px currentColor); }
  50%       { filter: brightness(1.8) drop-shadow(0 0 18px currentColor); }
}
@keyframes chakra-breathe-slow {
  0%, 100% { filter: brightness(0.5) drop-shadow(0 0 2px currentColor); }
  50%       { filter: brightness(1.1) drop-shadow(0 0 8px currentColor); }
}
@keyframes chakra-halo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes chakra-activate {
  0%   { transform: translate(-50%, -50%) scale(1);   filter: brightness(1); }
  40%  { transform: translate(-50%, -50%) scale(1.6); filter: brightness(3); }
  70%  { transform: translate(-50%, -50%) scale(0.9); filter: brightness(1.5); }
  100% { transform: translate(-50%, -50%) scale(1);   filter: brightness(1); }
}
@keyframes chakra-activate-img {
  0%   { transform: scale(1);   filter: brightness(1); }
  40%  { transform: scale(1.6); filter: brightness(3); }
  70%  { transform: scale(0.9); filter: brightness(1.5); }
  100% { transform: scale(1);   filter: brightness(1); }
}
@keyframes chakra-spark-float {
  0%   { transform: translate(0, 0) scale(1);   opacity: 0.9; }
  100% { transform: translate(var(--dx, 0px), -40px) scale(0); opacity: 0; }
}

/* ── Chakra animation states ─────────────────────────────────────────────── */

/* Active (score ≥ 0.75): fast bright breathing */
.chakra-icon.chakra-active {
  animation: chakra-breathe 1.8s ease-in-out infinite;
  opacity: 1;
}
/* Active image-based chakras */
#moon-icon.chakra-active,
#graph-icon.chakra-active,
#emotion-icon.chakra-active {
  animation: chakra-breathe 1.8s ease-in-out infinite;
  opacity: 1;
}

/* Partial (0.3 ≤ score < 0.75): medium breathing */
.chakra-icon.chakra-partial {
  animation: chakra-breathe 3s ease-in-out infinite;
  opacity: 0.75;
}
#moon-icon.chakra-partial,
#graph-icon.chakra-partial,
#emotion-icon.chakra-partial {
  animation: chakra-breathe 3s ease-in-out infinite;
  opacity: 0.75;
}

/* Dormant (score < 0.3): slow dim breathing */
.chakra-icon.chakra-dormant {
  animation: chakra-breathe-slow 5s ease-in-out infinite;
  opacity: 0.35;
}
#moon-icon.chakra-dormant,
#graph-icon.chakra-dormant,
#emotion-icon.chakra-dormant {
  animation: chakra-breathe-slow 5s ease-in-out infinite;
  opacity: 0.35;
}

/* Spring pop on activation */
.chakra-icon.chakra-activating {
  animation: chakra-activate 0.6s ease-out forwards !important;
}
#moon-icon.chakra-activating {
  animation: chakra-activate 0.6s ease-out forwards !important;
}
#graph-icon.chakra-activating,
#emotion-icon.chakra-activating {
  animation: chakra-activate-img 0.6s ease-out forwards !important;
}

/* Rotating halo ring on active chakras */
.chakra-icon.chakra-active,
#moon-icon.chakra-active,
#graph-icon.chakra-active,
#emotion-icon.chakra-active {
  position: absolute; /* ensure stacking context */
}
.chakra-icon.chakra-active::before,
#moon-icon.chakra-active::before,
#graph-icon.chakra-active::before,
#emotion-icon.chakra-active::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.5;
  animation: chakra-halo-spin 3s linear infinite;
  pointer-events: none;
}

/* Spark particles */
.chakra-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  animation: chakra-spark-float 1.2s ease-out forwards;
  z-index: 200;
}

/* "All Chakras Lit" body bloom */
#landing-bg.all-chakras-lit {
  filter: brightness(1.08) drop-shadow(0 0 18px rgba(255,255,255,0.35));
}
#exercises-last7days video {
  display: inline-block;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  border-radius: 6px;
  object-fit: cover;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
#cancel-workout-button {
  margin-top: 12px;
  margin-left: 10px;
  background-color: #ff0033;
  color: #fff;
  box-shadow: 0 0 10px #ff0033, 0 0 20px #ff0033;
  border-radius: 6px;
  border: none;
  padding: 6px 14px;
  font-weight: bold;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
#cancel-workout-button:hover {
  box-shadow: 0 0 20px #ff0033, 0 0 24px #ff0033;
  background-color: #ff3366;
}
.wallet-ticker {
  position: absolute;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

#wallet-ticker-circle .ticker-letter {
  font-size: 0.5rem;
  color: #00e5ff;
  text-shadow: 0 0 4px #d6e101d7;
}
#walletIconWrapper {
  position: absolute;
  right: 20px;
  top: 20px;
  text-align: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.bnut-coin-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 4px #00e5ff);
}

#metamaskIcon {
  display: block;
  width: 50px;
  height: 50px;
  margin: 0;
  opacity: 0.9;
  animation: shimmer-spin-y 8s linear infinite;
  filter: drop-shadow(0 0 10px #00e5ff);
  cursor: pointer;
}

/* Recent Supplements and Foods lists: scrollable, neon border, sticky header styles */
#recent-supplements-list,
#recent-foods-list,
#recent-exercises-list,
#workout-set-list {
  position: fixed;
  top: 165px;     /* below fixed header (~110px) + weight display (top:90px + ~40px height) */
  bottom: 95px;   /* above fixed footer (padding 1rem × 2 + 60px buttons ≈ 92px) */
  left: 70px;     /* clear the left side-toolbar */
  right: 70px;    /* clear the right side-toolbar */
  width: auto;
  max-width: none;
  overflow-y: auto;
  font-size: 0.9rem;
  z-index: 1000;
  border: 1px solid #00e5ff;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 33, 0.9);
  box-sizing: border-box;
}

/* Panel heading: centered, neon, with bottom separator */
#recent-supplements-list h4,
#recent-foods-list h4,
#recent-exercises-list h4,
#workout-set-list h4 {
  text-align: center;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.35);
  color: #00e5ff;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* Panel list items: comfortable spacing */
#recent-supplements-list ul,
#recent-foods-list ul,
#recent-exercises-list ul,
#workout-set-list ul {
  margin: 0;
  padding: 0 0.25rem;
}

#foods-last7days li {
  margin-bottom: 4px;
  padding-left: 5px;
  list-style: disc;
}

/* ── Raw Intake Daily Value Card ────────────────────────────────── */
#raw-intake-dv-card {
  background: rgba(0, 0, 44, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 8px;
  padding: 0.6rem 0.75rem 0.5rem;
  margin-bottom: 0.75rem;
}

.dv-period-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.dv-period-btn {
  flex: 1 1 auto;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 5px;
  color: rgba(0, 229, 255, 0.7);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dv-period-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: #00e5ff;
  color: #ffffff;
}

.dv-period-btn.active {
  background: rgba(0, 229, 255, 0.22);
  border-color: #00e5ff;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

.dv-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.25);
}

.dv-summary-period {
  font-size: 0.82rem;
  font-weight: 600;
  color: #00e5ff;
  letter-spacing: 0.04em;
}

.dv-summary-overpct {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffcc00;
  text-shadow: 0 0 6px rgba(255, 204, 0, 0.5);
}

.dv-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dv-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  color: rgba(200, 235, 255, 0.9);
}

.dv-row__main {
  display: grid;
  grid-template-columns: 1.4rem 5.5rem 1fr 2.6rem;
  align-items: center;
  gap: 4px;
}

.dv-row__icon {
  text-align: center;
  font-size: 0.8rem;
}

.dv-row__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
}

.dv-row__bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.dv-row__bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.dv-row__pct {
  text-align: right;
  font-size: 0.68rem;
  color: rgba(200, 235, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

/* Clickable DV% button style */
.dv-row__pct--btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 1px 3px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.dv-row__pct--btn:hover {
  border-color: rgba(0, 229, 255, 0.6);
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
}

/* Small indicator for custom goals */
.dv-custom-indicator {
  font-size: 0.58rem;
  color: #ffcc00;
  opacity: 0.85;
}

/* Manage nutrients button at bottom of DV card */
.dv-manage-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 5px;
  color: rgba(0, 229, 255, 0.55);
  text-align: center;
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dv-manage-btn:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.5);
  color: rgba(0, 229, 255, 0.9);
}

/* DV Goal Modal body */
.dv-goal-modal-nutrient {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.dv-goal-modal-icon {
  font-size: 1.5rem;
}

.dv-goal-modal-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #00e5ff;
}

.dv-goal-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: rgba(200, 235, 255, 0.8);
  margin-bottom: 0.6rem;
}

.dv-goal-input {
  background: rgba(0, 0, 60, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 6px;
  color: #e0f4ff;
  padding: 0.35rem 0.5rem;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.dv-goal-input:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}

.dv-goal-hint {
  font-size: 0.75rem;
  color: rgba(160, 210, 240, 0.6);
  margin: 0 0 1rem;
}

.dv-goal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dv-goal-btn {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: opacity 0.15s, box-shadow 0.15s;
}

.dv-goal-btn--primary {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.dv-goal-btn--primary:hover { opacity: 0.88; }

.dv-goal-btn--secondary {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: rgba(0, 229, 255, 0.85);
}

.dv-goal-btn--secondary:hover { background: rgba(0, 229, 255, 0.18); }

.dv-goal-btn--danger {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: rgba(255, 140, 140, 0.9);
}

.dv-goal-btn--danger:hover { background: rgba(255, 80, 80, 0.18); }

/* DV Manage Nutrients Modal list */
.dv-manage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
  gap: 0.5rem;
}

.dv-manage-check-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  flex: 1;
}

.dv-manage-checkbox {
  accent-color: #00e5ff;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.dv-manage-icon {
  font-size: 1rem;
}

.dv-manage-name {
  font-size: 0.82rem;
  color: rgba(200, 235, 255, 0.9);
}

.dv-manage-goal {
  font-size: 0.72rem;
  color: rgba(160, 210, 240, 0.6);
  white-space: nowrap;
}

.dv-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.dv-manage-action-btn {
  flex: 1 1 auto;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.07);
  color: rgba(0, 229, 255, 0.8);
  cursor: pointer;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background 0.15s, border-color 0.15s;
}

.dv-manage-action-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.6);
  color: #00e5ff;
}

.dv-row__vals {
  font-size: 0.64rem;
  color: rgba(160, 210, 240, 0.6);
  padding-left: 1.4rem;
}

.dv-log-heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(0, 229, 255, 0.7);
  margin: 0 0 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.supplement-name-hover {
  cursor: pointer;
  text-decoration: underline;
}
#ipfsIconWrapper {
  position: relative;
  top: 5px;
  display: inline-block;
}

.hover-popup {
  display: none;
  position: absolute;
  top: 50px;
  left: 45px; /* moved closer to the IPFS icon */
  background: rgba(0, 0, 40, 0.95);
  color: white;
  padding: 8px;
  border: 1px solid #00e5ff;
  border-radius: 8px;
  font-size: 0.6rem;
  min-width: 180px;
  z-index: 9999 !important;
  box-shadow: 0 0 8px #00e5ff;
  white-space: nowrap;
  pointer-events: auto;
}

.snapshot-today {
  color: #00ff99;
  text-shadow: 0 0 6px #00ff99;
}

.snapshot-old {
  color: #ff00cc;
  text-shadow: 0 0 6px #ff00cc;
}
/* Sticky header for exercise and workout lists */
.exercise-list-header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 33, 0.9);
  padding-bottom: 0.5rem;
  z-index: 1000;
}
#recent-exercises-list ul {
  margin-top: 0.5rem;
}

.workout-header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 33, 0.9);
  padding-bottom: 0.5rem;
  z-index: 1000;
}

#start-timer-button,
#pause-timer-button {
  margin: 10px 5px;
  background-color: #00e5ff;
  color: #000;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 8px #00e5ff;
}

.play-all-button {
  background: #00ffcc;
  color: #000;
  padding: 6px 12px;
  margin-bottom: 6px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 8px #00ffcc;
}

.play-all-button:hover {
  background: #00e5ff;
  box-shadow: 0 0 12px #00e5ff;
}

#workout-timer-modal .modal {
  text-align: center;
  background-color: rgba(0, 40, 40, 0.9);
}

#workout-timer-modal.resting .modal {
  background-color: rgba(40, 0, 40, 0.9);
}

#workout-timer-display {
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 8px #00e5ff;
}
#workout-set-items .workout-set-item {
  display: block;
  margin-bottom: 1rem;
  padding: 6px;
  border-bottom: 1px dashed #00e5ff;
}

.set-details {
  margin-top: 6px;
}

.set-entry {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.set-entry input {
  width: 45%;
  padding: 2px 4px;
  font-size: 0.8rem;
  background-color: #000033;
  color: white;
  border: 1px solid #00e5ff;
  border-radius: 4px;
}

.play-button {
  margin-top: 5px;
  background: #00e5ff;
  color: #000;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
/* Add vertical gap between upper and lower list sections on both sides */
#workout-set-list {
  text-align: right;
  max-height: none;
  padding: 5px;
  color: white;
}

#workout-set-list h4 {
  margin-top: 0.5rem;
  font-size: 1rem;
  text-align: right;
}

#workout-set-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 0.85rem;
}

.workout-exercise-name {
  flex: 1;
  text-align: left;
}

.workout-reps,
.workout-sets {
  width: 40px;
  margin-left: 0.5rem;
  background-color: #000033;
  color: white;
  border: 1px solid #00e5ff;
  border-radius: 4px;
  padding: 2px 4px;
}
#recent-exercises-list {
  text-align: right;
  max-height: none;
  padding: 5px;
  color: white;
}


#exercises-last7days li {
  margin-bottom: 4px;
  padding-right: 5px;
  list-style: none;
  position: relative;
  padding-left: 1.2em;
}

#exercises-last7days li::before {
  content: '';
}

.exercise-add-btn {
  position: absolute;
  left: 0;
  background: transparent;
  border: 1px solid #00e5ff;
  color: #00e5ff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 0 6px;
  border-radius: 4px;
  cursor: pointer;
  text-shadow: 0 0 4px #00e5ff;
  transition: all 0.2s ease;
}

.exercise-add-btn:hover {
  background-color: #00e5ff;
  color: #000;
}

/* Exercise color legend:
   .exercise-today      - Today
   .exercise-1day-rest  - 1 day rest
   .exercise-2day-rest  - 2 days rest
   .exercise-3day-rest  - 3 days rest
   .exercise-cooled-off - 4+ days rest
*/
.exercise-today {
  color: #ff3d3d;
  text-shadow: 0 0 6px #ff3d3d;
}

.exercise-1day-rest {
  color: #aa00ff;
  text-shadow: 0 0 6px #aa00ff;
}

.exercise-2day-rest {
  color: #00bfff;
  text-shadow: 0 0 6px #00bfff;
}

.exercise-3day-rest {
  color: #00ff66;
  text-shadow: 0 0 12px #00ff66;
}

.exercise-cooled-off {
  color: #66ffcc;
  text-shadow: 0 0 20px #0062ff, 0 0 30px #e1ff00;
}


#supplements-last7days li {
  margin-bottom: 4px;
  padding-left: 5px;
  list-style: disc;
}

.supplement-today {
  color: #00ff99;
  text-shadow: 0 0 6px #00ff99;
}

.supplement-missed {
  color: #ff00cc;
  text-shadow: 0 0 6px #ff00cc;
}
#current-weight-display {
  position: fixed;
  top: 90px; /* higher above footer */
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  font-weight: bold;
  color: #00e5ff;
  text-shadow: 0 0 5px #00e5ff, 0 0 10px #7300ff, 0 0 25px #eaff0097;
  z-index: 1000;
  display: block;
}

/* Sticky headers for recent-supplements-list and recent-foods-list */
#recent-supplements-list h4,
#recent-foods-list h4 {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 33, 0.95);
  z-index: 100;
  margin-top: 0;
  padding: 0.25rem 0.25rem 0.5rem;
}
#header-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1rem;
  position: relative;
}

#header-center {
  text-align: center;
  flex-grow: 1;
}

#app-title {
  font-family: 'Bungee', sans-serif;
  font-size: 3.5rem;
  color: #00e5ff;
  text-shadow: 0 0 10px #7300ff, 0 0 20px #00ffff;
  margin: 0;
  font-weight: bold;
}
#app-subtitle {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: 0.8rem;
  color: #7300ff;
  text-shadow: 0 0 10px #00e5ff, 0 0 20px #00ffff;
  margin: 0;
}

.wallet-icon {
  width: 16px;
  height: 16px;
}
body {
  margin: 0;
  padding: 0;
  background: #000021;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
}


header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 99999;
  background: rgba(0, 0, 33, 0.85); /* semi-transparent midnight blue */
}

@keyframes shimmer-spin-y {
  0% {
    transform: rotateY(0deg);
    filter: brightness(1);
  }
  50% {
    filter: brightness(2);
  }
  100% {
    transform: rotateY(360deg);
    filter: brightness(1);
  }
}

@keyframes shimmer-spin {
  0% {
    transform: rotate(0deg);
    filter: brightness(1);
  }
  50% {
    filter: brightness(2);
  }
  100% {
    transform: rotate(360deg);
    filter: brightness(1);
  }
}


#ipfs-status {
  position: absolute;
  top: 20px;
  left: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 2px solid #00e5ff;
  border-radius: 50%;
  box-shadow: 0 0 10px #00e5ff;
  overflow: visible;
}
#ipfsIconWrapper {
  position: relative;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
/* Default (always shown now — mode indicator even without wallet) */
#ipfsIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 50px;
  height: 50px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 50%;
  overflow: hidden;
  line-height: 1;
  opacity: 0.9;
  filter: drop-shadow(0 0 10px #00e5ff);
  cursor: pointer;
  transition: filter 0.5s ease, opacity 0.5s ease;
  appearance: none;
}

#ipfsIcon .ipfs-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 50%;
  display: block;
}

/* ── Storage-mode glow states for the IPFS icon ─────────────────────────────── */

/* json-only — dimmed, no glow */
#ipfsIcon[data-storage-mode="json-only"] {
  filter: drop-shadow(0 0 0px transparent) brightness(0.45) grayscale(0.6);
  opacity: 0.55;
}

#ipfsIcon[data-storage-mode="json-only"] .ipfs-logo { opacity: 0.8; }

/* own-w3s — green glow (user holds the keys) */
#ipfsIcon[data-storage-mode="own-w3s"],
#ipfsIcon[data-storage-mode="w3up"] {
  filter: drop-shadow(0 0 10px #00e676) drop-shadow(0 0 24px rgba(0, 220, 100, 0.7));
  opacity: 1;
  animation: ipfs-lighthouse-pulse 2.3s ease-in-out infinite;
}

/* Corresponding border on the status ring */
#ipfs-status[data-storage-mode="own-w3s"],
#ipfs-status[data-storage-mode="w3up"] {
  border-color: #00e676;
  box-shadow: 0 0 12px #00e676, 0 0 30px rgba(0, 230, 118, 0.35);
}
#ipfs-status[data-storage-mode="json-only"] {
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow: none;
}

@keyframes ipfs-lighthouse-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 10px #00e676) drop-shadow(0 0 24px rgba(0, 220, 100, 0.7));
    box-shadow: 0 0 10px #00e676, 0 0 24px rgba(0, 230, 118, 0.32);
  }
  50% {
    filter: drop-shadow(0 0 16px #00ff90) drop-shadow(0 0 34px rgba(0, 230, 118, 0.9));
    box-shadow: 0 0 16px #00ff90, 0 0 34px rgba(0, 230, 118, 0.5);
  }
}

#ticker-circle {
  will-change: transform;
}

#ticker-circle .ticker-letter {
  font-size: 0.45rem;
  color: #00e676;
  text-shadow: 0 0 4px rgba(0, 230, 118, 0.7);
}

/* Ticker letter colour per mode */
.ticker-letter[data-storage-mode="own-w3s"],
.ticker-letter[data-storage-mode="w3up"] { color: #00e676; text-shadow: 0 0 4px #00e676; }



/* Ticker circle styles */
/* Ticker circle new styles */
.ticker-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

.ticker-circle-metamask {
  position: absolute;
  right: 49px;
  width: 100%;
  height: 100%;
  transform-origin: center center;
}

.ticker-circle-ipfs {
  position: absolute;
  width: 100%;
  height: 100%;

  transform-origin: center center;
}

.ticker-letter {
  position: absolute;
  font-size: 0.5rem;
  color: #00e5ff;
  text-shadow: 0 0 4px #d6e101d7;
  transform: translate(-50%, -50%);
}

#wallet-connect {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 2px solid; /* base style, color set by state */
  border-radius: 50%;
  padding: 0;
  width: 70px;
  height: 70px;
  box-shadow: 0 0 10px; /* color set by state */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#wallet-connect img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: none;
  padding: 0;
  background: none;
  box-shadow: none;
}

#wallet-connect:hover {
  box-shadow: 0 0 15px #ff9800;
  border-color: #ff9800;
}

/* Disconnected state: red neon border */
#wallet-connect.disconnected {
  border-color: #ff5722;
  box-shadow: 0 0 10px #ff5722;
}
/* Data-state fallback for wallet connection */
#wallet-connect[data-wallet-state="disconnected"] {
  border-color: #ff5722;
  box-shadow: 0 0 10px #ff5722;
}
/* Connected state: green neon border */
#wallet-connect.connected {
  border-color: #00e676;
  box-shadow: 0 0 10px #00e676;
}
/* Data-state fallback for wallet connection */
#wallet-connect[data-wallet-state="connected"] {
  border-color: #00e676;
  box-shadow: 0 0 10px #00e676;
}
/* Connected hover: blue-green neon border */
#wallet-connect.connected:hover {
  border-color: #00ffcc;
  box-shadow: 0 0 15px #00ffcc;
}
#wallet-connect[data-wallet-state="connected"]:hover {
  border-color: #00ffcc;
  box-shadow: 0 0 15px #00ffcc;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  margin: 0;
  margin-top: 120px;
  margin-bottom: 80px;
}

#body-figure-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
  flex-shrink: 0;
}

#landing-bg {
  display: block;
  width: auto;
  height: 80vh;
  object-fit: contain;
  opacity: 0.8;
  margin: 0;
}

footer {
  display: none;
  justify-content: space-around;
  padding: 1rem;
  background-color: #000010;
  position: fixed;
  bottom: 0;
  width: 100%;
  opacity: 0.8;
  z-index: 10000;
}

.round-button {
  background: transparent;
  border: 2px solid #00e5ff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 10px #00e5ff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.round-button:hover {
  box-shadow: 0 0 20px #00ffff;
  border-color: #00ffff;
}

.round-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Modal hidden helper */
.modal-hidden {
  display: none;
  visibility: hidden;
  opacity: 0;
}

/* Modal overlay for modals with overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 40, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100000;
}

/* General modal style for overlay modals */
.modal {
  background: linear-gradient(160deg, #0a0a2e 0%, #0d1a3a 50%, #061020 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3), 0 8px 40px rgba(0, 0, 0, 0.7);
  padding: 2rem 1.8rem 1.8rem;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  color: #e0f4ff;
  position: relative;
  z-index: 100001;
  animation: diet-card-glow 4s ease-in-out infinite;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: rgba(0, 229, 255, 0.7);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: #fff; }

/* ── Uniform Logger Modal: title, form, labels, inputs, buttons ── */
.modal h2 {
  margin: 0 0 1.4rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #00e5ff;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
  letter-spacing: 0.04em;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7ecfef;
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
}

.modal input[type="text"],
.modal input[type="number"],
.modal input[type="date"],
.modal input[type="time"],
.modal input[type="password"],
.modal select,
.modal textarea {
  background: rgba(0, 30, 60, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  color: #e0f4ff;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.modal input[type="text"]:focus,
.modal input[type="number"]:focus,
.modal input[type="date"]:focus,
.modal input[type="time"]:focus,
.modal input[type="password"]:focus,
.modal select:focus,
.modal textarea:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.modal input::placeholder,
.modal textarea::placeholder { color: rgba(180, 220, 240, 0.4); }

.modal select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2300e5ff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2rem;
  cursor: pointer;
}
.modal select option { background: #0d1a3a; color: #e0f4ff; }

.modal button[type="submit"] {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #005f80 0%, #00a3cc 50%, #005f80 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
  transition: box-shadow 0.2s, transform 0.1s;
  margin-top: 0.8rem;
  width: 100%;
}
.modal button[type="submit"]:hover {
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.7);
  transform: translateY(-1px);
}
.modal button[type="submit"]:active { transform: translateY(0); }

/* Emotion modal: wider to accommodate the 600px emotion wheel */
#emotion-modal .modal {
  max-width: 660px;
  overflow-x: auto;
}

/* Emotion wheel container - responsive wrapper */
.emotion-wheel-container {
  position: relative;
  width: 580px;
  height: 580px;
  margin: 0 auto;
  max-width: 100%;
}

.emotion-log-modal {
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.emotion-wheel-hint {
  text-align: center;
  font-size: 0.85rem;
  color: #aaa;
  margin: 0.3rem 0 0.6rem;
}

.emotion-modal-context {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #00e5ff;
  margin: 0.3rem 0 0.8rem;
  text-shadow: 0 0 8px #00e5ff66;
}

/* Emotion wheel SVG */
#emotionWheelSVG {
  display: block;
  width: 100%;
  height: auto;
  max-width: 580px;
  margin: 0 auto;
}

#emotionSlices path.ew-slice {
  cursor: pointer;
  transition: filter 0.15s ease;
}
#emotionSlices path.ew-slice:hover {
  filter: brightness(1.35) drop-shadow(0 0 6px rgba(255,255,255,0.5));
}

/* Selected emotion display */
.emotion-selected-display {
  min-height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.6rem 0;
  flex-wrap: wrap;
}
.ew-selected-emoji { font-size: 2rem; }
.ew-selected-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 8px #00e5ff66;
}
.ew-log-btn {
  background: linear-gradient(135deg, #00e5ff22, #00b4cc44);
  border: 1px solid #00e5ff;
  border-radius: 8px;
  color: #00e5ff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.ew-log-btn:hover {
  background: #00e5ff22;
  box-shadow: 0 0 10px #00e5ff55;
}
.ew-cancel-btn {
  background: transparent;
  border: 1px solid #555;
  border-radius: 8px;
  color: #888;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}
.ew-logged-confirm {
  font-size: 1rem;
  font-weight: 700;
  color: #00e5ff;
  animation: ew-fade-in 0.3s ease;
}
@keyframes ew-fade-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Feelings Analytics Panel ── */
.feelings-analytics {
  border-top: 1px solid #333;
  padding-top: 1rem;
  margin-top: 0.5rem;
}
.ew-analytics-empty {
  text-align: center;
  color: #888;
  font-size: 0.95rem;
  padding: 1rem 0;
}
.ew-analytics-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.ew-pie-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.ew-pie-wrap h4,
.ew-stats-panel h4 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: #00e5ff;
  text-align: center;
}
.ew-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  max-width: 190px;
}
.ew-stats-panel {
  flex: 1;
  min-width: 180px;
}
.ew-stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.9;
  color: #ddd;
}
.ew-stats-list strong { color: #fff; }
.ew-emoji-cloud {
  margin-top: 0.8rem;
}
.ew-emojis {
  font-size: 1.5rem;
  letter-spacing: 0.1rem;
  line-height: 1.8;
  word-break: break-all;
}

/* ── Remove legacy overlay styles ── */
.emotion-wheel-img { display: none; }
.emotion-wheel-overlay-svg { display: none; }
#selectedEmotion { display: none; }

/* ── Shared utility styles for logger modals ── */
.modal-action-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 1.2rem;
  background: rgba(0, 30, 60, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 10px;
  color: #00e5ff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin-bottom: 0.5rem;
}
.modal-action-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.modal-status-text {
  font-size: 0.8rem;
  color: rgba(0, 229, 255, 0.6);
  text-align: center;
  margin: 0.3rem 0;
}

.modal-reading-display {
  font-size: 1.6rem;
  font-weight: 700;
  color: #00e5ff;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
  margin: 0.5rem 0;
}

.modal-feedback-text {
  min-height: 1.4em;
  font-weight: 700;
  color: #00e5ff;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Diet Modal overlay styling (legacy modal, uses style="display:none" toggle) */
/* Styles moved to Diet Modal Redesign section below */

/* ── Diet Modal Redesign ─────────────────────────────────────────────── */

/* Shimmer animation for the diet modal submit button */
@keyframes diet-shimmer {
  0%   { left: -100%; }
  60%  { left: 120%; }
  100% { left: 120%; }
}

@keyframes diet-card-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 229, 255, 0.35), 0 0 24px rgba(0, 229, 255, 0.15); }
  50%       { box-shadow: 0 0 20px rgba(0, 229, 255, 0.65), 0 0 40px rgba(0, 229, 255, 0.25); }
}

#dietModal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 40, 0.88);
  justify-content: center;
  align-items: flex-start;
  z-index: 100001;
  overflow-y: auto;
  padding: 2rem 0 5rem;
  box-sizing: border-box;
}

#dietModal[style*="display: block"] {
  display: flex !important;
}

.diet-modal-content {
  background: linear-gradient(160deg, #0a0a2e 0%, #0d1a3a 50%, #061020 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3), 0 8px 40px rgba(0, 0, 0, 0.7);
  padding: 2rem 1.8rem 1.8rem;
  width: 92%;
  max-width: 520px;
  position: relative;
  color: #e0f4ff;
  animation: diet-card-glow 4s ease-in-out infinite;
}

.diet-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: rgba(0, 229, 255, 0.7);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.diet-modal-close:hover { color: #fff; }

.diet-modal-title {
  margin: 0 0 1.4rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #00e5ff;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
  letter-spacing: 0.04em;
}

/* ── Form layout ─────────── */
.diet-form { display: flex; flex-direction: column; gap: 0.9rem; }

.diet-form-row {
  display: flex;
  gap: 0.9rem;
}

.diet-form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.diet-form-group--wide { flex: 2; }

.diet-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7ecfef;
  margin-bottom: 0.3rem;
}

.diet-input {
  background: rgba(0, 30, 60, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  color: #e0f4ff;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.diet-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
.diet-input::placeholder { color: rgba(180, 220, 240, 0.4); }

.diet-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2300e5ff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2rem;
  cursor: pointer;
}
.diet-select option { background: #0d1a3a; color: #e0f4ff; }

/* ── Nutritional Info Card ──── */
.diet-nutr-card {
  background: rgba(0, 20, 50, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 14px;
  padding: 1rem 1.1rem 0.8rem;
  position: relative;
  overflow: hidden;
}

.diet-nutr-card::before {
  content: '';
  position: absolute;
  top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.07), transparent);
  animation: diet-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

.diet-nutr-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.diet-nutr-card__icon { font-size: 1.1rem; }
.diet-nutr-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00e5ff;
  letter-spacing: 0.04em;
}
.diet-nutr-card__title em { color: rgba(0, 229, 255, 0.6); font-style: normal; font-size: 0.75rem; }

.diet-nutr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 0.9rem;
}

.diet-nutr-field { display: flex; flex-direction: column; }

.diet-input--nutr {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
}

.diet-nutr-card__note {
  margin-top: 0.7rem;
  font-size: 0.68rem;
  color: rgba(0, 229, 255, 0.45);
  text-align: center;
  font-style: italic;
}

/* ── Raw Intake log: Nutrition card popover on hover ── */
.food-nutr-popup {
  position: absolute;
  z-index: 2000;
  min-width: 230px;
  max-width: 280px;
  pointer-events: auto;
  box-shadow: 0 4px 24px rgba(0, 229, 255, 0.18);
}

.food-nutr-popup__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-direction: row;
}

.food-nutr-popup__icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.food-nutr-popup__label {
  flex: 1;
  font-size: 0.78rem;
  color: rgba(200, 240, 255, 0.75);
}

.food-nutr-popup__val {
  font-size: 0.82rem;
  font-weight: 600;
  color: #00e5ff;
  white-space: nowrap;
}

/* ── Submit Button ──── */
.diet-submit-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #005f80 0%, #00a3cc 50%, #005f80 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
  transition: box-shadow 0.2s, transform 0.1s;
  margin-top: 0.4rem;
}
.diet-submit-btn:hover {
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.7);
  transform: translateY(-1px);
}
.diet-submit-btn:active { transform: translateY(0); }

.diet-submit-shine {
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  animation: diet-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

/* ── All-Time Log ──── */
.diet-log-section {
  margin-top: 1.8rem;
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  padding-top: 1.2rem;
}

.diet-log-title {
  font-size: 1rem;
  font-weight: 600;
  color: #00e5ff;
  margin: 0 0 0.8rem;
  letter-spacing: 0.04em;
}

.diet-log-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 340px;
  overflow-y: auto;
}

.diet-log-list::-webkit-scrollbar { width: 4px; }
.diet-log-list::-webkit-scrollbar-track { background: rgba(0, 30, 60, 0.4); border-radius: 4px; }
.diet-log-list::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, 0.4); border-radius: 4px; }

.diet-log-entry {
  background: rgba(0, 20, 50, 0.55);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.diet-log-entry:hover { border-color: rgba(0, 229, 255, 0.45); }

.diet-log-entry__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.diet-log-entry__name {
  font-weight: 700;
  color: #e0f4ff;
  font-size: 0.95rem;
}

.diet-log-entry__amount {
  color: #00e5ff;
  font-size: 0.85rem;
}

.diet-log-entry__date {
  font-size: 0.72rem;
  color: rgba(180, 220, 240, 0.5);
  width: 100%;
}

.diet-log-entry__nutr {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
}

.diet-log-entry__nutr-pill {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 20px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  color: rgba(200, 240, 255, 0.85);
  white-space: nowrap;
}

/* ── Add Nutrient row inside diet log entries ── */
.diet-add-nutr-row {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.diet-add-nutr-btn {
  background: transparent;
  border: 1px dashed rgba(0, 229, 255, 0.35);
  border-radius: 20px;
  color: rgba(0, 229, 255, 0.6);
  font-size: 0.68rem;
  padding: 0.18rem 0.65rem;
  cursor: pointer;
  align-self: flex-start;
  transition: border-color 0.2s, color 0.2s;
}
.diet-add-nutr-btn:hover {
  border-color: rgba(0, 229, 255, 0.75);
  color: #00e5ff;
}

.diet-add-nutr-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.diet-nutr-name-input,
.diet-nutr-val-input {
  flex: 1;
  min-width: 100px;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
}

.diet-save-nutr-btn,
.diet-cancel-nutr-btn {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid;
  cursor: pointer;
  font-weight: 600;
}

.diet-save-nutr-btn {
  background: rgba(0, 180, 100, 0.2);
  border-color: rgba(0, 229, 100, 0.5);
  color: #00e580;
}
.diet-save-nutr-btn:hover {
  background: rgba(0, 229, 100, 0.25);
}

.diet-cancel-nutr-btn {
  background: transparent;
  border-color: rgba(180, 180, 180, 0.35);
  color: rgba(180, 220, 240, 0.55);
}
.diet-cancel-nutr-btn:hover {
  color: #fff;
  border-color: rgba(180, 180, 180, 0.65);
}

/* ── responsive tweaks ── */
@media (max-width: 420px) {
  .diet-nutr-grid { grid-template-columns: 1fr; }
  .diet-form-row { flex-direction: column; }
}

#weight-chart-toggle {
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
}

#weight-chart-toggle button,
#measurement-chart-toggle button {
  background: rgba(0, 30, 60, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s;
}

#weight-chart-toggle button:hover,
#measurement-chart-toggle button:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

#weight-chart-toggle button.active,
#measurement-chart-toggle button.active {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.round-button.active {
  box-shadow: 0 0 20px #00ffcc;
  border-color: #00ffcc;
}

#weight-chart {
  margin-top: 1rem;
  width: 100%;
  height: 200px;
}

/* Supplement entries log list */
#supplement-entries {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

#supplement-entries li {
  background: rgba(0, 20, 50, 0.55);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  color: #e0f4ff;
}

#supplement-entries::-webkit-scrollbar { width: 4px; }
#supplement-entries::-webkit-scrollbar-track { background: rgba(0, 30, 60, 0.4); border-radius: 4px; }
#supplement-entries::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, 0.4); border-radius: 4px; }

/* Measurement chart controls */
#measurement-chart-toggle {
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
}

#measurement-chart-controls {
  margin-top: 0.8rem;
}

#measurement-chart {
  margin-top: 1rem;
  width: 100%;
}
#log-exercise {
  background-color: #00e5ff;
  opacity: 0.8;
}

.delete-set-icon:hover {
  filter: brightness(1.5);
  transform: scale(1.1);
  transition: all 0.2s ease;
}

#emotion-icon,
#graph-icon,
.chakra-icon {
  opacity: 1;
  transition: opacity 0.3s ease;
}

body.hide-icons footer,
body.hide-icons #emotion-icon,
body.hide-icons #graph-icon,
body.hide-icons .chakra-icon {
  display: none !important;
  opacity: 0;
}

svg text {
  font-size: 10px;
  fill: #333;
  dominant-baseline: middle;
}
#emotionWheelSVG text {
  paint-order: stroke fill;
  stroke: #000;
  stroke-width: 0.5px;
  font-size: 10px;
}

.emotion-label {
  font-size: 10px;
  fill: #333;
  pointer-events: none;
}
/* Raw Food Modal: Hide by default, modal overlay style */
#rawFoodModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* ===== About Modal ===== */
#app-title {
  cursor: pointer;
  transition: text-shadow 0.2s;
}
#app-title:hover {
  text-shadow: 0 0 16px #7300ff, 0 0 32px #00ffff, 0 0 48px #00e5ff;
}

.about-modal {
  max-width: 700px;
  padding: 2rem 2.5rem;
  position: relative;
}

/* ── Timezone Bar (top of About Modal, centered) ────────────────── */
.tz-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  margin: 0 auto 1rem;
  width: fit-content;
  user-select: none;
}

.tz-clock {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #00e5ff;
  text-shadow: 0 0 6px #00e5ff;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.tz-sep {
  color: rgba(0, 229, 255, 0.4);
  font-size: 0.85rem;
}

/* Override .modal select rules so tz-select looks inline with the clock */
.tz-select {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 1.5rem 0 0 !important;
  font-size: 0.82rem !important;
  color: #7ecfea !important;
  cursor: pointer;
  letter-spacing: 0.03em;
  min-width: 120px;
}

.tz-select:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none;
}



.about-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.about-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  box-shadow: 0 0 16px #00e5ff;
  flex-shrink: 0;
}

.about-title {
  font-family: 'Bungee', sans-serif;
  font-size: 2rem;
  color: #00e5ff;
  text-shadow: 0 0 10px #7300ff, 0 0 20px #00ffff;
  margin: 0 0 0.2rem;
}

.about-subtitle {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: 0.85rem;
  color: #7300ff;
  margin: 0 0 0.2rem;
}

.about-version {
  font-size: 0.75rem;
  color: #aaa;
  margin: 0;
}

.about-section {
  margin-bottom: 1.4rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  padding-bottom: 1.2rem;
}

.about-section:last-of-type {
  border-bottom: none;
}

.about-section h3 {
  color: #00e5ff;
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-shadow: 0 0 6px #7300ff;
}

.about-tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: #ccc;
}

.about-tech-list li {
  padding: 0.15rem 0;
}

.about-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.about-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
}

.github-link {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid #00e5ff;
  color: #00e5ff;
}

.github-link:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 12px #00e5ff;
}

.email-link {
  background: rgba(115, 0, 255, 0.12);
  border: 1px solid #7300ff;
  color: #bf80ff;
}

.email-link:hover {
  background: rgba(115, 0, 255, 0.25);
  box-shadow: 0 0 12px #7300ff;
}

.about-gh-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.about-payment-desc {
  font-size: 0.85rem;
  color: #ccc;
  margin: 0 0 0.75rem;
}

.about-payment-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.paypal-form {
  display: inline-flex;
}

.about-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 10rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid transparent;
  transition: box-shadow 0.2s, background 0.2s;
}

/* ── Unified payment button base: PayPal / Stripe / Crypto all share this ── */
.paypal-btn,
.stripe-btn,
.crypto-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 2px solid rgba(0, 229, 255, 0.6);
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.paypal-btn:hover,
.stripe-btn:hover:not(:disabled),
.crypto-btn:hover:not(:disabled):not([aria-disabled="true"]):not(.disabled) {
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.45);
}

.crypto-btn[aria-disabled="true"],
.crypto-btn.disabled,
.stripe-btn:disabled {
  cursor: default;
  opacity: 0.65;
}

/* ── Card brand badges inside Stripe button ─ */
.card-badges {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin-left: 0.3rem;
}

.card-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  vertical-align: middle;
}

.card-badge-visa {
  background: #1a1f71;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card-badge-mc {
  background: #eb001b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ── DNFT button ───────────────────────────── */
.dnft-btn {
  background: linear-gradient(135deg, rgba(115,0,255,0.2), rgba(0,229,255,0.1));
  border: 2px solid rgba(115, 0, 255, 0.5);
  color: #d4aaff;
  font-size: 1rem;
  padding: 0.55rem 1.2rem;
}

.dnft-btn[aria-disabled="true"] {
  cursor: default;
  opacity: 0.7;
}

/* ── Subscribe section extras ──────────────── */
.subscribe-section {
  background: rgba(0, 229, 255, 0.04);
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid rgba(0, 229, 255, 0.1);
}

.premium-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.premium-features-list li {
  font-size: 0.8rem;
  color: #aaeeff;
  background: rgba(0, 229, 255, 0.07);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* ── Plan toggle ───────────────────────────── */
.plan-toggle {
  display: inline-flex;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.plan-btn {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.35rem 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.plan-btn-active {
  background: rgba(0, 229, 255, 0.2);
  color: #00e5ff;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.5);
}

.plan-save-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.2);
  color: #00e5ff;
  font-size: 0.65rem;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.2rem;
  font-weight: normal;
  border: 1px solid rgba(0, 229, 255, 0.3);
  vertical-align: middle;
}

.subscribe-btns {
  margin-bottom: 1.2rem;
}

/* Ensure all about-pay-btn have a consistent height */
.about-payment-row .about-pay-btn,
.about-payment-row .paypal-form {
  height: 2.6rem;
}

.about-payment-row .paypal-form button.about-pay-btn {
  height: 100%;
}

.about-features-note {
  font-size: 0.8rem;
  color: #7effc0;
  margin: 0 0 1rem;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 255, 140, 0.05);
  border: 1px solid rgba(0, 255, 140, 0.15);
  border-radius: 8px;
}

/* ── DNFT sub-section — DecentHead-standard buy section ─────── */
.dnft-buy-section {
  text-align: center;
  border: 1px solid rgba(139, 0, 255, 0.53);
  border-radius: 12px;
  padding: 1.2em 1em 1em;
  background: #1a0033;
  margin-top: 0.5rem;
  margin-bottom: 0.9rem;
}

.dnft-buy-heading {
  color: #cc88ff;
  font-size: 1rem;
  margin: 0 0 0.2rem;
  text-shadow: 0 0 8px rgba(139, 0, 255, 0.6);
}

.dnft-buy-subheading {
  font-size: 0.78rem;
  color: #888;
  margin: 0 0 0.8rem;
}

.dnft-perks-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dnft-perks-list li {
  font-size: 0.82rem;
  color: #d4aaff;
  padding-left: 0.2rem;
}

.dnft-perks-compact {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  gap: 0.25rem 1rem;
  text-align: left;
  margin-bottom: 1rem;
}

.dnft-perks-compact li {
  font-size: 0.78rem;
}

/* ── Buy options — two side-by-side cards ────────────────────── */
.dnft-buy-options {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.4em;
}

.dnft-buy-option-card {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  border: 1px solid rgba(139, 0, 255, 0.33);
  border-radius: 12px;
  padding: 1em;
  background: #120028;
  text-align: center;
}

.dnft-paypal-option {
  border-color: rgba(0, 112, 186, 0.33);
  background: #001a2c;
}

.dnft-option-title {
  font-size: 0.95em;
  font-weight: bold;
  color: #cc88ff;
  margin-bottom: 0.3em;
}

.dnft-paypal-option .dnft-option-title {
  color: #5bc6f7;
}

.dnft-option-price {
  font-size: 0.8em;
  color: #aaa;
  margin-bottom: 0.5em;
}

.dnft-option-desc {
  font-size: 0.78em;
  color: #888;
  margin: 0 0 0.7em;
}

.dnft-steps-compact {
  text-align: left;
  font-size: 0.78em;
  color: #ccc;
  padding-left: 1.2em;
  margin: 0 0 0.8em;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.dnft-steps-compact a {
  color: #00e5ff;
  text-decoration: none;
}

.dnft-steps-compact a:hover {
  text-decoration: underline;
}

.dnft-placeholder-inline {
  color: #888;
  font-style: italic;
}

/* ── Main buy button — matches DecentHead buy-btn ─────────────── */
.dnft-buy-btn {
  display: inline-block;
  background: linear-gradient(135deg, #8b00ff, #00e5ff);
  color: white;
  font-weight: bold;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 0 16px rgba(139, 0, 255, 0.53);
  transition: box-shadow 0.2s, transform 0.1s;
  text-decoration: none;
}

.dnft-buy-btn:hover:not([aria-disabled="true"]):not(.dnft-paypal-btn[aria-disabled="true"]) {
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.67);
  transform: translateY(-2px);
  text-decoration: none;
}

.dnft-paypal-btn {
  background: linear-gradient(135deg, #0070ba, #003087);
  box-shadow: 0 0 16px rgba(0, 112, 186, 0.33);
}

.dnft-paypal-btn[aria-disabled="true"] {
  opacity: 0.7;
  cursor: default;
}

/* ── DNFT PayPal wallet-address input ─────────────────────────── */
.dnft-wallet-input-row {
  margin: 0.4em 0 0.8em;
  text-align: left;
}

.dnft-wallet-label {
  display: block;
  font-size: 0.75em;
  color: #5bc6f7;
  margin-bottom: 0.3em;
  font-weight: 600;
}

.dnft-wallet-input {
  width: 100%;
  box-sizing: border-box;
  background: #001828;
  border: 1px solid rgba(0, 112, 186, 0.5);
  border-radius: 7px;
  color: #e0f4ff;
  font-size: 0.8em;
  padding: 0.45em 0.7em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: monospace;
}

.dnft-wallet-input:focus {
  border-color: #0070ba;
  box-shadow: 0 0 8px rgba(0, 112, 186, 0.45);
}

.dnft-wallet-err {
  font-size: 0.72em;
  color: #ff8a8a;
  min-height: 1.1em;
  margin: 0.25em 0 0;
}

.dnft-paypal-form {
  margin-top: 0.2em;
}

.dnft-paypal-confirm {
  font-size: 0.76em;
  color: #7effc0;
  background: rgba(0, 255, 140, 0.07);
  border: 1px solid rgba(0, 255, 140, 0.2);
  border-radius: 8px;
  padding: 0.5em 0.7em;
  margin-top: 0.7em;
  line-height: 1.5;
}

.dnft-paypal-confirm code {
  font-family: monospace;
  color: #5bc6f7;
}

/* ── Stripe DNFT option card ──────────────────────────────────── */
.dnft-stripe-option {
  border-color: rgba(0, 229, 255, 0.33);
  background: #001c1e;
}

.dnft-stripe-option .dnft-option-title {
  color: #00e5ff;
}

.dnft-stripe-wallet-label {
  color: #00e5ff;
}

.dnft-stripe-wallet-input {
  background: #001828;
  border-color: rgba(0, 229, 255, 0.4);
  color: #e0f4ff;
}

.dnft-stripe-wallet-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}

.dnft-stripe-btn {
  background: linear-gradient(135deg, rgba(0,229,255,0.25), rgba(0,229,255,0.1));
  border: 2px solid rgba(0, 229, 255, 0.6);
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dnft-stripe-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0,229,255,0.35), rgba(0,229,255,0.15));
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
  transform: translateY(-2px);
}

.dnft-stripe-confirm {
  font-size: 0.76em;
  color: #7effc0;
  background: rgba(0, 255, 140, 0.07);
  border: 1px solid rgba(0, 255, 140, 0.2);
  border-radius: 8px;
  padding: 0.5em 0.7em;
  margin-top: 0.7em;
  line-height: 1.5;
}

.dnft-stripe-confirm code {
  font-family: monospace;
  color: #00e5ff;
}

/* ── Combined Fiat DNFT card (PayPal + Stripe) ───────────────── */
.dnft-fiat-option {
  border-color: rgba(0, 180, 255, 0.35);
  background: linear-gradient(160deg, #001828 0%, #001c1e 100%);
}

.dnft-fiat-option .dnft-option-title {
  color: #5bc6f7;
}

/* Stacked PayPal + Stripe buttons (column layout, no overflow) */
.dnft-fiat-btns-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.6em;
  width: 100%;
}

.dnft-fiat-btns-row .paypal-form {
  display: flex;
  width: 100%;
}

.dnft-fiat-btns-row .paypal-form .dnft-buy-btn,
.dnft-fiat-btns-row > .dnft-buy-btn {
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dnft-escrow-note {
  font-size: 0.72em;
  color: #777;
  margin-top: 0.5em;
}

.dnft-escrow-note a {
  color: rgba(139, 0, 255, 0.85);
  text-decoration: none;
}

.dnft-escrow-note a:hover {
  text-decoration: underline;
}

.dnft-buy-footer-note {
  font-size: 0.75em;
  color: #777;
  margin-top: 0.8em;
}

.dnft-buy-footer-note a {
  color: #8b00ff;
  text-decoration: none;
}

.dnft-buy-footer-note a:hover {
  text-decoration: underline;
}


/* ── Cancel subscription row ───────────────── */
.cancel-subscription-row {
  margin-top: 0.7rem;
  text-align: center;
}

.cancel-sub-link {
  display: inline-block;
  color: #ff6b6b;
  font-size: 0.85rem;
  font-weight: bold;
  text-decoration: none;
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  transition: background 0.2s, box-shadow 0.2s;
}

.cancel-sub-link:hover {
  background: rgba(255, 107, 107, 0.1);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
  text-decoration: none;
}

.coming-soon-badge {
  display: inline-block;
  background: rgba(115, 0, 255, 0.25);
  color: #bf80ff;
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.2rem;
  font-weight: normal;
  border: 1px solid rgba(115, 0, 255, 0.4);
}

.about-footer {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #aaa;
}

.about-footer a {
  color: #00e5ff;
  text-decoration: none;
}

.about-footer a:hover {
  text-decoration: underline;
}

.about-license {
  color: #666;
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

/* Donate with crypto section */
.donate-crypto-section {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
}

.donate-crypto-address-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
}

.donate-crypto-icon {
  font-size: 1.6rem;
  color: #00e5ff;
  flex-shrink: 0;
}

.donate-crypto-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.donate-crypto-label {
  font-size: 0.82rem;
  color: #8ab0c0;
}

.donate-crypto-addr {
  font-size: 1rem;
  font-weight: 700;
  color: #00e5ff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  word-break: break-all;
}

.donate-crypto-note {
  font-size: 0.75rem;
  color: #607080;
}

@media (max-width: 500px) {
  .about-header {
    flex-direction: column;
    text-align: center;
  }
  .about-links {
    justify-content: center;
  }
  .about-payment-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* ── Moon & Sun Tracker Modal ──────────────────────────────── */
.moon-tracker-modal {
  background: linear-gradient(160deg, rgba(5,5,40,0.98) 0%, rgba(10,10,60,0.98) 100%);
  border-radius: 20px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 30px rgba(0,180,255,0.4), inset 0 0 60px rgba(0,0,80,0.5);
  padding: 1.8rem 1.6rem 1.4rem;
}

.moon-tracker-modal h2 {
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: #e0f7ff;
  margin: 0 0 1.1rem;
  text-shadow: 0 0 12px #00ccff;
}

.tracker-card {
  background: rgba(0, 50, 80, 0.45);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  color: #cceeff;
}

.tracker-card p {
  margin: 0;
}

.tracker-location {
  border-color: rgba(100, 200, 255, 0.2);
  background: rgba(0, 30, 60, 0.4);
  font-size: 0.88rem;
  color: #a0d8ef;
}

.tracker-ekadasi {
  border-color: rgba(255, 215, 0, 0.2);
  background: rgba(40, 30, 0, 0.35);
}

#ekadasi-links {
  margin-top: 0.3rem;
}

/* Featured Ekadasi card */
#ekadasi-links .ekadasi-featured {
  background: rgba(0, 60, 80, 0.55);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 14px;
  padding: 0.7rem 1rem 0.5rem;
  margin-bottom: 0.6rem;
}

#ekadasi-links .ekadasi-featured-name {
  font-weight: bold;
  font-size: 1.05rem;
  color: #00e5ff;
  margin: 0 0 0.35rem;
  text-shadow: 0 0 8px rgba(0,229,255,0.5);
}

#ekadasi-links .ekadasi-story-link a {
  display: inline-block;
  background: rgba(0, 180, 255, 0.15);
  border: 1px solid rgba(0,180,255,0.4);
  border-radius: 8px;
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
  color: #00e5ff;
  text-decoration: none;
  transition: background 0.2s;
}

#ekadasi-links .ekadasi-story-link a:hover {
  background: rgba(0, 180, 255, 0.3);
}

/* Prev / Next navigation row */
#ekadasi-links .ekadasi-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #99bbcc;
  margin: 0.4rem 0 0.5rem;
  gap: 0.5rem;
}

#ekadasi-links .ekadasi-nav a {
  color: #66ccee;
  text-decoration: none;
  border-bottom: 1px dotted rgba(102,204,238,0.4);
}

#ekadasi-links .ekadasi-nav a:hover {
  color: #00e5ff;
}

/* About link row */
#ekadasi-links .ekadasi-about {
  text-align: center;
  margin-top: 0.6rem;
  font-size: 0.82rem;
}

#ekadasi-links .ekadasi-about a {
  color: #88ddff;
  text-decoration: none;
  opacity: 0.8;
}

#ekadasi-links .ekadasi-about a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Location button */
.tracker-location-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(0, 180, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 10px;
  color: #00e5ff;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.tracker-location-btn:hover {
  background: rgba(0, 180, 255, 0.25);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Solar System Visualizer */
.ss-details {
  margin-top: 1rem;
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.ss-details summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.98rem;
  font-weight: bold;
  color: #88ddff;
  padding: 0.55rem 0.9rem;
  background: rgba(0, 30, 50, 0.5);
  user-select: none;
}

.ss-details summary::-webkit-details-marker { display: none; }

.ss-details summary::before {
  content: '▶ ';
  font-size: 0.75em;
  opacity: 0.7;
  transition: transform 0.2s;
  display: inline-block;
}

.ss-details[open] summary::before {
  transform: rotate(90deg);
}

.ss-container {
  text-align: center;
  padding: 0.5rem 0.5rem 0.7rem;
  background: rgba(0, 5, 15, 0.55);
}

#solar-system-canvas {
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 100, 200, 0.35);
}

.ss-controls {
  margin-top: 0.55rem;
}

.ss-btn {
  background: rgba(0, 180, 255, 0.12);
  border: 1px solid rgba(0, 180, 255, 0.35);
  border-radius: 8px;
  color: #00e5ff;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.25rem 0.8rem;
  transition: background 0.2s;
}

.ss-btn:hover {
  background: rgba(0, 180, 255, 0.28);
}

.ss-planet-info {
  margin-top: 0.55rem;
  padding: 0.4rem 0.8rem;
  background: rgba(0, 30, 50, 0.75);
  border: 1px solid rgba(0, 180, 255, 0.28);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #aaddff;
  text-align: left;
  line-height: 1.45;
}


/* ═══════════════════════════════════════════════════════════════
   Dashboard Panel Toolbars & Toggle System
   ═══════════════════════════════════════════════════════════════ */

/* Hide all panels by default; show only when .panel-visible is added */
.dashboard-panel {
  display: none;
}
.dashboard-panel.panel-visible {
  display: block;
}

/* ── Side Toolbar Base ─────────────────────────────────────────── */
.side-toolbar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1100;
  background: rgba(0, 0, 33, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.5);
  border-radius: 12px;
  padding: 8px 5px;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
}

.left-toolbar {
  left: 4px;
}
.right-toolbar {
  right: 4px;
}

/* ── Toolbar Buttons ───────────────────────────────────────────── */
.panel-toggle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 6px 5px;
  color: #00e5ff;
  font-size: 0.58rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-width: 48px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.panel-toggle-btn img,
.panel-toggle-btn .toolbar-emoji {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  text-align: center;
  font-size: 1.6rem;
  line-height: 30px;
}

.panel-toggle-btn:hover {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}

.panel-toggle-btn.active {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 10px #00e5ff, 0 0 22px rgba(0, 229, 255, 0.3);
  color: #ffffff;
}

/* ── Desktop: half-width panels anchored to their side (> 700px) ─ */
@media (min-width: 701px) {
  .dashboard-panel.panel-visible {
    position: fixed;
    top: 165px;    /* clear fixed header (~110px) + weight display (~55px) */
    bottom: 95px;  /* clear fixed footer/bottom chrome */
    width: 50%;
    max-width: 50%;
    overflow-y: auto;
    z-index: 1090; /* below .side-toolbar (1100) so toolbar stays on top */
  }

  /* Left-side panels anchor to the left, offset past the left toolbar */
  #recent-supplements-list.panel-visible,
  #recent-foods-list.panel-visible {
    left: 60px;   /* clear the ~54px-wide left side-toolbar */
    right: auto;
  }

  /* Right-side panels anchor to the right, offset past the right toolbar */
  #recent-exercises-list.panel-visible,
  #workout-set-list.panel-visible {
    right: 60px;  /* clear the ~54px-wide right side-toolbar */
    left: auto;
  }
}

/* ── Mobile: bottom bar layout (≤ 700px) ──────────────────────── */
@media (max-width: 700px) {
  /* ── Compact header for mobile ─────────────────────────────── */
  #app-title {
    font-size: 2rem;
  }
  #app-subtitle {
    font-size: 0.65rem;
  }
  #walletIconWrapper {
    width: 54px;
    height: 54px;
    top: 8px;
    right: 6px;
  }
  #wallet-connect {
    width: 50px;
    height: 50px;
    right: 2px;
  }
  #metamaskIcon {
    width: 46px;
    height: 46px;
  }
  /* ── IPFS logo: anchor to upper left corner on mobile ─────── */
  #ipfs-status {
    top: 8px;
    left: 6px;
    width: 54px;
    height: 54px;
  }
  #ipfsIcon {
    width: 40px;
    height: 40px;
  }
  #current-weight-display {
    font-size: 1.5rem;
    top: 55px;   /* just below the shrunken header */
  }
  main {
    margin-top: 82px;  /* clear shrunken header (~50px) + weight display (~24px) */
  }

  /* ── Compact footer in mobile ───────────────────────────────── */
  footer {
    display: flex !important;  /* always visible on mobile — no wallet needed */
    height: 64px;
    padding: 0.25rem 1rem;
    box-sizing: border-box;
  }
  .round-button {
    width: 50px;
    height: 50px;
  }

  /* ── Mobile panels: #id.class (specificity 0,1,1,0) beats base ─
     Default: panel sits above toolbar (56px) + footer (64px) + 8px gap = 128px */
  #recent-supplements-list.panel-visible,
  #recent-foods-list.panel-visible,
  #recent-exercises-list.panel-visible,
  #workout-set-list.panel-visible {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 128px;  /* above both rows (64px footer + 56px toolbar) + 8px gap */
    top: auto;
    width: 100%;
    max-width: 100%;
    max-height: 48vh;
    overflow-y: auto;
    border-radius: 14px 14px 0 0;
    z-index: 10002;  /* above footer (10000) and toolbar (10001) */
  }

  /* When footer is visible: same — both rows already always stacked */
  body.footer-visible #recent-supplements-list.panel-visible,
  body.footer-visible #recent-foods-list.panel-visible,
  body.footer-visible #recent-exercises-list.panel-visible,
  body.footer-visible #workout-set-list.panel-visible {
    bottom: 128px;  /* 64px footer + 56px toolbar + 8px gap */
  }

  /* ── Side toolbars: unified horizontal bar ──────────────────── */
  /* Toolbar always sits above the footer row (64px) */
  .side-toolbar {
    position: fixed;
    top: auto;
    bottom: 64px;   /* always above footer (64px) */
    transform: none;
    flex-direction: row;
    border-radius: 0;
    padding: 6px 10px;
    gap: 4px;
    width: 50%;
    box-sizing: border-box;
    justify-content: space-around;
    height: 56px;
    z-index: 10001;  /* above footer (10000), below panel (10002) */
    background: rgba(0, 0, 33, 0.97);
  }

  /* When footer is visible: toolbar stays at same position (both rows always stacked) */
  body.footer-visible .side-toolbar {
    bottom: 64px;
  }

  .left-toolbar {
    left: 0;
    right: auto;
    border-right: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 0;
  }

  .right-toolbar {
    right: 0;
    left: auto;
    border-left: none;
    border-radius: 0;
  }

  .panel-toggle-btn {
    min-width: 44px;
    min-height: 44px;
    flex: 1;
  }
}

/* ── DNFT buy card (escrow listing) ────────────────────────── */
.dnft-buy-card {
  margin: 0.8em auto;
  padding: 0.8em 1em;
  border: 1px solid rgba(139, 0, 255, 0.33);
  border-radius: 10px;
  background: #120028;
  max-width: 420px;
  text-align: center;
}

.dnft-buy-card-label {
  font-size: 0.95em;
  color: #cc88ff;
  margin-bottom: 0.3em;
  font-weight: bold;
}

.dnft-buy-card-supply {
  font-size: 0.82em;
  color: #aaa;
  margin-bottom: 0.6em;
}

.dnft-escrow-buy-btn {
  font-size: 1.05rem;
  padding: 10px 24px;
}

.dnft-buy-loading {
  font-size: 0.82em;
  color: #aaa;
  margin: 0.5em 0;
}

/* ── DNFT Details table ────────────────────────────────────── */
/* (removed — replaced by dnft-buy-section card layout) */

/* ── DNFT Manual Purchase Flow ─────────────────────────────── */
/* (removed — steps now inside dnft-steps-compact in buy cards) */

/* ── DNFT Action Buttons row ───────────────────────────────── */
/* (removed — action buttons now inside buy-option-cards) */

@media (max-width: 500px) {  .dnft-buy-options {
    flex-direction: column;
    align-items: center;
  }

  .dnft-buy-option-card {
    max-width: 100%;
  }
}

/* ── Staff of Aesculapius Dropdown ──────────────────────────────────────── */

#header-center {
  position: relative;
}

#aesculapius-left {
  cursor: pointer;
  display: inline-block;
  transition: text-shadow 0.2s ease, transform 0.2s ease;
}
#aesculapius-left:hover,
#aesculapius-left:focus {
  text-shadow: 0 0 20px #ff9f43, 0 0 40px #e74c3c, 0 0 60px #ff6b6b;
  transform: scale(1.15);
  outline: none;
}

#app-title-name {
  cursor: pointer;
}
#app-title-name:hover {
  text-shadow: 0 0 16px #00ff66, 0 0 32px #00e5ff;
}

#aesculapius-right {
  cursor: pointer;
  display: inline-block;
  transition: text-shadow 0.2s ease, transform 0.2s ease;
}
#aesculapius-right:hover,
#aesculapius-right:focus {
  text-shadow: 0 0 20px #00ff66, 0 0 40px #7300ff, 0 0 60px #00e5ff;
  transform: scale(1.15);
  outline: none;
}

/* ── Settings Modal ─────────────────────────────────────────────────────── */

.settings-modal {
  max-width: 480px;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.settings-gear-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.settings-header h2 {
  margin: 0;
  font-family: 'Bungee', sans-serif;
  font-size: 1.5rem;
  color: #00e5ff;
  text-shadow: 0 0 10px #00e5ff, 0 0 20px #7300ff;
}

.settings-section {
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  padding-bottom: 1.2rem;
}

.settings-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-section h3 {
  color: #00e5ff;
  font-size: 1rem;
  margin: 0 0 0.5rem;
  text-shadow: 0 0 6px #7300ff;
}

.settings-desc {
  font-size: 0.85rem;
  color: #c0d8f0;
  margin: 0 0 0.9rem;
  line-height: 1.5;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.settings-label {
  font-size: 0.9rem;
  color: #7ecfea;
  white-space: nowrap;
}

.settings-time-input {
  background: rgba(0, 0, 50, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.5);
  border-radius: 6px;
  color: #e0f4ff;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
  width: 7rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-time-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.settings-save-btn {
  background: linear-gradient(135deg, #0077cc 0%, #00e5ff 100%);
  border: none;
  border-radius: 6px;
  color: #000d1a;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.settings-save-btn:hover {
  opacity: 0.88;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.settings-status {
  font-size: 0.82rem;
  min-height: 1.2rem;
  margin: 0.4rem 0 0;
}

.settings-status-success { color: #00dc90; }
.settings-status-error   { color: #ff6b6b; }

.settings-hint {
  font-size: 0.8rem;
  color: #7a9ab8;
  margin: 0.6rem 0 0;
}

.settings-hint strong { color: #a0ccee; }

.aesculapius-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(0, 0, 40, 0.97);
  border: 2px solid #00e5ff;
  border-radius: 10px;
  box-shadow: 0 0 24px #00e5ff, 0 0 8px #7300ff;
  z-index: 200000;
  padding: 0.75rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aesculapius-dropdown.hidden {
  display: none;
}

/* Admin dropdown — left ⚕︎ */
.admin-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(30, 0, 20, 0.97);
  border: 2px solid #ff9f43;
  border-radius: 10px;
  box-shadow: 0 0 24px #ff9f43, 0 0 8px #e74c3c;
  z-index: 200000;
  padding: 0.75rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-dropdown.hidden {
  display: none;
}
.admin-menu-item {
  color: #ffe0b2 !important;
}
.admin-menu-item:hover,
.admin-menu-item:focus {
  background: rgba(255, 159, 67, 0.15) !important;
  border-color: #ff9f43 !important;
  color: #ff9f43 !important;
}

.aes-bnut-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.4rem 0.5rem 0.5rem;
}

.aes-bnut-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px #00e5ff);
  animation: shimmer-spin-y 8s linear infinite;
}

.aes-bnut-amount {
  font-family: 'Bungee', sans-serif;
  font-size: 0.95rem;
  color: #00e5ff;
  text-shadow: 0 0 8px #00e5ff;
  white-space: nowrap;
}

.aes-divider {
  border: none;
  border-top: 1px solid rgba(0, 229, 255, 0.3);
  margin: 2px 4px;
}

.aes-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #e0f7ff;
  font-size: 0.9rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.aes-menu-item:hover,
.aes-menu-item:focus {
  background: rgba(0, 229, 255, 0.12);
  border-color: #00e5ff;
  color: #00e5ff;
  outline: none;
}

/* ── Staff of Aesculapius Stub Modals ───────────────────────────────────── */

.aes-stub-modal {
  text-align: center;
}

.aes-stub-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.aes-stub-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px #00e5ff);
  animation: shimmer-spin-y 8s linear infinite;
}

.aes-stub-header h2 {
  margin: 0;
  font-family: 'Bungee', sans-serif;
  font-size: 1.4rem;
  color: #00e5ff;
  text-shadow: 0 0 10px #00e5ff;
}

.aes-stub-desc {
  color: #c0e8ff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.aes-stub-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  text-align: left;
  display: inline-block;
}
.aes-stub-list li {
  padding: 0.3rem 0;
  color: #e0f7ff;
  font-size: 0.9rem;
}

.aes-stub-coming-soon {
  color: #7300ff;
  font-size: 0.85rem;
  text-shadow: 0 0 6px #7300ff;
  margin-top: 0.5rem;
}

.aes-stub-actions {
  margin-bottom: 1rem;
}

.aes-stub-link-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 2px solid #00e5ff;
  border-radius: 6px;
  color: #00e5ff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.aes-stub-link-btn:hover {
  background: rgba(0, 229, 255, 0.15);
}

.aes-stub-prize-pool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  border: 1px solid #00e5ff;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.07);
  color: #00e5ff;
  font-size: 1rem;
}

.aes-stub-pool-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Governance Modal ──────────────────────────────────────────────────────── */

.gov-modal {
  max-width: 680px;
}

/* Payroll — data sharing reward entry inputs */
.payroll-ds-entry {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.payroll-ds-input {
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  background: #0a0a2e;
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #eee;
  border-radius: 5px;
}

.payroll-ds-wallet { width: 55%; }
.payroll-ds-amount { width: 20%; }
.payroll-ds-ref    { width: 22%; }

/* ── Payroll Bounty Queue Table ─────────────────────────────────────────── */
.payroll-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
}

.payroll-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: #dde8f0;
}

.payroll-table th {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.3);
  color: #00e5ff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.payroll-table td {
  padding: 0.5rem 0.6rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.payroll-row--needs-wallet td {
  opacity: 0.78;
}

.payroll-table .payroll-amount-input {
  width: 60px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 4px;
  color: #fff;
  padding: 0.2rem 0.35rem;
  font-size: 0.82rem;
}

.payroll-wallet-addr {
  font-size: 0.75em;
  color: #aacfdd;
  word-break: break-all;
}

.payroll-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

.payroll-badge--needs-wallet {
  background: rgba(255, 165, 0, 0.18);
  border: 1px solid rgba(255, 165, 0, 0.45);
  color: #ffaa33;
}

.payroll-badge--idea-originator {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.55);
  color: #c4b5fd;
}

.payroll-badge--implementer {
  background: rgba(8, 145, 178, 0.15);
  border: 1px solid rgba(8, 145, 178, 0.4);
  color: #67e8f9;
}

.payroll-row--idea-originator td {
  background: rgba(124, 58, 237, 0.06);
}

.payroll-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

.payroll-status--pending {
  background: rgba(0, 160, 255, 0.18);
  border: 1px solid rgba(0, 160, 255, 0.45);
  color: #55aaff;
}

.payroll-status--needs-wallet {
  background: rgba(255, 165, 0, 0.18);
  border: 1px solid rgba(255, 165, 0, 0.45);
  color: #ffaa33;
}

.payroll-status--settled {
  background: rgba(0, 200, 80, 0.18);
  border: 1px solid rgba(0, 200, 80, 0.45);
  color: #44dd88;
}

.payroll-issue-link {
  color: #00e5ff;
  text-decoration: none;
}

.payroll-issue-link:hover {
  text-decoration: underline;
}

.payroll-explorer-link {
  color: inherit;
  text-decoration: none;
}

.payroll-explorer-link:hover .payroll-wallet-addr {
  color: #00e5ff;
  text-decoration: underline;
}

.payroll-needs-wallet-notice {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #ffaa33;
  line-height: 1.5;
}

.payroll-needs-wallet-notice .gov-admin-action-btn {
  padding: 0.15rem 0.4rem;
  font-size: 0.68rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.payroll-row-actions {
  white-space: nowrap;
  min-width: 90px;
}

.payroll-row-msg {
  font-size: 0.72rem;
  margin-top: 0.3rem;
  color: #aacfdd;
  word-break: break-all;
  white-space: normal;
}

/* ── Batch Preview Card ──────────────────────────────────────────────────── */

.payroll-batch-preview-card {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.payroll-batch-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.payroll-batch-preview-header strong {
  color: #00e5ff;
  font-size: 0.9rem;
}

.payroll-batch-summary {
  font-size: 0.78rem;
  color: #aacfdd;
  background: rgba(0, 229, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.payroll-tally-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  color: #dde8f0;
  margin-bottom: 0.4rem;
}

.payroll-tally-table th {
  text-align: left;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  color: #00e5ff;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.payroll-tally-table td {
  padding: 0.4rem 0.5rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.payroll-tally-issues {
  line-height: 1.7;
}

.payroll-tally-total {
  font-weight: 700;
  color: #55ffaa;
  white-space: nowrap;
}

.payroll-batch-warning {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: #ffaa33;
  background: rgba(255, 165, 0, 0.08);
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
}

.payroll-batch-info {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  color: #aacfdd;
}

/* Prominent settle button */
.payroll-settle-btn-prominent {
  font-size: 1.05rem;
  padding: 0.65rem 1.8rem;
  background: linear-gradient(135deg, rgba(0, 180, 80, 0.35), rgba(0, 229, 255, 0.2));
  border: 1px solid rgba(0, 200, 80, 0.6);
  box-shadow: 0 0 12px rgba(0, 200, 80, 0.2);
  transition: box-shadow 0.2s, background 0.2s;
}

.payroll-settle-btn-prominent:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 200, 90, 0.5), rgba(0, 229, 255, 0.3));
  box-shadow: 0 0 20px rgba(0, 200, 80, 0.35);
}

.payroll-settle-btn-prominent:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Treasury health indicator */
#payroll-treasury-health {
  margin-bottom: 0.75rem;
}

.payroll-treasury-status {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.2rem 0 0;
  transition: color 0.3s;
}

.payroll-treasury-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.payroll-treasury-action-link {
  font-size: 0.78rem;
  color: #00e5ff;
  text-decoration: none;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  transition: background 0.15s, border-color 0.15s;
}

.payroll-treasury-action-link:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.6);
}

/* Bounty Bot pause toggle */
.payroll-bot-toggle-card {
  background: rgba(0, 0, 60, 0.45);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.payroll-bot-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.payroll-bot-toggle-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c0e8ff;
}

.payroll-bot-toggle-btn {
  position: relative;
  width: 52px;
  height: 26px;
  border-radius: 13px;
  border: 1.5px solid rgba(0, 229, 255, 0.4);
  background: rgba(60, 60, 100, 0.6);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, border-color 0.25s;
  flex-shrink: 0;
}

.payroll-bot-toggle-btn--on {
  background: rgba(0, 200, 80, 0.5);
  border-color: rgba(0, 200, 80, 0.7);
}

.payroll-bot-toggle-btn--off {
  background: rgba(80, 40, 40, 0.6);
  border-color: rgba(255, 80, 80, 0.4);
}

.payroll-bot-toggle-knob {
  position: absolute;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c0e8ff;
  transition: left 0.25s;
  pointer-events: none;
}

.payroll-bot-toggle-btn--on .payroll-bot-toggle-knob {
  left: 28px;
  background: #00ff88;
}

.payroll-bot-toggle-btn--off .payroll-bot-toggle-knob {
  left: 3px;
  background: #ff8888;
}

.payroll-bot-toggle-status {
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

.payroll-bot-pause-msg {
  font-size: 0.78rem;
  color: #ffcc00;
  background: rgba(255, 200, 0, 0.08);
  border: 1px solid rgba(255, 200, 0, 0.25);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Proposals container */
.gov-proposals-container {
  margin-top: 1rem;
}

.gov-loading,
.gov-empty,
.gov-error {
  color: #c0e8ff;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 0;
}

.gov-error {
  color: #ff6b6b;
}

/* Proposal cards */
.proposal-card {
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  background: rgba(0, 0, 60, 0.5);
  transition: border-color 0.2s;
}

.proposal-card.proposal-active {
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
}

.proposal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.proposal-id {
  font-size: 0.75rem;
  color: #7ecfff;
  font-family: monospace;
}

.proposal-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #e0f7ff;
  font-weight: 600;
}

.proposal-description {
  font-size: 0.88rem;
  color: #b0d8f0;
  margin-bottom: 0.6rem;
  white-space: pre-wrap;
}

.proposal-deadline {
  font-size: 0.78rem;
  color: #7ecfff;
  margin: 0.4rem 0;
}

/* State badges */
.badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-active  { background: rgba(0, 229, 255, 0.18); color: #00e5ff; border: 1px solid #00e5ff; }
.badge-passed  { background: rgba(0, 220, 100, 0.18); color: #00dc64; border: 1px solid #00dc64; }
.badge-failed  { background: rgba(255, 80, 80, 0.18);  color: #ff5050; border: 1px solid #ff5050; }
.badge-enacted { background: rgba(120, 60, 255, 0.18); color: #a070ff; border: 1px solid #a070ff; }
.badge-vetoed  { background: rgba(255, 140, 0, 0.18);  color: #ff8c00; border: 1px solid #ff8c00; }

/* Vote bar */
.gov-vote-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  margin: 0.5rem 0;
}

.gov-vote-bar-yes {
  background: #00dc64;
  transition: width 0.4s ease;
}

.gov-vote-bar-no {
  background: #ff5050;
  transition: width 0.4s ease;
}

/* Vote counts */
.gov-vote-counts {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #c0e8ff;
  margin-bottom: 0.35rem;
  align-items: center;
}

.gov-quorum {
  font-size: 0.75rem;
}

.gov-quorum.quorum-met   { color: #00dc64; }
.gov-quorum.quorum-unmet { color: #ffaa00; }

/* Vote buttons */
.gov-vote-buttons {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.gov-btn-yes,
.gov-btn-no {
  padding: 0.35rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.1s;
}

.gov-btn-yes {
  background: #00dc64;
  color: #001a0d;
}

.gov-btn-no {
  background: #ff5050;
  color: #1a0000;
}

.gov-btn-yes:hover,
.gov-btn-no:hover {
  opacity: 0.85;
}

.gov-btn-yes:disabled,
.gov-btn-no:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Notices */
.gov-voted-notice,
.gov-connect-notice,
.gov-no-bnut-notice {
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.gov-voted-notice    { color: #7ecfff; background: rgba(0,229,255,0.07); }
.gov-connect-notice  { color: #ffcc44; background: rgba(255,204,68,0.07); }
.gov-no-bnut-notice  { color: #ff8c44; background: rgba(255,140,68,0.07); }

/* Admin note */
.gov-admin-note {
  font-size: 0.8rem;
  color: #b8aaff;
  font-style: italic;
  margin: 0.3rem 0;
  border-left: 3px solid #7e60ff;
  padding-left: 0.5rem;
}

/* Create Proposal button wrapper */
.gov-create-btn-wrapper {
  text-align: center;
  margin-bottom: 0.75rem;
}

.gov-create-btn {
  background: transparent;
  border: 2px solid #00e5ff;
  color: #00e5ff;
  padding: 0.45rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gov-create-btn:hover {
  background: rgba(0, 229, 255, 0.15);
}

/* Create Proposal form */
.gov-create-form {
  background: rgba(0, 0, 40, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.gov-form-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #00e5ff;
}

.gov-label {
  display: block;
  font-size: 0.82rem;
  color: #9ec8e0;
  margin-bottom: 0.6rem;
}

.gov-input {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 50, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 5px;
  color: #e0f7ff;
  font-size: 0.88rem;
  box-sizing: border-box;
  outline: none;
}

.gov-input:focus {
  border-color: #00e5ff;
}

.gov-textarea {
  resize: vertical;
  min-height: 64px;
}

.gov-input-short {
  max-width: 120px;
}

.gov-form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.gov-submit-btn {
  background: #00e5ff;
  color: #001a2e;
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gov-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gov-cancel-btn {
  background: transparent;
  color: #9ec8e0;
  border: 1px solid rgba(0,229,255,0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s;
}

.gov-cancel-btn:hover {
  background: rgba(0,229,255,0.07);
}

.gov-form-status {
  margin: 0.5rem 0 0;
  font-size: 0.83rem;
  color: #c0e8ff;
  min-height: 1.2em;
}

/* Wallet balance display in modal header */
.gov-wallet-balance {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  margin: 0 0 0.75rem;
}

/* How to get $BNUT info box */
.gov-info-box {
  background: rgba(0, 0, 40, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.83rem;
  color: #9ec8e0;
}

.gov-info-box summary {
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  color: #7ecfff;
  font-weight: 600;
  user-select: none;
  list-style: none;
}

.gov-info-box summary::-webkit-details-marker { display: none; }

.gov-info-content {
  padding: 0.5rem 0.75rem 0.75rem;
  border-top: 1px solid rgba(0, 229, 255, 0.12);
}

.gov-info-content ul {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.2rem;
}

.gov-info-content li {
  margin-bottom: 0.3rem;
}

.gov-info-contract {
  font-size: 0.75rem;
  color: #5898b0;
  word-break: break-all;
  margin: 0;
}

.gov-info-contract code {
  background: rgba(0,0,0,0.3);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Admin panel */
.gov-admin-panel {
  background: rgba(120, 60, 255, 0.07);
  border: 1px solid rgba(160, 112, 255, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.gov-admin-panel-title {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  color: #a070ff;
  font-weight: 700;
}

.gov-admin-section {
  background: rgba(0, 0, 30, 0.4);
  border: 1px solid rgba(160, 112, 255, 0.2);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.83rem;
  color: #c8b8ff;
}

.gov-admin-section summary {
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  color: #b8aaff;
  font-weight: 600;
  user-select: none;
  list-style: none;
}

.gov-admin-section summary::-webkit-details-marker { display: none; }

.gov-admin-section-body {
  padding: 0.5rem 0.65rem 0.65rem;
  border-top: 1px solid rgba(160, 112, 255, 0.15);
}

.gov-admin-hint {
  font-size: 0.78rem;
  color: #7e60c0;
  margin: 0 0 0.5rem;
  font-style: italic;
}

.gov-admin-action-btn {
  background: rgba(120, 60, 255, 0.2);
  border: 1px solid rgba(160, 112, 255, 0.5);
  color: #c8b8ff;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: background 0.2s;
}

.gov-admin-action-btn:hover {
  background: rgba(120, 60, 255, 0.4);
}

.gov-admin-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gov-admin-danger-btn {
  border-color: rgba(255, 80, 80, 0.5);
  color: #ff9090;
  background: rgba(255, 80, 80, 0.1);
}

.gov-admin-danger-btn:hover {
  background: rgba(255, 80, 80, 0.25);
}

/* Admin controls on proposal cards */
.gov-admin-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(160, 112, 255, 0.2);
}

.gov-admin-label {
  font-size: 0.72rem;
  color: #7e60c0;
  font-weight: 600;
}

.gov-finalize-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  padding: 0.25rem 0.7rem;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.gov-finalize-btn:hover { background: rgba(0, 229, 255, 0.22); }

.gov-enact-btn {
  background: rgba(120, 60, 255, 0.12);
  border: 1px solid rgba(160, 112, 255, 0.5);
  color: #a070ff;
  padding: 0.25rem 0.7rem;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.gov-enact-btn:hover { background: rgba(120, 60, 255, 0.3); }

.gov-veto-btn {
  background: rgba(255, 140, 0, 0.1);
  border: 1px solid rgba(255, 140, 0, 0.4);
  color: #ff8c00;
  padding: 0.25rem 0.7rem;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.gov-veto-btn:hover { background: rgba(255, 140, 0, 0.25); }

.gov-finalize-btn:disabled,
.gov-enact-btn:disabled,
.gov-veto-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Subscription Status Modal ─────────────────────────────────────────────── */

.sub-modal {
  max-width: 560px;
}

/* ── Status Card ── */
.sub-status-card {
  background: rgba(0, 20, 60, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.3s;
}
.sub-status-card.sub-card-active {
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.12);
}

.sub-status-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.sub-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.28rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.3s;
}
.sub-badge-active {
  background: rgba(0, 229, 100, 0.15);
  border: 1px solid rgba(0, 229, 100, 0.5);
  color: #00e564;
  text-shadow: 0 0 8px rgba(0, 229, 100, 0.5);
  animation: sub-pulse-green 2.5s ease-in-out infinite;
}
.sub-badge-inactive {
  background: rgba(120, 120, 160, 0.15);
  border: 1px solid rgba(120, 120, 160, 0.35);
  color: #9090b0;
}
.sub-badge-expired {
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255, 90, 90, 0.4);
  color: #ff6b6b;
}

@keyframes sub-pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 100, 0.35); }
  50%       { box-shadow: 0 0 0 6px rgba(0, 229, 100, 0); }
}

.sub-status-method {
  font-size: 0.8rem;
  color: #88aabb;
  background: rgba(0, 0, 60, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
}

.sub-status-details {
  margin-top: 0.6rem;
}

.sub-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
  gap: 0.5rem;
}
.sub-detail-row:last-child { border-bottom: none; }

.sub-detail-label {
  color: #7090a0;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.sub-detail-value {
  color: #c0e8ff;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
}

.sub-manage-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.sub-action-btn {
  flex: 1;
  min-width: 110px;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.sub-action-manage {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
}
.sub-action-manage:hover {
  background: rgba(0, 229, 255, 0.22);
  color: #00e5ff;
}
.sub-action-cancel {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #ff6060;
  font-family: inherit;
}
.sub-action-cancel:hover {
  background: rgba(255, 80, 80, 0.22);
}

/* Crypto cancel info (no on-chain action needed) */
.sub-crypto-cancel-info {
  margin-top: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.3);
  border-radius: 8px;
  color: #ffd060;
  font-size: 0.85rem;
  line-height: 1.4;
}
.sub-crypto-cancel-info p {
  margin: 0;
}
.sub-crypto-cancel-info strong {
  color: #ffe090;
}

/* ── Subscribe / Upgrade Section ── */
.sub-new-section {
  margin-bottom: 1rem;
}

.sub-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #c0e8ff;
  margin: 0 0 0.7rem;
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.03em;
}

/* Plan toggle */
.sub-plan-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sub-plan-btn {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 0, 60, 0.4);
  color: #88aabb;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.sub-plan-btn:hover {
  border-color: rgba(0, 229, 255, 0.55);
  color: #c0e8ff;
}
.sub-plan-active {
  border-color: #00e5ff !important;
  background: rgba(0, 229, 255, 0.12) !important;
  color: #00e5ff !important;
}

.sub-save-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  background: rgba(0, 229, 100, 0.2);
  color: #00e564;
  margin-left: 4px;
  vertical-align: middle;
}

/* Payment method tabs */
.sub-method-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.sub-method-tab {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: transparent;
  color: #7090a0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.sub-method-tab:hover {
  border-color: rgba(0, 229, 255, 0.45);
  color: #c0e8ff;
}
.sub-tab-active {
  border-color: #00e5ff !important;
  background: rgba(0, 229, 255, 0.12) !important;
  color: #00e5ff !important;
}

/* Payment panels */
.sub-method-panel {
  background: rgba(0, 10, 40, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 10px;
  padding: 1rem;
  animation: sub-fade-in 0.25s ease;
}

@keyframes sub-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sub-method-desc {
  color: #90b0c0;
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.sub-pay-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
  margin-bottom: 0.5rem;
}

.sub-paypal-btn {
  background: transparent;
  border: none;
  width: auto;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.sub-paypal-btn:hover img { opacity: 0.85; }

.sub-stripe-btn-style {
  background: linear-gradient(135deg, #635bff, #4a43e8);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 91, 255, 0.35);
}
.sub-stripe-btn-style:hover {
  background: linear-gradient(135deg, #7872ff, #5a52f0);
  box-shadow: 0 4px 18px rgba(99, 91, 255, 0.5);
  transform: translateY(-1px);
}

.sub-eth-btn-style {
  background: linear-gradient(135deg, rgba(0, 80, 180, 0.6), rgba(0, 40, 120, 0.8));
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.2);
}
.sub-eth-btn-style:hover {
  background: linear-gradient(135deg, rgba(0, 100, 220, 0.7), rgba(0, 60, 160, 0.9));
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.35);
  transform: translateY(-1px);
}

.sub-bnut-btn-style {
  background: linear-gradient(135deg, rgba(115, 0, 255, 0.4), rgba(70, 0, 180, 0.6));
  border: 1px solid rgba(160, 80, 255, 0.5);
  color: #c088ff;
  box-shadow: 0 2px 10px rgba(115, 0, 255, 0.2);
}
.sub-bnut-btn-style:hover {
  background: linear-gradient(135deg, rgba(130, 20, 255, 0.55), rgba(90, 0, 200, 0.7));
  box-shadow: 0 4px 16px rgba(115, 0, 255, 0.38);
  transform: translateY(-1px);
}
.sub-bnut-btn-style:disabled,
.sub-eth-btn-style:disabled,
.sub-usdc-btn-style:disabled,
.sub-stripe-btn-style:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.sub-usdc-btn-style {
  background: linear-gradient(135deg, rgba(0, 160, 100, 0.4), rgba(0, 100, 60, 0.6));
  border: 1px solid rgba(0, 200, 120, 0.5);
  color: #00e8a0;
  box-shadow: 0 2px 10px rgba(0, 200, 120, 0.2);
}
.sub-usdc-btn-style:hover {
  background: linear-gradient(135deg, rgba(0, 180, 110, 0.55), rgba(0, 120, 75, 0.7));
  box-shadow: 0 4px 16px rgba(0, 200, 120, 0.38);
  transform: translateY(-1px);
}

.sub-crypto-price-row,
.sub-stripe-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.sub-crypto-label { color: #7090a0; font-size: 0.82rem; }
.sub-crypto-price,
.sub-stripe-price {
  color: #00e5ff;
  font-size: 1.05rem;
  font-weight: 700;
}

.sub-method-status {
  font-size: 0.83rem;
  color: #88ccaa;
  min-height: 1.2em;
  margin: 0.3rem 0 0;
}

.sub-sandbox-note {
  font-size: 0.76rem;
  color: #6688aa;
  margin: 0.5rem 0 0;
  font-style: italic;
}

/* ── Payment History ── */
.sub-history-details {
  margin-bottom: 1rem;
}
.sub-history-details summary {
  cursor: pointer;
  color: #88aabb;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.3rem 0;
  list-style: none;
  user-select: none;
}
.sub-history-details summary:hover { color: #00e5ff; }
.sub-history-details[open] summary { color: #00e5ff; margin-bottom: 0.5rem; }

.sub-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.sub-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  background: rgba(0, 0, 50, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.1);
  font-size: 0.82rem;
  gap: 0.5rem;
}
.sub-history-date { color: #7090a0; flex-shrink: 0; }
.sub-history-desc { color: #c0e8ff; flex: 1; }
.sub-history-amount { color: #00e5ff; font-weight: 700; flex-shrink: 0; }
.sub-history-status-ok  { color: #00e564; flex-shrink: 0; }
.sub-history-status-fail { color: #ff6b6b; flex-shrink: 0; }
.sub-history-tx { color: #00e5ff; font-size: 0.78rem; margin-left: 0.3em; text-decoration: none; }
.sub-history-tx:hover { text-decoration: underline; }

/* ── Footer Links ── */
.sub-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 229, 255, 0.1);
  margin-top: 0.25rem;
}

.sub-footer-link {
  font-size: 0.78rem;
  color: #5580a0;
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.sub-footer-link:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.07);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Community Data Dashboard Modal
   ═══════════════════════════════════════════════════════════════════════════ */

.comm-dashboard-modal {
  max-width: 700px;
  width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.5rem 1.25rem 1.25rem;
  box-sizing: border-box;
}

.comm-dash-subtitle {
  text-align: center;
  color: #8abfcc;
  font-size: 0.88rem;
  margin: -0.5rem 0 0.75rem;
}

.comm-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 229, 100, 0.12);
  border: 1px solid rgba(0, 229, 100, 0.3);
  color: #00e564;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* ── Tabs ── */
.comm-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.comm-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8abfcc;
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.comm-tab:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.06);
}

.comm-tab.active {
  color: #00e5ff;
  border-bottom-color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
}

/* ── Tab content ── */
.comm-tab-content { display: block; }
.comm-tab-content.comm-hidden { display: none; }

/* ── Stats row ── */
.comm-stats-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.comm-stat-card {
  flex: 1 1 80px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  min-width: 70px;
}

.comm-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #00e5ff;
  font-family: 'Bungee', sans-serif;
  line-height: 1.1;
}

.comm-stat-label {
  display: block;
  font-size: 0.7rem;
  color: #8abfcc;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Chart sections ── */
.comm-chart-section {
  margin-bottom: 1.2rem;
}

.comm-chart-title {
  font-size: 0.9rem;
  color: #cceeff;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.comm-chart-wrap {
  position: relative;
  width: 100%;
}

/* ── Ledger table ── */
.comm-ledger-wrap {
  overflow-x: auto;
}

.comm-ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.comm-ledger th {
  text-align: left;
  color: #8abfcc;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  font-weight: 600;
  white-space: nowrap;
}

.comm-ledger td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #ddd;
}

.comm-ledger-name { color: #00e5ff; }

.comm-role-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-transform: capitalize;
}

.comm-role-owner {
  background: rgba(255, 186, 8, 0.15);
  color: #ffba08;
  border: 1px solid rgba(255, 186, 8, 0.3);
}

.comm-role-contributor {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.comm-ledger-note {
  font-size: 0.72rem;
  color: #5a8fa0;
  margin-top: 0.5rem;
}

.comm-loading {
  color: #5a8fa0;
  font-size: 0.85rem;
  font-style: italic;
}

/* ── Data Pool tab ── */
.comm-datapool-intro {
  margin-bottom: 1rem;
}

.comm-datapool-intro p {
  font-size: 0.85rem;
  color: #aacfdd;
  margin: 0.4rem 0 0;
}

.comm-optin-card {
  background: rgba(0, 0, 33, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.comm-optin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.comm-optin-label {
  font-size: 0.85rem;
  color: #cceeff;
}

/* Toggle switch */
.comm-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.comm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.comm-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  transition: background 0.25s;
}

.comm-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

.comm-toggle input:checked + .comm-toggle-slider {
  background: rgba(0, 229, 255, 0.55);
}

.comm-toggle input:checked + .comm-toggle-slider::before {
  transform: translateX(18px);
  background: #00e5ff;
}

/* Privacy info list */
.comm-privacy-info {
  background: rgba(0, 229, 100, 0.05);
  border: 1px solid rgba(0, 229, 100, 0.18);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.comm-privacy-info h5 {
  margin: 0 0 0.5rem;
  color: #00e564;
  font-size: 0.88rem;
}

.comm-privacy-list {
  margin: 0;
  padding: 0 0 0 0.25rem;
  list-style: none;
}

.comm-privacy-list li {
  font-size: 0.8rem;
  color: #aacfdd;
  padding: 0.2rem 0;
}

/* Earn card */
.comm-earn-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 186, 8, 0.07);
  border: 1px solid rgba(255, 186, 8, 0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.comm-earn-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px #ffba08);
  flex-shrink: 0;
}

.comm-earn-card strong {
  color: #ffba08;
  font-size: 0.88rem;
}

.comm-earn-card p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #aacfdd;
}

/* Data preview */
.comm-data-preview {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.72rem;
  color: #c9f566;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
}

/* Earn card body flex child */
.comm-earn-body {
  flex: 1;
  min-width: 0;
}

/* Revoke consent bar */
.comm-revoke-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: rgba(255, 50, 50, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.comm-revoke-info {
  font-size: 0.78rem;
  color: #ff9999;
  flex: 1;
}

.comm-revoke-btn {
  background: rgba(200, 30, 30, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 80, 80, 0.5);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.comm-revoke-btn:hover {
  background: rgba(220, 50, 50, 0.9);
}

/* Reward status rows inside earn card */
.comm-reward-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
}

.comm-reward-label {
  font-size: 0.78rem;
  color: #aacfdd;
  min-width: 160px;
  flex-shrink: 0;
}

.comm-reward-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffba08;
}

.comm-reward-pending {
  color: #00e5ff;
}

.comm-reward-milestone {
  color: #c9f566;
}

/* Streak badge */
.comm-streak-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6700, #ffba08);
  color: #0a0a1e;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

/* Reward note */
.comm-reward-note {
  margin: 0.5rem 0 0.6rem;
  font-size: 0.75rem;
  color: #7a9aa8;
}

/* Claim button */
.comm-claim-btn {
  background: linear-gradient(135deg, #00e5ff22, #00e5ff44);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 7px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: inline-block;
  margin-top: 0.25rem;
}

.comm-claim-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: rgba(0, 229, 255, 0.7);
}

/* Claim status message */
.comm-claim-status {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
}

.comm-claim-ok {
  background: rgba(0, 229, 100, 0.08);
  color: #73e6a0;
  border: 1px solid rgba(0, 229, 100, 0.2);
}

.comm-claim-warn {
  background: rgba(255, 186, 8, 0.08);
  color: #ffba08;
  border: 1px solid rgba(255, 186, 8, 0.25);
}

/* On-chain history section */
.comm-history-title {
  margin: 0.75rem 0 0.35rem;
  color: #00e5ff;
  font-size: 0.82rem;
}

.comm-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.comm-history-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
}

.comm-history-ref {
  flex: 1;
  color: #aacfdd;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-history-amount {
  font-weight: 700;
  color: #ffba08;
  white-space: nowrap;
}

.comm-history-tx {
  color: #00e5ff;
  text-decoration: none;
  white-space: nowrap;
}

.comm-history-tx:hover {
  text-decoration: underline;
}

/* Privacy policy link in anonymization box */
.comm-privacy-policy-link {
  margin: 0.5rem 0 0;
  font-size: 0.76rem;
  color: #7a9aa8;
}

.comm-privacy-policy-link a {
  color: #00e5ff;
  text-decoration: none;
}

.comm-privacy-policy-link a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 500px) {
  .comm-dashboard-modal { padding: 1rem 0.75rem; }
  .comm-stat-value { font-size: 1.15rem; }
  .comm-tabs { gap: 2px; }
  .comm-tab { font-size: 0.75rem; padding: 0.4rem 0.55rem; }
  .comm-reward-label { min-width: 120px; }
  .comm-revoke-bar { flex-direction: column; align-items: flex-start; }
}

/* ── Treasury Admin Section ─────────────────────────────────────────────── */
.treasury-metric {
  display: flex;
  flex-direction: column;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
}

.treasury-metric-label {
  font-size: 0.72rem;
  color: #7a9aa8;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.treasury-metric-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #00e5ff;
}

.treasury-mints-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.treasury-mints-table th {
  color: #7a9aa8;
  font-weight: 600;
  text-align: left;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  white-space: nowrap;
}

.treasury-mints-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #ccc;
}

.treasury-mints-table tr:last-child td {
  border-bottom: none;
}

.treasury-mints-table a {
  color: #00e5ff;
  text-decoration: none;
}

.treasury-mints-table a:hover {
  text-decoration: underline;
}

/* ─── v3 DeFi Panel ──────────────────────────────────────────────────────── */

/* Accent colours per protocol */
.defi-aave-color      { color: #9b59b6 !important; }
.defi-alchemix-color  { color: #e67e22 !important; }

/* Action buttons coloured per protocol */
.defi-aave-btn {
  background: linear-gradient(135deg, #6c3483 0%, #9b59b6 100%);
  border-color: rgba(155, 89, 182, 0.5);
}
.defi-aave-btn:hover {
  background: linear-gradient(135deg, #7d3c98 0%, #a569bd 100%);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}

.defi-alchemix-btn {
  background: linear-gradient(135deg, #873600 0%, #e67e22 100%);
  border-color: rgba(230, 126, 34, 0.5);
}
.defi-alchemix-btn:hover {
  background: linear-gradient(135deg, #a04000 0%, #f39c12 100%);
  box-shadow: 0 0 12px rgba(230, 126, 34, 0.4);
}

/* LTV progress bar */
.defi-ltv-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.defi-ltv-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.defi-ltv-aave     { background: linear-gradient(90deg, #6c3483, #9b59b6); }
.defi-ltv-alchemix { background: linear-gradient(90deg, #873600, #e67e22); }

/* Protocol badges in movement history */
.defi-protocol-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.defi-protocol-aave     { background: rgba(155, 89, 182, 0.2); color: #c39bd3; border: 1px solid rgba(155, 89, 182, 0.4); }
.defi-protocol-alchemix { background: rgba(230, 126, 34, 0.2);  color: #f0b27a; border: 1px solid rgba(230, 126, 34, 0.4); }

/* ─── Contributors Table (Admin Panel) ──────────────────────────────────── */

.contrib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: #c8b8ff;
}

.contrib-table th {
  text-align: left;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  color: #a070ff;
  border-bottom: 1px solid rgba(160, 112, 255, 0.3);
  white-space: nowrap;
}

.contrib-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(160, 112, 255, 0.1);
  vertical-align: middle;
}

.contrib-table tr:last-child td {
  border-bottom: none;
}

.contrib-td-github {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.contrib-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(160, 112, 255, 0.4);
  object-fit: cover;
}

.contrib-github-link {
  color: #00e5ff;
  text-decoration: none;
  font-weight: 600;
}

.contrib-github-link:hover {
  text-decoration: underline;
}

.contrib-td-wallet {
  min-width: 200px;
}

.contrib-wallet-input {
  width: 100%;
  min-width: 180px;
  max-width: 340px;
  font-size: 0.78rem;
  padding: 0.25rem 0.4rem;
}

.contrib-td-stat {
  white-space: nowrap;
  color: #90e0b0;
}

.contrib-td-actions {
  white-space: nowrap;
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.contrib-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.contrib-badge-registered {
  background: rgba(0, 200, 100, 0.15);
  border: 1px solid rgba(0, 200, 100, 0.4);
  color: #00c864;
}

.contrib-badge-pending {
  background: rgba(255, 160, 0, 0.12);
  border: 1px solid rgba(255, 160, 0, 0.4);
  color: #ffa000;
}

/* ─── Add Contributor Modal ──────────────────────────────────────────────── */

.contrib-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
}

.contrib-modal-overlay.hidden,
.contrib-modal.hidden {
  display: none;
}

.contrib-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1101;
  background: #0d0d2a;
  border: 1px solid rgba(160, 112, 255, 0.5);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  width: min(420px, 92vw);
  color: #c8b8ff;
}

.contrib-modal .gov-label {
  margin-bottom: 0.6rem;
}

/* ─── Bounty Register section (inside modal) ─────────────────────────────── */

.br-step {
  margin-bottom: 1rem;
}

.br-step-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #a070ff;
  margin: 0 0 0.5rem;
}

.br-wallet-addr {
  font-size: 0.78rem;
  color: #00e5ff;
  word-break: break-all;
  margin: 0.4rem 0 0;
  font-family: monospace;
}

/* ─── Stripe toast notifications (Issue #41) ──────────────────────────────── */

.sub-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  animation: sub-toast-in 0.3s ease;
  pointer-events: none;
  max-width: min(90vw, 480px);
}

.sub-toast-success {
  background: rgba(0, 220, 120, 0.18);
  border: 1.5px solid rgba(0, 220, 120, 0.5);
  color: #00dc78;
  box-shadow: 0 4px 24px rgba(0, 220, 120, 0.15);
}

.sub-toast-info {
  background: rgba(99, 91, 255, 0.18);
  border: 1.5px solid rgba(99, 91, 255, 0.5);
  color: #a89fff;
  box-shadow: 0 4px 24px rgba(99, 91, 255, 0.15);
}

@keyframes sub-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   Data Control Modal  —  js/dataControl.js
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Modal wrapper ───────────────────────────────────────────────────────────── */
.dc-modal {
  max-width: 560px;
}

#ipfs-connect-dialog {
  z-index: 200010;
}

#ipfs-connect-dialog .modal {
  z-index: 200011;
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
.dc-modal-title {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #00e5ff;
  text-align: center;
}

.dc-modal-subtitle {
  color: #8ab0c4;
  font-size: 0.85rem;
  text-align: center;
  margin: 0 0 0.7rem;
}

/* ── Current mode row ────────────────────────────────────────────────────────── */
.dc-current-row,
.dc-about-mode-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #7090a0;
  margin-bottom: 1rem;
}

.dc-mode-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #00e5ff;
}

.dc-mode-badge[data-mode="own-w3s"],
.dc-mode-badge[data-mode="w3up"] {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.45);
  color: #00e676;
}

/* ── Buttons (kept for condensed dialog) ────────────────────────────────────── */
.dc-btn-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.dc-action-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.dc-btn-primary {
  background: linear-gradient(135deg, rgba(0, 180, 120, 0.5), rgba(0, 120, 80, 0.7));
  border: 1px solid rgba(0, 220, 120, 0.5);
  color: #00dc90;
}
.dc-btn-primary:hover {
  background: linear-gradient(135deg, rgba(0, 200, 130, 0.65), rgba(0, 140, 95, 0.8));
  box-shadow: 0 3px 14px rgba(0, 200, 120, 0.35);
  transform: translateY(-1px);
}

.dc-btn-secondary {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: #00e5ff;
}
.dc-btn-secondary:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 3px 12px rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}

.dc-btn-w3s {
  background: linear-gradient(135deg, rgba(0, 200, 100, 0.35), rgba(0, 130, 60, 0.55));
  border: 1px solid rgba(0, 230, 118, 0.5);
  color: #00e676;
}
.dc-btn-w3s:hover {
  background: linear-gradient(135deg, rgba(0, 220, 110, 0.5), rgba(0, 150, 70, 0.65));
  box-shadow: 0 3px 14px rgba(0, 210, 100, 0.38);
  transform: translateY(-1px);
}

/* ── Status messages ─────────────────────────────────────────────────────────── */
.dc-status {
  display: block;
  font-size: 0.82rem;
  min-height: 1.1em;
  margin-top: 0.45rem;
  transition: color 0.2s;
}
.dc-status a { color: inherit; text-decoration: underline; }

.dc-status-success { color: #00dc90; }
.dc-status-error   { color: #ff6b6b; }
.dc-status-info    { color: #80c8e8; }
.dc-status-warning { color: #f0c060; }

/* ── JSON utility title ──────────────────────────────────────────────────────── */
.dc-json-utility-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #8ab8cc;
  margin-bottom: 0.3rem;
}

/* ── About modal action row ──────────────────────────────────────────────────── */
.dc-about-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

/* ── About modal quick-open button ──────────────────────────────────────────── */
.dc-about-open-btn {
  flex: 1 1 auto;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 230, 118, 0.4);
  background: rgba(0, 200, 100, 0.07);
  color: #00e676;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}
.dc-about-open-btn:hover {
  background: rgba(0, 210, 110, 0.14);
  box-shadow: 0 3px 14px rgba(0, 210, 100, 0.2);
  transform: translateY(-1px);
}

.dc-about-json-btn {
  flex: 1 1 auto;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 220, 120, 0.4);
  background: rgba(0, 180, 100, 0.08);
  color: #00dc90;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}
.dc-about-json-btn:hover {
  background: rgba(0, 200, 110, 0.16);
  box-shadow: 0 3px 12px rgba(0, 200, 120, 0.28);
  transform: translateY(-1px);
}

.dc-notice-link {
  color: #00e5ff;
  font-weight: 600;
}
.dc-notice-link:hover { text-decoration: underline; }

.dc-about-section .dc-about-mode-row {
  justify-content: flex-start;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   IPFS Educational Overlay
   ═══════════════════════════════════════════════════════════════════════════════ */

.edu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(0, 0, 20, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: dc-fade-in 0.3s ease;
}

.edu-overlay.edu-hidden {
  display: none;
}

@keyframes dc-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.edu-overlay-card {
  background: linear-gradient(160deg, rgba(0, 10, 40, 0.98), rgba(0, 20, 60, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 16px;
  padding: 2rem 2.2rem;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.edu-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #00e676;
  margin: 0 0 1rem;
  text-align: center;
  text-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

.edu-body {
  color: #a0c0d4;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0 0 0.85rem;
}
.edu-body strong { color: #c8e8f8; }
.edu-link { color: #00e5ff; text-decoration: underline; }
.edu-link:hover { color: #80f0ff; }

/* Steps */
.edu-steps {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 0.8rem 0 1rem;
}
.edu-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  color: #8ab0c8;
}
.edu-step:last-child { margin-bottom: 0; }
.edu-step-num {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.2);
  border: 1px solid rgba(0, 230, 118, 0.45);
  color: #00e676;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile notice */
.edu-mobile-notice {
  background: rgba(255, 160, 0, 0.08);
  border: 1px solid rgba(255, 160, 0, 0.3);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  color: #f0c060;
  margin: 0 0 1rem;
  line-height: 1.55;
}

/* Action buttons */
.edu-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.edu-connect-btn {
  width: 100%;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 230, 118, 0.55);
  background: linear-gradient(135deg, rgba(0, 200, 100, 0.35), rgba(0, 130, 60, 0.55));
  color: #00e676;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}
.edu-connect-btn:hover {
  background: linear-gradient(135deg, rgba(0, 220, 110, 0.5), rgba(0, 150, 70, 0.7));
  box-shadow: 0 4px 20px rgba(0, 200, 100, 0.35);
  transform: translateY(-1px);
}

.edu-skip-btn {
  background: transparent;
  border: none;
  color: #5080a0;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-align: center;
  padding: 0.2rem;
}
.edu-skip-btn:hover { color: #90b8cc; }

/* ═══════════════════════════════════════════════════════════════════════════════
   Snapshot Panel (anchored to IPFS icon area)
   ═══════════════════════════════════════════════════════════════════════════════ */

.snapshot-panel {
  position: absolute;
  top: 80px;
  left: 8px;
  z-index: 4000;
  width: 340px;
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(0, 8, 30, 0.97), rgba(0, 15, 50, 0.97));
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  animation: dc-fade-in 0.2s ease;
}

.snapshot-panel-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  background: none;
  border: none;
  color: #5080a0;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.snapshot-panel-close:hover { color: #c0e0f8; }

.sp-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: #00e5ff;
  margin-bottom: 0.6rem;
  padding-right: 1.5rem;
}

.sp-status {
  font-size: 0.8rem;
  min-height: 1rem;
  margin-bottom: 0.5rem;
}
.sp-status a { color: inherit; text-decoration: underline; }
.sp-status-success { color: #00dc90; }
.sp-status-error   { color: #ff6b6b; }
.sp-status-info    { color: #80c8e8; }
.sp-status-warning { color: #f0c060; }

.sp-mobile-msg {
  background: rgba(255, 160, 0, 0.07);
  border: 1px solid rgba(255, 160, 0, 0.25);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  color: #d0a040;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.sp-section {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(0, 229, 255, 0.08);
}
.sp-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #5888a8;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* History list */
.sp-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.sp-history-empty {
  font-size: 0.8rem;
  color: #4060a0;
  font-style: italic;
}
.sp-history-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  background: rgba(0, 229, 255, 0.04);
  border-radius: 5px;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(0, 229, 255, 0.07);
}
.sp-history-row.sp-today {
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.06);
}
.sp-history-date { color: #6080a0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-history-cid { color: #00e5ff; font-family: monospace; font-size: 0.72rem; }
.sp-history-cid:hover { text-decoration: underline; }
.sp-today-badge {
  font-size: 0.68rem;
  color: #00e676;
  white-space: nowrap;
}

.sp-provider-badge {
  font-size: 0.65rem;
  color: #8ab0c4;
  background: rgba(0, 229, 255, 0.08);
  border-radius: 3px;
  padding: 0 4px;
  white-space: nowrap;
}

/* CID import */
.sp-cid-row {
  display: flex;
  gap: 0.4rem;
}
.sp-cid-input {
  flex: 1;
  padding: 0.35rem 0.6rem;
  background: rgba(0, 10, 40, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 6px;
  color: #c0e0f8;
  font-size: 0.8rem;
  font-family: monospace;
}
.sp-cid-input::placeholder { color: #304060; }
.sp-cid-input:focus { outline: none; border-color: rgba(0, 229, 255, 0.5); }

/* Buttons in snapshot panel */
.sp-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.sp-btn-cid {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: #00e5ff;
}
.sp-btn-cid:hover { background: rgba(0, 229, 255, 0.2); }

.sp-btn-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.sp-btn-export {
  background: rgba(0, 200, 100, 0.12);
  border: 1px solid rgba(0, 220, 120, 0.4);
  color: #00dc90;
}
.sp-btn-export:hover { background: rgba(0, 200, 100, 0.22); }

.sp-btn-import {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #00e5ff;
}
.sp-btn-import:hover { background: rgba(0, 229, 255, 0.15); }

/* ═══════════════════════════════════════════════════════════════════════════
   Genie Chat — WebLLM AI assistant embedded in side panels
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Genie icon button ─────────────────────────────────────────────────────── */
.genie-icon-btn {
  /* position: fixed and coordinates are set by JS via getBoundingClientRect() */
  position: fixed;
  width: 36px;
  height: 36px;
  background: rgba(115, 0, 255, 0.18);
  border: 1px solid rgba(115, 0, 255, 0.55);
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 8px rgba(115, 0, 255, 0.4);
}

.genie-icon-btn:hover {
  background: rgba(115, 0, 255, 0.35);
  box-shadow: 0 0 16px rgba(115, 0, 255, 0.7), 0 0 32px rgba(0, 229, 255, 0.3);
  transform: scale(1.1);
}

/* ── Genie chat window ─────────────────────────────────────────────────────── */
.genie-chat-window {
  /* position: fixed and coordinates are set by JS via getBoundingClientRect() */
  position: fixed;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, rgba(0, 5, 22, 0.97) 0%, rgba(10, 0, 40, 0.97) 100%);
  border: 1px solid rgba(115, 0, 255, 0.5);
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(115, 0, 255, 0.2);
  z-index: 1150;
  overflow: hidden;
  animation: genie-pop 0.2s ease;
}

@keyframes genie-pop {
  from { opacity: 0; transform: scale(0.92) translateY(-6px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ── Chat header ───────────────────────────────────────────────────────────── */
.genie-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.7rem;
  background: rgba(115, 0, 255, 0.15);
  border-bottom: 1px solid rgba(115, 0, 255, 0.3);
  flex-shrink: 0;
}

.genie-chat-title {
  font-family: 'Bungee', sans-serif;
  font-size: 0.85rem;
  color: #c084fc;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.6);
  letter-spacing: 0.03em;
}

.genie-chat-close {
  background: transparent;
  border: none;
  color: rgba(200, 180, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
  transition: color 0.15s;
}
.genie-chat-close:hover { color: #ff6b6b; }

/* ── Status line ───────────────────────────────────────────────────────────── */
.genie-chat-status {
  font-size: 0.72rem;
  color: #a78bfa;
  padding: 0.2rem 0.7rem;
  min-height: 1.2rem;
  flex-shrink: 0;
  background: rgba(115, 0, 255, 0.06);
}

/* ── Messages area ─────────────────────────────────────────────────────────── */
.genie-chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(115,0,255,0.4) transparent;
}

.genie-msg {
  max-width: 90%;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.genie-msg-user {
  align-self: flex-end;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #cceeff;
}

.genie-msg-genie {
  align-self: flex-start;
  background: rgba(115, 0, 255, 0.12);
  border: 1px solid rgba(115, 0, 255, 0.28);
  color: #e8d5ff;
}

.genie-msg-error {
  align-self: center;
  background: rgba(255, 60, 60, 0.12);
  border: 1px solid rgba(255, 60, 60, 0.3);
  color: #ff9999;
  font-size: 0.75rem;
}

/* ── Input row ─────────────────────────────────────────────────────────────── */
.genie-chat-input-row {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-top: 1px solid rgba(115, 0, 255, 0.2);
  background: rgba(0, 0, 15, 0.5);
  flex-shrink: 0;
}

.genie-chat-input {
  flex: 1 1 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(115, 0, 255, 0.35);
  border-radius: 6px;
  color: #e8d5ff;
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.genie-chat-input::placeholder { color: rgba(200,180,255,0.4); }
.genie-chat-input:focus { border-color: rgba(115, 0, 255, 0.7); }
.genie-chat-input:disabled { opacity: 0.5; }

.genie-chat-send {
  flex-shrink: 0;
  background: rgba(115, 0, 255, 0.25);
  border: 1px solid rgba(115, 0, 255, 0.55);
  border-radius: 6px;
  color: #c084fc;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.15s;
}
.genie-chat-send:hover:not(:disabled) {
  background: rgba(115, 0, 255, 0.45);
  box-shadow: 0 0 8px rgba(115, 0, 255, 0.5);
}
.genie-chat-send:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Hint footer ───────────────────────────────────────────────────────────── */
.genie-chat-hint {
  font-size: 0.65rem;
  color: rgba(160, 140, 200, 0.5);
  text-align: center;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 15, 0.6);
  border-top: 1px solid rgba(115, 0, 255, 0.1);
  flex-shrink: 0;
}

/* ── Resize handle ─────────────────────────────────────────────────────────── */
.genie-resize-handle {
  position: absolute;
  bottom: 4px;
  right: 6px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  color: rgba(0, 229, 255, 0.35);
  font-size: 14px;
  line-height: 1;
  user-select: none;
  transition: color 0.15s;
  z-index: 10;
}

.genie-resize-handle:hover {
  color: rgba(0, 229, 255, 0.85);
}

/* Left-panel Genie: handle in bottom-left */
.genie-chat-window[data-panel="recent-supplements-list"] .genie-resize-handle,
.genie-chat-window[data-panel="recent-foods-list"] .genie-resize-handle {
  right: auto;
  left: 6px;
  bottom: 4px;
  cursor: nesw-resize;
  transform: scaleX(-1);
}

.genie-chat-messages {
  min-height: 80px;
}

/* ── Settings toggle row ───────────────────────────────────────────────────── */
.genie-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.genie-settings-label {
  font-size: 0.88rem;
  color: #cceeff;
  flex: 1;
}

/* Re-use .comm-toggle switch style for the genie toggle */
.genie-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.genie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.genie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  transition: background 0.25s;
}

.genie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

.genie-toggle input:checked + .genie-toggle-slider {
  background: linear-gradient(135deg, #7300ff, #a855f7);
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.5);
}

.genie-toggle input:checked + .genie-toggle-slider::before {
  transform: translateX(18px);
}

.genie-model-select {
  background: rgba(30, 20, 60, 0.85);
  color: #cceeff;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  flex-shrink: 0;
  max-width: 260px;
}

.genie-model-select:focus {
  outline: 2px solid rgba(168, 85, 247, 0.7);
}

/* ── Genie Backend Selector ───────────────────────────────────────────── */
.genie-backend-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.genie-backend-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.genie-backend-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.genie-backend-option:hover {
  background: rgba(0, 229, 255, 0.06);
}

.genie-backend-option input[type="radio"] {
  accent-color: #00e5ff;
}

.backend-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.backend-github { background: rgba(0, 229, 255, 0.15); color: #00e5ff; }
.backend-openai { background: rgba(0, 200, 100, 0.15); color: #00cc66; }
.backend-webllm { background: rgba(180, 120, 255, 0.15); color: #bb88ff; }

.backend-desc {
  font-size: 0.78rem;
  color: rgba(200, 220, 255, 0.6);
}

/* ── API Key Input ────────────────────────────────────────────────────── */
.genie-apikey-section {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.genie-apikey-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.genie-api-key-input {
  flex: 1;
  background: rgba(0, 10, 30, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 6px;
  color: #cceeff;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-family: monospace;
}

.genie-api-key-input:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.25);
}

.genie-key-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}

.genie-key-btn:hover { background: rgba(0, 229, 255, 0.2); }

.genie-key-btn--clear {
  border-color: rgba(255, 80, 80, 0.4);
  background: rgba(255, 80, 80, 0.08);
  color: #ff8888;
}

.genie-key-btn--clear:hover { background: rgba(255, 80, 80, 0.18); }

.genie-apikey-status {
  font-size: 0.78rem;
  margin-left: 0.5rem;
}

.genie-apikey-status.saved   { color: #00ff88; }
.genie-apikey-status.cleared { color: #ff8888; }

/* ── Genie Chat Header Actions ─────────────────────────────────────────────── */
.genie-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.genie-chat-new,
.genie-chat-clear {
  background: transparent;
  border: none;
  color: rgba(200, 180, 255, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
  border-radius: 4px;
}
.genie-chat-new:hover { color: #a78bfa; transform: scale(1.15); }
.genie-chat-clear:hover { color: #ff6b6b; transform: scale(1.15); }

/* ── Data toggle button ────────────────────────────────────────────────────── */
.genie-chat-data-toggle {
  background: transparent;
  border: 1px solid rgba(115, 0, 255, 0.25);
  color: rgba(200, 180, 255, 0.7);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
  border-radius: 4px;
}
.genie-chat-data-toggle:hover {
  color: #c084fc;
  border-color: rgba(115, 0, 255, 0.5);
  transform: scale(1.05);
}

/* ── Genie Category Panel ──────────────────────────────────────────────────── */
.genie-category-panel {
  background: rgba(0, 2, 15, 0.92);
  border-bottom: 1px solid rgba(115, 0, 255, 0.25);
  padding: 0.5rem 0.6rem;
  flex-shrink: 0;
  animation: genie-pop 0.15s ease;
}

.genie-cat-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  color: #c084fc;
}

.genie-cat-header span {
  flex: 1;
  font-weight: 600;
}

.genie-cat-selectall,
.genie-cat-deselectall {
  background: rgba(115, 0, 255, 0.12);
  border: 1px solid rgba(115, 0, 255, 0.3);
  color: rgba(200, 180, 255, 0.7);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.genie-cat-selectall:hover,
.genie-cat-deselectall:hover {
  background: rgba(115, 0, 255, 0.25);
  color: #e0d0ff;
}

.genie-cat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.15rem 0.5rem;
}

.genie-cat-list label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: rgba(200, 190, 230, 0.85);
  cursor: pointer;
  padding: 0.1rem 0;
  transition: color 0.15s;
}

.genie-cat-list label:hover {
  color: #e0d0ff;
}

.genie-cat-list label.genie-cat-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.genie-cat-soon {
  font-size: 0.55rem;
  color: rgba(200, 180, 255, 0.4);
  font-style: italic;
}

.genie-cat-list input[type="checkbox"] {
  accent-color: #7c3aed;
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.genie-cat-list label.genie-cat-disabled input[type="checkbox"] {
  cursor: not-allowed;
}

.genie-cat-token-estimate {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  text-align: center;
  color: #00ff88;
  transition: color 0.2s;
}

@media (max-width: 480px) {
  .genie-cat-list {
    grid-template-columns: 1fr;
  }
}

/* ── Pin button on Genie messages (Tier 3) ─────────────────────────────────── */
.genie-msg-genie {
  position: relative;
}

.genie-pin-btn {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0.1rem;
  line-height: 1;
}

.genie-msg-genie:hover .genie-pin-btn {
  opacity: 0.7;
}

.genie-pin-btn:hover {
  opacity: 1 !important;
  transform: scale(1.2);
}

/* ── Memory footer in chat window ──────────────────────────────────────────── */
.genie-chat-memory-footer {
  font-size: 0.62rem;
  color: rgba(160, 140, 200, 0.45);
  text-align: center;
  padding: 0.15rem 0.5rem;
  background: rgba(0, 0, 15, 0.4);
  border-top: 1px solid rgba(115, 0, 255, 0.08);
  flex-shrink: 0;
}

/* ── Insight suggestion in chat ────────────────────────────────────────────── */
.genie-insight-suggestion {
  border: 1px solid rgba(255, 200, 0, 0.3) !important;
  background: rgba(255, 200, 0, 0.06) !important;
}

.genie-insight-btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.genie-insight-action-btn {
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  font-size: 0.72rem;
  cursor: pointer;
  border: 1px solid rgba(115, 0, 255, 0.4);
  background: rgba(115, 0, 255, 0.12);
  color: #c084fc;
  transition: background 0.15s;
}

.genie-insight-action-btn:hover { background: rgba(115, 0, 255, 0.3); }
.genie-insight-action-btn:disabled { opacity: 0.5; cursor: default; }
.genie-insight-skip { border-color: rgba(255, 255, 255, 0.15); background: transparent; color: rgba(200, 180, 255, 0.5); }
.genie-insight-skip:hover { background: rgba(255, 255, 255, 0.05); }

/* ── Genie Memory Settings ─────────────────────────────────────────────────── */
.genie-memory-stats {
  font-size: 0.85rem;
  color: #cceeff;
  padding: 0.5rem 0;
  line-height: 1.6;
}

.genie-memory-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

/* ── Genie Memory Review Modal ─────────────────────────────────────────────── */
.genie-memory-modal {
  background: linear-gradient(160deg, rgba(0, 5, 22, 0.98) 0%, rgba(10, 0, 40, 0.98) 100%);
  border-radius: 16px;
  border: 1px solid rgba(115, 0, 255, 0.45);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(115, 0, 255, 0.2);
  padding: 1.5rem;
  max-width: 600px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
  color: #e0d0ff;
}

.genie-memory-modal h2 {
  text-align: center;
  font-size: 1.2rem;
  color: #c084fc;
  margin-bottom: 1rem;
}

.genie-memory-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(115, 0, 255, 0.2);
  padding-bottom: 0.5rem;
}

.genie-memory-tab {
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(115, 0, 255, 0.3);
  border-radius: 6px;
  background: transparent;
  color: rgba(200, 180, 255, 0.6);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.genie-memory-tab:hover { background: rgba(115, 0, 255, 0.1); }
.genie-memory-tab.active {
  background: rgba(115, 0, 255, 0.2);
  color: #c084fc;
  border-color: rgba(115, 0, 255, 0.5);
}

.genie-memory-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.genie-memory-item {
  padding: 0.6rem 0.7rem;
  background: rgba(115, 0, 255, 0.06);
  border: 1px solid rgba(115, 0, 255, 0.18);
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.genie-memory-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.genie-memory-item-date {
  font-size: 0.7rem;
  color: rgba(200, 180, 255, 0.5);
}

.genie-memory-item-category {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: rgba(115, 0, 255, 0.15);
  color: #c084fc;
}

.genie-memory-item-text {
  color: #e0d0ff;
}

.genie-memory-item-topics {
  margin-top: 0.3rem;
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.genie-memory-topic-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: rgba(0, 229, 255, 0.1);
  color: rgba(0, 229, 255, 0.7);
}

.genie-memory-item-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
  align-items: center;
}

.genie-memory-item-actions button {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  border: 1px solid rgba(115, 0, 255, 0.3);
  background: rgba(115, 0, 255, 0.08);
  color: rgba(200, 180, 255, 0.7);
  transition: background 0.15s;
}

.genie-memory-item-actions button:hover { background: rgba(115, 0, 255, 0.2); }

.genie-memory-delete-btn {
  border-color: rgba(255, 80, 80, 0.3) !important;
  color: #ff8888 !important;
}
.genie-memory-delete-btn:hover { background: rgba(255, 80, 80, 0.15) !important; }

.genie-memory-rating-btn.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: rgba(0, 229, 255, 0.5);
  color: #00e5ff;
}

.genie-memory-modal-footer {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(115, 0, 255, 0.15);
}

.genie-memory-empty {
  text-align: center;
  color: rgba(200, 180, 255, 0.4);
  font-size: 0.85rem;
  padding: 1.5rem;
}

/* ── Mobile tweaks ─────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* JS handles mobile positioning; no static overrides needed. */
}

/* ── Pain Log Modal (Sacral Chakra) ─────────────────────────────────────── */
.pain-log-modal {
  background: linear-gradient(160deg, rgba(30,10,0,0.97) 0%, rgba(50,20,0,0.97) 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 140, 0, 0.45);
  box-shadow: 0 0 30px rgba(255,100,0,0.35), inset 0 0 60px rgba(60,20,0,0.5);
  padding: 1.8rem 1.6rem 1.4rem;
  max-width: 520px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.pain-log-modal h2 {
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: #ffd0a0;
  margin: 0 0 0.4rem;
  text-shadow: 0 0 12px #ff8c00;
}

.pain-log-intro {
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255,200,140,0.75);
  margin: 0 0 1.2rem;
}

.pain-log-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.pain-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pain-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,200,140,0.9);
  letter-spacing: 0.03em;
}

.pain-input,
.pain-select,
.pain-textarea {
  background: rgba(40,15,0,0.7);
  border: 1px solid rgba(255,140,0,0.35);
  border-radius: 8px;
  color: #ffd0a0;
  font-size: 0.92rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.pain-input:focus,
.pain-select:focus,
.pain-textarea:focus {
  border-color: rgba(255,140,0,0.75);
  box-shadow: 0 0 8px rgba(255,100,0,0.3);
}

.pain-select option {
  background: #1a0a00;
  color: #ffd0a0;
}

.pain-textarea {
  resize: vertical;
  min-height: 3.5rem;
}

.pain-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #ff4500, #ff8c00, #ffcc00);
  outline: none;
  cursor: pointer;
}

.pain-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff8c00;
  box-shadow: 0 0 6px #ff4500;
  cursor: pointer;
}

.pain-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff8c00;
  box-shadow: 0 0 6px #ff4500;
  border: none;
  cursor: pointer;
}

.pain-severity-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,180,100,0.6);
  margin-top: 0.2rem;
}

.pain-submit-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 1.2rem;
  background: rgba(255, 100, 0, 0.2);
  border: 1px solid rgba(255,140,0,0.6);
  border-radius: 10px;
  color: #ffd0a0;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
}

.pain-submit-btn:hover {
  background: rgba(255,100,0,0.38);
  box-shadow: 0 0 14px rgba(255,100,0,0.45);
}

/* Pain log history list */
.pain-log-history {
  margin-top: 1.4rem;
  border-top: 1px solid rgba(255,140,0,0.25);
  padding-top: 1rem;
}

.pain-history-title {
  font-size: 0.95rem;
  color: rgba(255,200,140,0.85);
  margin: 0 0 0.6rem;
  text-align: center;
}

.pain-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
}

.pain-log-entry {
  background: rgba(50,20,0,0.6);
  border: 1px solid rgba(255,140,0,0.25);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: #ffd0a0;
  position: relative;
}

.pain-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pain-entry-area {
  font-weight: 700;
  color: #ffb060;
}

.pain-entry-date {
  font-size: 0.75rem;
  color: rgba(255,180,100,0.6);
}

.pain-entry-severity {
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-weight: 700;
}
.pain-entry-severity[data-level="low"] {
  background: rgba(255,200,0,0.15);
  color: #ffcc00;
  border: 1px solid rgba(255,200,0,0.35);
}
.pain-entry-severity[data-level="medium"] {
  background: rgba(255,120,0,0.18);
  color: #ff8c00;
  border: 1px solid rgba(255,120,0,0.4);
}
.pain-entry-severity[data-level="high"] {
  background: rgba(255,50,0,0.18);
  color: #ff4500;
  border: 1px solid rgba(255,50,0,0.4);
}

.pain-entry-status {
  font-size: 0.75rem;
  color: rgba(255,200,140,0.65);
  text-transform: capitalize;
}

.pain-entry-desc {
  font-size: 0.82rem;
  color: rgba(255,210,170,0.8);
  margin-top: 0.2rem;
  word-break: break-word;
}

.pain-entry-delete {
  background: none;
  border: none;
  color: rgba(255,80,0,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0 0.2rem;
  transition: color 0.15s;
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
}

.pain-entry-delete:hover {
  color: rgba(255,80,0,0.9);
}

@media (max-width: 600px) {
  .pain-log-modal {
    padding: 1.2rem 1rem 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Mobile Data Sheet (bottom-sheet shown on IPFS icon tap, mobile)
   ═══════════════════════════════════════════════════════════════ */

.mobile-data-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20000;
  background: rgba(0, 0, 33, 0.98);
  border-top: 2px solid rgba(0, 229, 255, 0.45);
  border-radius: 18px 18px 0 0;
  padding: 1.2rem 1.2rem 2rem;
  box-shadow: 0 -4px 32px rgba(0, 229, 255, 0.18);
  animation: slideUpSheet 0.22s ease-out;
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.mobile-data-sheet-inner {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.mobile-sheet-close {
  position: absolute;
  top: -0.4rem;
  right: -0.2rem;
  background: none;
  border: none;
  color: #5080a0;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.mobile-sheet-close:hover { color: #c0e0f8; }

.mobile-sheet-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #00e5ff;
  margin-bottom: 0.3rem;
  padding-right: 2rem;
}

.mobile-sheet-desc {
  font-size: 0.88rem;
  color: #8ab0c4;
  margin: 0 0 1rem;
}

.mobile-sheet-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.mobile-sheet-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s;
}
.mobile-sheet-btn:active { opacity: 0.75; }

.mobile-sheet-btn-primary {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 180, 220, 0.35);
}

.mobile-sheet-btn-secondary {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.mobile-sheet-hint {
  font-size: 0.78rem;
  color: #4a6a80;
  margin: 0.4rem 0 0;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   🧠 Third Eye — Correlation Graph Modal
   ══════════════════════════════════════════════════════════════ */

/* Wider modal for the chart */
.corr-graph-modal {
  max-width: 740px;
  width: 96%;
  padding: 1.6rem 1.4rem 1.2rem;
}

/* ── Controls row ───────────────────────────────────────────── */
.corr-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.2rem;
  margin-bottom: 0.9rem;
}

.corr-ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.corr-ctrl-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7ecfef;
  white-space: nowrap;
}

.corr-btn-row {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* ── Time range & chart type buttons ────────────────────────── */
.corr-time-btn,
.corr-type-btn {
  background: rgba(0, 30, 60, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 14px;
  color: #7ecfef;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
  line-height: 1.4;
}

.corr-time-btn:hover,
.corr-type-btn:hover {
  border-color: rgba(0, 229, 255, 0.6);
  color: #c0eeff;
}

.corr-time-btn.active,
.corr-type-btn.active {
  background: rgba(0, 229, 255, 0.18);
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 7px rgba(0, 229, 255, 0.4);
}

/* ── Normalize label ────────────────────────────────────────── */
.corr-normalize-wrap {
  margin-left: auto;
}

.corr-normalize-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #7ecfef;
  cursor: pointer;
  user-select: none;
}

.corr-normalize-label input[type="checkbox"] {
  accent-color: #00e5ff;
  width: 13px;
  height: 13px;
  cursor: pointer;
}

/* ── Series chiclet groups ──────────────────────────────────── */
.corr-group {
  margin-bottom: 0.55rem;
}

.corr-group-label {
  display: block;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.corr-chiclets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.corr-chiclet {
  background: rgba(0, 20, 50, 0.8);
  border: 1px solid rgba(100, 180, 240, 0.2);
  border-radius: 12px;
  color: rgba(160, 210, 240, 0.8);
  padding: 0.18rem 0.6rem;
  font-size: 0.76rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.corr-chiclet:hover {
  border-color: var(--chiclet-color, #00e5ff);
  color: #ddf;
}

.corr-chiclet.active {
  background: rgba(0, 229, 255, 0.14);
  border-color: var(--chiclet-color, #00e5ff);
  color: var(--chiclet-color, #00e5ff);
  box-shadow: 0 0 5px rgba(0, 229, 255, 0.25);
}

/* ── Mini insights ──────────────────────────────────────────── */
.corr-insights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.4rem;
  margin: 0.5rem 0 0.6rem;
}

.corr-insight-badge {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 20px;
  padding: 0.18rem 0.65rem;
  font-size: 0.75rem;
  color: #aaddff;
  white-space: nowrap;
}

/* ── Chart canvas wrapper ───────────────────────────────────── */
.corr-chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  margin-top: 0.4rem;
}

.corr-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── Footer / export button ─────────────────────────────────── */
.corr-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.6rem;
}

.corr-export-btn {
  background: rgba(0, 30, 60, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 14px;
  color: #7ecfef;
  padding: 0.25rem 0.8rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.corr-export-btn:hover {
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.35);
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .corr-chart-wrap { height: 220px; }
  .corr-controls-row { gap: 0.5rem 0.7rem; }
  .corr-normalize-wrap { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   Mobile panel-open fixes (≤ 700px)
   Z-index stack (bottom → top):
     footer (.round-button bar)   : 10000  — always visible at bottom: 0
     .side-toolbar                : 10001  — always at bottom: 64px (above footer)
     .dashboard-panel.panel-visible: 10002 — at bottom: 128px (above both rows)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  /* When a panel is open: keep footer visible — both rows stay accessible */

  /* When panel is open: toolbar stays at bottom: 64px (above footer) */

  /* Panel stays above both rows (footer 64px + toolbar 56px + 8px gap = 128px) */
  body.panel-open #recent-supplements-list.panel-visible,
  body.panel-open #recent-foods-list.panel-visible,
  body.panel-open #recent-exercises-list.panel-visible,
  body.panel-open #workout-set-list.panel-visible {
    bottom: 128px;  /* 64px footer + 56px toolbar + 8px gap */
  }
}

/* ─── v3.1.0 Competition / Streak Bet Styles ─────────────────────────────── */

/* Competition admin filter bar */
.comp-filter-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.comp-filter-btn {
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.05);
  color: #aacfdd;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.comp-filter-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  color: #e0f7fa;
}
.comp-filter-btn.comp-filter-active {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  color: #00e5ff;
}

/* Competition admin stats grid */
.comp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.5rem;
}
.comp-stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.25rem;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.1);
}
.comp-stats-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e0f7fa;
}
.comp-stats-label {
  font-size: 0.72rem;
  color: #aacfdd;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}
.comp-stats-active .comp-stats-value { color: #00e676; }
.comp-stats-settled .comp-stats-value { color: #ffd740; }
.comp-stats-cancelled .comp-stats-value { color: #ff5252; }

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.comp-table th,
.comp-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
  white-space: nowrap;
}
.comp-table th {
  color: #aacfdd;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comp-table td {
  color: #e0e0e0;
}
.comp-action-btn {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.08);
  color: #00e5ff;
  font-size: 0.78rem;
  cursor: pointer;
  margin: 0.1rem;
  transition: background 0.2s;
}
.comp-action-btn:hover {
  background: rgba(0, 229, 255, 0.2);
}
.comp-action-btn.comp-danger {
  border-color: rgba(255, 82, 82, 0.4);
  color: #ff5252;
  background: rgba(255, 82, 82, 0.08);
}
.comp-action-btn.comp-danger:hover {
  background: rgba(255, 82, 82, 0.2);
}

/* User competition card */
.comp-card {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.comp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.comp-card-header h4 {
  margin: 0;
  color: #e0f7fa;
  font-size: 1rem;
}
.comp-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 1rem;
  margin-bottom: 0.5rem;
}
.comp-stat {
  font-size: 0.82rem;
  color: #aacfdd;
}
.comp-stat strong {
  color: #e0e0e0;
}
.comp-stat a {
  text-decoration: none;
}
.comp-entrant-status {
  font-size: 0.85rem;
  color: #b2dfdb;
  margin: 0.25rem 0 0.5rem;
}
.comp-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.comp-user-btn {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.comp-user-btn:hover {
  background: rgba(0, 229, 255, 0.25);
}
.comp-user-btn.comp-join {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.3);
  color: #00e676;
}
.comp-user-btn.comp-join:hover {
  background: rgba(0, 230, 118, 0.25);
}
.comp-user-btn.comp-danger {
  border-color: rgba(255, 82, 82, 0.4);
  color: #ff5252;
  background: rgba(255, 82, 82, 0.08);
}
.comp-user-btn.comp-danger:hover {
  background: rgba(255, 82, 82, 0.2);
}

/* Auto-verify badge in user cards */
.comp-auto-badge {
  grid-column: 1 / -1;
  color: #00e676;
  font-size: 0.78rem;
}
.comp-auto-badge strong {
  color: #00e676;
}

/* Daily report chain viewer */
.comp-report-chain-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.comp-report-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.08);
  font-size: 0.82rem;
}
.comp-report-date {
  font-weight: 600;
  color: #e0f7fa;
  min-width: 6em;
}
.comp-report-stats {
  color: #aacfdd;
  min-width: 7em;
}
.comp-report-link {
  color: #00e5ff;
  text-decoration: none;
  font-family: monospace;
  font-size: 0.78rem;
}
.comp-report-link:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   YOGA FLOW MODE — Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* Toggle button in workout panel */
.yoga-flow-toggle-btn {
  background: linear-gradient(135deg, #2d004d, #003344);
  color: #c084fc;
  border: 1px solid #7c3aed;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
  transition: all 0.25s ease;
  letter-spacing: 0.03em;
}
.yoga-flow-toggle-btn:hover {
  background: linear-gradient(135deg, #4c0080, #005566);
  color: #e9d5ff;
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.7), 0 0 6px #00e5ff44;
  transform: translateY(-1px);
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.yoga-modal-overlay {
  /* Full-screen backdrop — blurs the app behind the yoga panel */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 0, 20, 0.72);    /* semi-transparent so app shows through */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;             /* center the panel */
  padding: 32px;                       /* margin all around — click backdrop to close */
  box-sizing: border-box;
  overflow: hidden;
  z-index: 200000;  /* above header (99999) and all other fixed UI */
}
.yoga-modal-overlay.modal-hidden { display: none; }

/* ── Modal Shell ─────────────────────────────────────────────────────────── */
/* Two-column flex container: yoga content + optional genie sidebar           */
.yoga-modal-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(124, 58, 237, 0.5), 0 30px 80px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.4);
}

/* ── Left scrollable column ─────────────────────────────────────────────── */
.yoga-modal {
  background: linear-gradient(160deg, #0a0015 0%, #00001a 50%, #001022 100%);
  border: none;
  border-right: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 0;
  box-shadow: none;
  flex: 1 1 0;
  width: 0;         /* let flex-grow handle width; overrides .modal width:90% */
  max-width: none;  /* overrides .modal max-width:520px */
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed #0a0015;
  position: relative;
  padding: 0;
  text-align: left;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.yoga-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(30, 0, 60, 0.6);
  position: sticky;
  top: 0;
  z-index: 10;
  border-radius: 0;
}
.yoga-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e9d5ff;
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px #7c3aed, 0 0 30px rgba(124, 58, 237, 0.4);
}
.yoga-close-btn {
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.5);
  color: #c084fc;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.yoga-close-btn:hover {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
  box-shadow: 0 0 8px #7c3aed;
}

/* ── Screen System ───────────────────────────────────────────────────────── */
.yoga-screen { padding: 16px 18px 20px; }
.yoga-screen.hidden { display: none; }

/* ── Breathing Aura ─────────────────────────────────────────────────────── */
.yoga-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  --aura-color: #ffd700;
  background: radial-gradient(circle, transparent 30%, var(--aura-color) 60%, transparent 75%);
  opacity: 0;
  transition: opacity 0.5s;
}

/* Inhale — aura expands outward */
.yoga-aura.inhale {
  animation: yogaAuraExpand 4s ease-in-out forwards;
}
/* Exhale — aura contracts */
.yoga-aura.exhale {
  animation: yogaAuraContract 6s ease-in-out forwards;
}
/* Hold — subtle gentle pulse */
.yoga-aura.hold {
  animation: yogaAuraHold 2s ease-in-out infinite;
}

@keyframes yogaAuraExpand {
  0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.6); }
  50%  { opacity: 0.22; transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 0.28; transform: translate(-50%, -50%) scale(1.3); }
}
@keyframes yogaAuraContract {
  0%   { opacity: 0.28; transform: translate(-50%, -50%) scale(1.3); }
  50%  { opacity: 0.18; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 0.08; transform: translate(-50%, -50%) scale(0.6); }
}
@keyframes yogaAuraHold {
  0%, 100% { opacity: 0.14; transform: translate(-50%, -50%) scale(1.0); }
  50%      { opacity: 0.20; transform: translate(-50%, -50%) scale(1.05); }
}

/* ── Pose Preview Area ──────────────────────────────────────────────────── */
.yoga-preview-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 220px;
  margin-bottom: 10px;
}

.yoga-pose-svg {
  position: relative;
  z-index: 1;
  width: 160px;
  height: 200px;
  margin: 0 auto;
  filter: drop-shadow(0 0 8px currentColor);
}
.yoga-pose-svg-active {
  width: 130px;
  height: 165px;
}

/* ── Name Display ───────────────────────────────────────────────────────── */
.yoga-preview-names {
  text-align: center;
  margin-top: 6px;
  z-index: 1;
  position: relative;
}
.yoga-devanagari {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.7), 0 0 30px rgba(255, 215, 0, 0.3);
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.yoga-devanagari-lg { font-size: 1.8rem; }

.yoga-sanskrit {
  font-size: 0.95rem;
  font-style: italic;
  color: #c084fc;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.6);
  margin-top: 2px;
}
.yoga-sanskrit-lg { font-size: 1.1rem; }

.yoga-english {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
  letter-spacing: 0.05em;
}
.yoga-english-lg { font-size: 1rem; }

/* ── Breath Cue & Label ─────────────────────────────────────────────────── */
.yoga-breath-cue {
  text-align: center;
  font-size: 0.78rem;
  color: #7dd3fc;
  font-style: italic;
  padding: 4px 10px;
  line-height: 1.4;
  opacity: 0.85;
}
.yoga-breath-cue-active { font-size: 0.85rem; }

.yoga-breath-label {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #86efac;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(134, 239, 172, 0.6);
  min-height: 1.4em;
}
.yoga-breath-label-active { font-size: 1rem; }

/* ── Estimated Time ─────────────────────────────────────────────────────── */
.yoga-est-time {
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

/* ── Pose Sequence List ─────────────────────────────────────────────────── */
.yoga-seq-heading {
  font-size: 0.9rem;
  color: #c084fc;
  margin-bottom: 8px;
  margin-top: 0;
  font-weight: 600;
}
.yoga-seq-container {
  margin-bottom: 14px;
}
.yoga-seq-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;  /* never scroll horizontally */
  scrollbar-width: thin;
  scrollbar-color: #7c3aed #0a0015;
}
.yoga-seq-list-active {
  max-height: 160px;
  margin-top: 10px;
}

.yoga-seq-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  margin-bottom: 4px;
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(30, 0, 60, 0.3);
  transition: all 0.2s;
  overflow: hidden;  /* no horizontal bleed */
  min-width: 0;
}
.yoga-seq-item.yoga-seq-active {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Thumbnail SVG in each list card */
.yoga-seq-thumb {
  flex-shrink: 0;
  width: 32px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.yoga-seq-thumb svg {
  width: 32px;
  height: 40px;
  display: block;
}

.yoga-seq-num {
  font-size: 0.68rem;
  color: #7c3aed;
  width: 14px;
  text-align: right;
  flex-shrink: 0;
}
.yoga-seq-names {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.yoga-seq-english    { font-size: 0.78rem; color: #e2e8f0; font-weight: 500; }
.yoga-seq-sanskrit   { font-size: 0.68rem; color: #c084fc; font-style: italic; }
.yoga-seq-devanagari { font-size: 0.7rem;  color: #ffd700; opacity: 0.75; }
/* Prevent long names from causing horizontal overflow */
.yoga-seq-english,
.yoga-seq-sanskrit,
.yoga-seq-devanagari { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.yoga-dur-input {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 2px 3px;
  font-size: 0.74rem;
  background: #0a0015;
  color: #e9d5ff;
  border: 1px solid rgba(124, 58, 237, 0.5);
  border-radius: 5px 0 0 5px;
  text-align: center;
  flex-shrink: 0;
  flex-grow: 0;      /* never expand */
  box-sizing: content-box;
  /* Remove browser spinner arrows */
  appearance: textfield;
}
.yoga-dur-input::-webkit-inner-spin-button,
.yoga-dur-input::-webkit-outer-spin-button { display: none; }
/* Unit toggle button (sec/min) */
.yoga-dur-unit-btn {
  padding: 2px 4px;
  font-size: 0.65rem;
  background: rgba(124, 58, 237, 0.25);
  color: #c084fc;
  border: 1px solid rgba(124, 58, 237, 0.5);
  border-left: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s;
}
.yoga-dur-unit-btn:hover { background: rgba(124, 58, 237, 0.45); color: #e9d5ff; }
.yoga-dur-unit-btn.is-min { color: #ffd700; background: rgba(255, 215, 0, 0.15); border-color: rgba(255, 215, 0, 0.4); }
.yoga-remove-btn {
  background: transparent;
  border: 1px solid rgba(255, 60, 60, 0.3);
  color: #f87171;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 5px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.yoga-remove-btn:hover {
  background: rgba(255, 60, 60, 0.2);
  box-shadow: 0 0 6px #f87171;
}

/* ── Add Custom Pose ────────────────────────────────────────────────────── */
.yoga-add-pose-details {
  margin-bottom: 14px;
}
.yoga-add-pose-summary {
  font-size: 0.82rem;
  color: #7dd3fc;
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
}
.yoga-add-pose-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: rgba(0, 10, 30, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.15);
}
.yoga-input {
  padding: 6px 10px;
  background: #0a0015;
  color: #e2e8f0;
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 6px;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}
.yoga-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 6px rgba(124, 58, 237, 0.4);
}
.yoga-input-num { width: 60px; text-align: center; }
.yoga-dur-label {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.yoga-form-btns {
  display: flex;
  gap: 8px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.yoga-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
  letter-spacing: 0.03em;
}
.yoga-btn-start {
  width: 100%;
  background: linear-gradient(135deg, #4c0080, #005566);
  color: #e9d5ff;
  border: 1px solid #7c3aed;
  padding: 12px;
  font-size: 0.95rem;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
  margin-top: 4px;
}
.yoga-btn-start:hover {
  background: linear-gradient(135deg, #6b00b0, #007788);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.7), 0 0 10px rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}
.yoga-btn-add {
  background: rgba(124, 58, 237, 0.25);
  color: #c084fc;
  border: 1px solid rgba(124, 58, 237, 0.5);
  flex: 1;
}
.yoga-btn-add:hover { background: rgba(124, 58, 237, 0.45); }
.yoga-btn-remove {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.yoga-btn-remove:hover { background: rgba(239, 68, 68, 0.2); }
.yoga-btn-pause {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.yoga-btn-pause:hover { background: rgba(0, 229, 255, 0.3); }
.yoga-btn-skip {
  background: rgba(255, 166, 0, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.yoga-btn-skip:hover { background: rgba(255, 166, 0, 0.25); }
.yoga-btn-end {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.yoga-btn-end:hover { background: rgba(239, 68, 68, 0.2); }

/* ── Active Session Screen ───────────────────────────────────────────────── */
.yoga-active-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 180px;
  margin-bottom: 8px;
}
.yoga-active-names {
  text-align: center;
  margin-bottom: 6px;
}
.yoga-timer-area {
  text-align: center;
  margin: 10px 0;
}
.yoga-timer {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px #c084fc, 0 0 40px rgba(192, 132, 252, 0.4);
  letter-spacing: 0.05em;
  line-height: 1;
}
.yoga-pose-count {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
  letter-spacing: 0.06em;
}
.yoga-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.yoga-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd700, #c084fc);
  border-radius: 2px;
  transition: width 1s linear, background 2s ease;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.yoga-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0;
}

/* ── Transition Overlay ─────────────────────────────────────────────────── */
.yoga-transition-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 0, 20, 0.92);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.yoga-transition-overlay.hidden { display: none; }
.yoga-transition-inner {
  text-align: center;
}
.yoga-transition-bowl {
  font-size: 2.5rem;
  animation: bowlSpin 2s ease-in-out infinite;
  display: block;
  margin-bottom: 10px;
}
@keyframes bowlSpin {
  0%,100% { transform: scale(1) rotate(-5deg); }
  50%     { transform: scale(1.1) rotate(5deg); }
}
.yoga-transition-text {
  font-size: 1rem;
  color: #c084fc;
  margin-bottom: 8px;
  font-style: italic;
}
.yoga-transition-count {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 20px #ffd700;
  animation: countPulse 1s ease-in-out infinite;
}
@keyframes countPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.15); opacity: 0.8; }
}

/* ── Complete Screen ─────────────────────────────────────────────────────── */
.yoga-complete-header {
  text-align: center;
  padding: 10px 0 16px;
}
.yoga-complete-mandala {
  font-size: 3rem;
  animation: mandalaRotate 8s linear infinite;
  color: #ffd700;
  display: block;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}
@keyframes mandalaRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.yoga-complete-title {
  font-size: 1.6rem;
  color: #e9d5ff;
  margin: 8px 0 4px;
  text-shadow: 0 0 16px #7c3aed;
}
.yoga-complete-sub {
  font-size: 0.8rem;
  color: #86efac;
  margin: 0;
}
.yoga-complete-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  margin-bottom: 12px;
}
.yoga-stat {
  font-size: 0.85rem;
  color: #c084fc;
  text-align: center;
}
.yoga-complete-poses {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed #0a0015;
}
.yoga-complete-poses li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  font-size: 0.78rem;
}
.yc-eng  { color: #e2e8f0; font-weight: 500; flex: 1; }
.yc-skt  { color: #c084fc; font-style: italic; }
.yc-dev  { color: #ffd700; opacity: 0.75; }
.yc-dur  { color: #94a3b8; margin-left: auto; flex-shrink: 0; }

/* ── Yoga Visual Area (shared, always visible) ──────────────────────────── */
.yoga-visual-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 18px 10px;
  min-height: 230px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  background: linear-gradient(180deg, rgba(30,0,60,0.5) 0%, transparent 100%);
}

.yoga-pose-names {
  text-align: center;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

/* Active sequence extra column */
.yoga-seq-dur {
  font-size: 0.7rem;
  color: #94a3b8;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Yoga Genie Button (in modal header) ─────────────────────────────────── */
.yoga-genie-btn {
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #c084fc;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-right: 4px;
}
.yoga-genie-btn:hover {
  background: rgba(124, 58, 237, 0.3);
  box-shadow: 0 0 10px #7c3aed;
}
.yoga-genie-btn.genie-active {
  background: rgba(124, 58, 237, 0.35);
  border-color: #a78bfa;
  box-shadow: 0 0 8px #7c3aed;
}

/* ── Yoga Genie Sidebar Panel ────────────────────────────────────────────── */
/* Flexbox sibling of .yoga-modal inside .yoga-modal-inner                   */
.yoga-genie-panel {
  flex: 0 0 380px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #080010 0%, #000018 100%);
  border-left: 1px solid rgba(124, 58, 237, 0.45);
  overflow: hidden;
  position: relative;
}
/* Drag-to-resize handle on left border of the genie panel */
.yoga-genie-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  z-index: 10;
  background: transparent;
}
.yoga-genie-resize-handle:hover {
  background: rgba(124, 58, 237, 0.25);
}
.yoga-genie-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(30, 0, 60, 0.7);
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  font-size: 0.82rem;
  color: #e9d5ff;
  font-weight: 600;
  flex-shrink: 0;
}
.yoga-genie-chat-close {
  background: transparent;
  border: none;
  color: #c084fc;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
}
.yoga-genie-messages {
  flex: 1 1 0;
  min-height: 0; /* critical for Firefox flex scrolling */
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed #0a0015;
}
.yoga-genie-msg {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 95%;
  word-break: break-word;
  white-space: pre-wrap;
}
.yoga-genie-msg.user {
  background: rgba(124, 58, 237, 0.3);
  color: #e9d5ff;
  align-self: flex-end;
  border: 1px solid rgba(124, 58, 237, 0.4);
}
.yoga-genie-msg.genie {
  background: rgba(0, 10, 30, 0.85);
  color: #7dd3fc;
  border: 1px solid rgba(0, 229, 255, 0.18);
  align-self: flex-start;
}
.yoga-genie-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(10, 0, 21, 0.8);
  flex-shrink: 0;
}
.yoga-genie-input {
  flex: 1;
  padding: 6px 10px;
  background: rgba(20, 0, 40, 0.8);
  color: #e9d5ff;
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 7px;
  font-size: 0.8rem;
  outline: none;
}
.yoga-genie-input:focus { border-color: #7c3aed; }
.yoga-genie-send {
  padding: 6px 12px;
  background: rgba(124, 58, 237, 0.5);
  color: #fff;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s;
  flex-shrink: 0;
}
.yoga-genie-send:hover { background: rgba(124, 58, 237, 0.85); }
.yoga-genie-status {
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 0 10px 6px;
  min-height: 18px;
  flex-shrink: 0;
}

/* ── Named Flow Save / Load ──────────────────────────────────────────────── */
.yoga-flows-section {
  margin-bottom: 12px;
}
.yoga-flows-heading {
  font-size: 0.8rem;
  color: #7dd3fc;
  font-weight: 600;
  margin-bottom: 6px;
}
.yoga-flows-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.yoga-flow-name-input {
  flex: 1;
  min-width: 100px;
  padding: 4px 8px;
  background: #0a0015;
  color: #e2e8f0;
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 6px;
  font-size: 0.78rem;
  outline: none;
}
.yoga-flow-name-input:focus { border-color: #7c3aed; }
.yoga-btn-save-flow {
  padding: 4px 10px;
  background: rgba(124, 58, 237, 0.4);
  color: #e9d5ff;
  border: 1px solid rgba(124, 58, 237, 0.5);
  border-radius: 6px;
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.yoga-btn-save-flow:hover { background: rgba(124, 58, 237, 0.7); }
.yoga-saved-flows-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed #0a0015;
}
.yoga-saved-flow-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(0, 5, 20, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 6px;
}
.yoga-saved-flow-name {
  flex: 1;
  font-size: 0.78rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yoga-saved-flow-count {
  font-size: 0.68rem;
  color: #7c3aed;
  flex-shrink: 0;
}
.yoga-btn-load-flow {
  padding: 2px 8px;
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 5px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.2s;
}
.yoga-btn-load-flow:hover { background: rgba(0, 229, 255, 0.3); }
.yoga-btn-delete-flow {
  padding: 2px 6px;
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(255, 60, 60, 0.25);
  border-radius: 5px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: background 0.2s;
}
.yoga-btn-delete-flow:hover { background: rgba(255, 60, 60, 0.2); }

/* ── Responsive: narrow screens (< 600px) ───────────────────────────────── */
@media (max-width: 600px) {
  .yoga-modal-overlay {
    padding: 8px;  /* smaller margin on phones */
  }
  /* Stack genie panel below yoga content on small screens */
  .yoga-modal-inner {
    flex-direction: column;
  }
  .yoga-genie-panel {
    flex: 0 0 280px;
    min-width: 0;
    border-left: none;
    border-top: 1px solid rgba(124, 58, 237, 0.45);
  }
  .yoga-genie-resize-handle {
    display: none; /* resize not meaningful when stacked vertically */
  }
}
