/* ── VARIABLES ── */
:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --surface2: #1e1e1e;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --muted: #666;
  --faint: #333;
  --empty: #1a1a1a;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Size-adjusted fallbacks so layout doesn't shift when webfonts load */
@font-face {
  font-family: 'Fraunces-fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 98%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'JetBrainsMono-fallback';
  src: local('Courier New'), local('Courier');
  size-adjust: 85%;
  ascent-override: 95%;
  descent-override: 20%;
  line-gap-override: 0%;
}

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'JetBrainsMono-fallback', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── HEADER ── */
header {
  padding: 36px 48px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-family: 'Fraunces', 'Fraunces-fallback', serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.logo span {
  font-style: italic;
  font-weight: 300;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.year-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
}

.btn-add {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 9px 18px;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  font-weight: 700;
}

.btn-add:hover { opacity: 0.85; }
.btn-add:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-add-secondary {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ── MAIN ── */
main {
  padding: 48px;
  max-width: min(1400px, 95vw);
  margin: 0 auto;
  width: 100%;
}

/* ── EMPTY STATE ── */
#empty-state {
  text-align: center;
  padding: 100px 20px;
}

.empty-title {
  font-family: 'Fraunces', 'Fraunces-fallback', serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.empty-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
}

.empty-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 36px;
}

.btn-start {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 14px 32px;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: opacity 0.15s;
}

.btn-start:hover { opacity: 0.85; }

/* ── HABIT CARDS ── */
#habits-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.habit-card {
  opacity: 0;
  transform: translateY(12px);
  animation: cardIn 0.4s ease forwards;
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.habit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

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

.habit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.habit-name {
  font-family: 'Fraunces', 'Fraunces-fallback', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.habit-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-val {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.habit-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-icon.danger:hover {
  border-color: #ff4444;
  color: #ff4444;
}

/* ── GRID ── */
.grid-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.grid-inner {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  min-width: max-content;
}

.month-labels {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
  padding-left: 20px;
}

.month-label-slot {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.08em;
  width: 13px;
  text-align: center;
  overflow: visible;
  white-space: nowrap;
}

.grid-rows {
  display: flex;
  gap: 3px;
}

.day-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: 4px;
}

.day-label {
  font-size: 9px;
  color: var(--muted);
  height: 13px;
  display: flex;
  align-items: center;
  letter-spacing: 0.06em;
  width: 16px;
}

.grid-cols {
  display: flex;
  gap: clamp(3px, 0.25vw, 5px);
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.25vw, 5px);
}

.cell {
  width: clamp(13px, 1.1vw, 18px);
  height: clamp(13px, 1.1vw, 18px);
  border-radius: 2px;
  background: var(--empty);
  cursor: pointer;
  transition: transform 0.1s, opacity 0.1s;
  position: relative;
  flex-shrink: 0;
}

.cell:hover {
  transform: scale(1.15);
  z-index: 10;
}

@media (hover: none) {
  .cell:hover {
    transform: none;
  }
}
.cell.filled {
  opacity: 1;
}

.cell.today {
  box-shadow: 0 0 0 1.5px var(--text);
}

.cell.future {
  opacity: 0.2;
  cursor: default;
}

.cell.future:hover {
  transform: none;
}

/* ── TODAY BUTTON ── */
.today-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.btn-checkin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.15s;
}

.checkin-date {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}



/* ── DIVIDER ── */
.habit-divider {
  height: 1px;
  background: var(--border);
  margin-top: 40px;
}

/* ── EXPORT BAR ── */
#export-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 100;
}

.export-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-export {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: opacity 0.15s;
}

.btn-export:hover { opacity: 0.85; }

.btn-export.secondary {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-export.secondary:hover {
  border-color: var(--text);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 36px;
  width: 100%;
  max-width: 400px;
  transform: translateY(10px);
  animation: slideUp 0.25s ease forwards;
}

@keyframes slideUp { to { transform: translateY(0); } }

.modal-title {
  font-family: 'Fraunces', 'Fraunces-fallback', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input[type="text"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s;
}

.field input[type="text"]:focus {
  border-color: var(--text);
}

.color-picker-wrap {
  position: relative;
  padding: 6px 0;
}

.color-picker-fade-right,
.color-picker-fade-left {
  position: absolute;
  top: 0;
  width: 28px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease;
}

.color-picker-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--surface), transparent);
}

.color-picker-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--surface), transparent);
  opacity: 0;
}

.color-picker {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 6px 8px 6px;
}

.color-picker::-webkit-scrollbar {
  display: none;
}

.color-opt {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.color-opt:hover { transform: scale(1.15); }

.color-opt.selected {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  z-index: 1;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.btn-modal {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: opacity 0.15s;
}

.btn-modal.primary {
  background: var(--text);
  color: var(--bg);
}

.btn-modal.cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn-modal:hover { opacity: 0.8; }

/* ── MISC ── */
#export-canvas { display: none; }

/* ── TOOLTIP ── */
.tooltip {
  position: fixed;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 10px;
  padding: 5px 10px;
  pointer-events: none;
  z-index: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transform: translate(-50%, -120%);
  display: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  header, main, #export-bar { padding-left: 20px; padding-right: 20px; }
  .habit-stats { gap: 14px; }
  .color-picker-fade-right,
  .color-picker-fade-left {
    display: block;
    position: absolute;
    z-index: 2;
  }
}

/* ── MOBILE TOUCH TARGETS ── */
@media (max-width: 768px) {
  .cell {
    width: 16px;
    height: 16px;
  }

  .cell::after {
    content: '';
    position: absolute;
    inset: -4px;
  }

  .grid-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

/* ── DELETE MODE ── */
.delete-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  flex-shrink: 0;
  transition: all 0.15s;
}

.delete-checkbox:checked {
  background: #ff4444;
  border-color: #ff4444;
}

.delete-checkbox:checked::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  height: 100%;
}

#delete-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a0a0a;
  border-top: 1px solid #ff4444;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
  flex-wrap: wrap;
}

.delete-bar-label {
  font-size: 11px;
  color: #ff4444;
  letter-spacing: 0.1em;
}

.delete-bar-actions {
  display: flex;
  gap: 10px;
}

.btn-delete-confirm {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  background: #ff4444;
  color: #0e0e0e;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: opacity 0.15s;
}

.btn-delete-confirm:hover { opacity: 0.85; }

.btn-delete-cancel {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-delete-cancel:hover {
  border-color: var(--text);
  color: var(--text);
}

@media (max-width: 600px) {
  #delete-bar { padding-left: 20px; padding-right: 20px; }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ── STREAK CHIPS ── */
.streak-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.streak-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.streak-chip .chain-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.streak-chip .chip-num {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease;
  display: inline-block;
}

.streak-chip .chip-name {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* snap-in animation */
@keyframes chainSnap {
  0%   { transform: scale(1) rotate(0deg); }
  30%  { transform: scale(1.35) rotate(-8deg); }
  55%  { transform: scale(0.92) rotate(4deg); }
  75%  { transform: scale(1.1) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes numTick {
  0%   { transform: translateY(0); opacity: 1; }
  40%  { transform: translateY(-8px); opacity: 0; }
  41%  { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes chipGlow {
  0%   { box-shadow: none; }
  40%  { box-shadow: 0 0 0 2px var(--chip-color, #3fb950), 0 0 12px var(--chip-color, #3fb950); }
  100% { box-shadow: none; }
}

.streak-chip.animate-snap .chain-icon {
  animation: chainSnap 0.45s cubic-bezier(0.36,0.07,0.19,0.97) forwards;
}

.streak-chip.animate-snap .chip-num {
  animation: numTick 0.35s ease forwards;
}

.streak-chip.animate-snap {
  animation: chipGlow 0.6s ease forwards;
}

/* milestone chip — brighter border */
.streak-chip.milestone {
  border-color: var(--chip-color, #3fb950);
}

/* ── FOOTER OVERLAP FIX ── */
.main-pad {
  padding-bottom: 100px;
}

@media (max-width: 600px) {
  .header-left { gap: 12px; }
  .streak-chip .chip-name { display: none; }
  .streak-chip { padding: 5px 10px; }
  .main-pad { padding-bottom: 120px; }
}

/* ── HOW IT WORKS ── */
.how-it-works {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 64px;
  flex-wrap: wrap;
}

.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 180px;
}

.how-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface);
}

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

.how-step:hover .how-icon {
  border-color: var(--text);
  color: var(--text);
}

.how-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.how-desc {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.how-arrow {
  color: var(--faint);
  font-size: 18px;
  margin-top: 13px;
  padding: 0 8px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .how-it-works { gap: 24px; }
  .how-arrow { display: none; }
  .how-step { width: 140px; }
}

/* ── EDIT MODE ── */
.reorder-arrows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}

.btn-arrow:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

.edit-mode-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

#edit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0a0f1a;
  border-top: 1px solid #1a3a6a;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
}

.edit-bar-label {
  font-size: 11px;
  color: #58a6ff;
  letter-spacing: 0.1em;
}

.btn-edit-done {
  background: #58a6ff;
}

@media (max-width: 600px) {
  #edit-bar { padding-left: 20px; padding-right: 20px; }
}

/* ── CARD PICKER SHEET ── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease forwards;
}

.sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  width: 100%;
  max-width: 560px;
  padding: 28px 28px 40px;
  animation: sheetUp 0.3s cubic-bezier(0.32,0.72,0,1) forwards;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.sheet-habits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.sheet-habit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
  font-family: 'JetBrains Mono', monospace;
}

.sheet-habit:hover { border-color: var(--text); }

.sheet-habit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sheet-habit-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex: 1;
}

.sheet-habit-streak {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sheet-cancel {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 12px;
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.sheet-cancel:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-checkin.logged {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-checkin.logged:hover {
  background: rgba(255,0,0,0.08);
  border-color: #ff4444;
  color: #ff4444;
  transition: all 0.15s;
}

.btn-checkin.logged:hover::after {
  content: attr(data-unlog);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14,14,14,0.92);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.btn-checkin.logged,
.btn-checkin.unlogged {
  border-width: 1px;
  box-sizing: border-box;
}

.btn-checkin.logged:hover,
.btn-checkin.unlogged:hover {
  border-width: 1px;
}

.btn-checkin.unlogged {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--habit-color);
  outline: none;
}

.btn-checkin.unlogged:hover {
  outline-offset: 0px;
}

.btn-checkin.unlogged:hover::after {
  content: attr(data-log);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14,14,14,0.92);
  color: #e8e8e8;
  font-size: 11px;
  letter-spacing: 0.08em;
}

@keyframes riskPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,68,68,0.4); }
  70%  { box-shadow: 0 0 0 6px rgba(255,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,68,68,0); }
}

.streak-chip.at-risk {
  animation: riskPulse 1.5s ease infinite;
}

.streak-chip.at-risk.animate-snap {
  animation: riskPulse 1.5s ease infinite, chipGlow 0.6s ease forwards;
}

.risk-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #ff4444;
  letter-spacing: 0.1em;
  text-align: center;
  margin-top: 3px;
}
