/* =============================================================================
   6 Life Pillars — check-in, detail, quick log, Mind/Edge apps
   ============================================================================= */

/* Daily check-in overlay */
.pillar-checkin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 12, 0.88);
  backdrop-filter: blur(4px);
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
}
.pillar-checkin-overlay.open { display: flex; }

.pillar-checkin-inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.pillar-checkin-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  color: #fff;
}

.pillar-checkin-sub {
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  color: #aaa;
  margin: 0 0 24px;
}

.pillar-checkin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.pillar-checkin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.2s;
}
.pillar-checkin-dot.filled { background: var(--dot-color, #9B59FF); }
.pillar-checkin-dot.active { transform: scale(1.3); }

.pillar-checkin-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 32px 24px;
  margin-bottom: 24px;
}

.pillar-checkin-icon svg {
  width: 48px;
  height: 48px;
  color: var(--pillar-color);
  margin-bottom: 12px;
}

.pillar-checkin-pillar {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: var(--pillar-color);
  margin: 0 0 12px;
}

.pillar-checkin-q {
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  color: #ddd;
  margin: 0 0 24px;
  line-height: 1.5;
}

.pillar-checkin-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-btn-yes {
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--pillar-color);
  color: #0a0a0f;
  box-shadow: 0 0 20px color-mix(in srgb, var(--pillar-color) 50%, transparent);
}

.pillar-btn-no {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  color: #888;
}

.pillar-checkin-submit {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #9B59FF, #FF6B6B);
  color: #fff;
}
.pillar-checkin-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Quick log */
.pillar-log-win-link {
  display: block;
  width: 100%;
  text-align: center;
  margin: 8px 0 0;
  padding: 8px;
  background: none;
  border: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #888;
  cursor: pointer;
}
.pillar-log-win-link:hover { color: #ccc; }

.pillar-quicklog-sheet {
  position: fixed;
  inset: 0;
  z-index: 8500;
  pointer-events: none;
  visibility: hidden;
}
.pillar-quicklog-sheet.open {
  pointer-events: auto;
  visibility: visible;
}

.pillar-quicklog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.25s;
}
.pillar-quicklog-sheet.open .pillar-quicklog-backdrop { opacity: 1; }

.pillar-quicklog-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #12121a;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.pillar-quicklog-sheet.open .pillar-quicklog-panel { transform: translateY(0); }

.pillar-quicklog-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.pillar-quicklog-panel h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  margin: 0 0 16px;
  color: #fff;
}

.pillar-quicklog-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pillar-quicklog-pill {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--pill-color);
  background: transparent;
  color: var(--pill-color);
  cursor: pointer;
}
.pillar-quicklog-pill.active {
  background: var(--pill-color);
  color: #0a0a0f;
}

.pillar-quicklog-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 16px;
  margin-bottom: 8px;
}

.pillar-quicklog-xp {
  font-size: 13px;
  color: #888;
  margin: 0 0 16px;
}

.pillar-quicklog-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  background: #9B59FF;
  color: #fff;
  cursor: pointer;
}

/* Atlas alert */
.pillar-atlas-alert {
  display: none;
  margin: 0 16px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 149, 0, 0.15);
  border: 1px solid rgba(255, 149, 0, 0.4);
  color: #ffb74d;
  font-size: 13px;
  text-align: center;
}
.pillar-atlas-alert.visible { display: block; }

/* Pillar detail panel */
.pillar-detail-panel {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: #0a0a0f;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.pillar-detail-panel.open { transform: translateX(0); }

.pillar-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  background: #0a0a0f;
  z-index: 1;
}

.pillar-detail-back {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}

.pillar-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar-detail-icon svg { width: 32px; height: 32px; }

.pillar-detail-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: var(--pillar-color, #fff);
  margin: 0;
}

.pillar-detail-body { padding: 16px; }

.pillar-detail-section {
  margin-bottom: 28px;
}
.pillar-detail-section h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: #888;
  margin: 0 0 12px;
}

.pillar-week-xp {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
}

.pillar-insight-card {
  background: rgba(255,255,255,0.04);
  border-left: 3px solid #FF9500;
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ccc;
  margin-bottom: 8px;
}
.pillar-insight-label {
  display: block;
  font-size: 11px;
  color: #FF9500;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.pillar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 100px;
}
.pillar-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.pillar-chart-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}
.pillar-chart-bar-wrap span {
  font-size: 10px;
  color: #666;
  margin-top: 6px;
}

.pillar-logs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pillar-logs-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  color: #ccc;
}
.pillar-log-xp {
  color: var(--pillar-color, #9B59FF);
  font-weight: 600;
  margin-right: 8px;
}
.pillar-logs-list time {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.pillar-quick-log-link {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  margin-top: 12px;
  padding: 0;
}

/* Mind / Edge shared section styles */
.mind-section, .edge-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mind-section h4, .edge-section h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: #FF6B6B;
  margin: 0 0 14px;
}
.edge-section h4 { color: #FF9500; }

.mind-input-row, .mind-book-add, .mind-skill-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mind-input-row input, .edge-section input[type="text"],
.mind-book-add input, .mind-skill-add input {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 14px;
}

.mind-section button, .edge-section button {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: #FF6B6B;
  color: #0a0a0f;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.edge-section button { background: #FF9500; }

.mind-feed, .edge-feed { margin-top: 12px; }
.mind-feed-item, .edge-feed-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
  color: #bbb;
}
.mind-feed-item time, .edge-feed-item time {
  display: block;
  font-size: 11px;
  color: #555;
  margin-top: 4px;
}

.mind-focus {
  text-align: center;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 107, 107, 0.08);
}
.mind-focus.active { background: rgba(255, 107, 107, 0.15); }
.mind-focus-time {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 64px;
  color: #FF6B6B;
  margin-bottom: 16px;
}
.mind-focus-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #aaa;
}
.mind-focus-controls input {
  width: 48px;
  margin-left: 6px;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.3);
  color: #fff;
}

.mind-skill { margin-bottom: 12px; }
.mind-skill-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.mind-skill-range { width: 100%; accent-color: #FF6B6B; }

.mind-book {
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}
.mind-book-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  margin: 8px 0;
  overflow: hidden;
}
.mind-book-bar div {
  height: 100%;
  background: #FF6B6B;
  border-radius: 3px;
}

.mind-knowledge-card {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 12px;
  padding: 16px;
}
.mind-knowledge-card p { margin: 0 0 12px; line-height: 1.5; color: #ddd; }
.mind-knowledge-card button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #888;
}

.edge-commit {
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  margin-bottom: 10px;
}
.edge-commit p { margin: 0 0 10px; font-size: 14px; }
.edge-commit-btns { display: flex; gap: 8px; }
.edge-commit-btns button {
  flex: 1;
  padding: 8px;
  font-size: 12px;
}
.edge-kept { background: #00C853 !important; }
.edge-missed { background: rgba(255,255,255,0.1) !important; color: #888 !important; }

.edge-tap-log {
  width: 100%;
  padding: 16px !important;
  font-size: 14px !important;
}

.edge-comfort-row {
  margin: 12px 0;
  font-size: 13px;
  color: #aaa;
}
.edge-comfort-row input[type="range"] {
  width: 100%;
  accent-color: #FF9500;
  margin: 8px 0;
}

.mind-empty, .edge-empty, .pillar-insight-empty, .pillar-logs-empty {
  font-size: 13px;
  color: #666;
}

.pillar-detail-loading, .mind-loading, .edge-loading {
  text-align: center;
  color: #666;
  padding: 40px;
}

/* Pillar zoom expansion */
.pillar-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 280;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(10,10,18,0.92) 0%, rgba(10,10,18,0.98) 70%);
  transition: opacity 0.35s ease;
}
.pillar-zoom-overlay.active { opacity: 1; }
.pillar-zoom-icon {
  position: fixed;
  transform: translate(-50%, -50%);
  transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
  filter: drop-shadow(0 0 24px var(--pillar-color, #9B59FF));
}
.pillar-zoom-overlay.expand .pillar-zoom-icon {
  left: 50% !important;
  top: 50% !important;
  width: min(72vw, 320px) !important;
  height: min(72vw, 320px) !important;
  opacity: 0.15;
}
.pillar-zoom-icon svg { width: 100%; height: 100%; }

/* Mastery big wins */
.edge-big-wins { display: grid; gap: 10px; }
.edge-big-win-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,149,0,0.35);
  background: rgba(255,149,0,0.08);
}
.edge-big-win-xp {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  color: #FF9500;
  letter-spacing: 0.06em;
}
.edge-big-win-label { font-size: 14px; font-weight: 700; margin-top: 4px; }
.edge-big-win-hint { display: block; font-size: 11px; color: #888; margin-top: 6px; }
.edge-big-win-btn {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,149,0,0.5);
  background: rgba(255,149,0,0.15);
  color: #FF9500;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.edge-big-wins-intro { font-size: 13px; color: #888; margin: 0 0 12px; }

/* Recharge health */
.recharge-section { margin-bottom: 20px; }
.recharge-hint { font-size: 12px; color: #888; margin-bottom: 12px; line-height: 1.5; }
.recharge-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--mono);
  color: #4FC3F7;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79,195,247,0.35);
  background: rgba(79,195,247,0.08);
}
.recharge-sync-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4FC3F7;
  box-shadow: 0 0 8px #4FC3F7;
}
.recharge-fields { display: grid; gap: 10px; }
.recharge-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #aaa; }
.recharge-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 16px;
}
.recharge-save-btn {
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #4FC3F7;
  color: #0a0a0f;
  font-weight: 800;
  cursor: pointer;
}
.recharge-history { list-style: none; padding: 0; margin: 0; }
.recharge-history li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.recharge-history time { grid-column: 2; font-size: 11px; color: #666; }

/* Fuel reading */
.fuel-reading-type-row { display: flex; gap: 16px; margin: 10px 0 14px; font-size: 13px; }
.fuel-reading-history { list-style: none; padding: 0; margin: 0; }
.fuel-reading-history li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.fuel-reading-type {
  display: inline-block;
  font-size: 10px;
  font-family: var(--mono);
  color: #00C853;
  margin-right: 8px;
  text-transform: uppercase;
}
.fuel-reading-xp { color: var(--purple); font-family: var(--mono); font-size: 11px; margin-left: 8px; }

/* Double XP weekend */
.double-xp-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,18,0.92);
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 24px;
}
.double-xp-overlay.visible { opacity: 1; }
.double-xp-card {
  text-align: center;
  max-width: 340px;
  padding: 32px 24px;
  border-radius: 20px;
  border: 2px solid rgba(155,89,255,0.6);
  background: linear-gradient(160deg, rgba(155,89,255,0.2), rgba(10,10,18,0.95));
  box-shadow: 0 0 48px rgba(155,89,255,0.35);
}
.double-xp-flash {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #FFD700;
  margin-bottom: 12px;
  animation: double-xp-pulse 1.2s ease-in-out infinite;
}
@keyframes double-xp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}
.double-xp-card h2 { font-size: 24px; margin: 0 0 10px; }
.double-xp-card p { color: #aaa; font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.double-xp-btn {
  padding: 14px 28px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #9B59FF, #FFD700);
  color: #0a0a0f;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
