:root {
  --bg: #000000;
  --surface: #1A1A1A;
  --surface-2: #2A2A2A;
  --border: #2F2F2F;
  --neon: #D8FF3C;
  --neon-dim: rgba(216, 255, 60, 0.15);
  --blue: #1E9BFF;
  --text: #FFFFFF;
  --text-2: #9A9A9A;
  --text-muted: #6A6A6A;
  --danger: #F87171;
  --prio-high: #F87171;
  --prio-medium: #FB923C;
  --prio-low: #4ADE80;
  --hour-h: 60px;
  --nav-height: 64px;
  --nav-bottom-margin: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: calc(160px + env(safe-area-inset-bottom));
}

.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 0 12px;
}
.app-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}
.month-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 6px;
}
.header-right {
  display: flex;
  gap: 8px;
}
.icon-btn {
  background: var(--surface);
  border: none;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* VIEW PICKER */
.view-picker { position: relative; }
.view-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.view-menu[hidden] { display: none; }
.view-option {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  letter-spacing: 0.02em;
}
.view-option:hover { background: var(--surface-2); }
.view-option.is-selected { color: var(--neon); }
.view-option.is-selected::after {
  content: '\2713';
  font-weight: 700;
  margin-left: 12px;
}

/* WEEK STRIP */
.week-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 12px;
}
.chevron {
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 24px;
  width: 36px;
  height: 56px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chevron:hover { color: var(--text); }
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  gap: 2px;
}
.day {
  background: transparent;
  border: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  cursor: pointer;
  font-family: inherit;
  min-height: 56px;
}
.day-letter {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-2);
  text-transform: uppercase;
}
.day-num {
  font-size: 16px;
  font-weight: 700;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.day.is-today .day-num { color: var(--neon); }
.day.is-visible:not(.is-selected) .day-num {
  background: var(--neon-dim);
}
.day.is-selected .day-num {
  background: var(--neon);
  color: #000;
}
.day.is-selected.is-today .day-num { color: #000; }

/* ALL DAY */
.all-day {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border);
  min-height: 52px;
}
.all-day-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  flex-shrink: 0;
  width: 56px;
}
.all-day-chips {
  display: grid;
  grid-template-columns: repeat(var(--num-cols, 1), 1fr);
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.all-day-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-height: 32px;
  min-width: 0;
}
.all-day-chip {
  color: var(--text);
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-left: 3px solid;
  text-align: left;
  max-width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.all-day-chip-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.all-day-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.all-day-chip.is-completed {
  color: var(--text-muted);
  opacity: 0.55;
  border-left-color: var(--border) !important;
}
.all-day-chip.is-completed .all-day-chip-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.all-day-chip.is-completed .all-day-chip-check { color: var(--text-2); }

/* DAY GRID */
.day-grid {
  position: relative;
  margin-top: 6px;
}
.hours { position: relative; }
.hour-row {
  height: var(--hour-h);
  display: flex;
  align-items: flex-start;
  border-top: 1px solid var(--border);
  position: relative;
}
.hour-row:last-child { border-bottom: 1px solid var(--border); }
.hour-label {
  font-size: 11px;
  color: var(--text-muted);
  width: 56px;
  flex-shrink: 0;
  padding-right: 8px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateY(-7px);
  background: var(--bg);
}

.tasks-layer {
  position: absolute;
  top: 0;
  left: 56px;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.col-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  pointer-events: none;
}

/* DAY HEADERS (multi-day views) */
.day-headers {
  display: flex;
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--border);
}
.day-headers[hidden] { display: none; }
.day-headers-spacer {
  width: 56px;
  flex-shrink: 0;
}
.day-headers-cells {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--num-cols, 1), 1fr);
  gap: 0;
}
.day-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  text-align: center;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.day-header-num { font-size: 14px; color: var(--text); }
.day-header.is-today .day-header-num { color: var(--neon); }
.task-block {
  position: absolute;
  border-radius: 10px;
  border-left: 4px solid;
  padding: 6px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
  background: var(--surface-2);
  box-sizing: border-box;
  text-align: left;
  font-family: inherit;
  line-height: 1.25;
}
.task-block:focus-visible { outline: 2px solid var(--neon); outline-offset: 1px; }
.task-block.is-completed { color: var(--text-muted); opacity: 0.55; text-decoration: line-through; text-decoration-thickness: 1.5px; }

.time-line {
  position: absolute;
  left: 56px;
  right: 0;
  height: 2px;
  background: var(--blue);
  pointer-events: none;
  z-index: 2;
}
.time-line[hidden] { display: none; }

/* TO DO VIEW */
.todo-view {
  padding: 8px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.todo-view[hidden] { display: none; }

/* DAILY BRAND HEADER */
.dl-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border);
}
.dl-brand {
  margin: 0;
  font-size: 32px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1;
}
.brand-solo { color: var(--text); }
.brand-leveling { color: var(--neon); }
.dl-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}
.dl-stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}
.dl-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.dl-stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dl-stat-icon {
  color: var(--neon);
  flex-shrink: 0;
  display: inline-flex;
}
.dl-stat-title {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dl-stat-progress {
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.dl-stat-current { color: var(--neon); }
.dl-stat-total { color: var(--text-muted); }
.dl-stat-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.dl-stat-fill {
  height: 100%;
  background: var(--neon);
  border-radius: 999px;
  width: 0%;
  transition: width 0.2s ease;
}

/* SECTION HEADER */
.dl-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dl-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.dl-section-icon {
  color: var(--neon);
  flex-shrink: 0;
  display: inline-flex;
}
.dl-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.dl-section-line {
  flex: 1;
  height: 1px;
  background: var(--neon);
  opacity: 0.7;
  position: relative;
}
.dl-section-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--neon);
}
.dl-add-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 4px;
}
.dl-add-btn:hover { color: var(--text); border-color: var(--neon); }
.dl-add-btn-dashed { border-style: dashed; }
.dl-tasks-list { display: flex; flex-direction: column; gap: 12px; }

/* DAILY TASK CARD */
.dl-task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.dl-task-card.is-complete { border-color: rgba(216, 255, 60, 0.35); }
.dl-task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dl-task-iconwrap {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--neon);
  font-size: 26px;
  line-height: 1;
}
.dl-task-iconwrap.is-initial {
  background: var(--neon);
  color: #000;
  font-weight: 800;
  font-size: 22px;
}
.dl-task-meta {
  flex: 1;
  min-width: 0;
}
.dl-task-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dl-task-goal {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-top: 2px;
}
.dl-task-progress {
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  text-align: right;
}
.dl-task-current { color: var(--neon); }
.dl-task-total { color: var(--text-muted); font-weight: 700; font-size: 14px; }

.dl-task-blocks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.dl-task-block {
  aspect-ratio: 1;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  gap: 2px;
  background: transparent;
  font-family: inherit;
  padding: 4px;
}
.dl-task-block.is-complete {
  background: var(--neon);
  border-style: solid;
  border-color: var(--neon);
  color: #000;
}
.dl-task-block-check { display: none; }
.dl-task-block.is-complete .dl-task-block-check { display: inline-flex; }

.dl-task-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}
.dl-task-add {
  background: transparent;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  border-radius: 999px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  min-width: 140px;
}
.dl-task-add:hover { background: var(--neon-dim); }
.dl-task-custom {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
  border-radius: 999px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-width: 100px;
}
.dl-task-custom:hover { color: var(--text); border-color: var(--text-2); }

/* Progress bar variant for Daily Task */
.dl-task-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dl-task-bar-track {
  height: 12px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.dl-task-bar-fill {
  height: 100%;
  background: var(--neon);
  border-radius: 999px;
  width: 0%;
  transition: width 0.2s ease;
}
.dl-task-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
  font-weight: 600;
}
.dl-task-bar-meta-end { color: var(--neon); }

.dl-task-edit {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.dl-task-edit:hover { color: var(--text); background: var(--surface-2); }

/* TIMELINE row check (for completed simple-tap items) */
.timeline-row-check {
  color: var(--neon);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 4px;
}
.td-section { display: flex; flex-direction: column; gap: 8px; }
.td-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.td-section-head-inline {
  justify-content: flex-end;
  padding: 0 0 4px;
}
.td-section-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ROUTINE HEADER */
.routine { display: flex; flex-direction: column; gap: 12px; }
.routine-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 12px;
}
.routine-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.routine-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.routine-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}
.routine-streak[hidden] { display: none; }
.routine-streak svg { color: var(--neon); }
.routine-progress { display: flex; flex-direction: column; gap: 8px; }
.routine-progress-text {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
}
.routine-progress-bar {
  height: 5px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.routine-progress-fill {
  height: 100%;
  background: var(--neon);
  border-radius: 999px;
  transition: width 0.2s ease;
  width: 0%;
}

/* TIMELINE */
.routine-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
}
.routine-timeline::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--surface-2);
  z-index: 0;
}
.timeline-item {
  display: flex;
  align-items: stretch;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid var(--text-muted);
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: transparent;
}
.timeline-item.is-complete .timeline-dot {
  background: var(--neon);
  border-color: var(--neon);
  color: #000;
  box-shadow: 0 0 12px rgba(216, 255, 60, 0.3);
}
.timeline-item.is-next .timeline-dot {
  border-color: var(--neon);
  border-width: 2px;
}
.timeline-card {
  flex: 1;
  background: var(--surface);
  border-radius: 12px;
  border-left: 3px solid transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.timeline-item.priority-high .timeline-card { border-left-color: var(--prio-high); }
.timeline-item.priority-medium .timeline-card { border-left-color: var(--prio-medium); }
.timeline-item.priority-low .timeline-card { border-left-color: var(--prio-low); }
.timeline-card.is-complete { background: var(--neon-dim); }
.timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 56px;
}
.timeline-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--text);
}
.timeline-icon.is-initial {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue);
  color: #000;
  font-weight: 800;
  font-size: 14px;
}
.timeline-title {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  flex-shrink: 0;
}
.timeline-card.is-complete .timeline-progress { color: var(--neon); }
.timeline-chev {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.timeline-card.is-expanded .timeline-chev { transform: rotate(180deg); }
.timeline-edit {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.timeline-edit:hover { color: var(--text); background: var(--surface-2); }
.timeline-subtask-list {
  display: flex;
  flex-direction: column;
  padding: 0 14px 12px 50px;
  gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.timeline-subtask-list[hidden] { display: none; }

/* HISTORY DOTS */
.routine-history {
  margin-top: 12px;
  padding: 14px 14px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.routine-history[hidden] { display: none; }
.routine-history-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-2);
}
.routine-history-dots {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 4px;
  align-items: center;
}
.history-dot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--surface-2);
}
.history-dot.is-complete { background: var(--neon); }
.history-dot.is-today { outline: 1.5px solid var(--text); outline-offset: 1px; }
.td-add {
  background: transparent;
  border: none;
  color: var(--neon);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 8px;
  cursor: pointer;
  min-height: 36px;
}
.td-list { display: flex; flex-direction: column; gap: 6px; }
.td-empty {
  padding: 14px 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.td-empty[hidden] { display: none; }

.daily-item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  overflow: hidden;
}
.daily-item.priority-high { border-left-color: var(--prio-high); }
.daily-item.priority-medium { border-left-color: var(--prio-medium); }
.daily-item.priority-low { border-left-color: var(--prio-low); }
.daily-item.is-complete {
  background: var(--neon-dim);
  border-color: rgba(216, 255, 60, 0.25);
}
.daily-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  min-height: 56px;
}
.daily-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}
.daily-icon.is-initial {
  background: var(--blue);
  color: #000;
  font-weight: 800;
  font-size: 16px;
}
.daily-title {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.daily-progress {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}
.daily-item.is-complete .daily-progress { color: var(--neon); }
.daily-chevron {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.daily-item.is-expanded .daily-chevron { transform: rotate(180deg); }
.subtask-list {
  display: flex;
  flex-direction: column;
  padding: 0 14px 12px 56px;
  gap: 2px;
}
.subtask-list[hidden] { display: none; }
.subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  cursor: pointer;
  min-height: 36px;
}
.subtask-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  color: #000;
}
.subtask-row.is-done .subtask-checkbox {
  background: var(--neon);
  border-color: var(--neon);
}
.subtask-title {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subtask-row.is-done .subtask-title {
  text-decoration: line-through;
  color: var(--text-2);
}

/* Habit modal subtasks edit */
.subtasks-edit { display: flex; flex-direction: column; gap: 6px; }
.subtask-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subtask-edit-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  min-width: 0;
}
.subtask-edit-input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon);
}
.subtask-edit-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 999px;
  flex-shrink: 0;
  line-height: 1;
}
.subtask-edit-remove:hover { color: var(--danger); background: var(--surface-2); }
.subtask-add {
  align-self: flex-start;
  margin-top: 2px;
  padding-left: 0;
}
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.field-hint[hidden] { display: none; }

.sync-status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.sync-status.is-idle    { color: var(--text-2); }
.sync-status.is-pulling { color: #58C0F5; border-color: #58C0F5; }
.sync-status.is-pushing { color: var(--neon); border-color: var(--neon); }
.sync-status.is-error   { color: #F87171; border-color: #F87171; }
.sync-status.is-ok      { color: #4ADE80; border-color: rgba(74,222,128,0.4); }
#syncEndpointInput, #syncTokenInput {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
}
.sync-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.sync-buttons .btn-text {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
}
.sync-buttons .btn-text:hover { border-color: var(--neon); color: var(--neon); }
.daily-edit {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.daily-edit:hover { color: var(--text); background: var(--surface-2); }

.todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 52px;
  border-left: 3px solid transparent;
}
.todo-row.priority-high { border-left-color: var(--prio-high); }
.todo-row.priority-medium { border-left-color: var(--prio-medium); }
.todo-row.priority-low { border-left-color: var(--prio-low); }
.todo-row.is-done {
  background: transparent;
  opacity: 0.55;
}
.todo-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  color: #000;
}
.todo-row.is-done .todo-checkbox {
  background: var(--neon);
  border-color: var(--neon);
}
.todo-title {
  flex: 1;
  font-weight: 500;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.todo-row.is-done .todo-title { text-decoration: line-through; }
.todo-due {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
}
.todo-due.is-overdue { color: var(--danger); }

/* CONFIRM MODAL */
.modal-confirm { max-width: 380px; }
#confirmBackdrop {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#confirmBackdrop .modal {
  width: min(340px, 100%);
  max-height: 70vh;
  border-radius: 18px;
  padding: 20px;
  margin: 0;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
  align-self: center;
  gap: 14px;
}
.confirm-text {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  padding: 8px 4px;
  line-height: 1.4;
}
.confirm-amount {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 4px 0;
}
.confirm-amount[hidden] { display: none; }
.confirm-amount input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  width: 110px;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}
.confirm-amount input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon);
}
.confirm-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: lowercase;
}

/* WORKOUT VIEW */
.workout-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 24px; }
.workout-view[hidden] { display: none; }
.wo-page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  margin-top: -2px;
  text-transform: uppercase;
}
.wo-subtitle { font-size: 13px; color: var(--text-2); margin-top: -4px; text-align: center; }
.wo-stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}
.wo-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wo-stat-icon {
  color: var(--neon);
  flex-shrink: 0;
  display: inline-flex;
}
.wo-stat-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wo-stat-label { font-size: 10px; color: var(--text-2); font-weight: 600; text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-stat-value { font-size: 18px; font-weight: 800; color: var(--neon); line-height: 1; }
.wo-stat-unit { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.wo-stat-bar { height: 3px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.wo-stat-fill { height: 100%; background: var(--neon); width: 0%; transition: width 0.2s ease; }
.wo-stat-spark { height: 18px; }
.wo-stat-spark svg { width: 100%; height: 100%; display: block; }

/* SUB-TABS */
.wo-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: var(--surface);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.wo-subtab {
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  min-height: 44px;
}
.wo-subtab.is-active {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 12px rgba(216, 255, 60, 0.2);
}

.wo-content { display: flex; flex-direction: column; gap: 14px; }
.wo-content[hidden] { display: none; }

/* DAY PICKER */
.wo-day-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.wo-day-chip {
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 4px;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  min-height: 40px;
}
.wo-day-chip.is-active {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 12px rgba(216, 255, 60, 0.2);
}

/* SESSION CARD */
.wo-sessions-list { display: flex; flex-direction: column; gap: 14px; }
.wo-session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wo-session-card.is-complete { border-color: rgba(216, 255, 60, 0.35); }
.wo-session-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.wo-session-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wo-session-meta { flex: 1; min-width: 0; }
.wo-session-day { font-size: 18px; font-weight: 800; color: var(--text); }
.wo-session-name { font-size: 16px; font-weight: 700; color: var(--text); margin-top: 2px; }
.wo-session-badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.wo-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--neon);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--neon);
  background: transparent;
}
.wo-badge.is-muted { color: var(--text-2); border-color: var(--border); }
.wo-session-count { font-size: 12px; color: var(--text-2); flex-shrink: 0; font-weight: 600; }

.wo-session-edit {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wo-session-edit:hover { color: var(--text); background: var(--surface-2); }

.wo-exercise-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.wo-exercise-row.is-complete { border-color: rgba(216, 255, 60, 0.35); }
.wo-ex-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  border: 1px solid var(--border);
}
.wo-ex-meta { flex: 1; min-width: 0; }
.wo-ex-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-ex-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; font-weight: 500; }
.wo-ex-stats { display: flex; gap: 16px; flex-shrink: 0; align-items: center; }
.wo-ex-stat-block { text-align: right; }
.wo-ex-stat-label { font-size: 9px; color: var(--text-2); text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }
.wo-ex-stat-val { font-size: 13px; font-weight: 800; color: var(--neon); }
.wo-ex-stat-val.is-muted { color: var(--text); font-weight: 700; }
.wo-ex-tag {
  font-size: 10px;
  color: var(--neon);
  margin-top: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.wo-ex-check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--text-muted);
  background: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  cursor: pointer;
}
.wo-exercise-row.is-complete .wo-ex-check { background: var(--neon); border-color: var(--neon); }

.wo-session-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.wo-action-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
}
.wo-action-secondary:hover { border-color: var(--neon); color: var(--neon); }
.wo-action-primary {
  background: var(--neon);
  border: none;
  color: #000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  box-shadow: 0 0 16px rgba(216, 255, 60, 0.25);
}
.wo-empty {
  text-align: center;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.wo-empty[hidden] { display: none; }
.wo-empty h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.wo-empty p { margin: 0; font-size: 13px; color: var(--text-2); }
.wo-add-session-btn { color: var(--neon); border-color: var(--neon); }

/* EXERCISES TAB */
.wo-search {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 12px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
}
.wo-search::placeholder { color: var(--text-muted); }
.wo-search:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon); }
.wo-bodypart-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wo-bp-chip {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
}
.wo-bp-chip.is-active {
  background: var(--neon);
  color: #000;
  border-color: var(--neon);
}
.wo-section-title { margin: 4px 0 0; font-size: 18px; font-weight: 800; }
.wo-exercises-list { display: flex; flex-direction: column; gap: 12px; }

.wo-exercise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
}
.wo-ec-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 28px;
  border: 1px solid var(--border);
}
.wo-ec-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wo-ec-name { font-size: 17px; font-weight: 800; }
.wo-ec-type { font-size: 12px; color: var(--text-2); margin-top: -2px; }
.wo-ec-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.wo-ec-stat { text-align: left; }
.wo-ec-stat-label { font-size: 10px; color: var(--text-2); font-weight: 700; letter-spacing: 0.03em; }
.wo-ec-stat-val { font-size: 14px; font-weight: 800; }
.wo-ec-stat-val.is-neon { color: var(--neon); }
.wo-ec-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* PROGRESS TAB */
.wo-prog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wo-prog-head { display: flex; align-items: center; gap: 10px; }
.wo-prog-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.wo-prog-icon { color: var(--neon); display: inline-flex; }
.wo-prog-filters { display: flex; gap: 8px; }
.wo-prog-select {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 12 8'><path fill='none' stroke='%239A9A9A' stroke-width='2' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  min-width: 0;
}
.wo-chart {
  height: 180px;
  background: var(--bg);
  border-radius: 8px;
  position: relative;
}
.wo-chart svg { width: 100%; height: 100%; display: block; }
.wo-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 13px;
}
.wo-prog-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px;
}
.wo-pst { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.wo-pst-label { font-size: 10px; color: var(--text-2); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.wo-pst-val { font-size: 14px; font-weight: 800; color: var(--neon); }
.wo-overload-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}
.wo-ot {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wo-ot-label { font-size: 10px; color: var(--text-2); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.wo-ot-val { font-size: 16px; font-weight: 800; color: var(--neon); }
.wo-ot-bar { height: 3px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 2px; }
.wo-ot-fill { height: 100%; background: var(--neon); border-radius: 999px; }
.wo-muscle-bars { display: flex; flex-direction: column; gap: 8px; }
.wo-mb-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; }
.wo-mb-label { font-size: 13px; color: var(--text); font-weight: 600; }
.wo-mb-bar-track { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.wo-mb-bar-fill { height: 100%; background: var(--neon); border-radius: 999px; }
.wo-mb-val { font-size: 13px; color: var(--neon); font-weight: 700; white-space: nowrap; }
.wo-wins-list { display: flex; flex-direction: column; gap: 6px; }
.wo-win-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.wo-win-icon { color: var(--neon); flex-shrink: 0; display: inline-flex; }
.wo-win-text { flex: 1; font-size: 14px; font-weight: 600; }
.wo-win-when { font-size: 11px; color: var(--text-2); flex-shrink: 0; }

/* WORKOUT LOGGER */
.wo-logger-backdrop { background: var(--bg); align-items: stretch; justify-content: stretch; }
.wo-logger {
  background: var(--bg);
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0;
}
.wo-logger-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.wo-logger-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wo-logger-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}
.wo-log-ex {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wo-log-ex-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wo-log-ex-name { font-size: 16px; font-weight: 800; }
.wo-log-ex-target { font-size: 12px; color: var(--text-2); }
.wo-log-ex-target .is-neon { color: var(--neon); font-weight: 700; }
.wo-set-grid {
  display: grid;
  grid-template-columns: 30px 1fr 1fr 60px 32px;
  gap: 6px;
  align-items: center;
}
.wo-set-grid-head {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.05em;
}
.wo-set-row { display: contents; }
.wo-set-cell input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  text-align: center;
  padding: 10px 4px;
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
  min-height: 40px;
  box-sizing: border-box;
}
.wo-set-cell input:focus { outline: none; border-color: var(--neon); }
.wo-set-num { text-align: center; font-size: 13px; color: var(--text-2); font-weight: 700; }
.wo-set-check {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
}
.wo-set-check.is-complete { background: var(--neon); border-color: var(--neon); }
.wo-log-ex-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.wo-log-ex-action {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.wo-log-ex-action:hover { border-color: var(--neon); color: var(--neon); }

/* RPE PICKER */
.wo-rpe-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}
.wo-rpe-label { font-size: 11px; font-weight: 700; color: var(--text-2); letter-spacing: 0.05em; text-transform: uppercase; }
.wo-rpe-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.wo-rpe-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  min-height: 44px;
}
.wo-rpe-btn.is-active {
  background: var(--neon);
  border-color: var(--neon);
  color: #000;
  box-shadow: 0 0 8px rgba(216, 255, 60, 0.3);
}
.wo-pain-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.wo-pain-flag input { width: 18px; height: 18px; accent-color: var(--neon); }

/* SUGGESTION MODAL */
.wo-suggest-list { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; }
.wo-suggest-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wo-suggest-row.is-accepted { border-color: var(--neon); }
.wo-suggest-row.is-ignored { opacity: 0.5; }
.wo-suggest-name { font-size: 15px; font-weight: 800; }
.wo-suggest-comparison { font-size: 13px; color: var(--text-2); }
.wo-suggest-comparison .new { color: var(--neon); font-weight: 700; }
.wo-suggest-reason { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.wo-suggest-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wo-suggest-actions button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex: 1;
  min-height: 32px;
}
.wo-suggest-actions button.is-active { background: var(--neon); border-color: var(--neon); color: #000; }
.wo-suggest-edit-row { display: flex; gap: 6px; align-items: center; }
.wo-suggest-edit-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  min-width: 0;
}

/* MISSION CARDS */
.mission-card {
  background: var(--surface);
  border: 1px solid var(--neon);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 16px rgba(216, 255, 60, 0.15);
}
.mission-card.is-warning { border-color: var(--prio-medium); box-shadow: 0 0 16px rgba(251, 146, 60, 0.15); }
.mission-card.is-critical { border-color: var(--danger); box-shadow: 0 0 16px rgba(248, 113, 113, 0.15); }
.mission-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--neon-dim);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.mission-meta { flex: 1; min-width: 0; }
.mission-title { font-size: 11px; color: var(--text-2); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mission-text { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 2px; }
.mission-btn {
  background: var(--neon);
  border: none;
  color: #000;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}
.mission-list { display: flex; flex-direction: column; gap: 8px; }

/* PHOTO TRACKER */
.photo-tracker-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.photo-tracker-card.priority-due { border-color: var(--neon); }
.photo-tracker-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.photo-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: var(--surface-2);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.photo-thumb-label {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 999px;
}
.photo-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
  border: 1.5px dashed var(--border);
}

/* PHOTO CAPTURE */
.photo-capture-backdrop { background: #000; align-items: stretch; justify-content: stretch; }
.photo-capture {
  background: #000;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
}
.photo-capture-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.7);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
.photo-capture-title { flex: 1; font-size: 16px; font-weight: 800; text-transform: uppercase; }
.photo-capture-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}
.photo-capture-video, .photo-capture-snapshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-capture-ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
}
.photo-capture-instructions {
  position: absolute;
  bottom: 90px;
  left: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 13px;
}
.photo-capture-instructions h4 { margin: 0 0 4px; font-size: 14px; }
.photo-capture-instructions ul { margin: 0; padding-left: 18px; font-size: 11px; color: var(--text-2); }
.photo-capture-controls {
  padding: 16px;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.photo-shutter {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--neon);
  border: 4px solid #000;
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--neon);
}
.photo-ghost-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  font-weight: 700;
}
.photo-stage-indicator {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--neon);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* COMPARE MODAL */
.photo-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.photo-compare-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.photo-compare-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-2);
}
.photo-compare-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

/* PROGRESS / CHECK-INS */
.progress-view, .profile-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 24px; }
.progress-view[hidden], .profile-view[hidden] { display: none; }
.ci-new-tracker-btn {
  color: var(--neon);
  border-color: var(--neon);
  font-size: 15px;
  padding: 16px;
}
.ci-cat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ci-cat-chips::-webkit-scrollbar { display: none; }
.ci-cat-chip {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
  white-space: nowrap;
}
.ci-cat-chip.is-active { background: var(--neon); color: #000; border-color: var(--neon); }
.ci-trackers-list { display: flex; flex-direction: column; gap: 14px; }

.ci-tracker-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.ci-tracker-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.ci-tracker-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.ci-tracker-meta { flex: 1; min-width: 0; }
.ci-tracker-name { font-size: 18px; font-weight: 800; }
.ci-tracker-type { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.ci-tracker-edit {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ci-tracker-edit:hover { color: var(--text); background: var(--surface-2); }
.ci-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.ci-stat-block { display: flex; flex-direction: column; gap: 2px; }
.ci-stat-label { font-size: 11px; color: var(--text-2); font-weight: 600; }
.ci-stat-val { font-size: 18px; font-weight: 800; color: var(--text); }
.ci-stat-val.is-neon { color: var(--neon); }
.ci-tracker-chart { height: 110px; background: var(--bg); border-radius: 8px; }
.ci-tracker-chart svg { width: 100%; height: 100%; display: block; }
.ci-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 12px;
}
.ci-tracker-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ci-action-primary {
  background: var(--neon);
  border: none;
  color: #000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  min-height: 44px;
}
.ci-action-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  min-height: 44px;
}
.ci-action-secondary:hover { border-color: var(--neon); color: var(--neon); }

.ci-recent-list { display: flex; flex-direction: column; gap: 4px; }
.ci-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.ci-recent-row:last-child { border-bottom: none; }
.ci-recent-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ci-recent-name { flex: 1; font-size: 14px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-recent-val { font-size: 13px; color: var(--neon); font-weight: 700; flex-shrink: 0; }
.ci-recent-when { font-size: 12px; color: var(--text-2); flex-shrink: 0; min-width: 70px; text-align: right; }

.ci-history-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.ci-history-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ci-history-meta { flex: 1; min-width: 0; }
.ci-history-date { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ci-history-value { font-size: 15px; font-weight: 800; color: var(--neon); }
.ci-history-notes { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.ci-history-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ci-history-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ci-history-btn:hover { color: var(--text); background: var(--surface-2); }
.ci-history-btn.danger:hover { color: var(--danger); }

/* OVERVIEW / MISSION CONTROL (Simplified v2) */
.overview-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 16px; }
.overview-view[hidden] { display: none; }
.ov-top { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.ov-top .dl-brand { margin: 0; font-size: 22px; }
.ov-top .ov-date { font-size: 13px; color: var(--text-2); font-weight: 600; }
.ov-titleblock { margin-top: -4px; }
.ov-titleblock .ov-page-title { margin: 0; font-size: 36px; font-weight: 900; letter-spacing: 0.02em; line-height: 1; }
.ov-titleblock .ov-subtitle { font-size: 14px; color: var(--text-2); margin-top: 6px; }

/* DAY TIER */
.ov-daytier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.ov-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ov-tier-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}
.ov-tier-restbadge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-2);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}
.ov-tier-lockbadge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--neon);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--neon-dim);
  border: 1px solid var(--neon);
}
.ov-tier-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}
.ov-tier-badge {
  width: 92px; height: 92px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  position: relative;
}
.ov-tier-letter {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
}
.ov-tier-score {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ov-tier-score-max { color: var(--text-muted); font-weight: 600; }
.ov-tier-meta { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ov-tier-tagline {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
}
.ov-tier-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.ov-tier-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.ov-tier-warn {
  font-size: 11px;
  color: #FB923C;
  background: rgba(251,146,60,0.10);
  border: 1px solid rgba(251,146,60,0.25);
  padding: 6px 8px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}
.ov-tier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ov-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.ov-tier-chip-lbl { color: var(--text-2); }
.ov-tier-chip-val { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ov-tier-chip.is-mid { border-color: rgba(216,255,60,0.25); color: var(--text); }
.ov-tier-chip.is-mid .ov-tier-chip-val { color: var(--neon); }
.ov-tier-chip.is-full {
  background: var(--neon-dim);
  border-color: var(--neon);
  color: var(--neon);
}
.ov-tier-chip.is-full .ov-tier-chip-lbl,
.ov-tier-chip.is-full .ov-tier-chip-val { color: var(--neon); }
.ov-tier-chip.is-low { color: var(--text-muted); }

/* Tier color treatments */
.ov-tier-badge.ov-tier-S {
  background: linear-gradient(160deg, rgba(216,255,60,0.18), rgba(216,255,60,0.04));
  border-color: var(--neon);
  box-shadow: 0 0 24px rgba(216,255,60,0.30);
}
.ov-tier-badge.ov-tier-S .ov-tier-letter { color: var(--neon); text-shadow: 0 0 14px rgba(216,255,60,0.5); }
.ov-tier-A-fill, .ov-tier-S-fill { background: var(--neon); box-shadow: 0 0 8px rgba(216,255,60,0.5); }
.ov-tier-badge.ov-tier-A { border-color: var(--neon); }
.ov-tier-badge.ov-tier-A .ov-tier-letter { color: var(--neon); }
.ov-tier-badge.ov-tier-B { border-color: #58C0F5; }
.ov-tier-badge.ov-tier-B .ov-tier-letter { color: #58C0F5; }
.ov-tier-B-fill { background: #58C0F5; }
.ov-tier-badge.ov-tier-C { border-color: #A78BFA; }
.ov-tier-badge.ov-tier-C .ov-tier-letter { color: #A78BFA; }
.ov-tier-C-fill { background: #A78BFA; }
.ov-tier-badge.ov-tier-D { border-color: #FB923C; }
.ov-tier-badge.ov-tier-D .ov-tier-letter { color: #FB923C; }
.ov-tier-D-fill { background: #FB923C; }
.ov-tier-badge.ov-tier-F { border-color: #F87171; }
.ov-tier-badge.ov-tier-F .ov-tier-letter { color: #F87171; }
.ov-tier-F-fill { background: #F87171; }

/* 7-day tier history strip */
.ov-tier-hist {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-tier-hist-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}
.ov-tier-hist-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.ov-tier-hist-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-height: 52px;
}
.ov-tier-hist-cell.is-today { box-shadow: 0 0 0 1.5px var(--neon); }
.ov-tier-hist-dow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.ov-tier-hist-letter {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}
.ov-tier-hist-cell.is-empty .ov-tier-hist-letter { color: var(--text-muted); }
.ov-tier-hist-cell.ov-tier-hist-S { background: rgba(216,255,60,0.12); border-color: var(--neon); }
.ov-tier-hist-cell.ov-tier-hist-S .ov-tier-hist-letter { color: var(--neon); text-shadow: 0 0 6px rgba(216,255,60,0.5); }
.ov-tier-hist-cell.ov-tier-hist-A { border-color: var(--neon); }
.ov-tier-hist-cell.ov-tier-hist-A .ov-tier-hist-letter { color: var(--neon); }
.ov-tier-hist-cell.ov-tier-hist-B { border-color: #58C0F5; }
.ov-tier-hist-cell.ov-tier-hist-B .ov-tier-hist-letter { color: #58C0F5; }
.ov-tier-hist-cell.ov-tier-hist-C { border-color: #A78BFA; }
.ov-tier-hist-cell.ov-tier-hist-C .ov-tier-hist-letter { color: #A78BFA; }
.ov-tier-hist-cell.ov-tier-hist-D { border-color: #FB923C; }
.ov-tier-hist-cell.ov-tier-hist-D .ov-tier-hist-letter { color: #FB923C; }
.ov-tier-hist-cell.ov-tier-hist-F { border-color: #F87171; }
.ov-tier-hist-cell.ov-tier-hist-F .ov-tier-hist-letter { color: #F87171; }

/* HAPPENING NOW */
.ov-happening {
  background: var(--surface);
  border: 2px solid var(--neon);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  box-shadow: 0 0 24px rgba(216,255,60,0.15);
  overflow: hidden;
}
.ov-happening::before {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 90px; height: 90px;
  border: 1.5px solid var(--neon);
  border-radius: 999px;
  opacity: 0.2;
  pointer-events: none;
}
.ov-happening::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 90px; height: 90px;
  border: 1px dashed var(--neon);
  border-radius: 999px;
  transform: scale(0.7);
  transform-origin: top right;
  opacity: 0.25;
  pointer-events: none;
}
.ov-hap-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--neon);
  margin-bottom: 12px;
}
.ov-hap-tag-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--neon); box-shadow: 0 0 6px var(--neon); }
.ov-hap-body { display: flex; gap: 16px; align-items: flex-start; position: relative; z-index: 1; }
.ov-hap-icon {
  width: 78px; height: 78px;
  border: 2px solid var(--neon);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--neon);
  box-shadow: 0 0 16px rgba(216,255,60,0.25), inset 0 0 16px rgba(216,255,60,0.15);
}
.ov-hap-meta { flex: 1; min-width: 0; }
.ov-hap-title { font-size: 26px; font-weight: 900; color: var(--text); line-height: 1.1; }
.ov-hap-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
  margin-top: 6px;
  font-weight: 600;
}
.ov-hap-time-icon { color: var(--neon); }
.ov-hap-next { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.ov-hap-next .strong { color: var(--text); font-weight: 700; }
.ov-hap-desc-wrap {
  position: relative;
  margin-top: 6px;
  padding-right: 24px;
}
.ov-hap-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ov-hap-desc.is-expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
  display: block;
}
.ov-hap-desc-toggle {
  position: absolute;
  right: 0;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.ov-hap-desc-toggle:hover {
  background: var(--neon-dim);
  border-color: var(--neon);
  color: var(--neon);
}
.ov-hap-continue {
  background: var(--neon);
  color: #000;
  border: none;
  border-radius: 14px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 16px rgba(216,255,60,0.4);
  text-transform: uppercase;
}
.ov-hap-continue:hover { box-shadow: 0 0 24px rgba(216,255,60,0.6); }

.ov-hap-upnext {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ov-hap-upnext:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.18); }
.ov-hap-upnext-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.ov-hap-upnext-lbl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ov-hap-upnext-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ov-hap-upnext-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-hap-upnext-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* MACROS card */
.ov-macros {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}
.ov-macros-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ov-macros-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ov-macros-title svg { color: var(--neon); }
.ov-macros-details {
  background: transparent;
  border: none;
  color: var(--neon);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ov-macro-row {
  display: grid;
  grid-template-columns: 32px 68px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}
.ov-macro-icon {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon);
  flex-shrink: 0;
}
.ov-macro-row.is-priority .ov-macro-icon {
  border-color: var(--neon);
  box-shadow: 0 0 8px rgba(216,255,60,0.4);
}
.ov-macro-label { font-size: 15px; font-weight: 700; color: var(--text); }
.ov-macro-row.is-priority .ov-macro-label { color: var(--neon); }
.ov-macro-bar-track {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.ov-macro-bar-fill { height: 100%; background: var(--neon); border-radius: 999px; box-shadow: 0 0 4px rgba(216,255,60,0.5); }
.ov-macro-row.is-priority .ov-macro-bar-fill { box-shadow: 0 0 8px rgba(216,255,60,0.7); }
.ov-macro-vals { font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--text-2); }
.ov-macro-vals .num { color: var(--text); }
.ov-macro-row.is-priority .ov-macro-vals .num { color: var(--neon); font-size: 16px; font-weight: 900; }

/* Summary cards (Morning Routine / Daily Quests) */
.ov-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .ov-pair { grid-template-columns: 1fr; } }
.ov-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}
.ov-summary-head { display: flex; align-items: center; justify-content: space-between; }
.ov-summary-titlewrap { display: flex; align-items: center; gap: 8px; }
.ov-summary-icon {
  width: 30px; height: 30px;
  border: 1.5px solid var(--neon);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--neon);
  flex-shrink: 0;
}
.ov-summary-title { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--text); }
.ov-summary-menu { color: var(--text-muted); padding: 4px; }
.ov-summary-fraction { font-size: 32px; font-weight: 900; line-height: 1; }
.ov-summary-fraction .num { color: var(--text); }
.ov-summary-fraction .denom { color: var(--text-2); }
.ov-summary-fraction .complete { font-size: 14px; color: var(--text-2); font-weight: 600; margin-left: 4px; }
.ov-summary-segs { display: flex; gap: 4px; height: 6px; }
.ov-summary-seg { flex: 1; background: var(--surface-2); border-radius: 999px; }
.ov-summary-seg.is-on { background: var(--neon); box-shadow: 0 0 4px rgba(216,255,60,0.5); }
.ov-summary-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  color: var(--text-2);
}
.ov-summary-footer .strong { color: var(--text); font-weight: 700; }
.ov-summary-arrow { color: var(--neon); }

/* Workout for the Day */
.ov-workout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}
.ov-workout-head { display: flex; align-items: center; justify-content: space-between; }
.ov-workout-titlewrap { display: flex; align-items: center; gap: 8px; }
.ov-workout-icon {
  width: 30px; height: 30px;
  border: 1.5px solid var(--neon);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--neon);
  flex-shrink: 0;
}
.ov-workout-title { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--text); }
.ov-workout-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.ov-workout-list { display: flex; flex-direction: column; gap: 10px; }
.ov-workout-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.ov-workout-row:hover { border-color: rgba(255,255,255,0.18); }
.ov-workout-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ov-workout-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.ov-workout-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.ov-workout-status.is-active { color: var(--neon); background: var(--neon-dim); }
.ov-workout-status.is-done { color: #4ADE80; background: rgba(74,222,128,0.12); }
.ov-workout-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ov-workout-chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.ov-workout-segs { display: flex; gap: 4px; height: 5px; }
.ov-workout-seg { flex: 1; background: rgba(255,255,255,0.06); border-radius: 999px; }
.ov-workout-seg.is-on { background: var(--neon); box-shadow: 0 0 4px rgba(216,255,60,0.5); }
.ov-workout-rest {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.ov-workout-rest-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--neon);
}
.ov-workout-rest-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

/* UP NEXT */
.ov-upnext {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}
.ov-upnext-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ov-upnext-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ov-upnext-title svg { color: var(--neon); }
.ov-upnext-cal {
  background: transparent;
  border: none;
  color: var(--neon);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ov-upnext-list { position: relative; padding-left: 18px; }
.ov-upnext-list::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 1.5px;
  background: var(--neon);
  opacity: 0.4;
}
.ov-upnext-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  position: relative;
  cursor: pointer;
}
.ov-upnext-item::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border: 1.5px solid var(--neon);
  border-radius: 999px;
  background: var(--surface);
}
.ov-upnext-item.is-next::before { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.ov-upnext-time { font-size: 13px; color: var(--text-2); font-weight: 700; }
.ov-upnext-label { font-size: 14px; color: var(--text); font-weight: 600; }

.ov-upnext-item.ov-upnext-now { cursor: default; padding: 6px 0; }
.ov-upnext-item.ov-upnext-now::before {
  width: 12px; height: 12px;
  background: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 0 3px var(--neon-dim), 0 0 12px var(--neon);
  animation: ovUpnextNowPulse 1.6s ease-in-out infinite;
}
.ov-upnext-item.ov-upnext-now .ov-upnext-time { color: var(--neon); font-weight: 800; letter-spacing: 0.04em; }
.ov-upnext-item.ov-upnext-now .ov-upnext-label {
  color: var(--neon);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@keyframes ovUpnextNowPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--neon-dim), 0 0 8px var(--neon); }
  50%      { box-shadow: 0 0 0 6px var(--neon-dim), 0 0 16px var(--neon); }
}

.ov-header { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; position: relative; }
.ov-header .dl-brand { margin: 0; font-size: 22px; line-height: 1; }
.ov-page-title { margin: 4px 0 0; font-size: 28px; font-weight: 900; letter-spacing: 0.02em; line-height: 1.05; }
.ov-subtitle { font-size: 12px; color: var(--text-2); }
.ov-date {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
@media (min-width: 560px) {
  .ov-header { position: relative; }
  .ov-date { position: absolute; top: 24px; right: 0; margin-top: 0; }
}
.ov-date svg { color: var(--neon); }

.ov-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .ov-pair { grid-template-columns: 1fr; } }

/* Player Status */
.ov-player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 14px;
  align-items: center;
}
@media (max-width: 560px) {
  .ov-player-card { grid-template-columns: auto 1fr auto; }
  .ov-player-card .ov-xp-col { grid-column: 1 / -1; order: 5; }
  .ov-player-card .ov-completion { grid-column: 3; order: 4; }
}
.ov-emblem {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  color: var(--neon);
  filter: drop-shadow(0 0 10px rgba(216,255,60,0.5));
}
.ov-level-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ov-level-label { font-size: 11px; color: var(--text-2); font-weight: 700; letter-spacing: 0.1em; }
.ov-level-num { font-size: 36px; font-weight: 900; color: var(--text); line-height: 1; }
.ov-xp-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ov-xp-text { font-size: 18px; font-weight: 900; line-height: 1; }
.ov-xp-text .current { color: var(--neon); }
.ov-xp-text .total { color: var(--text-muted); font-size: 13px; font-weight: 700; }
.ov-xp-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ov-xp-bar-fill { height: 100%; background: var(--neon); border-radius: 999px; box-shadow: 0 0 8px rgba(216,255,60,0.6); transition: width 0.3s ease; }
.ov-streak { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.ov-streak-icon { color: var(--neon); filter: drop-shadow(0 0 4px rgba(216,255,60,0.5)); }
.ov-streak-num { font-size: 28px; font-weight: 900; line-height: 1; }
.ov-streak-lbl { font-size: 10px; color: var(--text-2); font-weight: 700; letter-spacing: 0.08em; }
.ov-completion { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ov-completion-ring-wrap { position: relative; width: 64px; height: 64px; }
.ov-completion-ring { width: 64px; height: 64px; }
.ov-completion-ring-bg { stroke: var(--surface-2); fill: none; }
.ov-completion-ring-fg { stroke: var(--neon); fill: none; transition: stroke-dasharray 0.3s ease; filter: drop-shadow(0 0 4px rgba(216,255,60,0.5)); }
.ov-completion-pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 900;
  color: var(--neon);
}
.ov-completion-lbl { font-size: 9px; color: var(--text-2); font-weight: 700; letter-spacing: 0.05em; text-align: center; line-height: 1.2; }

/* Priority Alert */
.ov-alert-card {
  background: var(--surface);
  border: 2px solid var(--neon);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 0 20px rgba(216,255,60,0.2);
  position: relative;
  overflow: hidden;
}
.ov-alert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(45deg, var(--neon), var(--neon) 5px, transparent 5px, transparent 10px);
  opacity: 0.3;
}
.ov-card-head { display: flex; align-items: center; gap: 8px; }
.ov-card-icon { color: var(--neon); flex-shrink: 0; }
.ov-card-title { font-size: 14px; font-weight: 800; color: var(--neon); text-transform: uppercase; letter-spacing: 0.04em; }
.ov-alert-msg { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.ov-alert-sub { font-size: 11px; color: var(--text-2); }
.ov-card-action {
  background: transparent;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.ov-card-action:hover { background: var(--neon-dim); }

/* Next Best Action */
.ov-nba-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-nba-card .ov-card-title { color: var(--text); }
.ov-nba-msg { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.ov-nba-sub { font-size: 11px; color: var(--text-2); }

/* Today's Quests */
.ov-quests-card, .ov-schedule-card, .ov-srank-card, .ov-xp-card, .ov-briefing-card, .ov-wins-card, .ov-night-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.ov-quests-list { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.ov-quest-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
  color: var(--text);
}
.ov-quest-row:first-child { border-top: none; padding-top: 4px; }
.ov-quest-icon {
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ov-quest-meta { min-width: 0; overflow: hidden; }
.ov-quest-name { font-size: 13px; font-weight: 800; }
.ov-quest-sub { font-size: 11px; color: var(--text-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-quest-progress { font-size: 12px; font-weight: 800; color: var(--text-2); white-space: nowrap; }
.ov-quest-progress .num { color: var(--neon); }
.ov-quest-arrow { color: var(--text-muted); }
.ov-mini-bar { height: 3px; background: var(--surface-2); border-radius: 999px; margin-top: 4px; overflow: hidden; max-width: 100px; }
.ov-mini-bar-fill { height: 100%; background: var(--neon); border-radius: 999px; }

/* Schedule timeline */
.ov-schedule-list { position: relative; padding-left: 12px; }
.ov-schedule-list::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--neon);
  opacity: 0.4;
}
.ov-sched-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  position: relative;
}
.ov-sched-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 2px solid var(--text-muted);
}
.ov-sched-item.is-next::before {
  background: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}
.ov-sched-item.is-completed::before {
  background: var(--neon);
  border-color: var(--neon);
}
.ov-sched-time { font-size: 11px; color: var(--text-2); font-weight: 700; }
.ov-sched-label { font-size: 13px; font-weight: 700; color: var(--text); }
.ov-sched-item.is-completed .ov-sched-label { color: var(--text-2); text-decoration: line-through; }
.ov-sched-ic { color: var(--neon); display: flex; align-items: center; }

/* S-Rank */
.ov-srank-card {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ov-srank-emblem { color: var(--neon); flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(216,255,60,0.5)); }
.ov-srank-meta { flex: 1; min-width: 0; }
.ov-srank-title { font-size: 12px; color: var(--neon); font-weight: 800; letter-spacing: 0.08em; }
.ov-srank-fraction { font-size: 32px; font-weight: 900; line-height: 1; }
.ov-srank-frac-num { color: var(--neon); }
.ov-srank-frac-denom { color: var(--text-muted); font-size: 20px; }
.ov-srank-lbl { font-size: 11px; color: var(--text-2); }
.ov-srank-status { font-size: 12px; color: var(--neon); font-weight: 800; margin-top: 2px; }
.ov-srank-status.is-risk { color: var(--prio-medium); }
.ov-srank-status.is-failed { color: var(--danger); }
.ov-srank-ring { width: 80px; height: 80px; flex-shrink: 0; }
.ov-srank-ring-bg { stroke: var(--surface-2); fill: none; }
.ov-srank-ring-fg { stroke: var(--neon); fill: none; filter: drop-shadow(0 0 6px rgba(216,255,60,0.4)); }

/* XP Available */
.ov-xp-list { display: flex; flex-direction: column; gap: 4px; }
.ov-xp-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.ov-xp-row:first-child { border-top: none; }
.ov-xp-row .lbl { color: var(--text); font-weight: 600; }
.ov-xp-row .val { color: var(--neon); font-weight: 800; }
.ov-xp-row.is-completed .lbl { color: var(--text-muted); text-decoration: line-through; }
.ov-xp-row.is-completed .val { color: var(--text-muted); }
.ov-xp-total {
  display: flex;
  justify-content: space-between;
  border-top: 1.5px solid var(--neon);
  padding-top: 8px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 900;
}
.ov-xp-total .val { color: var(--neon); }

/* System Briefing */
.ov-briefing-card { background: linear-gradient(135deg, var(--surface), rgba(216,255,60,0.04)); }
.ov-briefing-text { font-size: 13px; line-height: 1.5; color: var(--text); margin-top: 6px; }
.ov-briefing-text .neon { color: var(--neon); font-weight: 700; }

/* Recent Level-Ups */
.ov-wins-list { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 4px; }
@media (max-width: 480px) { .ov-wins-list { grid-template-columns: 1fr; } }
.ov-win {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.ov-win-icon { color: var(--neon); flex-shrink: 0; }
.ov-win-text { min-width: 0; }
.ov-win-title { font-size: 11px; color: var(--text-2); font-weight: 600; }
.ov-win-val { font-size: 13px; font-weight: 800; color: var(--text); }

/* Night Review prompt */
.ov-night-card { border-color: var(--neon); }

/* PROGRESS — Habits section */
.pg-habits-section { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pg-habits-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.pg-habits-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-muted); }
.pg-habits-sub { font-size: 11px; color: var(--text-muted); }
.pg-habits-list { display: flex; flex-direction: column; gap: 10px; }
.pg-habit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pg-habit-head { display: flex; align-items: center; gap: 10px; }
.pg-habit-ic {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--neon);
  flex-shrink: 0;
}
.pg-habit-name { font-size: 15px; font-weight: 800; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-habit-edit { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.pg-habit-edit:hover { color: var(--neon); }
.pg-habit-heat {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 3px;
}
.pg-heat-cell {
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.pg-heat-cell.is-future { opacity: 0.25; }
.pg-habit-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (max-width: 480px) {
  .pg-habit-stats { grid-template-columns: 1fr 1fr; }
}
.pg-habit-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pg-habit-stat-lbl { font-size: 9px; font-weight: 800; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.pg-habit-stat-val { font-size: 14px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-habit-stat-val.is-neon { color: var(--neon); }
.pg-habit-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 38px;
}
.pg-habit-bar {
  flex: 1;
  background: rgba(216,255,60,0.15);
  border-radius: 2px;
  min-height: 2px;
}
.pg-habit-bar.is-full { background: var(--neon); box-shadow: 0 0 4px rgba(216,255,60,0.4); }
.pg-habit-empty { color: var(--text-muted); font-size: 12px; text-align: center; padding: 8px 0; }

/* Subtask editor target fields */
.subtask-edit-main { display: flex; align-items: center; gap: 6px; }
.subtask-toggle-target {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 4px 8px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.subtask-toggle-target:hover { border-color: var(--neon); color: var(--neon); }
.subtask-target-fields {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.subtask-target-fields[hidden] { display: none; }
.subtask-target-input, .subtask-unit-input {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
}
.subtask-target-input { max-width: 100px; }

/* Subtask row count meta */
.subtask-meta {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.subtask-row.is-partial .subtask-checkbox {
  border-color: var(--neon);
  background: rgba(216,255,60,0.10);
}
.subtask-checkbox-partial {
  display: block;
  width: 60%;
  height: 60%;
  border-radius: 2px;
  background: var(--neon);
}

/* BEHAVIORS / HABITS VIEW */
.behaviors-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 14px; }
.behaviors-view[hidden] { display: none; }
.bh-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bh-header-meta { display: flex; flex-direction: column; gap: 4px; }
.bh-page-title { margin: 4px 0 0; font-size: 32px; font-weight: 900; letter-spacing: 0.02em; line-height: 1; }
.bh-subtitle { font-size: 13px; color: var(--text-2); }
.bh-add-icon {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  font-size: 22px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; flex-shrink: 0;
}
.bh-add-icon:hover { background: var(--neon-dim); }

.bh-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (max-width: 600px) { .bh-summary { grid-template-columns: 1fr 1fr; } }
.bh-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}
.bh-summary-ic {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--neon);
}
.bh-summary-lbl { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; color: var(--text-muted); }
.bh-summary-val { font-size: 20px; font-weight: 900; color: var(--text); line-height: 1.05; }
.bh-summary-val small { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-left: 2px; }
.bh-summary-val.is-up { color: #F87171; }
.bh-summary-val.is-down { color: #4ADE80; }

.bh-section-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.bh-section-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-muted); }
.bh-section-count { font-size: 11px; font-weight: 700; color: var(--neon); }

.bh-quick-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.bh-quick-row::-webkit-scrollbar { display: none; }
.bh-quick-chip {
  flex-shrink: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bh-quick-chip:hover { box-shadow: 0 0 10px rgba(216,255,60,0.2); }
.bh-quick-chip-plus { font-size: 14px; font-weight: 800; }

.bh-calendar-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.bh-calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bh-calendar-month { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; color: var(--text); }
.bh-calendar-nav { display: flex; gap: 4px; }
.bh-cal-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bh-cal-btn:hover { color: var(--neon); border-color: var(--neon); }
.bh-calendar-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
}
.bh-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
}
.bh-cal-cell {
  position: relative;
  aspect-ratio: 1 / 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 0 4px;
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.bh-cal-cell.is-other-month { color: var(--text-muted); opacity: 0.5; }
.bh-cal-cell.is-today { color: var(--neon); }
.bh-cal-dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
  align-items: center;
  min-height: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.bh-cal-dot { width: 5px; height: 5px; border-radius: 999px; }
.bh-cal-extra { font-size: 8px; color: var(--text-muted); font-weight: 700; }
.bh-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-2);
}
.bh-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.bh-legend-dot { width: 8px; height: 8px; border-radius: 999px; }

.bh-habit-list { display: flex; flex-direction: column; gap: 10px; }
.bh-habit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.bh-habit-ic {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bh-habit-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bh-habit-name { font-size: 16px; font-weight: 800; color: var(--text); }
.bh-habit-stats {
  font-size: 12px;
  color: var(--text-2);
}
.bh-habit-stats .bh-strong { color: var(--text); font-weight: 700; }
.bh-habit-goal { font-size: 11px; color: var(--text-muted); }
.bh-habit-goal.is-over { color: #F87171; font-weight: 700; }
.bh-habit-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.bh-habit-btn {
  background: transparent;
  border: 1.5px solid;
  color: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.bh-habit-btn.is-secondary {
  border-color: var(--border);
  color: var(--text-2);
}
.bh-habit-btn:hover { box-shadow: 0 0 10px currentColor; }
.bh-habit-card.is-private .bh-habit-name { font-style: italic; color: var(--text-muted); }
.bh-habit-card.is-private .bh-habit-stats,
.bh-habit-card.is-private .bh-habit-goal { color: var(--text-muted); }

/* New behavior modal extras */
.bh-cat-row, .bh-goal-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (max-width: 480px) {
  .bh-cat-row, .bh-goal-row { grid-template-columns: 1fr 1fr; }
}
.bh-cat-btn, .bh-goal-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 8px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bh-cat-btn.is-on, .bh-goal-btn.is-on {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 10px var(--neon-dim);
}
.bh-cat-ic, .bh-goal-ic { display: flex; align-items: center; }

/* Log modal fields */
.bh-log-summary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.bh-log-sum-dot { width: 32px; height: 32px; border-radius: 999px; border: 1.5px solid; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bh-log-sum-name { font-size: 14px; font-weight: 800; color: var(--text); }
.bh-log-sum-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.bh-pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.bh-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.bh-pill.is-on { border-color: var(--neon); color: var(--neon); background: var(--neon-dim); }
.bh-counter {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  width: fit-content;
}
.bh-counter button {
  width: 28px; height: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.bh-counter-val { font-size: 14px; font-weight: 800; color: var(--neon); min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }
.bh-mood-row { display: flex; gap: 6px; flex-wrap: wrap; }
.bh-mood {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bh-mood.is-on { border-color: var(--neon); background: var(--neon-dim); box-shadow: 0 0 8px var(--neon-dim); }
.bh-toggle-row { display: flex; align-items: center; justify-content: space-between; }
.bh-day-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.bh-day-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.bh-day-row-dot { width: 10px; height: 10px; border-radius: 999px; margin-top: 5px; flex-shrink: 0; }
.bh-day-row-body { flex: 1; min-width: 0; }
.bh-day-row-title { font-size: 13px; font-weight: 700; color: var(--text); }
.bh-day-row-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* TASKS VIEW */
.tasks-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 14px; }
.tasks-view[hidden] { display: none; }
.tk-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tk-header-meta { display: flex; flex-direction: column; gap: 4px; }
.tk-page-title { margin: 4px 0 0; font-size: 32px; font-weight: 900; letter-spacing: 0.02em; line-height: 1; }
.tk-subtitle { font-size: 13px; color: var(--text-2); }
.tk-add-icon {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.tk-add-icon:hover { background: var(--neon-dim); }
.tk-quick-capture {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1.5px solid var(--neon);
  border-radius: 12px;
  box-shadow: 0 0 12px var(--neon-dim);
}
.tk-quick-plus {
  background: transparent;
  border: none;
  color: var(--neon);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.tk-quick-capture input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 0;
  outline: none;
}
.tk-quick-mic {
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px;
}
.tk-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.tk-filters::-webkit-scrollbar { display: none; }
.tk-filter {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.tk-filter.is-active { background: var(--neon); color: #000; border-color: var(--neon); box-shadow: 0 0 10px var(--neon-dim); }

.tk-section { display: flex; flex-direction: column; gap: 8px; }
.tk-section-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.tk-section-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-muted); }
.tk-section-count { font-size: 11px; font-weight: 700; color: var(--neon); }
.tk-list { display: flex; flex-direction: column; gap: 8px; }
.tk-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 14px 0; }

.tk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.12s ease;
  position: relative;
}
.tk-card:hover { border-color: var(--neon); }
.tk-card.is-pinned { border-color: var(--neon); box-shadow: 0 0 12px var(--neon-dim); }
.tk-card.is-done { opacity: 0.5; }
.tk-card.is-done .tk-card-title { text-decoration: line-through; }
.tk-card-check {
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
  margin-top: 2px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.tk-card-check.is-prio-low { color: #4ADE80; }
.tk-card-check.is-prio-medium { color: #FACC15; }
.tk-card-check.is-prio-high { color: #FB923C; }
.tk-card-check.is-prio-urgent { color: #F87171; }
.tk-card-check.is-done { background: var(--neon); color: #000; border-color: var(--neon); }
.tk-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tk-prio-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid;
  align-self: flex-start;
}
.tk-prio-badge.is-low { color: #4ADE80; border-color: #4ADE80; background: rgba(74,222,128,0.08); }
.tk-prio-badge.is-medium { color: #FACC15; border-color: #FACC15; background: rgba(250,204,21,0.08); }
.tk-prio-badge.is-high { color: #FB923C; border-color: #FB923C; background: rgba(251,146,60,0.08); }
.tk-prio-badge.is-urgent { color: #F87171; border-color: #F87171; background: rgba(248,113,113,0.08); }
.tk-card-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.25; }
.tk-card-sub { font-size: 12px; color: var(--text-2); }
.tk-card-due { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.tk-card-due.is-overdue { color: #F87171; }
.tk-card-due.is-today { color: var(--neon); }
.tk-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tk-card-menu {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 18px;
  line-height: 1;
}
.tk-card-menu:hover { color: var(--text); }
.tk-progress {
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.tk-progress-fill { height: 100%; background: var(--neon); border-radius: 999px; box-shadow: 0 0 6px var(--neon-dim); }

.tk-project-card {
  background: var(--surface);
  border: 1.5px solid var(--neon);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tk-project-head { display: flex; align-items: flex-start; gap: 12px; }
.tk-project-body { flex: 1; min-width: 0; }
.tk-project-title { font-size: 15px; font-weight: 800; color: var(--text); }
.tk-project-stats { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.tk-subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
}
.tk-subtask-check {
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #000;
}
.tk-subtask-check.is-done { background: var(--neon); border-color: var(--neon); }
.tk-subtask-title { font-size: 13px; color: var(--text); flex: 1; }
.tk-subtask-row.is-done .tk-subtask-title { text-decoration: line-through; color: var(--text-muted); }
.tk-subtask-list { display: flex; flex-direction: column; gap: 0; padding-top: 4px; border-top: 1px solid var(--border); }
.tk-add-subtask {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--neon);
  padding: 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tk-add-subtask:hover { border-color: var(--neon); background: var(--neon-dim); }
.tk-confirm-row {
  background: rgba(216,255,60,0.08);
  border: 1px solid var(--neon);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tk-confirm-text { font-size: 13px; color: var(--text); font-weight: 700; }
.tk-confirm-actions { display: flex; gap: 8px; }
.tk-confirm-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.tk-confirm-btn.is-yes { background: var(--neon); color: #000; border-color: var(--neon); }

/* New Todo modal-specific */
.tk-new-subtitle {
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
  margin: -8px 0 14px;
}
.tk-new-save-top {
  position: absolute;
  right: 12px;
  top: 12px;
  background: var(--neon);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 12px var(--neon-dim);
}
.tk-priority-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
@media (max-width: 420px) { .tk-priority-row { grid-template-columns: 1fr 1fr; } }
.tk-prio-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tk-prio-btn.is-on { box-shadow: 0 0 10px var(--neon-dim); border-color: var(--neon); }
.tk-prio-dot { width: 8px; height: 8px; border-radius: 999px; }
.tk-type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-type-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tk-type-btn.is-on { color: var(--neon); border-color: var(--neon); box-shadow: 0 0 10px var(--neon-dim); }
.tk-counter { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px; }
.tk-subtasks-edit { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.tk-subtask-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.tk-subtask-edit-check {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  flex-shrink: 0;
}
.tk-subtask-edit-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.tk-subtask-edit-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
}
.tk-subtask-edit-drag {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: grab;
  padding: 0 4px;
}
.tk-options-list { display: flex; flex-direction: column; gap: 6px; }
.tk-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.tk-option-ic { color: var(--neon); flex-shrink: 0; display: flex; }
.tk-option-lbl { flex: 1; color: var(--text); font-size: 14px; font-weight: 600; }

/* PEPTIDES VIEW */
.peptides-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 14px; }
.peptides-view[hidden] { display: none; }
.pep-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pep-header-meta { display: flex; flex-direction: column; gap: 4px; }
.pep-page-title { margin: 4px 0 0; font-size: 32px; font-weight: 900; letter-spacing: 0.02em; line-height: 1; }
.pep-subtitle { font-size: 13px; color: var(--text-2); }
.pep-add-icon {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.pep-add-icon:hover { background: var(--neon-dim); }

.pep-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pep-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.12s ease;
}
.pep-summary-card:hover { border-color: var(--neon); }
.pep-summary-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon);
  flex-shrink: 0;
}
.pep-summary-body { flex: 1; min-width: 0; }
.pep-summary-lbl { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-muted); }
.pep-summary-val { font-size: 18px; font-weight: 900; color: var(--text); line-height: 1.1; margin-top: 2px; }
.pep-summary-val small { font-size: 11px; color: var(--text-2); font-weight: 600; margin-left: 4px; }
.pep-summary-chev { color: var(--text-muted); flex-shrink: 0; }

.pep-calendar-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.pep-calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pep-calendar-month { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; color: var(--text); }
.pep-calendar-nav { display: flex; gap: 4px; }
.pep-cal-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pep-cal-btn:hover { color: var(--neon); border-color: var(--neon); }
.pep-calendar-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
}
.pep-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
}
.pep-cal-cell {
  position: relative;
  aspect-ratio: 1 / 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 0 4px;
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.pep-cal-cell.is-other-month { color: var(--text-muted); opacity: 0.5; }
.pep-cal-cell.is-today { color: var(--neon); }
.pep-cal-cell.is-selected {
  background: var(--neon);
  color: #000;
}
.pep-cal-cell.is-selected .pep-cal-dot { box-shadow: 0 0 0 1px #000; }
.pep-cal-dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
  align-items: center;
  min-height: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.pep-cal-dot { width: 5px; height: 5px; border-radius: 999px; }
.pep-cal-miss {
  color: #F87171;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
}
.pep-cal-extra { font-size: 8px; color: var(--text-muted); font-weight: 700; }
.pep-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-2);
}
.pep-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.pep-legend-dot { width: 8px; height: 8px; border-radius: 999px; }
.pep-legend-miss { color: #F87171; font-weight: 800; }

.pep-due-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pep-due-head { display: flex; justify-content: space-between; align-items: center; }
.pep-due-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--text); }
.pep-due-count { font-size: 11px; font-weight: 700; color: var(--neon); }
.pep-due-list { display: flex; flex-direction: column; gap: 8px; }
.pep-due-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.pep-due-row:first-child { border-top: none; padding-top: 0; }
.pep-due-dot { width: 12px; height: 12px; border-radius: 999px; flex-shrink: 0; }
.pep-due-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pep-due-when { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.pep-due-log {
  background: transparent;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  flex-shrink: 0;
}
.pep-due-log:hover { background: var(--neon-dim); }
.pep-due-empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 10px 0; }

.pep-section-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.pep-section-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-muted); }
.pep-section-count { font-size: 11px; font-weight: 700; color: var(--neon); }
.pep-active-list { display: flex; flex-direction: column; gap: 10px; }
.pep-active-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pep-active-head { display: flex; align-items: center; gap: 8px; }
.pep-active-dot { width: 12px; height: 12px; border-radius: 999px; flex-shrink: 0; }
.pep-active-name { font-size: 16px; font-weight: 800; color: var(--text); flex: 1; }
.pep-active-chev { color: var(--text-muted); }
.pep-active-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
@media (max-width: 600px) {
  .pep-active-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
.pep-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pep-stat-lbl { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; color: var(--text-muted); }
.pep-stat-val { font-size: 14px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pep-stat-val.is-neon { color: var(--neon); }
.pep-active-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pep-active-btn {
  padding: 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.pep-active-btn.is-primary { background: transparent; border: 1.5px solid var(--neon); color: var(--neon); }
.pep-active-btn.is-primary:hover { background: var(--neon-dim); }
.pep-active-btn.is-secondary { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.pep-active-btn.is-secondary:hover { border-color: var(--neon); color: var(--neon); }

.pep-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pep-action-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--neon);
  padding: 12px 6px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pep-action-btn:hover { border-color: var(--neon); }

.pep-day-picker { display: flex; gap: 4px; flex-wrap: wrap; }
.pep-day-btn {
  flex: 1;
  min-width: 40px;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.pep-day-btn.is-on { background: var(--neon-dim); border-color: var(--neon); color: var(--neon); }

.pep-calc-out {
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--neon);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px;
}
.pep-calc-out.is-invalid { color: var(--text-muted); font-size: 13px; font-weight: 600; }

.pep-log-summary {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
}
.pep-log-summary strong { color: var(--neon); }

/* NUTRITION VIEW */
.nutrition-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 18px; }
.nutrition-view[hidden] { display: none; }
.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.macro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 0;
  min-width: 0;
}
.macro-card.is-protein { border: 1.5px solid var(--neon); box-shadow: 0 0 20px rgba(216, 255, 60, 0.25); }
.macro-card-name { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--text-2); text-transform: uppercase; }
.macro-card.is-protein .macro-card-name { color: var(--neon); }
.macro-ring-wrap { position: relative; width: 56px; height: 56px; }
.macro-ring { transform: rotate(-90deg); width: 56px; height: 56px; }
.macro-ring-bg { stroke: var(--surface-2); fill: none; }
.macro-ring-fg { stroke: var(--neon); fill: none; transition: stroke-dasharray 0.3s ease; filter: drop-shadow(0 0 4px rgba(216, 255, 60, 0.5)); }
.macro-ring-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
}
.macro-ring-icon svg { width: 20px; height: 20px; }
.macro-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.15;
}
.macro-value .muted { font-size: 10px; color: var(--text-muted); font-weight: 600; display: block; }
.macro-bar { height: 3px; background: var(--surface-2); border-radius: 999px; width: 90%; overflow: hidden; }
.macro-bar-fill { height: 100%; background: var(--neon); border-radius: 999px; }
.macro-left { font-size: 10px; color: var(--text-muted); font-weight: 600; text-align: center; line-height: 1.2; }
.macro-left.is-over { color: var(--danger); }

/* Quick Actions */
.nu-section-head { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--neon); padding: 0 0 4px; }
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 560px) { .quick-actions { grid-template-columns: 1fr 1fr; } }
.quick-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 90px;
}
.quick-action:hover { border-color: var(--neon); box-shadow: 0 0 12px rgba(216, 255, 60, 0.2); }
.qa-icon { color: var(--neon); filter: drop-shadow(0 0 4px rgba(216, 255, 60, 0.4)); }
.qa-label { color: var(--text); }

.nu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nu-card-title { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--neon); }
.nu-pair {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) { .nu-pair { grid-template-columns: 1fr; } }

/* Meals list */
.meals-list { display: flex; flex-direction: column; gap: 0; }
.meal-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
  color: var(--text);
}
.meal-row:first-child { border-top: none; }
.meal-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.meal-meta { min-width: 0; }
.meal-type { font-size: 12px; color: var(--text-2); font-weight: 600; }
.meal-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal-macros { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.meal-macros .p { color: var(--neon); }
.meal-macros .c { color: var(--blue); }
.meal-macros .f { color: #FB923C; }
.meal-cals { font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; }
.meal-arrow { color: var(--text-muted); }

/* Remaining grid */
.remaining-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}
.remaining-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.remaining-tile-icon { color: var(--neon); }
.remaining-tile-val { font-size: 16px; font-weight: 800; color: var(--neon); }
.remaining-tile-val.is-over { color: var(--danger); }
.remaining-tile-lbl { font-size: 10px; color: var(--text-2); font-weight: 600; }

/* Suggested card */
.suggested-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}
.suggested-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
}
.suggested-name { font-size: 14px; font-weight: 800; color: var(--text); }
.suggested-reason { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.suggested-arrow { color: var(--text-muted); }

/* Water + Supplements */
.nu-water-pair {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  align-items: center;
}
@media (max-width: 480px) { .nu-water-pair { grid-template-columns: 1fr; } }
.water-block {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}
.water-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid var(--neon);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
}
.water-meta { min-width: 0; }
.water-lbl { font-size: 11px; color: var(--text-2); font-weight: 700; letter-spacing: 0.08em; }
.water-val { font-size: 22px; font-weight: 900; color: var(--text); }
.water-val .muted { font-size: 13px; color: var(--text-muted); font-weight: 700; }
.water-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.water-bar-fill { height: 100%; background: var(--neon); border-radius: 999px; }
.water-pct { font-size: 11px; color: var(--text-2); margin-top: 4px; font-weight: 600; }

.supps-block { display: flex; flex-direction: column; gap: 4px; }
.supps-title { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--text-2); padding-bottom: 4px; }
.supp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.supp-check {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--neon);
  flex-shrink: 0;
}
.supp-row.is-done .supp-check { background: var(--neon); border-color: var(--neon); color: #000; }

/* Weekly Review */
.weekly-review-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: center;
}
@media (max-width: 480px) { .weekly-review-row { grid-template-columns: 1fr 1fr; } }
.wr-tile { display: flex; align-items: center; gap: 10px; }
.wr-icon { color: var(--neon); display: flex; align-items: center; justify-content: center; }
.wr-meta { min-width: 0; }
.wr-lbl { font-size: 11px; color: var(--text-2); font-weight: 600; }
.wr-val { font-size: 16px; font-weight: 800; }
.wr-val .neon { color: var(--neon); }
.wr-arrow { color: var(--text-muted); }

/* Saved meals modal list */
.saved-meals-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.saved-meal-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
}
.saved-meal-meta { min-width: 0; }
.saved-meal-name { font-size: 14px; font-weight: 800; color: var(--text); }
.saved-meal-macros { font-size: 11px; color: var(--text-2); }
.saved-meal-action {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.saved-meal-action.primary { background: var(--neon); color: #000; border-color: var(--neon); }
.saved-meal-action:hover { color: var(--text); }

/* Water modal presets */
.water-presets {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.water-preset {
  background: var(--surface-2);
  border: 1.5px solid var(--neon);
  color: var(--neon);
  border-radius: 12px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.water-preset:hover { background: var(--neon-dim); }

/* MORE VIEW (full page) */
.more-view { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 18px; }
.more-view[hidden] { display: none; }
.xp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}
.xp-card-section {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.xp-card-divider { width: 1px; align-self: stretch; background: var(--border); }
.xp-icon { color: var(--neon); flex-shrink: 0; display: inline-flex; }
.xp-meta { min-width: 0; }
.xp-label { font-size: 11px; color: var(--text-2); font-weight: 700; letter-spacing: 0.03em; }
.xp-value { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1.1; }
.xp-value .neon { color: var(--neon); }
.xp-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 6px; min-width: 120px; }
.xp-bar-fill { height: 100%; background: var(--neon); border-radius: 999px; box-shadow: 0 0 8px rgba(216, 255, 60, 0.5); }
.xp-streak-num { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1.1; }
.xp-streak-lbl { font-size: 12px; color: var(--text-2); font-weight: 600; }

.more-search-row {
  position: relative;
  display: flex;
  align-items: center;
}
.more-search-icon { position: absolute; left: 14px; color: var(--neon); pointer-events: none; }
.more-search-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--neon);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 14px 14px 14px 44px;
  border-radius: 14px;
  min-height: 50px;
  box-shadow: 0 0 20px rgba(216, 255, 60, 0.15);
  -webkit-appearance: none;
  appearance: none;
}
.more-search-input:focus { outline: none; box-shadow: 0 0 20px rgba(216, 255, 60, 0.4); }
.more-search-input::placeholder { color: var(--text-muted); }

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 420px) {
  .more-grid { grid-template-columns: repeat(2, 1fr); }
}
.more-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  min-height: 150px;
  position: relative;
  font-family: inherit;
  color: var(--text);
}
.more-card:hover { border-color: var(--neon); box-shadow: 0 0 16px rgba(216, 255, 60, 0.18); }
.more-card-icon { color: var(--neon); flex-shrink: 0; margin-top: 4px; filter: drop-shadow(0 0 6px rgba(216, 255, 60, 0.4)); }
.more-card-title { font-size: 14px; font-weight: 800; color: var(--text); }
.more-card-sub { font-size: 11px; color: var(--text-2); font-weight: 500; line-height: 1.3; }
.more-card-arrow { color: var(--neon); margin-top: auto; }
.more-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.more-empty[hidden] { display: none; }
.more-empty h3 { margin: 0 0 4px; font-size: 15px; }
.more-empty p { margin: 0; font-size: 13px; color: var(--text-2); }

.more-quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 4px;
  display: flex;
  flex-direction: column;
}
.more-quick-title { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--neon); padding: 0 14px 8px; }
.more-quick-list { display: flex; flex-direction: column; }
.more-quick-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  border-top: 1px solid var(--border);
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-family: inherit;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  width: 100%;
}
.more-quick-row:hover { color: var(--neon); }
.more-quick-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid var(--neon);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.more-quick-row-name { flex: 1; }
.more-quick-row-arrow { color: var(--text-muted); }

/* ICON PICKER */
#iconPickerBackdrop { z-index: 200; }
#iconLibraryBackdrop { z-index: 180; }
#placeholderBackdrop { z-index: 180; }
#confirmBackdrop { z-index: 220; }
.icon-key-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-align: left;
}
.icon-key-btn:hover { border-color: var(--neon); }
.icon-key-preview {
  width: 24px;
  height: 24px;
  color: var(--neon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-picker-cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
}
.icon-picker-cats::-webkit-scrollbar { display: none; }
.icon-picker-cat {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.icon-picker-cat.is-active { background: var(--neon); color: #000; border-color: var(--neon); }
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}
.icon-picker-tile {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  min-height: 80px;
}
.icon-picker-tile.is-selected {
  border-color: var(--neon);
  box-shadow: 0 0 12px rgba(216, 255, 60, 0.3);
}
.icon-picker-tile-icon { color: var(--neon); }
.icon-picker-tile-label { font-size: 10px; font-weight: 700; color: var(--text); text-align: center; }

/* ICON LIBRARY VIEWER */
.icon-library-list { display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow-y: auto; }
.icon-library-section h4 { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--neon); border-bottom: 1px solid var(--neon-dim); padding-bottom: 4px; }
.icon-library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.icon-library-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.icon-library-tile-icon { color: var(--neon); filter: drop-shadow(0 0 6px rgba(216, 255, 60, 0.45)); }
.icon-library-tile-label { font-size: 11px; font-weight: 700; color: var(--text); }

/* MORE MODAL */
.modal-more { max-width: 420px; }
.more-list { display: flex; flex-direction: column; gap: 6px; }
.more-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-height: 48px;
}
.more-item:disabled { cursor: not-allowed; opacity: 0.6; }
.more-item:not(:disabled):hover { background: var(--surface); }
.color-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-input-row input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}
.color-input-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.color-input-row input[type="text"] {
  flex: 1;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  text-transform: uppercase;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  min-height: 44px;
  min-width: 0;
}
.color-input-row input[type="text"]:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon);
}

.saved-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.saved-colors-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
}
.saved-color {
  position: relative;
  width: 36px;
  height: 36px;
}
.saved-color-swatch {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.saved-color-swatch:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px currentColor;
}
.saved-color-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 0.1s ease;
}
.saved-color:hover .saved-color-remove { opacity: 1; }
.saved-color-remove:hover { color: var(--text); background: var(--surface-2); }

.nav-config-list { display: flex; flex-direction: column; gap: 4px; }
.nav-config-divider {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 8px 4px 2px;
}
.nav-config-divider:first-child { padding-top: 2px; }
.nav-config-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 44px;
}
.nav-config-row.is-in-nav { border-color: var(--neon); }
.nav-config-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  flex-shrink: 0;
}
.nav-config-check.is-checked { background: var(--neon); border-color: var(--neon); }
.nav-config-label { flex: 1; font-size: 14px; font-weight: 600; }
.nav-config-arrows { display: flex; gap: 2px; flex-shrink: 0; }
.nav-config-arrow {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-config-arrow:hover:not(:disabled) { color: var(--neon); background: var(--bg); }
.nav-config-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

.reminder-list { display: flex; flex-direction: column; gap: 4px; }
.reminder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.reminder-row input[type="checkbox"] { accent-color: var(--neon); width: 18px; height: 18px; }
.more-item-icon { font-size: 20px; line-height: 1; }
.more-item-title { flex: 1; }
.more-item-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 999px;
}
.more-add {
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: not-allowed;
}

/* MONTH VIEW */
.month-view {
  margin-top: 4px;
}
.month-view[hidden] { display: none; }
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 12px;
}
.month-nav-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.month-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.month-dows span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-2);
  text-transform: uppercase;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.month-cell {
  background: transparent;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: inherit;
  min-height: 100px;
  padding: 4px 3px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  color: var(--text);
}
.month-cell.is-outside { cursor: default; }
.month-cell-numwrap {
  text-align: center;
  padding: 2px 0 4px;
}
.month-cell-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  min-width: 22px;
  color: var(--text);
  line-height: 1.2;
}
.month-cell.is-today .month-cell-num { color: var(--neon); }
.month-cell.is-selected .month-cell-num {
  background: var(--neon);
  color: #000;
}
.month-cell.is-selected.is-today .month-cell-num { color: #000; }
.month-chip {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  padding: 2px 5px;
  border-radius: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
  cursor: pointer;
}
.month-more {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  padding: 2px 4px;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.time-line-dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--blue);
}

/* SCHEDULE MISSION modal */
.sm-backdrop {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}
.sm-sheet {
  background: var(--bg);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (min-width: 600px) {
  .sm-backdrop { align-items: center; justify-content: center; padding: 24px; }
  .sm-sheet { max-width: 600px; max-height: 90vh; border-radius: 18px; border: 1px solid var(--border); box-shadow: 0 12px 48px rgba(0,0,0,0.6); }
}
.sm-header {
  padding: 18px 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}
.sm-close {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-close:hover { background: var(--surface-2); }
.sm-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  margin: 0 0 14px;
  color: var(--text);
}
.sm-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.sm-tab {
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 10px 8px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.sm-tab.is-active { background: var(--neon); color: #000; box-shadow: 0 0 12px var(--neon-dim); }
.sm-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
  -webkit-overflow-scrolling: touch;
}
.sm-section-head { margin-bottom: 12px; }
.sm-section-title { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--text); }
.sm-section-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sm-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.sm-chips::-webkit-scrollbar { display: none; }
.sm-chip {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
}
.sm-chip.is-active { background: var(--neon-dim); border-color: var(--neon); color: var(--neon); }
.sm-missions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.sm-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}
.sm-mission {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.sm-mission.is-selected { border-color: var(--neon); background: var(--neon-dim); }
.sm-mission-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon);
  flex-shrink: 0;
}
.sm-mission-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-mission-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sm-mission-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.sm-mission-sub {
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sm-mission-action {
  background: var(--neon);
  color: #000;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.sm-mission-action:hover { box-shadow: 0 0 12px var(--neon-dim); }
.sm-mission-action.is-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.sm-mission-action.is-secondary:hover { border-color: var(--neon); color: var(--neon); }
.sm-mission-due-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #FB923C;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(251,146,60,0.12);
  border: 1px solid rgba(251,146,60,0.3);
  margin-left: 6px;
}
.sm-other-link {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-2);
  padding: 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
}
.sm-other-link:hover { border-color: var(--neon); color: var(--neon); }
.sm-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.sm-form-head { display: flex; flex-direction: column; gap: 2px; }
.sm-form-title { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--text); }
.sm-form-sub { font-size: 11px; color: var(--text-muted); }
.sm-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  bottom: 0;
}

/* FAB */
.fab[hidden] { display: none; }
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--nav-bottom-margin) + 16px + env(safe-area-inset-bottom));
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--neon);
  color: #000;
  border: none;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 18px var(--neon-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 20;
  font-family: inherit;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.fab:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 0 26px var(--neon-dim); }
.fab:active { transform: scale(0.96); }
@media (min-width: 600px) {
  .fab {
    right: calc(50vw - 300px + 24px);
  }
}

/* BOTTOM NAV (glass) */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-bottom-margin) + env(safe-area-inset-bottom));
  width: 92%;
  max-width: 500px;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(20, 20, 20, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 30;
  box-sizing: border-box;
  gap: 2px;
}
.nav-tab[hidden] { display: none; }
.nav-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav-tab.is-active {
  color: var(--text);
  cursor: default;
}
.nav-tab[aria-disabled="true"] {
  cursor: default;
}
.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: stretch;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 120ms ease-out;
}
.modal-backdrop[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
@media (min-width: 600px) {
  .modal-backdrop { align-items: center; }
  .modal {
    border-radius: 20px;
    margin: 24px;
    max-height: calc(100vh - 48px);
  }
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="search"],
.field select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  min-height: 48px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input[type="number"] {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%239A9A9A' stroke-width='2' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field input[type="text"]:focus,
.field input[type="number"]:focus,
.field input[type="date"]:focus,
.field input[type="search"]:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon);
}
.field.row {
  align-items: center;
}
.field.row > input,
.field.row > select,
.field.row > div:not(.field-hint) {
  flex: 1;
  max-width: 220px;
}
.field-input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}
.field-input-suffix input { padding-right: 42px; text-align: right; }
.field-input-suffix .suffix {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}
.field-input-readonly {
  background: var(--bg);
  border: 1px dashed var(--border);
  color: var(--neon);
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  padding: 12px 42px 12px 14px;
  border-radius: 10px;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
.field-input-readonly .suffix {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}
.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px) { .field-grid-2 { grid-template-columns: 1fr 1fr; } }
.field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  width: 100%;
  resize: vertical;
  min-height: 80px;
  font-weight: 400;
  line-height: 1.4;
}

.time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.time-fields[hidden] { display: none; }

.time-picker-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.time-picker-row select {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 10px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px;
  padding-right: 22px;
}
.time-picker-row select:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon);
}
.time-picker-sep {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-2);
  padding: 0 2px;
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface-2);
  border-radius: 999px;
  transition: 0.15s;
}
.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background: var(--text);
  border-radius: 999px;
  transition: 0.15s;
}
.switch input:checked + .slider { background: var(--neon); }
.switch input:checked + .slider::before { transform: translateX(20px); background: #000; }

.color-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  outline-offset: 2px;
}
.color-swatch.is-selected { border-color: var(--text); }

.error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
}
.error[hidden] { display: none; }

.modal-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding: 12px 0 calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  z-index: 5;
}
.btn-text {
  background: transparent;
  border: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  min-height: 44px;
}
.btn-text.danger { color: var(--danger); }
.btn-text[hidden] { display: none; }
.btn-primary {
  background: var(--neon);
  color: #000;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: auto;
  min-height: 44px;
  letter-spacing: 0.02em;
}
