/* ========================================
   STOPMAATJE — Design System
   ======================================== */
:root {
  --orange: #FF6B35;
  --orange-light: #FFF0E8;
  --orange-dark: #CC4A18;
  --yellow: #FFD93D;
  --yellow-light: #FFFBE6;
  --yellow-dark: #B8960A;
  --green: #2DC87A;
  --green-light: #E8FAF1;
  --green-dark: #1A9957;
  --purple: #A78BFA;
  --purple-light: #EEEDFE;
  --purple-dark: #3C3489;
  --bg: #F9F4EF;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-tertiary: #9B9B9B;
  --border: #E8E4DF;
  --border-light: #F0ECE7;
  --red: #E24B4A;
  --red-light: #FCEBEB;
  --red-dark: #A32D2D;
  --font-display: 'Lilita One', cursive;
  --font-body: 'Nunito', sans-serif;
}

/* ========================================
   RESET & BASE
   ======================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { 
  font-family: var(--font-body); 
  background: var(--bg); 
  color: var(--text); 
  min-height: 100vh; 
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
input, textarea, button { font-family: var(--font-body); }
input[type=text], input[type=number], input[type=date], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
}
textarea { resize: none; height: 80px; }

/* ========================================
   SCREENS
   ======================================== */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-card);
}
.screen.active { display: flex; }

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 { font-family: var(--font-display); font-size: 26px; line-height: 1.15; color: var(--text); }
h2 { font-family: var(--font-display); font-size: 18px; line-height: 1.2; color: var(--text); }
.sub { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-top: 4px; }
.sub.center { text-align: center; }
.center { text-align: center; }

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: auto;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.4; cursor: default; }

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.btn-success {
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  cursor: pointer;
}

.btn-danger {
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  cursor: pointer;
  margin-bottom: 8px;
}

.btn-back {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  cursor: pointer;
  text-align: center;
  padding: 10px;
  width: 100%;
}

/* ========================================
   ONBOARDING
   ======================================== */
.ob-header {
  background: var(--orange-light);
  padding: 36px 20px 24px;
  text-align: center;
}
.logo { font-family: var(--font-display); font-size: 36px; color: var(--orange); }
.logo.small { font-size: 20px; }
.tagline { font-size: 14px; font-weight: 700; color: var(--orange-dark); margin-top: 4px; }

.ob-progress { height: 5px; background: var(--border-light); }
.ob-progress-fill { height: 5px; background: var(--orange); border-radius: 0 3px 3px 0; transition: width 0.3s; }

.ob-body { flex: 1; padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.ob-body.center { justify-content: center; align-items: center; }

.step-label { font-size: 11px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.1em; }

.field-group { margin-bottom: 4px; }
.field-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; display: block; }

/* Pills */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.pill.active { border-color: var(--orange); background: var(--orange-light); color: var(--orange-dark); }

/* Color dots */
.color-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cdot {
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.15s;
}
.cdot.active { border-color: var(--orange); transform: scale(1.2); }

/* Sig select */
.sig-list { display: flex; flex-direction: column; gap: 8px; }
.sig-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 10px;
  padding: 10px 12px; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
}
.sig-item.active { border-color: var(--orange); background: var(--orange-light); }
.sig-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s; font-size: 12px; color: #fff;
}
.sig-item.active .sig-check { background: var(--orange); border-color: var(--orange); }
.sig-item:not(.active) .sig-check span { display: none; }
.sig-name { font-size: 14px; font-weight: 700; flex: 1; }
.sig-time { font-size: 12px; color: var(--text-tertiary); }
.sig-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.badge-ok { background: var(--green-light); color: var(--green-dark); }
.badge-extra { background: var(--orange-light); color: var(--orange-dark); }
.badge-skip { background: var(--bg); color: var(--text-tertiary); }

/* Order list (drag) */
.drag-hint { font-size: 12px; color: var(--text-tertiary); text-align: center; margin-bottom: 10px; }
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 10px;
  padding: 10px 12px; cursor: grab; user-select: none;
  border: 2px solid transparent; transition: all 0.15s;
}
.order-item.dragging { opacity: 0.4; border-color: var(--orange); }
.order-item.drag-over { border-color: var(--orange); background: var(--orange-light); }
.order-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; color: #fff; flex-shrink: 0;
}
.order-name { font-size: 14px; font-weight: 700; flex: 1; }
.order-week { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

/* Code box */
.code-box { background: var(--bg); border-radius: 12px; padding: 20px; text-align: center; margin-bottom: 12px; }
.code-num { font-family: var(--font-display); font-size: 36px; color: var(--orange); letter-spacing: 0.15em; }
.code-label { font-size: 12px; color: var(--text-secondary); font-weight: 700; margin-top: 4px; }

.locked-box { background: var(--bg); border-radius: 12px; padding: 20px; text-align: center; border: 2px dashed var(--border); margin-bottom: 12px; }
.locked-icon { font-size: 28px; margin-bottom: 8px; }
.locked-title { font-family: var(--font-display); font-size: 16px; color: var(--text-secondary); }
.locked-sub { font-size: 12px; color: var(--text-tertiary); }

.warning-box { background: var(--yellow-light); border-radius: 12px; padding: 16px; border: 2px solid var(--yellow); margin-bottom: 16px; text-align: left; }
.warning-title { font-family: var(--font-display); font-size: 18px; color: var(--yellow-dark); margin-bottom: 4px; }
.warning-sub { font-size: 13px; color: var(--yellow-dark); line-height: 1.5; }

/* Avatar preview */
.avatar-preview { display: flex; justify-content: center; margin: 8px 0; }
.avatar-placeholder-icon { font-size: 48px; display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; }
.avatar-placeholder-large { font-size: 64px; display: flex; align-items: center; justify-content: center; }

/* Finish screen */
.ob-finish-top { background: var(--orange-light); padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bubble-container { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
.bubble-name { font-size: 12px; font-weight: 700; color: var(--orange-dark); padding-left: 4px; }
.bubble { background: var(--orange); border-radius: 12px 12px 12px 4px; padding: 12px 16px; font-family: var(--font-display); font-size: 15px; color: #fff; line-height: 1.4; }
.bubble-row { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }

.summary-box { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.summary-label { font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.summary-row { font-size: 13px; font-weight: 700; line-height: 1.9; }

/* ========================================
   DASHBOARD
   ======================================== */
.dash-header {
  background: var(--orange-light);
  padding: 16px 18px 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.dash-greeting { font-size: 12px; color: var(--orange-dark); font-weight: 700; margin-top: 2px; }
.dash-bell { font-size: 20px; cursor: pointer; }

.streak-block { background: var(--green-light); padding: 20px; text-align: center; border-bottom: 0.5px solid var(--border-light); }
.streak-number { font-family: var(--font-display); font-size: 56px; color: #085041; line-height: 1; }
.streak-label { font-size: 13px; color: #0F6E56; font-weight: 700; margin-top: 4px; }
.streak-sub { font-size: 11px; color: var(--green); margin-top: 2px; }

.section { padding: 14px 16px; border-bottom: 0.5px solid var(--border-light); }
.section-title { font-family: var(--font-display); font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.stat-val { font-family: var(--font-display); font-size: 20px; color: var(--text); }
.stat-lbl { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.fase-bar { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.fase-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.fase-name { font-size: 13px; font-weight: 700; }
.fase-badge { font-size: 11px; background: var(--green-light); color: var(--green-dark); padding: 2px 8px; border-radius: 20px; }
.fase-progress { height: 4px; background: var(--border); border-radius: 2px; }
.fase-fill { height: 4px; background: var(--green); border-radius: 2px; transition: width 0.3s; }

.maatje-card { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.avatar-sm {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--purple-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; color: var(--purple-dark); flex-shrink: 0;
}
.profile-avatar { width: 50px; height: 50px; font-size: 18px; border: 2.5px solid var(--text); }
.maatje-info { flex: 1; }
.maatje-streak { font-family: var(--font-display); font-size: 18px; }
.maatje-sub { font-size: 12px; color: var(--text-secondary); }
.ping-btn {
  background: var(--orange); color: #fff; border: none;
  border-radius: 20px; padding: 7px 14px;
  font-family: var(--font-display); font-size: 13px; cursor: pointer; white-space: nowrap;
}

.last-ping { background: var(--orange-light); border-radius: 10px; padding: 8px 12px; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.last-ping-text { font-size: 12px; color: var(--orange-dark); font-weight: 700; flex: 1; }
.last-ping-reaction { font-size: 20px; }

/* Weekly banner */
.week-banner { background: var(--purple-light); border-radius: 14px; border: 2px solid var(--purple); overflow: hidden; cursor: pointer; }
.week-banner-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.week-banner-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--purple); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.week-banner-title { font-family: var(--font-display); font-size: 15px; color: var(--purple-dark); flex: 1; }
.week-banner-arrow { font-size: 16px; color: var(--purple-dark); transition: transform 0.2s; }
.week-banner-arrow.open { transform: rotate(180deg); }
.week-content { display: none; padding: 0 14px 14px; }
.week-content.open { display: block; }

/* ========================================
   CRAVING
   ======================================== */
.craving-center { flex: 1; padding: 24px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.craving-btn {
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--orange-light); border: 3px solid var(--orange);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.15s;
}
.craving-btn:active { transform: scale(0.95); }
.craving-icon { font-size: 32px; }
.craving-label { font-family: var(--font-display); font-size: 16px; color: var(--orange-dark); }
.craving-sub { font-size: 11px; color: var(--orange-dark); }

.countdown-box { background: var(--bg); border-radius: 12px; padding: 16px; width: 100%; }
.countdown-num { font-family: var(--font-display); font-size: 48px; color: var(--text); text-align: center; }
.countdown-lbl { font-size: 13px; color: var(--text-secondary); text-align: center; margin-top: 4px; }

.craving-done { text-align: center; }
.craving-done-icon { font-size: 48px; color: var(--green); margin-bottom: 8px; }

/* ========================================
   TOP BAR
   ======================================== */
.topbar {
  background: var(--orange-light); padding: 16px 18px 12px;
  display: flex; align-items: center; gap: 12px; position: relative;
}
.topbar-title { font-family: var(--font-display); font-size: 20px; color: var(--orange); }
.back-arrow { background: none; border: none; font-size: 20px; color: var(--orange-dark); cursor: pointer; }

/* ========================================
   CHECK-IN
   ======================================== */
.checkin-body { flex: 1; overflow-y: auto; }
.checkin-extra-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; border: 2px solid transparent; margin-top: 10px; transition: all 0.15s;
}
.checkin-extra-row.active { border-color: var(--orange); background: var(--orange-light); }
.checkin-extra-row.active .sig-check { background: var(--orange); border-color: var(--orange); }
.checkin-extra-row.active .sig-check span::after { content: '✓'; color: #fff; }

.extra-box { background: var(--orange-light); border-radius: 10px; padding: 12px 14px; border: 2px solid var(--orange); margin-top: 8px; display: none; }
.extra-box.visible { display: block; }
.extra-title { font-family: var(--font-display); font-size: 14px; color: var(--orange-dark); }
.extra-sub { font-size: 12px; color: var(--orange-dark); line-height: 1.5; margin: 4px 0 8px; }

.faces-row { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; }
.face-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; background: var(--bg); transition: all 0.15s;
}
.face-btn span { font-size: 24px; }
.face-btn small { font-size: 10px; font-weight: 700; color: var(--text-tertiary); }
.face-btn.active { border-color: var(--orange); background: var(--orange-light); }
.face-btn.active small { color: var(--orange-dark); }

.checkin-done-top { background: var(--green-light); padding: 28px 20px; text-align: center; }
.checkin-done-icon { font-size: 48px; color: var(--green); margin-bottom: 8px; }
.checkin-done-top h1 { color: var(--green-dark); }
.checkin-done-top p { color: var(--green); font-weight: 700; }

/* ========================================
   SCHEMA
   ======================================== */
.schema-body { flex: 1; padding: 16px; overflow-y: auto; }
.schema-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 0.5px solid var(--border-light); }
.schema-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.schema-done { background: var(--green-light); color: var(--green-dark); }
.schema-active { background: var(--yellow-light); color: var(--yellow-dark); }
.schema-todo { background: var(--bg); color: var(--text-tertiary); }
.schema-name { font-size: 14px; font-weight: 700; flex: 1; }
.schema-status { font-size: 11px; font-weight: 700; }

/* ========================================
   GOALS / TABS
   ======================================== */
.tabs { display: flex; border-bottom: 2px solid var(--border-light); background: var(--orange-light); }
.tab {
  flex: 1; padding: 12px; text-align: center;
  font-size: 14px; font-weight: 700; color: var(--text-tertiary);
  cursor: pointer; border: none; background: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.15s;
}
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.tab-content { display: none; padding: 14px 16px; flex: 1; overflow-y: auto; }
.tab-content.active { display: block; }

.milestone { background: var(--bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; border: 2px solid transparent; }
.milestone.done { border-color: var(--green); background: var(--green-light); }
.milestone.current { border-color: var(--orange); background: var(--orange-light); }
.milestone-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.milestone-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.milestone-name { font-size: 14px; font-weight: 700; flex: 1; }
.milestone-status { font-size: 11px; font-weight: 700; }
.milestone-progress { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 6px; }
.reward-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }

.challenge { background: var(--bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; border: 2px solid transparent; }
.challenge.ongoing { border-color: var(--purple); background: var(--purple-light); }
.challenge.done { border-color: var(--green); background: var(--green-light); }
.challenge-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.challenge-name { font-family: var(--font-display); font-size: 15px; }
.challenge-date { font-size: 11px; color: var(--text-tertiary); }
.challenge-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; display: inline-block; margin-bottom: 4px; }

.add-btn {
  width: 100%; padding: 12px; background: transparent;
  border: 2px dashed var(--border); border-radius: 12px;
  font-size: 14px; font-weight: 700; color: var(--text-secondary); cursor: pointer;
  text-align: center; transition: all 0.15s;
}
.add-btn:hover { border-color: var(--orange); color: var(--orange); }

/* ========================================
   PROFILE
   ======================================== */
.profile-header { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 0.5px solid var(--border-light); }
.profile-name { font-family: var(--font-display); font-size: 20px; }
.profile-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.settings-group { padding: 12px 18px 4px; }
.group-label { font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 0.5px solid var(--border-light); cursor: pointer; }
.setting-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.icon-orange { background: var(--orange-light); }
.icon-green { background: var(--green-light); }
.icon-purple { background: var(--purple-light); }
.icon-red { background: var(--red-light); }
.setting-name { font-size: 14px; font-weight: 700; flex: 1; }
.setting-value { font-size: 12px; color: var(--text-tertiary); }
.setting-arrow { color: var(--text-tertiary); font-size: 18px; }

.reset-row {
  margin: 12px 18px 16px; background: var(--red-light); border-radius: 10px;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; border: 1.5px solid #F09595;
}
.reset-text { font-size: 14px; font-weight: 700; color: var(--red-dark); }
.reset-sub { font-size: 11px; color: var(--red-dark); opacity: 0.8; margin-top: 2px; }

/* ========================================
   SHEETS / OVERLAYS
   ======================================== */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100; animation: fadeIn 0.2s;
}
.sheet {
  background: var(--bg-card); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 420px; padding: 0 0 24px;
  animation: slideUp 0.25s ease-out;
}
.sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 12px auto 16px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 12px; border-bottom: 0.5px solid var(--border-light); }
.sheet-header h2 { font-family: var(--font-display); font-size: 18px; }
.sheet-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.close-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: none; cursor: pointer; font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }

/* Ping options */
.ping-options { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.option-item {
  padding: 12px 14px; border-radius: 10px; background: var(--bg);
  font-size: 15px; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s; text-align: left;
}
.option-item.active { border-color: var(--orange); background: var(--orange-light); color: var(--orange-dark); }
.custom-option { display: flex; align-items: center; gap: 8px; cursor: default; }
.custom-option input { border: none; background: transparent; font-size: 15px; font-weight: 700; flex: 1; padding: 0; }
.custom-option input:focus { outline: none; }
.char-count { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

.ping-sent { text-align: center; padding: 24px 18px; }
.ping-sent-icon { font-size: 48px; color: var(--green); margin-bottom: 8px; }
.ping-sent h2 { color: var(--green-dark); }

#ping-send-btn { margin: 4px 16px 0; width: calc(100% - 32px); }

/* Incoming ping */
.incoming-msg { margin: 16px 16px 14px; background: var(--orange-light); border-radius: 12px; padding: 14px 16px; }
.incoming-label { font-size: 11px; font-weight: 700; color: var(--orange-dark); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.incoming-text { font-family: var(--font-display); font-size: 20px; color: var(--orange); }
.emoji-label { font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; padding: 0 16px; margin-bottom: 8px; }
.emoji-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 16px; margin-bottom: 12px; }
.emoji-btn { background: var(--bg); border: 2px solid transparent; border-radius: 10px; padding: 10px 4px; text-align: center; font-size: 24px; cursor: pointer; transition: all 0.15s; }
.emoji-btn:hover, .emoji-btn.active { border-color: var(--purple); background: var(--purple-light); }
#incoming-ping .btn-secondary { margin: 0 16px; width: calc(100% - 32px); }

/* Popups */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px; animation: fadeIn 0.2s;
}
.popup-card {
  background: var(--bg-card); border-radius: 20px; padding: 24px 20px;
  text-align: center; width: 100%; max-width: 340px; animation: scaleIn 0.25s ease-out;
}
.popup-emoji { font-size: 48px; margin-bottom: 8px; }
.popup-title { font-family: var(--font-display); font-size: 22px; color: var(--orange); margin-bottom: 8px; }
.popup-title.danger { color: var(--red-dark); }
.popup-milestone { font-family: var(--font-display); font-size: 16px; background: var(--bg); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.popup-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.popup-card .bubble { margin-bottom: 16px; }
.popup-card .btn-success, .popup-card .btn-danger { margin-bottom: 8px; }

/* ========================================
   BOTTOM NAV
   ======================================== */
.bottom-nav {
  display: flex; justify-content: space-around;
  padding: 10px 0 8px; border-top: 0.5px solid var(--border-light);
  background: var(--bg-card); margin-top: auto;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 700; color: var(--text-tertiary);
  cursor: pointer; padding: 4px 8px; border: none; background: none;
}
.nav-item.active { color: var(--orange); }
.nav-icon { font-size: 20px; }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 480px) {
  .screen, .sheet { max-width: 420px; margin: 0 auto; }
  body { display: flex; justify-content: center; }
  #app { width: 100%; max-width: 420px; }
}
