:root {
  --bg: #0b1220;
  --bg-2: #0f172a;
  --panel: #1a2332;
  --panel-strong: #1e293b;
  --border: rgba(148, 163, 184, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --green: #10b981;
  --blue: #3b82f6;
  --orange: #f97316;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --danger: #ef4444;
  --shadow: none;
  --radius: 18px;
  --nav-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Outfit", system-ui, -apple-system, sans-serif;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  margin: 0;
  background: #0b1220;
  color: var(--text);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
html::-webkit-scrollbar { display: none; width: 0; height: 0; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: #0b1220;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Uygulama içi kaydırma çubuklarını gizle */
.page,
.notif-list,
.habit-dock,
.reminder-stack,
.admin-list,
.collapse-body,
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

a { color: var(--green); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.app-bg {
  display: none;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.page {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: calc(12px + var(--safe-t)) 16px 0;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

.page.has-nav {
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  line-height: 1;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(30, 41, 59, .7);
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 8px 24px rgba(2, 8, 23, .28);
}
.brand-mark svg { display: block; }
.brand-word {
  display: flex;
  align-items: center;
  height: 44px;
  min-width: 0;
}
.brand-name {
  font-size: clamp(1.55rem, 5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 44px;
  background: linear-gradient(105deg, #6ee7b7 0%, #60a5fa 48%, #fdba74 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-title {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--avatar, var(--green)) 25%, transparent);
  border: 1px solid color-mix(in srgb, var(--avatar, var(--green)) 55%, transparent);
  color: var(--text);
  font-weight: 700;
  flex-shrink: 0;
}
.notif-bell {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #f1f5f9;
  transition: transform .15s ease, border-color .2s ease, background .2s ease, color .2s ease;
  overflow: visible;
}
.notif-bell:active { transform: scale(.96); }
.notif-bell.has-unread {
  border-color: rgba(249, 115, 22, .5);
  background: rgba(249, 115, 22, .14);
  color: #fdba74;
}
.notif-bell-svg {
  display: block;
  width: 26px;
  height: 26px;
}
.notif-balloon {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 2px solid #0b1220;
  box-shadow: 0 4px 12px rgba(249, 115, 22, .4);
}
.notif-balloon.show {
  display: inline-flex;
}
.notif-balloon[hidden] {
  display: none !important;
}

.notif-panel-hero { padding-bottom: 14px; }
.notif-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.notif-empty {
  text-align: center;
  padding: 28px 12px;
}
.notif-empty-ico { font-size: 2rem; display: block; margin-bottom: 8px; }
.notif-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}
.notif-item.unread .notif-dot {
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .18);
}

.notify-inbox-head,
.notify-inbox .notify-inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.notify-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.notify-push-lead { margin: 6px 0 14px; }
.notify-actions { display: grid; gap: 10px; margin: 0 0 12px; padding-top: 8px; }
.notify-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ios-hint {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .45);
  border: 1px solid var(--border);
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.45;
}
.ios-hint p { margin: 0 0 8px; }
.ios-hint p:last-child { margin-bottom: 0; }
.ios-hint strong { color: var(--text); }
.ios-hint .tight { margin-bottom: 10px; }
#pushCollapse .collapse-body { padding-bottom: 16px; }
#pushCollapse .notify-actions { padding: 14px 16px 0; }
#pushCollapse .ios-hint { margin: 0 16px 4px; }

.habit-ico,
.type-ico,
.habit-dock-ico,
.profile-avatar-ico,
.avatar-pick,
.reminder-ico,
.notif-empty-ico,
.modal-ico {
  font-family: var(--emoji);
  line-height: 1;
}

.schedule-form { margin-top: 4px; }
.reminder-stack { display: grid; gap: 10px; margin: 0 0 14px; min-width: 0; }
.reminder-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .5);
  border: 1px solid var(--border);
  overflow: hidden;
  min-width: 0;
  transition: none;
}
.reminder-card.is-on {
  border-color: rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .07);
}
.reminder-card-top { margin-bottom: 10px; min-width: 0; }
.reminder-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 0;
  min-width: 0;
}
.reminder-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.reminder-switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(100, 116, 139, .45);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: none;
}
.reminder-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: none;
}
.reminder-toggle input:checked + .reminder-switch {
  background: rgba(16, 185, 129, .55);
  border-color: rgba(16, 185, 129, .45);
}
.reminder-toggle input:checked + .reminder-switch::after {
  transform: translateX(18px);
  background: #fff;
}
.reminder-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .95rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reminder-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.reminder-field {
  display: grid;
  gap: 5px;
  margin: 0;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
}
.reminder-field input[type="time"],
.reminder-field select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .85);
  border-radius: 12px;
  padding: 10px 8px;
  color: var(--text);
  font-size: 16px; /* iOS zoom engeli */
  font-weight: 600;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}
.reminder-field input[type="time"] {
  padding-inline: 8px;
}
.reminder-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%94a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
#scheduleCollapse .collapse-body {
  overflow: hidden;
  padding: 0 14px 16px;
  min-width: 0;
}

/* legacy reminder rows (kept minimal) */
.reminder-list { display: grid; gap: 10px; margin: 12px 0; }
.reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .4);
  border: 1px solid var(--border);
}
.reminder-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .9rem;
}
.reminder-ico { font-size: 1.1rem; }
.reminder-row input[type="time"] {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .65);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
}

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  color: inherit;
  text-decoration: none;
}
.shortcut-ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(249, 115, 22, .14);
  font-size: 1.2rem;
}
.shortcut-card strong { display: block; }
.shortcut-card small { display: block; margin-top: 2px; }
.shortcut-card .chev {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.4rem;
}
.accent-chip {
  margin-left: auto;
  background: rgba(249, 115, 22, .18);
  color: #fdba74;
}

.notif-list { display: grid; gap: 8px; }
.notif-row { border-radius: 14px; }
.notif-delete-btn {
  border: 0;
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
}
.notif-delete-btn svg { display: block; }
.notif-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .98);
  border: 1px solid var(--border);
}
.notif-item.unread {
  border-color: rgba(249, 115, 22, .4);
  background: rgba(30, 20, 12, .95);
}
.notif-item strong { display: block; margin-bottom: 4px; }
.notif-item p { margin: 0 0 6px; color: var(--muted); font-size: .88rem; }
.collapse-label {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
}
.collapse-title .card-kicker {
  display: block;
  margin-bottom: 2px;
}

.summary-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-pill.tone-money { border-color: rgba(16,185,129,.28); }
.stat-pill.tone-time { border-color: rgba(59,130,246,.28); }
.stat-pill.tone-fire { border-color: rgba(249,115,22,.28); }

.feature-card {
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.25), transparent 70%);
  pointer-events: none;
}
.card-kicker {
  margin: 0 0 2px;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
}

.glass-rack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}
.glass-cup {
  width: 34px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.cup-body {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(125, 211, 252, .45);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  position: relative;
  overflow: hidden;
  background: rgba(8, 47, 73, .35);
  transition: transform .15s ease, border-color .2s ease;
}
.glass-cup:active .cup-body { transform: scale(.92); }
.cup-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: linear-gradient(180deg, #67e8f9, #0891b2);
  transition: height .35s ease;
}
.glass-cup.filled .cup-body { border-color: #22d3ee; }
.glass-cup.filled .cup-fill { height: 78%; }

.chip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip-actions.inline { margin-top: 0; flex: 1; }
.chip-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .55);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
  position: relative;
  overflow: hidden;
}
.chip-btn:hover, .chip-btn:active {
  border-color: color-mix(in srgb, var(--accent, var(--green)) 55%, transparent);
  background: color-mix(in srgb, var(--accent, var(--green)) 16%, transparent);
  transform: translateY(-1px);
}

.habit-card.variant-water { background: linear-gradient(160deg, rgba(6,182,212,.12), rgba(30,41,59,.62)); }
.habit-card.variant-walk { background: linear-gradient(160deg, rgba(132,204,22,.12), rgba(30,41,59,.62)); }
.habit-card.variant-book { background: linear-gradient(160deg, rgba(167,139,250,.12), rgba(30,41,59,.62)); }
.habit-card.variant-smoking { background: linear-gradient(160deg, rgba(249,115,22,.12), rgba(30,41,59,.62)); }
.habit-card.variant-rest,
.habit-card.variant-meditation { background: linear-gradient(160deg, rgba(139,92,246,.14), rgba(30,41,59,.62)); }
.habit-card.variant-exercise { background: linear-gradient(160deg, rgba(244,63,94,.12), rgba(30,41,59,.62)); }
.habit-card.variant-work { background: linear-gradient(160deg, rgba(56,189,248,.14), rgba(30,41,59,.62)); }
.habit-card.variant-language { background: linear-gradient(160deg, rgba(20,184,166,.12), rgba(30,41,59,.62)); }
.habit-card.variant-social { background: linear-gradient(160deg, rgba(59,130,246,.12), rgba(30,41,59,.62)); }
.habit-card.variant-sugar { background: linear-gradient(160deg, rgba(236,72,153,.12), rgba(30,41,59,.62)); }
.habit-card.variant-caffeine { background: linear-gradient(160deg, rgba(180,83,9,.14), rgba(30,41,59,.62)); }

.collapse-card { padding: 0; overflow: hidden; }
.collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}
.collapse-title { display: inline-flex; align-items: center; gap: 10px; }
.collapse-ico {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(16,185,129,.16);
  color: #6ee7b7;
  font-size: 1.1rem;
  transition: transform .2s ease;
}
.collapse-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.collapse-card.is-open .collapse-chevron { transform: rotate(-135deg); }
.collapse-card.is-open .collapse-ico { transform: rotate(45deg); }
.collapse-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
  animation: rise .3s ease both;
}
.collapse-body[hidden] { display: none !important; }

.chip-slip {
  border-color: rgba(248, 113, 113, .35) !important;
  color: #fecaca;
  background: rgba(239, 68, 68, .1) !important;
}
.slip-note {
  margin: 14px 0 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(239, 68, 68, .08);
  border: 1px dashed rgba(248, 113, 113, .35);
  color: #fecaca;
  font-size: .82rem;
  font-weight: 600;
}
.slip-safe {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .16);
  color: #6ee7b7;
  font-size: .72rem;
}

.progress-bar.glow i {
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent, var(--green)) 55%, transparent);
}

.pulse-ring {
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--avatar, var(--green)) 40%, transparent);
  animation: avatarPulse 2.4s ease-out infinite;
}
@keyframes avatarPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--avatar, var(--green)) 35%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.type-grid-rich {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.type-option {
  --accent: var(--green);
}
.type-option.selected,
.type-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 18%, transparent);
}
.form-hero {
  background:
    radial-gradient(500px 180px at 0% 0%, rgba(16,185,129,.12), transparent 60%),
    var(--panel);
}
.water-visual.soft { margin-top: 4px; }

@media (max-width: 420px) {
  .summary-rail { grid-template-columns: 1fr 1fr; }
  .type-grid-rich { grid-template-columns: repeat(3, 1fr); }
  .reminder-fields { grid-template-columns: 1fr; }
  .notify-actions-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .reminder-fields {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }
  .reminder-field input[type="time"],
  .reminder-field select {
    padding: 9px 6px;
    font-size: 15px;
  }
  .reminder-field select { padding-right: 24px; }
}

.stat-pill {
  padding: 14px 16px;
  animation: rise .5s ease both;
}
.stat-pill:nth-child(2) { animation-delay: .05s; }
.stat-pill:nth-child(3) { animation-delay: .1s; }
.stat-pill:nth-child(4) { animation-delay: .15s; }

.stat-label {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 6px;
}
.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stat-value.money { color: var(--green); }
.stat-value.accent { color: var(--orange); }

.section { margin-top: 8px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
}
.section-head h2, .card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.link-btn {
  color: var(--blue);
  font-weight: 600;
  font-size: .95rem;
}

.card {
  padding: 18px;
  margin-bottom: 14px;
  animation: rise .55s ease both;
}

.habit-list { display: grid; gap: 12px; }
.habit-card {
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.habit-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent, var(--green));
}
.habit-card:active { transform: scale(.985); }
.habit-card.mini { padding: 12px 14px; }

.habit-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.habit-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent, var(--green)) 18%, transparent);
  font-size: 1.25rem;
}
.habit-meta { flex: 1; min-width: 0; }
.habit-meta h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, .14);
  border: 1px solid rgba(249, 115, 22, .28);
  color: #fdba74;
  font-family: var(--mono);
  font-size: .9rem;
}
.flame { animation: flicker 1.4s ease-in-out infinite; }
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.12) rotate(2deg); }
}

.live-clock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.clock-block {
  text-align: center;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid var(--border);
}
.clock-block b {
  display: block;
  font-size: 1.35rem;
  font-family: var(--mono);
  font-weight: 700;
}
.clock-block small { color: var(--muted); font-size: .72rem; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.metric-row div {
  background: rgba(15, 23, 42, .4);
  border-radius: 14px;
  padding: 10px;
}
.metric-row span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  margin-bottom: 4px;
}
.metric-row strong {
  font-size: .98rem;
  font-weight: 700;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .15);
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-bar.tall { height: 12px; }
.progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent, var(--green)), var(--blue));
  transition: width .5s ease;
}

.habit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.custom-add {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .55);
  overflow: hidden;
  min-width: 0;
  position: relative;
}
.custom-add.is-collapsed {
  border-color: rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .14);
}
.custom-add-open {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #6ee7b7;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.custom-add.is-open .custom-add-open { display: none; }
.custom-add-panel {
  display: none;
  align-items: center;
  flex: 1;
  min-width: 0;
  width: 100%;
}
.custom-add.is-open {
  flex: 1 1 220px;
  max-width: 100%;
}
.custom-add.is-open .custom-add-panel {
  display: inline-flex;
}
.custom-add-input {
  flex: 1;
  min-width: 0;
  width: 72px;
  border: 0;
  background: transparent;
  padding: 10px 10px;
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
  outline: none;
}
.custom-add-input::placeholder { color: var(--muted); font-weight: 500; }
.custom-add-unit {
  padding: 0 6px 0 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.custom-add-confirm {
  border: 0;
  border-left: 1px solid var(--border);
  background: rgba(16, 185, 129, .22);
  color: #6ee7b7;
  font-size: .82rem;
  font-weight: 800;
  padding: 0 12px;
  height: 42px;
  cursor: pointer;
  white-space: nowrap;
}
.custom-add-cancel {
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  width: 36px;
  height: 42px;
  cursor: pointer;
  font-size: .9rem;
}
.custom-add-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-left: 1px solid var(--border);
  background: rgba(16, 185, 129, .18);
  color: #6ee7b7;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.custom-add-btn:active { background: rgba(16, 185, 129, .3); }

.chip-actions .custom-add {
  flex: 0 0 auto;
}
.chip-actions .custom-add.is-open {
  flex: 1 1 100%;
}

.glass-cup,
.chip-btn[data-water-add] {
  position: relative;
  z-index: 2;
}
.feature-card::after {
  pointer-events: none;
}

.done-tag {
  color: var(--green);
  font-weight: 600;
  font-size: .9rem;
}

.muted { color: var(--muted); }
.muted.tight { margin: 0 0 8px; font-size: .9rem; }

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(.97); }
.btn-block { width: 100%; display: block; text-align: center; }
.btn-sm { padding: 8px 12px; font-size: .88rem; border-radius: 12px; }
.btn-primary {
  background: linear-gradient(135deg, var(--green), #059669);
  color: #04140e;
  box-shadow: 0 10px 28px rgba(16, 185, 129, .28);
}
.btn-ghost {
  background: rgba(148, 163, 184, .1);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-danger {
  background: rgba(239, 68, 68, .14);
  border: 1px solid rgba(239, 68, 68, .35);
  color: #fca5a5;
  margin-top: 12px;
}

.ripple::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(255,255,255,.28), transparent 45%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.ripple.is-rippling::after { opacity: 1; transition: opacity 0s; }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.water-card .water-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.water-card h2 { margin: 0 0 4px; font-size: 1.15rem; }

.water-wave {
  --pct: 0%;
  height: 120px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: rgba(6, 182, 212, .08);
  border: 1px solid rgba(6, 182, 212, .2);
}
.wave-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--pct);
  background: linear-gradient(180deg, rgba(6,182,212,.75), rgba(14,116,144,.95));
  transition: height .6s cubic-bezier(.2,.8,.2,1);
}
.wave-fill::before,
.wave-fill::after {
  content: "";
  position: absolute;
  left: -20%;
  width: 140%;
  height: 18px;
  top: -8px;
  border-radius: 40%;
  background: rgba(165, 243, 252, .35);
  animation: wave 3.2s linear infinite;
}
.wave-fill::after {
  top: -4px;
  opacity: .5;
  animation-duration: 4.5s;
  animation-direction: reverse;
}
@keyframes wave {
  from { transform: translateX(0) rotate(0deg); }
  to { transform: translateX(-18%) rotate(2deg); }
}
.wave-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.4rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  z-index: 1;
}

.empty {
  text-align: center;
  padding: 48px 20px 40px;
  margin-top: 12px;
}
.empty-ico { font-size: 2.4rem; margin-bottom: 10px; font-family: var(--emoji); }
.empty h3 { margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0 0 22px; }
.empty-cta { margin-top: 4px; }

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b));
}
.auth-card {
  width: min(420px, 100%);
  padding: 28px 22px;
  animation: rise .55s ease both;
}
.auth-card .brand-mark { text-align: center; margin-bottom: 22px; width: auto; height: auto; border: 0; background: transparent; box-shadow: none; border-radius: 0; display: block; }
.brand-title {
  margin: 12px 0 4px;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #fff, #86efac 45%, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub { margin: 0; color: var(--muted); }

.logo-ring {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 24px;
  display: grid;
  place-items: center;
  gap: 0;
  background: linear-gradient(145deg, rgba(16,185,129,.25), rgba(59,130,246,.2));
  border: 1px solid rgba(16,185,129,.35);
  position: relative;
}
.logo-link {
  position: absolute;
  width: 22px;
  height: 14px;
  border: 3px solid #34d399;
  border-radius: 999px;
  transform-origin: center;
}
.logo-link:nth-child(1) { transform: translate(-10px, 0) rotate(-25deg); }
.logo-link:nth-child(2) { transform: translate(0, 0) rotate(15deg); border-color: #60a5fa; }
.logo-link:nth-child(3) { transform: translate(10px, 0) rotate(-10deg); border-color: #fb923c; animation: chainPulse 2.4s ease-in-out infinite; }
@keyframes chainPulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 8px rgba(249,115,22,.7)); }
}

.auth-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.field input, .field select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .65);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus {
  border-color: rgba(16, 185, 129, .55);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}
.auth-switch {
  text-align: center;
  color: var(--muted);
  margin: 18px 0 0;
  font-size: .92rem;
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: .92rem;
  font-weight: 600;
}
.alert-error {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .35);
  color: #fecaca;
}
.alert-ok {
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .35);
  color: #a7f3d0;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  margin-top: 8px;
}
.type-grid-rich {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.type-grid-8 {
  grid-template-columns: repeat(4, 1fr);
}
.type-panel {
  margin: 4px 0 14px;
  min-height: 72px;
}
.type-fields[hidden] {
  display: none !important;
}
.motivate {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .18);
  color: #a7f3d0;
  font-size: .86rem;
  line-height: 1.45;
}
.habit-card .habit-actions {
  margin-top: 14px;
}
.streak-badge.compact {
  padding: 5px 8px;
  font-size: .82rem;
}
.chain-stats { margin-bottom: 14px; }
.chain-stat-list { display: grid; gap: 12px; }
.chain-stat-card {
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.chain-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent, var(--green));
}
.chain-stat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.chain-stat-meta { flex: 1; min-width: 0; }
.chain-stat-meta h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chain-day-counter {
  text-align: right;
  flex-shrink: 0;
  line-height: 1.15;
}
.chain-day-counter strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent, var(--green));
}
.chain-day-counter small {
  display: block;
  font-size: .68rem;
  color: var(--muted);
  max-width: 72px;
}
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ledger-cell {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .5);
  border: 1px solid var(--border);
  min-width: 0;
}
.ledger-cell span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.25;
}
.ledger-cell strong {
  display: block;
  font-size: .98rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.ledger-cell.tone-plus {
  border-color: rgba(16, 185, 129, .28);
}
.ledger-cell.tone-plus strong { color: #6ee7b7; }
.ledger-cell.tone-minus {
  border-color: rgba(248, 113, 113, .3);
  background: rgba(239, 68, 68, .07);
}
.ledger-cell.tone-minus strong { color: #fca5a5; }
.ledger-cell.is-hero {
  grid-column: 1 / -1;
  background: color-mix(in srgb, var(--accent, #10b981) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #10b981) 35%, transparent);
}
.ledger-cell.is-hero strong {
  font-size: 1.35rem;
  color: var(--accent, #6ee7b7);
}
.mini-health { display: grid; gap: 8px; margin-bottom: 10px; }
.mini-health-row span {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.type-option {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid var(--border);
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: .2s ease;
}
.type-option.selected,
.type-option:has(input:checked) {
  color: var(--text);
  border-color: rgba(16, 185, 129, .55);
  background: rgba(16, 185, 129, .14);
  transform: translateY(-2px);
}
.type-ico { font-size: 1.2rem; }
.type-fields { display: grid; gap: 12px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  transform: none;
  width: min(560px, 100%);
  height: calc(var(--nav-h) + var(--safe-b));
  box-sizing: border-box;
  padding: 4px 6px var(--safe-b);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  align-content: center;
  background: #0b1220;
  border-top: 1px solid var(--border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 50;
}
.nav-item {
  display: grid;
  place-items: center;
  gap: 1px;
  color: var(--muted);
  border-radius: 12px;
  padding: 4px 2px;
  transition: none;
}
.nav-item.active {
  color: var(--green);
  background: rgba(16, 185, 129, .12);
}
.nav-label { font-size: .68rem; font-weight: 700; }
.nav-ico-wrap {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}
.nav-ico-svg {
  display: block;
  width: 20px;
  height: 20px;
}

.health-list { display: grid; gap: 14px; }
.health-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: .92rem;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.highlight-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  animation: rise .5s ease both;
}
.highlight-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .5);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.highlight-card strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.highlight-card.tone-orange { border-color: rgba(249,115,22,.3); }
.highlight-card.tone-pink { border-color: rgba(236,72,153,.3); }
.highlight-card.tone-brown { border-color: rgba(180,83,9,.35); }
.highlight-card.tone-lime { border-color: rgba(132,204,22,.3); }
.highlight-card.tone-teal { border-color: rgba(20,184,166,.3); }
.highlight-card.tone-blue { border-color: rgba(59,130,246,.3); }
.highlight-card.tone-sky { border-color: rgba(56,189,248,.3); }
.highlight-card.tone-violet { border-color: rgba(167,139,250,.3); }
.highlight-card.tone-money { border-color: rgba(16,185,129,.3); }
.highlight-card .live-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  font-variant-numeric: tabular-nums;
}
.highlight-card .live-mini small {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 6px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 12px;
  width: 100%;
}
.cal-panel {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 12px;
}
.cal-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent, var(--green));
}
.cal-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cal-panel-head > div { min-width: 0; flex: 1; }
.cal-switch {
  flex-shrink: 0;
  max-width: 42%;
}
.cal-switch select {
  width: 100%;
  max-width: 160px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .65);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 8px 0 2px;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}
.cal-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.cal-legend .dot.done { background: #34d399; box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.cal-legend .dot.today { background: #60a5fa; }
.cal-legend .dot.miss { background: rgba(148,163,184,.35); }
.cal-head {
  text-align: center;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 0 0 6px;
  line-height: 1;
}
.cal-nav {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
}
.cal-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .5);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}
.cal-nav-btn:active {
  background: rgba(16, 185, 129, .16);
  border-color: rgba(16, 185, 129, .4);
}
.cal-nav-mid {
  text-align: center;
  min-width: 0;
}
.cal-nav-mid strong {
  display: block;
  font-size: 1.02rem;
}
.cal-nav-mid .muted {
  display: block;
  margin-top: 2px;
  font-size: .78rem;
}
.cal-streak-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent, #10b981) 14%, rgba(15,23,42,.55));
  border: 1px solid color-mix(in srgb, var(--accent, #10b981) 35%, transparent);
}
.cal-streak-ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: rgba(15, 23, 42, .45);
  flex-shrink: 0;
}
.cal-streak-bar strong {
  display: block;
  font-size: 1rem;
}
.cal-streak-bar small {
  display: block;
  margin-top: 2px;
  font-size: .78rem;
}

.cal-cell {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 0;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: rgba(15, 23, 42, .45);
  border: 1px solid rgba(148, 163, 184, .12);
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  padding: 2px;
  box-sizing: border-box;
}
.cal-cell.empty {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}
.cal-cell.done {
  background: color-mix(in srgb, var(--accent, #10b981) 22%, rgba(15,23,42,.55));
  border-color: color-mix(in srgb, var(--accent, #10b981) 55%, transparent);
  color: #ecfdf5;
}
.cal-cell.today {
  border-color: rgba(96, 165, 250, .9);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .16);
  color: #fff;
}
.cal-cell.future { opacity: .4; }
.cal-ico {
  font-size: .72rem;
  line-height: 1;
  display: block;
}
.cal-cell.done .cal-day {
  font-size: .62rem;
  opacity: .9;
}
.cal-day {
  position: relative;
  z-index: 1;
}
.cal-mark {
  display: none;
}
.cal-foot {
  margin: 12px 0 0;
  font-size: .82rem;
  text-align: center;
}

.dashboard-stack {
  display: grid;
  gap: 12px;
}
.dashboard-stack > .card {
  margin-bottom: 0;
}
.stack-card {
  position: relative;
  overflow: hidden;
}
.stack-card.is-focused {
  border-color: color-mix(in srgb, var(--accent, var(--green)) 55%, transparent);
  box-shadow: 0 12px 36px rgba(2, 8, 23, .35);
}

.habit-dock {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 12px;
  margin: 0 0 10px;
  background: #0b1220;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  scrollbar-width: none;
}
.habit-dock::-webkit-scrollbar { display: none; }
.habit-dock-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, .72);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: .15s ease;
}
.habit-dock-item.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent, var(--green)) 55%, transparent);
  background: color-mix(in srgb, var(--accent, var(--green)) 18%, rgba(30,41,59,.8));
}
.habit-dock-ico { font-size: 1rem; line-height: 1; }
.habit-dock-lbl { line-height: 1; }

.card-move {
  display: flex;
  gap: 6px;
  margin: -4px 0 12px;
}
.card-move-btn {
  flex: 1;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .45);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.card-move-btn:hover,
.card-move-btn:active {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, .4);
  background: rgba(16, 185, 129, .12);
}
.stack-card.is-lifting {
  animation: liftPulse .45s ease;
}
@keyframes liftPulse {
  0% { transform: translateY(6px); opacity: .75; }
  100% { transform: none; opacity: 1; }
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px 18px;
  border-radius: 24px;
  margin-bottom: 14px;
  /* iOS PWA: border-radius köşe kırpmasını zorla */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  transform: translateZ(0);
  isolation: isolate;
  background: var(--panel);
}
.profile-hero-card.glass {
  border-radius: 24px;
}
.profile-hero-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--green) 35%, transparent), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, .28), transparent 50%),
    radial-gradient(circle at 60% 90%, rgba(249, 115, 22, .2), transparent 45%);
  pointer-events: none;
  overflow: hidden;
}
.profile-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--avatar, var(--green)) 38%, transparent), rgba(15, 23, 42, .55));
  border: 1px solid color-mix(in srgb, var(--avatar, var(--green)) 55%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.profile-avatar-ico {
  font-size: 2.15rem;
  line-height: 1;
  font-family: var(--emoji);
}
.profile-avatar-ring {
  display: none;
}
.profile-hero-meta { min-width: 0; }
.profile-name {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.profile-handle {
  margin: 4px 0 10px;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .9rem;
  font-weight: 500;
}
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(148, 163, 184, .22);
  color: #e2e8f0;
}
.profile-badge.soft {
  color: #86efac;
  border-color: rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .12);
}
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.avatar-pick {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .2);
  background: rgba(15, 23, 42, .55);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.avatar-pick:active { transform: scale(.94); }
.avatar-pick.is-selected {
  border-color: color-mix(in srgb, var(--green) 70%, transparent);
  background: color-mix(in srgb, var(--green) 18%, rgba(15, 23, 42, .7));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 25%, transparent);
}
.profile-edit-form {
  padding: 4px 16px 18px;
}
.remember-row {
  margin: 4px 0 12px;
  user-select: none;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
}
.check-row input { width: 18px; height: 18px; accent-color: var(--green); }

.admin-page { padding-bottom: 40px; }
.admin-list { display: grid; gap: 12px; margin-top: 8px; }
.admin-user,
.admin-user-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
}
.admin-user-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  background: color-mix(in srgb, var(--avatar, var(--green)) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--avatar, var(--green)) 45%, transparent);
  flex-shrink: 0;
}
.admin-user-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.admin-user-meta strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-meta span,
.admin-user-meta small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-username {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .88rem;
}
.admin-edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}
.admin-edit-form .field { margin: 0; }
.admin-save-btn {
  height: 44px;
  padding-inline: 14px;
  white-space: nowrap;
}
.admin-pass-form {
  padding: 4px 16px 18px;
}
@media (max-width: 640px) {
  .admin-edit-form {
    grid-template-columns: 1fr;
  }
  .admin-save-btn { width: 100%; }
  .glass,
  .bottom-nav,
  .modal-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .page-header,
  .auth-card,
  .habit-card,
  .card {
    animation: none !important;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: .28s ease;
  max-width: min(90vw, 360px);
  text-align: center;
  font-weight: 600;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 23, .82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.modal-overlay[hidden] { display: none !important; }
.modal-card {
  width: min(100%, 360px);
  padding: 22px 20px 18px;
  text-align: center;
  animation: rise .28s ease both;
}
.modal-ico {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  background: rgba(249, 115, 22, .14);
  border: 1px solid rgba(249, 115, 22, .28);
}
.modal-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.modal-text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal-actions .btn { width: 100%; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .page { padding-top: 28px; }
  .type-grid { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Genel hız: animasyon/filtre yükünü kes */
.collapse-body,
.stat-pill,
.habit-card,
.auth-card,
.card,
.page-header,
.modal-card {
  animation: none !important;
}
.flame,
.water-wave,
.logo-link,
.profile-avatar-ring,
.pulse-ring {
  animation: none !important;
}
.habit-card,
.card,
.reminder-card,
.notif-item {
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: 120px;
}
.btn,
.nav-item,
.ripple {
  transition: none !important;
}
.ripple::after { display: none !important; }
