/* Manrope, inclus local: merge offline. */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0a0a11;
  --glass: rgba(255, 255, 255, 0.055);
  --glass2: rgba(255, 255, 255, 0.085);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke2: rgba(255, 255, 255, 0.16);
  --text: #f4f2f8;
  --muted: #9e9aae;
  --gold: #b18cff;       /* accent principal (mov) */
  --gold2: #dccbff;
  --violet: #9d6bff;
  --orange: #ff8a3d;
  --blue: #6aa8ff;
  --cyan: #3ddc97;
  --green: #3ddc97;
  --red: #ff7a45;
  --hot: linear-gradient(140deg, #ffb15c 0%, #ff7a2f 60%, #f2562a 100%);
  --radius: 28px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
/* Fără bară de scroll vizibilă (scroll-ul merge în continuare) */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  font: 16px/1.5 "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.006em;
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
/* Pete de culoare difuze în fundal */
body::before {
  content: ""; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 30% at 12% 8%, rgba(140, 80, 255, 0.32), transparent 70%),
    radial-gradient(34% 28% at 94% 34%, rgba(255, 138, 61, 0.20), transparent 70%),
    radial-gradient(45% 35% at 70% 96%, rgba(61, 220, 151, 0.20), transparent 70%),
    radial-gradient(30% 25% at 5% 72%, rgba(157, 107, 255, 0.14), transparent 70%);
  filter: blur(20px);
}

#app {
  position: relative; z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 22px) 20px calc(var(--safe-b) + 120px);
}
body.locked #app { padding-bottom: calc(var(--safe-b) + 28px); }

h1, h2, h3 { font-weight: 700; margin: 0 0 8px; letter-spacing: -0.03em; }
h3 { font-weight: 600; }
h1 { font-size: 34px; line-height: 1.12; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.serif { font-family: inherit; }
.gold { color: var(--gold); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 14px; }
.spacer { height: 14px; }
.section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 2px 12px; }
.section-h h3 { margin: 0; font-weight: 500; }

/* Sticlă */
.card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.card.soft { background: rgba(255, 255, 255, 0.035); }
.card.warn { border-color: rgba(255, 138, 76, 0.35); background: rgba(255, 138, 76, 0.08); }

/* Antet */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; min-height: 56px; }
.topbar .title { font-size: 19px; font-weight: 500; }
.circle-btn {
  width: 56px; height: 56px; border-radius: 50%; padding: 0;
  background: var(--glass); border: 1px solid var(--stroke);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--text);
}
.circle-btn svg { width: 22px; height: 22px; }
.pill {
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--glass); border: 1px solid var(--stroke); color: var(--gold);
}
.greet .sub { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* Icon în cerc */
.ico {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, rgba(157, 107, 255, 0.24), rgba(61, 220, 151, 0.10));
  border: 1px solid var(--stroke2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 16px rgba(0, 0, 0, 0.25);
  color: #fff;
}
.ico svg { width: 20px; height: 20px; }
.ico.sm { width: 36px; height: 36px; }
.ico.sm svg { width: 17px; height: 17px; }
.ico.fall { background: linear-gradient(150deg, rgba(255, 122, 69, 0.30), rgba(255, 122, 69, 0.08)); }
.ico.won { background: linear-gradient(150deg, rgba(61, 220, 151, 0.30), rgba(61, 220, 151, 0.08)); }
.ico.sos { background: linear-gradient(150deg, rgba(255, 177, 92, 0.30), rgba(255, 122, 47, 0.12)); }
.ico.morning { background: linear-gradient(150deg, rgba(255, 177, 92, 0.28), rgba(157, 107, 255, 0.10)); }
.ico.evening { background: linear-gradient(150deg, rgba(157, 107, 255, 0.30), rgba(61, 220, 151, 0.08)); }

/* Card principal (seria) */
.hero { position: relative; overflow: hidden; padding: 22px; min-height: 196px; }
.hero canvas { position: absolute; right: -70px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.hero .content { position: relative; z-index: 1; max-width: 62%; }
.hero .label { color: var(--muted); font-size: 15px; }
.hero .big { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.hero .unit { font-size: 15px; color: var(--text); }
.hero .meta { font-size: 13px; color: var(--muted); margin-top: 10px; }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 12px; }
.bar > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #9d6bff, #ff8a3d, #3ddc97); }

/* Plăci 3 coloane */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  background: var(--glass); border: 1px solid var(--stroke); border-radius: 24px;
  padding: 16px 14px; display: flex; flex-direction: column; gap: 12px;
}
.tile b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.tile span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--glass); border: 1px solid var(--stroke); border-radius: 22px; padding: 14px 8px; text-align: center; }
.stat b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); line-height: 1.25; display: block; }

/* Rânduri listă */
.list > * + * { margin-top: 10px; }
.lrow {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: 24px; padding: 12px 16px 12px 12px;
}
.lrow .t { font-size: 16px; font-weight: 500; }
.lrow .s { font-size: 13px; color: var(--muted); }
.lrow .chev { margin-left: auto; color: var(--muted); }
.lrow.hl { border-color: rgba(157, 107, 255, 0.35); }

/* Butoane */
button, .btn {
  font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--glass);
  border-radius: 999px; padding: 14px 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: transform .1s ease, background .15s, border-color .15s;
}
button:active, .btn:active { transform: scale(0.97); }
button:disabled { opacity: .35; cursor: default; }
.btn-block { width: 100%; }
.btn-gold { background: var(--hot); color: #fff; border-color: transparent; font-weight: 600; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.btn-soft { background: rgba(157, 107, 255, 0.14); border-color: rgba(157, 107, 255, 0.3); color: var(--gold2); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(255, 122, 69, 0.35); color: var(--red); background: transparent; }
.btn-sos { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Verset */
.verse .text { font-size: 18px; line-height: 1.6; font-weight: 400; }
.verse .ref { margin-top: 12px; color: var(--gold); font-size: 14px; font-weight: 500; }
.verse.big .text { font-size: 21px; }
.attrib { font-size: 11px; color: var(--muted); opacity: .65; margin-top: 22px; text-align: center; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; color: var(--muted); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 15px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--text);
}
.chip.on { background: rgba(157, 107, 255, 0.2); color: #fff; border-color: rgba(157, 107, 255, 0.6); }

/* Formulare */
textarea, input[type=text], input[type=password], input[type=datetime-local], select {
  width: 100%; font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke); border-radius: 20px; padding: 14px 16px;
}
textarea:focus, input:focus { outline: none; border-color: rgba(157, 107, 255, 0.5); }
textarea { min-height: 92px; resize: vertical; }
label.q { display: block; margin: 18px 2px 8px; font-size: 15px; }
.scale { display: flex; gap: 8px; }
.scale button { flex: 1; padding: 12px 0; }
.scale button.on { background: rgba(157, 107, 255, 0.2); border-color: rgba(157, 107, 255, 0.6); }

/* Dock jos: navigație + SOS */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 0 16px calc(var(--safe-b) + 14px);
  display: flex; gap: 10px; align-items: center; justify-content: center;
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
.nav {
  flex: 1; max-width: 400px; display: flex; justify-content: space-around; align-items: center;
  height: 68px; border-radius: 999px; padding: 0 8px;
  background: rgba(24, 22, 34, 0.72); border: 1px solid var(--stroke);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.nav a { color: var(--muted); text-decoration: none; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.nav a svg { width: 22px; height: 22px; }
.nav a.active { color: #fff; background: rgba(255, 255, 255, 0.09); }
.sos-fab {
  width: 68px; height: 68px; border-radius: 50%; border: none; flex: none; padding: 0;
  background: var(--hot); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .04em;
  box-shadow: 0 10px 28px rgba(255, 122, 47, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.dock[hidden] { display: none; }

/* SOS */
.sos-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sos-title { font-size: 19px; font-weight: 500; }
.orb-wrap { display: flex; justify-content: center; margin: 4px 0 10px; }
.orb-wrap canvas { transition: transform 4s ease-in-out; }
.orb-wrap.in canvas, .orb-wrap.hold canvas { transform: scale(1.12); }
.orb-wrap.out canvas { transform: scale(0.82); transition-duration: 6s; }
.headline { font-size: 26px; line-height: 1.3; font-weight: 500; text-align: center; letter-spacing: -0.01em; }
.headline .dim { color: var(--muted); }
.timer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.timer { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.round { width: 68px; height: 68px; border-radius: 50%; padding: 0; background: var(--glass); border: 1px solid var(--stroke); }
.round svg { width: 24px; height: 24px; }
.round.hot { background: var(--hot); border: none; box-shadow: 0 10px 28px rgba(255, 122, 47, 0.4); }
.progress { height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; margin: 6px 0 18px; }
.progress > div { height: 100%; background: linear-gradient(90deg, #9d6bff, #ff8a3d, #3ddc97); transition: width 1s linear; }
.stepdots { display: flex; gap: 5px; justify-content: center; margin: 4px 0 14px; }
.stepdots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.stepdots i.on { background: var(--gold); }
.sos-card { min-height: 220px; display: flex; flex-direction: column; justify-content: center; }
.prayer { font-size: 21px; line-height: 1.6; }
.step-title { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; color: var(--gold); margin-bottom: 14px; }
.fade-in { animation: fade .45s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.breath { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.breath .label { font-size: 22px; font-weight: 500; }

.sugg { padding: 15px 18px; border-radius: 22px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); }
.sugg + .sugg { margin-top: 10px; }
.hint { font-size: 13px; color: var(--muted); border: 1px dashed var(--stroke2); border-radius: 20px; padding: 12px 14px; }

/* PIN */
.pin { max-width: 300px; margin: 10vh auto 0; text-align: center; }
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 28px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: var(--gold); border-color: var(--gold); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pinpad button { height: 72px; width: 72px; font-size: 26px; border-radius: 50%; margin: 0 auto; padding: 0; }
.pin .err { color: var(--red); min-height: 22px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

/* Jurnal */
.day-h { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 24px 4px 10px; }
.entry { display: flex; gap: 12px; padding: 14px; background: var(--glass); border: 1px solid var(--stroke); border-radius: 24px; }
.entry + .entry { margin-top: 8px; }
.entry .meta { font-size: 13px; color: var(--muted); }
.entry .ans { font-size: 14px; margin-top: 8px; white-space: pre-wrap; }
.entry .ans b { font-weight: 400; color: var(--muted); display: block; font-size: 12px; }
.entry .del { margin-left: auto; background: none; border: none; color: var(--muted); padding: 2px 6px; font-size: 20px; align-self: flex-start; }

/* Grafice */
.chart { width: 100%; display: block; margin-top: 6px; }
.chart text { fill: var(--muted); font-size: 10px; font-family: inherit; }
.insight { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--stroke); font-size: 15px; }
.insight:last-child { border-bottom: none; padding-bottom: 0; }
.insight .dot { color: var(--gold); flex: none; }
.seg { display: flex; background: var(--glass); border: 1px solid var(--stroke); border-radius: 999px; padding: 4px; }
.seg button { flex: 1; border: none; background: none; padding: 10px; font-size: 14px; }
.seg button.on { background: rgba(255, 255, 255, 0.1); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }

ol.steps { padding-left: 20px; margin: 10px 0 4px; }
ol.steps li { margin-bottom: 6px; }
details { margin-top: 10px; }
details summary { cursor: pointer; color: var(--gold2); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .orb-wrap canvas { transition: none !important; }
  .fade-in { animation: none; }
}

.header { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 18px; }
.header .date { color: var(--muted); font-size: 14px; }
