/* ─────────────────────────────────────────────────────────────
   Noi Doi — aspectul aplicației
   Ideea: „firul roșu” care ne leagă. Roșul apare discret, ca un fir
   subțire (între nume, în cronologie) și ca sigiliu de ceară pe scrisori.
   Pozele stau în rame ca de polaroid, prinse cu cârlige.
   ───────────────────────────────────────────────────────────── */

/* ── Fonturi (găzduite local, cu diacritice) ── */
@font-face { font-family: 'Bodoni'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/bodoni-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; }
@font-face { font-family: 'Bodoni'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/bodoni-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bodoni'; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url(../fonts/bodoni-italic-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; }
@font-face { font-family: 'Bodoni'; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url(../fonts/bodoni-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/jost-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; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/jost-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
/* Cifrele. În Bodoni, liniile foarte subțiri dispar pe ecran (4 ajunge să semene cu 1),
   așa că în textele scrise cu Bodoni cifrele vin din Jost, care se citește clar.
   Literele rămân în Bodoni; doar caracterele 0–9 (unicode-range) folosesc fontul acesta. */
@font-face { font-family: 'Cifre'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2'); unicode-range: U+0030-0039; size-adjust: 104%; }
@font-face { font-family: 'Cifre'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2'); unicode-range: U+0030-0039; size-adjust: 104%; }
/* Pentru numerele mari (contorul de pe Acasă): aceleași cifre, mai subțiri și elegante. */
@font-face { font-family: 'Cifre mari'; font-style: normal; font-weight: 300; font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2'); unicode-range: U+0030-0039, U+002C, U+002E; }
@font-face { font-family: 'Cifre mari'; font-style: italic; font-weight: 300; font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2'); unicode-range: U+0030-0039, U+002C, U+002E; }

/* ── Culori și măsuri ── */
:root {
  --fundal: #FCF5F1;      /* crem cu o umbră de roz */
  --hartie: #FFFCFA;      /* rama pozelor, foile */
  --petala: #F6E1E4;      /* roz pal */
  --roz: #D9879B;         /* roz prăfuit — al doilea fir */
  --roz-text: #B05A72;    /* roz destul de închis pentru text */
  --rosu: #9C2338;        /* roșul discret — firul */
  --rosu-adanc: #7E1A2C;
  --pe-rosu: #FFF7F5;     /* textul de pe butoanele roșii */
  --cerneala: #3A2328;    /* textul */
  --estompat: #85686E;    /* text secundar */
  --linie: #EEDEDF;
  --auriu: #B08A4F;       /* praguri */
  --lemn: #D7B88E;        /* cârligele */
  --umbra: 0 1px 2px rgba(90, 30, 45, .07), 0 10px 26px -14px rgba(90, 30, 45, .32);
  --umbra-mica: 0 1px 2px rgba(90, 30, 45, .08), 0 4px 10px -6px rgba(90, 30, 45, .25);
  --serif: 'Cifre', 'Bodoni', 'Bodoni 72', Didot, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;
  --tab-h: 66px;
  --sus: env(safe-area-inset-top, 0px);
  --jos: env(safe-area-inset-bottom, 0px);
  --sus-pagina: var(--sus); /* spațiul de sus pentru conținutul care curge (nu pentru straturile fixe) */
  color-scheme: light;
}
:root[data-tema="seara"], :root[data-theme="dark"]:not([data-tema="zi"]) {
  --fundal: #1E1316; --hartie: #2A1C20; --petala: #3A242A; --roz: #E3A1B1; --roz-text: #EBB3C1;
  --rosu: #E5677E; --rosu-adanc: #F08A9C; --pe-rosu: #2A0E15; --cerneala: #F7E9EA; --estompat: #BFA2A8;
  --linie: #3F2B30; --auriu: #DDBB82; --lemn: #A88A64;
  --umbra: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .7);
  --umbra-mica: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px -6px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="zi"]):not([data-theme="light"]) {
    --fundal: #1E1316; --hartie: #2A1C20; --petala: #3A242A; --roz: #E3A1B1; --roz-text: #EBB3C1;
    --rosu: #E5677E; --rosu-adanc: #F08A9C; --pe-rosu: #2A0E15; --cerneala: #F7E9EA; --estompat: #BFA2A8;
    --linie: #3F2B30; --auriu: #DDBB82; --lemn: #A88A64;
    --umbra: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .7);
    --umbra-mica: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px -6px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ── Bază ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--fundal); }
body {
  margin: 0; min-height: 100dvh; background: var(--fundal); color: var(--cerneala);
  font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
img { max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: var(--rosu); }
:focus-visible { outline: 2px solid var(--rosu); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ascuns { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.privat #app { filter: blur(22px); }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; position: relative; }
.ecran { padding: calc(var(--sus-pagina) + 10px) 18px calc(var(--tab-h) + var(--jos) + 28px); animation: intra .22s ease-out; }
@keyframes intra { from { opacity: 0; transform: translateY(6px); } }

/* ── Text ── */
h1, h2, h3 { margin: 0; font-weight: 500; }
.titlu { font: italic 500 31px/1.1 var(--serif); letter-spacing: -.01em; }
.subtitlu { font: italic 500 22px/1.2 var(--serif); margin: 30px 0 12px; }
.mic { font-size: 13.5px; color: var(--estompat); }
.estompat { color: var(--estompat); }
.centru { text-align: center; }
.text-mesaj { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── Bara de sus ── */
.bara { display: flex; align-items: center; gap: 6px; min-height: 52px; margin: 0 -6px 6px; }
.bara .titlu { flex: 1; font-size: 24px; text-align: center; }
.bara .spatiu { flex: 1; }
/* titlul ecranelor din bara de jos (Scrisori, Setări) și al paginilor din ele */
.titlu.titlu-ecran { font-size: 31px; text-align: left; margin: 2px 0 0; }
.bara .titlu.titlu-ecran { padding-left: 6px; margin: 0; }
/* „‹ Înapoi”, cu text, ca să fie clar unde duce */
.inapoi-text { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 12px 0 4px; border-radius: 99px; color: var(--rosu); font-size: 15.5px; font-weight: 500; }
.inapoi-text .icon { width: 22px; height: 22px; }
.inapoi-text:active { background: var(--petala); }

/* Comutatorul Lună · An · Cronologie */
.vederi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 4px 0 16px; border-radius: 99px; background: var(--hartie); box-shadow: inset 0 0 0 1px var(--linie); }
.vederi button { min-height: 40px; border-radius: 99px; font-size: 14.5px; color: var(--estompat); }
.vederi button[aria-selected="true"] { background: var(--rosu); color: var(--pe-rosu); font-weight: 500; }
.sigla { font: italic 600 25px/1 var(--serif); color: var(--rosu); padding-left: 6px; letter-spacing: -.01em; }
.btn-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--cerneala); flex: none; }
.btn-icon:active { background: var(--petala); }
.btn-icon svg { width: 23px; height: 23px; }
.icon { width: 22px; height: 22px; flex: none; }

/* ── Butoane ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 24px;
  border-radius: 999px; font: 500 16px/1.2 var(--sans); letter-spacing: .01em; background: var(--rosu); color: var(--pe-rosu);
  transition: transform .12s ease, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.lat { width: 100%; }
.btn.usor { background: var(--petala); color: var(--rosu); }
.btn.contur { background: transparent; color: var(--rosu); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.text { background: none; color: var(--rosu); min-height: 44px; padding: 0 10px; }
.btn.pericol { background: transparent; color: #B4233C; box-shadow: inset 0 0 0 1.5px currentColor; }
:root[data-tema="seara"] .btn.pericol { color: #FF8A9D; }
.btn .icon { width: 20px; height: 20px; }
.butoane { display: grid; gap: 10px; margin-top: 22px; }

/* ── Câmpuri ── */
.camp { display: block; margin-bottom: 16px; }
.camp > span { display: block; font-size: 14px; color: var(--estompat); margin: 0 0 6px 2px; }
input, textarea, select {
  width: 100%; font: 400 16px/1.45 var(--sans); color: var(--cerneala); background: var(--hartie);
  border: 1px solid var(--linie); border-radius: 14px; padding: 13px 15px; appearance: none; -webkit-appearance: none;
}
input[type="date"] { min-height: 50px; }
textarea { resize: none; min-height: 116px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--rosu); outline-offset: 0; border-color: transparent; }
::placeholder { color: var(--estompat); opacity: .8; }
.eroare { color: #B4233C; font-size: 14px; min-height: 20px; margin: 4px 2px 0; }
:root[data-tema="seara"] .eroare { color: #FF8A9D; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--hartie); box-shadow: inset 0 0 0 1px var(--linie); font-size: 14.5px; color: var(--cerneala);
}
.chip[aria-pressed="true"] { background: var(--rosu); color: var(--pe-rosu); box-shadow: none; }
.chip.ales { box-shadow: inset 0 0 0 1.5px var(--rosu); color: var(--rosu); }

/* ── Comutator (da / nu) ── */
.comutator { position: relative; width: 50px; height: 30px; flex: none; }
.comutator input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.comutator span { position: absolute; inset: 0; border-radius: 99px; background: var(--linie); transition: background .2s; }
.comutator span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.comutator input:checked + span { background: var(--rosu); }
.comutator input:checked + span::after { transform: translateX(20px); }
.comutator input:focus-visible + span { outline: 2px solid var(--rosu); outline-offset: 2px; }

/* ── Bara de jos (taburi) ── */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 30;
  height: calc(var(--tab-h) + var(--jos)); padding-bottom: var(--jos); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--fundal); background: color-mix(in srgb, var(--fundal) 86%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--linie);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--estompat); text-decoration: none; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--rosu); font-weight: 500; }
.tab-ic { position: relative; display: grid; place-items: center; }
.tab .insigna { position: absolute; top: -1px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--rosu); box-shadow: 0 0 0 2px var(--fundal); }
.tab-plus { align-self: start; justify-self: center; margin-top: -16px; width: 58px; height: 58px; border-radius: 50%; background: var(--rosu); color: var(--pe-rosu);
  display: grid; place-items: center; box-shadow: 0 10px 22px -8px rgba(156, 35, 56, .6), 0 0 0 5px var(--fundal); }
.tab-plus svg { width: 26px; height: 26px; }
.tab-plus:active { transform: scale(.96); }

/* ── Acasă: cuplul și firul ── */
.cuplu { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; }
.cuplu .nume { font: italic 500 24px/1.1 var(--serif); white-space: nowrap; max-width: 34%; overflow: hidden; text-overflow: ellipsis; }
.cuplu .nume.a { color: var(--rosu); text-align: right; }
.cuplu .nume.b { color: var(--roz-text); }
.fir { flex: 1; min-width: 60px; height: 34px; overflow: visible; }
.fir path { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.fir .fa { stroke: var(--rosu); }
.fir .fb { stroke: var(--roz); }
.fir .nod { fill: var(--rosu); transform-origin: 100px 17px; }
.anim .fir path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: deseneaza 1.5s cubic-bezier(.55, .1, .25, 1) forwards; }
.anim .fir .nod { transform: scale(0); animation: bataie .6s 1.35s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.anim .contor { opacity: 0; animation: aparitie .7s .45s ease-out forwards; }
@keyframes aparitie { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes deseneaza { to { stroke-dashoffset: 0; } }
@keyframes bataie { to { transform: scale(1); } }

.contor { text-align: center; margin: 8px auto 6px; padding: 6px 0 10px; display: block; width: 100%; }
.contor-numar { display: block; font: italic 300 clamp(66px, 22vw, 108px)/1 'Cifre mari', var(--serif); letter-spacing: -.01em; font-variant-numeric: lining-nums; color: var(--cerneala); }
.contor-eticheta { display: block; font: italic 400 20px/1.3 var(--serif); color: var(--estompat); margin-top: 2px; }
.contor-durata { display: block; font-size: 15.5px; margin-top: 10px; }
.contor-puncte { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.contor-puncte i { width: 5px; height: 5px; border-radius: 50%; background: var(--linie); }
.contor-puncte i.activ { background: var(--rosu); }
.contor-indiciu { display: block; margin-top: 8px; font-size: 12.5px; color: var(--estompat); }

/* ── Polaroid + cârlig ── */
.polaroid { background: var(--hartie); padding: 9px 9px 0; border-radius: 3px; box-shadow: var(--umbra); transform: rotate(var(--rot, 0deg)); margin: 0; position: relative; }
.polaroid img, .polaroid .gol { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 1px; background: var(--petala); }
.polaroid figcaption { font: italic 400 15px/1.3 var(--serif); padding: 9px 2px 0; border-bottom: 12px solid transparent; min-height: 52px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.carlig { position: absolute; top: -15px; left: 50%; width: 13px; height: 32px; margin-left: -6.5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--lemn) 0 46%, color-mix(in srgb, var(--lemn) 78%, #000) 46% 54%, var(--lemn) 54%); box-shadow: 0 2px 3px rgba(60, 30, 20, .25); z-index: 2; }
.sfoara { position: absolute; left: -18px; right: -18px; top: 0; width: calc(100% + 36px); height: 40px; pointer-events: none; }
.sfoara path { fill: none; stroke: var(--rosu); stroke-width: 1.4; opacity: .75; }

.sectiune-azi { margin-top: 30px; }
.azi-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.azi-cap h2 { font: italic 500 22px/1.2 var(--serif); }
.azi-scena { position: relative; padding-top: 30px; }
.azi-gol { width: min(68%, 252px); margin: 0 auto; display: block; --rot: -1.5deg; }
.azi-gol .gol { display: grid; place-items: center; align-content: center; gap: 10px; color: var(--rosu); text-align: center; background:
  repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--petala) 60%, transparent) 10px 20px), var(--petala); }
.azi-gol .gol svg { width: 38px; height: 38px; }
.azi-gol .gol b { font-weight: 500; font-size: 16px; }
.azi-scrie { display: block; margin: 18px auto 0; }
.azi-poze { display: flex; justify-content: center; }
.azi-poze .polaroid { width: min(64%, 250px); flex: none; }
.azi-poze .polaroid + .polaroid { margin-left: -22%; }
.azi-mesaj { margin: 18px 6px 0; font: italic 400 17px/1.5 var(--serif); text-align: center; }
.azi-mesaj .semnatura { display: block; font: 400 13.5px var(--sans); font-style: normal; color: var(--estompat); margin-top: 4px; }

/* ── Secțiuni de pe Acasă ── */
.sectiune { margin-top: 36px; }
.sectiune > h2 { font: italic 500 22px/1.2 var(--serif); margin-bottom: 14px; }
.rand-orizontal { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 18px 18px; margin: -16px -18px 0; scrollbar-width: none; }
.rand-orizontal::-webkit-scrollbar { display: none; }
.rand-orizontal > * { scroll-snap-align: start; flex: none; }
.amintire-veche { width: 168px; }
.amintire-veche .polaroid { --rot: 0deg; }
.amintire-veche .cand { display: block; font-size: 13px; color: var(--rosu); margin-bottom: 8px; font-weight: 500; }
.amintire-veche .gol { display: grid; place-items: center; font-size: 40px; }

.urmatoarea { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 6px 0; }
.urmatoarea + .urmatoarea { border-top: 1px solid var(--linie); padding-top: 14px; margin-top: 8px; }
.medalion { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--petala); flex: none; }
.medalion.auriu { background: color-mix(in srgb, var(--auriu) 22%, var(--hartie)); }
.urmatoarea .cat { margin-left: auto; text-align: right; font-size: 14px; color: var(--estompat); white-space: nowrap; padding-left: 8px; }
.urmatoarea .cat b { display: block; font: italic 500 22px/1 var(--serif); color: var(--cerneala); }
.link-tot { display: flex; margin: 10px 0 0 auto; gap: 2px; padding: 0 4px 0 10px; font-size: 15px; }
.link-tot .icon { width: 18px; height: 18px; }

.banda { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--petala); font-size: 13.5px; line-height: 1.4; margin: 2px 0 4px; }
.banda .icon { width: 19px; height: 19px; }
.banda .icon { color: var(--rosu); }
.banda button, .banda a { margin-left: auto; color: var(--rosu); font-weight: 500; text-decoration: none; white-space: nowrap; }
.sfat-instalare { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; padding: 14px 16px; border-radius: 16px; background: var(--petala); font-size: 14px; line-height: 1.45; }
.sfat-instalare > span { flex: 1 1 200px; }
.sfat-instalare .icon { color: var(--rosu); }
.sfat-instalare .btn { min-height: 42px; padding: 0 18px; font-size: 14.5px; background: var(--hartie); text-decoration: none; }
.offline { position: fixed; top: calc(var(--sus) + 8px); left: 50%; transform: translateX(-50%); z-index: 60; background: var(--cerneala); color: var(--fundal); font-size: 13.5px; padding: 6px 14px; border-radius: 99px; box-shadow: var(--umbra-mica); }

/* ── Plicuri (scrisori) ── */
.plic { position: relative; display: block; width: 100%; text-align: left; background: var(--hartie); border-radius: 8px; padding: 28px 16px 18px 78px; box-shadow: var(--umbra-mica); overflow: hidden; margin-bottom: 14px; }
.plic::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 34px; background: var(--petala); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: .7; }
.plic > * { position: relative; }
.plic h3 { font: italic 500 19px/1.25 var(--serif); }
.plic .mic { margin-top: 3px; }
.sigiliu { position: absolute; left: 18px; top: 50%; margin-top: -23px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, #C9435B, #9C2338 58%, #6E1626); color: #F8D9DF; font: italic 600 21px/1 var(--serif);
  box-shadow: 0 3px 6px rgba(110, 22, 38, .35), inset 0 0 0 3px rgba(255, 255, 255, .07), inset 0 -3px 6px rgba(0, 0, 0, .18); }
.sigiliu::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed rgba(255, 220, 228, .35); }
.plic.gata { box-shadow: 0 0 0 2px var(--rosu), var(--umbra); }
.plic.gata .sigiliu { animation: puls 1.8s ease-in-out infinite; }
.plic.deschis .sigiliu { background: var(--petala); color: var(--rosu); box-shadow: none; }
.plic.deschis .sigiliu::after { border-color: var(--roz); }
@keyframes puls { 50% { transform: scale(1.07); } }

/* Citirea unei scrisori */
.lectura { position: fixed; inset: 0; z-index: 70; background: var(--fundal); overflow-y: auto; padding: calc(var(--sus) + 12px) 20px calc(var(--jos) + 30px); }
.lectura-in { max-width: 480px; margin: 0 auto; }
.scena-plic { position: relative; height: 210px; margin: 40px auto 0; width: min(88%, 340px); perspective: 900px; }
.scena-plic .corp { position: absolute; inset: 60px 0 0; background: var(--hartie); border-radius: 6px; box-shadow: var(--umbra); }
.scena-plic .clapa { position: absolute; left: 0; right: 0; top: 60px; height: 96px; background: var(--petala); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .7s ease; z-index: 3; }
.scena-plic .sigiliu { left: 50%; top: 142px; margin: 0 0 0 -26px; width: 52px; height: 52px; z-index: 4; transition: transform .45s, opacity .45s; }
.scena-plic .foaie-scrisoare { position: absolute; left: 7%; right: 7%; top: 72px; height: 120px; background: var(--hartie); border-radius: 4px; box-shadow: 0 0 0 1px var(--linie); z-index: 2; transition: transform .8s .5s cubic-bezier(.2, .8, .2, 1); }
.scena-plic.deschide .sigiliu { transform: scale(1.4); opacity: 0; }
.scena-plic.deschide .clapa { transform: rotateX(180deg); z-index: 1; }
.scena-plic.deschide .foaie-scrisoare { transform: translateY(-70px); }
.scrisoare { background: var(--hartie); padding: 28px 22px 30px; border-radius: 6px; box-shadow: var(--umbra); margin-top: 22px; animation: intra .6s ease-out; }
.scrisoare h2 { font: italic 500 27px/1.2 var(--serif); margin-bottom: 18px; }
.scrisoare .text-mesaj { font-size: 17px; line-height: 1.7; }
.scrisoare .semnatura { font: italic 500 20px var(--serif); text-align: right; margin-top: 22px; color: var(--rosu); }

/* ── Ziua ── */
.zi-cap { display: flex; align-items: center; gap: 4px; text-align: center; margin: 0 -8px 18px; }
.zi-cap > div { flex: 1; min-width: 0; }
.zi-cap .saptamana { font-size: 14px; color: var(--estompat); }
.zi-cap h1 { font: italic 500 30px/1.15 var(--serif); }
.eticheta-zi { display: inline-block; margin-top: 10px; font-size: 14px; padding: 5px 13px; border-radius: 99px; background: var(--petala); color: var(--rosu); font-weight: 500; }
.sarbatori { display: grid; gap: 8px; margin: 14px 0 6px; }
.sarbatoare-rand { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: var(--hartie); box-shadow: inset 0 0 0 1px var(--linie); }
.sarbatoare-rand.mare { box-shadow: inset 0 0 0 1.5px var(--auriu); }
.sarbatoare-rand .e { font-size: 22px; }
.sarbatoare-rand b { font-weight: 500; display: block; }

.galerie { display: flex; align-items: flex-start; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 18px 22px; margin: 0 -18px; scrollbar-width: none; }
.galerie::-webkit-scrollbar { display: none; }
.galerie .polaroid { flex: none; width: 78%; scroll-snap-align: center; }
.galerie.una .polaroid { width: 100%; }
.galerie .polaroid img { aspect-ratio: auto; max-height: 62dvh; object-fit: cover; }
.galerie .polaroid figcaption { font: 400 13px var(--sans); color: var(--estompat); min-height: 0; display: flex; justify-content: space-between; align-items: center; }
.galerie .stea { color: var(--auriu); font-size: 13px; }

.mesaj { position: relative; background: var(--hartie); border-radius: 4px 16px 16px 4px; padding: 16px 16px 14px 20px; margin-bottom: 14px; box-shadow: var(--umbra-mica); }
.mesaj::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--fir, var(--rosu)); }
.mesaj.b { --fir: var(--roz); }
.mesaj .tip { font-size: 13px; color: var(--estompat); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mesaj .text-mesaj { font-size: 16.5px; line-height: 1.6; margin: 6px 0 8px; }
.mesaj.declaratie .text-mesaj, .mesaj.moment .text-mesaj { font: italic 400 19px/1.55 var(--serif); }
.mesaj .semnatura { font: italic 500 16px var(--serif); color: var(--rosu); }
.mesaj.b .semnatura { color: var(--roz-text); }
.mesaj .mai-mult { width: 36px; height: 36px; margin: -8px -8px 0 0; }
.gol-zi { text-align: center; padding: 36px 10px 10px; color: var(--estompat); }
.gol-zi .titlu { color: var(--cerneala); font-size: 24px; margin-bottom: 8px; }
.actiune-zi { margin-top: 18px; }

/* ── Vizualizator de poze ── */
.vizualizator { position: fixed; inset: 0; z-index: 80; background: #0F0A0B; color: #fff; display: flex; flex-direction: column; }
.vizualizator .sus, .vizualizator .jos { display: flex; align-items: center; gap: 4px; padding: calc(var(--sus) + 6px) 8px 6px; }
.vizualizator .jos { padding: 8px 12px calc(var(--jos) + 12px); justify-content: space-between; font-size: 14px; color: #E9D9DC; }
.vizualizator .btn-icon { color: #fff; }
.vizualizator .btn-icon:active { background: rgba(255, 255, 255, .12); }
.vizualizator .pista { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.vizualizator .pista::-webkit-scrollbar { display: none; }
.vizualizator .cadru { flex: none; width: 100%; height: 100%; display: grid; place-items: center; scroll-snap-align: center; }
.vizualizator img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vizualizator .contor-poze { flex: 1; text-align: center; font-size: 14px; }

/* ── Calendar ── */
.cal-cap { display: flex; align-items: center; justify-content: space-between; margin: 6px -6px 12px; }
.cal-cap button.titlu-luna { font: italic 500 27px/1.1 var(--serif); padding: 6px 10px; border-radius: 12px; }
.cal-cap button.titlu-luna small { font: 400 14px var(--sans); color: var(--estompat); margin-left: 6px; font-style: normal; }
.zile-sapt { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 12.5px; color: var(--estompat); margin-bottom: 6px; }
.luna-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; touch-action: pan-y; }
.celula { aspect-ratio: 1; position: relative; border-radius: 12px; overflow: hidden; display: block; padding: 5px 0 0 7px; text-align: left; font-size: 13.5px; font-variant-numeric: tabular-nums;
  background: var(--hartie); box-shadow: inset 0 0 0 1px var(--linie); }
.celula img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.celula .nr { position: relative; z-index: 1; }
.celula.cu-poza .nr { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); font-weight: 500; }
.celula.cu-poza::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 45%); }
.celula .inima { position: absolute; right: 6px; bottom: 6px; width: 11px; height: 11px; color: var(--rosu); z-index: 1; }
.celula .semn { position: absolute; right: 4px; top: 3px; font-size: 11px; z-index: 1; line-height: 1; }
.celula.azi { box-shadow: inset 0 0 0 2px var(--rosu); }
.celula.azi.cu-poza { box-shadow: 0 0 0 2px var(--rosu); }
.celula.alt { visibility: hidden; }
.celula.viitor { opacity: .42; }
.celula.inainte { background: transparent; color: var(--estompat); }
.cal-rezumat { margin-top: 20px; }
.cal-rezumat p { margin: 0 0 12px; }
.an-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; }
.mini-luna { display: block; width: 100%; min-width: 0; text-align: left; padding: 4px; border-radius: 12px; align-self: start; }
.mini-luna h3 { font: italic 500 16px var(--serif); margin: 0 0 6px 2px; }
.mini-luna .puncte { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mini-luna i { aspect-ratio: 1; border-radius: 50%; background: var(--linie); }
.mini-luna i.gol { background: transparent; }
.mini-luna i.da { background: var(--rosu); }
.mini-luna i.imp { background: var(--auriu); }
.mini-luna i.astazi { box-shadow: 0 0 0 1.5px var(--rosu); background: var(--hartie); }
.mini-luna i.astazi.da { background: var(--rosu); }

/* ── Cronologie ── */
.ani { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 22px; padding: 2px 18px; scrollbar-width: none; }
.ani::-webkit-scrollbar { display: none; }
.cronologie { position: relative; padding-left: 36px; }
.cronologie::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 0; width: 1.5px; background: linear-gradient(var(--rosu), var(--roz)); opacity: .75; }
.nod-c { position: relative; margin-bottom: 30px; display: block; width: 100%; text-align: left; }
.nod-c > .inima-nod { position: absolute; left: -30px; top: 5px; width: 15px; height: 15px; color: var(--rosu); background: var(--fundal); border-radius: 50%; padding: 1px; }
.nod-c h3 { font: italic 500 20px/1.2 var(--serif); }
.nod-c .mic { margin: 1px 0 10px; }
.nod-c .poze-c { display: flex; gap: 10px; align-items: flex-start; }
.nod-c .poze-c .polaroid { width: 132px; padding: 6px 6px 18px; }
.nod-c .poze-c .polaroid:nth-child(2) { width: 96px; margin-top: 18px; --rot: 2deg; }
.nod-c .poze-c .polaroid:nth-child(3) { width: 78px; margin-top: 30px; --rot: -2deg; }
.nod-c .extras { margin: 10px 0 0; font-size: 15.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.separator-luna { font: italic 500 15px var(--sans); font-style: normal; letter-spacing: .02em; color: var(--estompat); margin: 6px 0 18px -36px; padding-left: 36px; position: relative; }
.prag-c { position: relative; margin: 0 0 30px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--auriu) 14%, var(--hartie)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--auriu) 45%, transparent); }
.prag-c::before { content: ''; position: absolute; left: -29px; top: 50%; margin-top: -7px; width: 13px; height: 13px; border-radius: 50%; background: var(--auriu); box-shadow: 0 0 0 4px var(--fundal); }
.prag-c b { font-weight: 500; }
.inceput-c { text-align: center; padding: 20px 0 6px; margin-left: -36px; }
.inceput-c .titlu { font-size: 24px; color: var(--rosu); }

/* ── Liste (meniu, zile importante) ── */
.grup { background: var(--hartie); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--linie); overflow: hidden; }
.grup-titlu { font-size: 14px; color: var(--estompat); margin: 26px 4px 8px; }
.rand { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 12px 16px; text-align: left; position: relative; }
.rand + .rand { border-top: 1px solid var(--linie); }
a.rand { color: inherit; text-decoration: none; }
.rand > .icon { color: var(--rosu); }
.rand .eticheta { flex: 1; min-width: 0; }
.rand .eticheta small { display: block; font-size: 13px; color: var(--estompat); line-height: 1.35; }
.rand .valoare { color: var(--estompat); font-size: 14.5px; text-align: right; white-space: nowrap; }
.rand .sageata { width: 18px; height: 18px; color: var(--estompat); flex: none; }
.rand.pericol { color: #B4233C; }
:root[data-tema="seara"] .rand.pericol { color: #FF8A9D; }
.rand.pericol > .icon { color: inherit; }

.rand-special { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; }
.rand-special + .rand-special { border-top: 1px solid var(--linie); }
.rand-special .eticheta { flex: 1; min-width: 0; }
.rand-special .eticheta b { font-weight: 500; display: block; }
.rand-special .cat { text-align: right; font-size: 13.5px; color: var(--estompat); white-space: nowrap; }
.rand-special .cat b { display: block; color: var(--rosu); font-weight: 500; font-size: 14.5px; }
.emoji-uri { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-uri button { width: 46px; height: 46px; border-radius: 14px; font-size: 22px; background: var(--hartie); box-shadow: inset 0 0 0 1px var(--linie); }
.emoji-uri button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--rosu); background: var(--petala); }

/* ── Foi care urcă de jos ── */
.strat { position: fixed; inset: 0; z-index: 86; }
.strat .umbra-strat { position: absolute; inset: 0; background: rgba(38, 16, 22, .4); opacity: 0; transition: opacity .25s; }
.foaie { position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 520px; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--fundal); border-radius: 26px 26px 0 0; padding: 8px 18px calc(var(--jos) + 20px); transform: translate(-50%, 104%); transition: transform .34s cubic-bezier(.2, .85, .25, 1); }
.foaie::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--linie); margin: 0 auto 10px; }
.strat.vizibil .umbra-strat { opacity: 1; }
.strat.vizibil .foaie { transform: translate(-50%, 0); }
.foaie-cap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.foaie-cap h2 { flex: 1; font: italic 500 25px/1.15 var(--serif); }
.foaie p { margin: 0 0 14px; }

/* Adaugă amintire */
.data-alege { position: relative; display: inline-flex; }
.data-alege input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; padding: 0; border: 0; z-index: 1; }
.poze-noi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 16px; }
.poze-noi .previz { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--petala); }
.poze-noi .previz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poze-noi .previz button { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; background: rgba(30, 12, 18, .6); color: #fff; display: grid; place-items: center; }
.poze-noi .previz button svg { width: 16px; height: 16px; }
.poze-noi .previz.trimis::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(156, 35, 56, .55); color: #fff; font-size: 30px; }
.adauga-poza { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--rosu); font-size: 13.5px; font-weight: 500;
  background: var(--hartie); box-shadow: inset 0 0 0 1.5px var(--roz); border: 0; }
.adauga-poza svg { width: 28px; height: 28px; }
.indiciu { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--petala); margin: -6px 0 16px; }
.indiciu button { margin-left: auto; color: var(--rosu); font-weight: 500; white-space: nowrap; }
.progres { height: 4px; border-radius: 4px; background: var(--linie); overflow: hidden; margin: 14px 0 4px; }
.progres i { display: block; height: 100%; width: 0; background: var(--rosu); transition: width .2s; }

/* ── Blocare (PIN) ── */
.blocare { position: fixed; inset: 0; z-index: 90; background: var(--fundal); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: calc(var(--sus) + 20px) 20px calc(var(--jos) + 20px); overflow-y: auto; }
.blocare .bio-btn { min-height: 54px; padding: 0 26px; font-size: 16.5px; }
.blocare .bio-btn .icon { width: 24px; height: 24px; }
.blocare .sigla { font-size: 34px; padding: 0; }
.blocare p { margin: 0; text-align: center; min-height: 24px; }
.puncte-pin { display: flex; gap: 20px; }
.puncte-pin i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--rosu); transition: background .15s; }
.puncte-pin i.plin { background: var(--rosu); }
.puncte-pin.gresit { animation: scutura .4s; }
@keyframes scutura { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.tastatura { display: grid; grid-template-columns: repeat(3, 74px); gap: 14px 26px; }
.tasta { width: 74px; height: 74px; border-radius: 50%; font: 300 31px/1 var(--sans); background: var(--hartie); box-shadow: inset 0 0 0 1px var(--linie); display: grid; place-items: center; }
.tasta:active { background: var(--petala); }
.tasta.simpla { background: none; box-shadow: none; color: var(--rosu); }
.tasta svg { width: 28px; height: 28px; }
.blocare .btn.text { font-size: 14.5px; }
@media (max-height: 720px) {
  .blocare { gap: 14px; justify-content: flex-start; }
  .tastatura { grid-template-columns: repeat(3, 66px); gap: 10px 24px; }
  .tasta { width: 66px; height: 66px; font-size: 28px; }
}

/* ── Ecrane de început ── */
.inceput { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--sus-pagina) + 24px) 26px calc(var(--jos) + 26px); animation: intra .3s ease-out; }
.inceput .sigla-mare { font: italic 500 64px/1 var(--serif); color: var(--rosu); text-align: center; letter-spacing: -.02em; }
.inceput .fir { display: block; width: 210px; height: 40px; margin: 18px auto 14px; }
.inceput .moto { text-align: center; font: italic 400 21px/1.4 var(--serif); color: var(--estompat); margin: 0 0 40px; }
.inceput h1 { font: italic 500 32px/1.15 var(--serif); margin-bottom: 8px; }
.inceput .pas { font-size: 14px; color: var(--rosu); font-weight: 500; margin-bottom: 8px; }
.inceput form { margin-top: 22px; }
.inceput .inapoi { position: absolute; top: calc(var(--sus) + 10px); left: 10px; }
.cine-esti { display: grid; gap: 14px; margin-top: 26px; }
.cine-esti button { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 18px; background: var(--hartie); box-shadow: inset 0 0 0 1px var(--linie); font: italic 500 24px var(--serif); text-align: left; }
.cine-esti button i { width: 14px; height: 14px; border-radius: 50%; background: var(--rosu); }
.cine-esti button.b i { background: var(--roz); }

/* ── Mesaje scurte și efecte ── */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--jos) + 18px); transform: translate(-50%, 16px); opacity: 0; z-index: 110; pointer-events: none;
  background: var(--cerneala); color: var(--fundal); padding: 12px 18px; border-radius: 16px; font-size: 14.5px; max-width: calc(100% - 32px); width: max-content;
  display: flex; align-items: center; gap: 14px; transition: opacity .25s, transform .25s; box-shadow: var(--umbra); }
.toast.vizibil { opacity: 1; transform: translate(-50%, 0); }
.toast button { color: var(--roz); font-weight: 500; white-space: nowrap; pointer-events: auto; }
.inima-zbor { position: fixed; z-index: 120; pointer-events: none; color: var(--rosu); width: 22px; height: 22px; animation: zbor 1.15s ease-out forwards; }
@keyframes zbor { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), -180px) scale(1.15) rotate(var(--r)); opacity: 0; } }

.sarbatoare { position: fixed; inset: 0; z-index: 95; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 26px;
  background: radial-gradient(circle at 50% 42%, var(--hartie), var(--fundal) 72%); animation: intra .45s ease-out; }
.sarbatoare .e { font-size: 54px; }
.sarbatoare h1 { font: italic 500 40px/1.12 var(--serif); margin: 16px 0 10px; color: var(--rosu); }
.sarbatoare p { margin: 0 0 30px; color: var(--estompat); font-size: 16.5px; max-width: 320px; }
.ploaie { position: absolute; inset: 0; pointer-events: none; }
.ploaie svg { position: absolute; top: -30px; width: var(--m, 18px); height: var(--m, 18px); color: var(--c, var(--rosu)); animation: cade var(--t, 4s) var(--d, 0s) linear forwards; opacity: .85; }
@keyframes cade { to { transform: translate(var(--dx, 0), 110dvh) rotate(var(--r, 180deg)); } }

.schelet { background: linear-gradient(90deg, var(--petala), var(--hartie), var(--petala)); background-size: 300% 100%; animation: sclipire 1.4s infinite; border-radius: 10px; }
@keyframes sclipire { to { background-position: -150% 0; } }
.gol-ecran { text-align: center; padding: 40px 14px; }
.gol-ecran .titlu { font-size: 25px; margin-bottom: 10px; }
.gol-ecran p { color: var(--estompat); margin: 0 auto 22px; max-width: 300px; }

@media (min-width: 560px) {
  body { background: radial-gradient(1200px 600px at 50% -10%, var(--petala), var(--fundal) 60%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
