/* ==========================================================================
   Gata — stiluri
   1. Token-uri și bază      4. Pagina de prezentare    7. Task-uri și swipe
   2. Fundal + sticlă        5. Formulare și admin      8. Sheet, toast, confetti
   3. Butoane și elemente    6. Dashboard
   ========================================================================== */

/* ---------- 1. Token-uri și bază ---------- */

/* --tint e culoarea care „curge" prin fundal. O înregistrăm ca să se poată anima lin. */
@property --tint {
  syntax: '<color>';
  inherits: true;
  initial-value: #5B7CFF;
}
/* --dx = cât e tras un rând; înregistrat ca lungime ca să poată fi animat */
@property --dx {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

:root {
  --tint: #5B7CFF;

  --bg: #070B1A;
  --text: #F3F5FF;
  --muted: rgba(243, 245, 255, .64);
  --hair: rgba(255, 255, 255, .12);
  --glass-a: rgba(255, 255, 255, .14);
  --glass-b: rgba(255, 255, 255, .05);
  --live-a: rgba(26, 32, 60, .70);
  --live-b: rgba(18, 23, 46, .58);
  --edge-hi: rgba(255, 255, 255, .58);
  --edge-lo: rgba(255, 255, 255, .07);
  --inset: rgba(255, 255, 255, .07);
  --field: rgba(255, 255, 255, .09);
  --shadow: 0 20px 44px -22px rgba(0, 0, 12, .8);
  --btn-bg: #F3F5FF;
  --btn-fg: #0C1230;
  --blob: .5;
  --good: #4ADE9A;
  --bad: #FF7A85;

  --accent: color-mix(in oklab, var(--tint) 62%, var(--text));
  --font-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(.2, .9, .25, 1.12);
  --ease: cubic-bezier(.3, .7, .2, 1);

  color-scheme: dark;
  transition: --tint .9s ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #E9EEFA;
    --text: #0C1230;
    --muted: rgba(12, 18, 48, .64);
    --hair: rgba(12, 18, 48, .10);
    --glass-a: rgba(255, 255, 255, .80);
    --glass-b: rgba(255, 255, 255, .44);
    --live-a: rgba(255, 255, 255, .80);
    --live-b: rgba(255, 255, 255, .62);
    --edge-hi: rgba(255, 255, 255, 1);
    --edge-lo: rgba(255, 255, 255, .4);
    --inset: rgba(255, 255, 255, .55);
    --field: rgba(12, 18, 48, .06);
    --shadow: 0 20px 44px -24px rgba(40, 60, 130, .45);
    --btn-bg: #0C1230;
    --btn-fg: #F3F5FF;
    --blob: .42;
    --good: #0E9F62;
    --bad: #D92C43;
    color-scheme: light;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 17px/1.45 var(--font-body);
  color: var(--text);
  background: transparent; /* fundalul e desenat de .wall; un fundal opac aici l-ar acoperi */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; text-wrap: balance; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
code { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--field); padding: 2px 6px; border-radius: 6px; }

/* ---------- 2. Fundal + sticlă ---------- */

/* Trei pete mari de culoare care plutesc încet. Sunt gradiente simple mutate cu transform,
   deci nu costă baterie; sticla de deasupra le „prinde" culoarea. */
.wall { position: fixed; inset: -140px 0; z-index: -1; overflow: hidden; background: var(--bg); pointer-events: none; }
.wall i {
  position: absolute;
  width: 110vmax; height: 110vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, transparent 100%);
  opacity: var(--blob);
  will-change: transform;
  animation: drift 32s ease-in-out infinite alternate;
}
.wall i:nth-child(1) { --c: var(--tint); top: -55vmax; left: -45vmax; }
.wall i:nth-child(2) { --c: color-mix(in oklab, var(--tint) 45%, #19C7B0); bottom: -60vmax; right: -50vmax; animation-duration: 38s; animation-direction: alternate-reverse; }
.wall i:nth-child(3) { --c: color-mix(in oklab, var(--tint) 35%, #FF8A5B); width: 70vmax; height: 70vmax; top: 38%; left: 30%; opacity: calc(var(--blob) * .55); animation-duration: 46s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(9vmax, 7vmax, 0) scale(1.12); }
}

/* Sticlă „statică": pentru carduri care stau peste fundalul deja difuz (nu are ce blura). */
.glass, .glass-live, .task {
  position: relative;
  background: linear-gradient(145deg, var(--glass-a), var(--glass-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), var(--shadow);
}
/* Sticlă „vie": pentru ce plutește peste conținut (bara de jos, sheet, toast) — aici blurul e real. */
.glass-live {
  background: linear-gradient(160deg, var(--live-a), var(--live-b));
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
}
/* Muchia luminoasă: o ramă de 1px cu gradient, ca reflexia de pe marginea unei lentile. */
.glass::before, .glass-live::before, .task::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--edge-hi), var(--edge-lo) 32%, var(--edge-lo) 68%, color-mix(in srgb, var(--edge-hi) 55%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-inset { background: var(--inset); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--hair); }

/* ---------- 3. Butoane și elemente mici ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px;
  border: 0; border-radius: 999px;
  font-weight: 650; font-size: 17px; text-decoration: none; text-align: center;
  transition: transform .18s var(--spring), opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 12px 26px -14px var(--btn-bg); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--hair); }
.btn.glass-btn { background: var(--field); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn.danger-ghost { background: transparent; color: var(--bad); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn.big { min-height: 56px; padding: 14px 28px; font-size: 18px; }

.link { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.link.danger { color: var(--bad); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--text); text-decoration: none;
  transition: transform .18s var(--spring);
}
.icon-btn.glass { background: linear-gradient(145deg, var(--glass-a), var(--glass-b)); }
.icon-btn:active { transform: scale(.9); }
.ic { display: inline-grid; width: 22px; height: 22px; flex: none; }
.ic svg { width: 100%; height: 100%; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--field); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.late { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--tint)); flex: none; }
.dot.ok { background: var(--good); }
.dot.off { background: var(--muted); }

.notice { padding: 12px 14px; border-radius: 14px; font-size: 15px; margin: 0 0 14px; }
.notice.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.notice.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 22px/1 var(--font-display); letter-spacing: -.02em; }
.brand img { border-radius: 24%; }

.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: var(--hair); }
.ring-fg { stroke: var(--c, var(--tint)); stroke-linecap: round; transition: stroke-dasharray .6s var(--ease); }

/* ---------- 4. Pagina de prezentare ---------- */

.page-landing { padding-top: env(safe-area-inset-top, 0px); }
.lp-nav, .lp, .lp-foot { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 8px; }

.lp-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding: 56px 0 88px; }
.lp-hero h1 { font-size: clamp(2.9rem, 8.4vw, 5.4rem); line-height: .98; letter-spacing: -.04em; }
.lead { margin: 22px 0 28px; font-size: clamp(1.06rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }

.demo { width: 100%; max-width: 430px; justify-self: center; padding: 22px 18px 18px; border-radius: 36px; overflow: hidden; overflow: clip; }
.demo-head { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 16px; }
.demo-head .ring { width: 44px; height: 44px; }
.demo-date { font: 800 28px/1.1 var(--font-display); letter-spacing: -.02em; }
.demo-count { color: var(--muted); font-size: 15px; }
.demo-list { min-height: 40px; }
.demo-hint { text-align: center; color: var(--muted); font-size: 14px; padding: 8px 0 2px; }
.demo-reset { display: flex; margin: 10px auto 0; }

.lp-features h2, .lp-steps h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 24px; }
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feat { padding: 22px; border-radius: 28px; }
.feat h3 { font-size: 1.3rem; margin: 18px 0 6px; }
.feat p { color: var(--muted); max-width: 36em; }
.feat-art { height: 84px; display: flex; align-items: center; }
.feat-art.swatches i { width: 46px; height: 46px; border-radius: 50%; margin-right: -10px; background: linear-gradient(160deg, color-mix(in srgb, var(--c), #fff 30%), var(--c)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 14px -6px var(--c); }
.feat-art.notif { gap: 12px; padding: 12px 14px; height: auto; min-height: 64px; margin: 10px 0; border-radius: 20px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--hair); font-size: 14px; line-height: 1.3; }
.feat-art.notif img { border-radius: 24%; flex: none; }
.feat-art.notif b, .feat-art.notif span { display: block; }
.feat-art.notif span { color: var(--muted); }
.swipe-track { position: relative; display: block; width: min(100%, 260px); height: 52px; border-radius: 999px; background: linear-gradient(90deg, #2ECC8F, color-mix(in srgb, #2ECC8F 15%, transparent)) no-repeat; box-shadow: inset 0 0 0 1px var(--hair); }
.swipe-knob { position: absolute; right: 5px; top: 5px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); font-weight: 800; }
.feat-art.thumbs i, .feat-art.thumbs b { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-right: -14px; background: linear-gradient(160deg, color-mix(in srgb, var(--c), #fff 35%), var(--c)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bg) 60%, transparent), 0 8px 16px -8px rgba(0, 0, 0, .4); }
.feat-art.thumbs b { background: var(--btn-bg); color: var(--btn-fg); font-size: 15px; }
.link-pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 600; color: var(--muted); }
.platforms { margin: 0; font-size: 15px; }
.platforms dt { font-weight: 700; margin-top: 8px; }
.platforms dt:first-child { margin-top: 0; }
.platforms dd { margin: 0; color: var(--muted); }
.hello-pill { padding: 12px 20px; border-radius: 999px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--hair); font: 800 22px/1 var(--font-display); letter-spacing: -.02em; }

.lp-steps { padding: 88px 0 0; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { display: flex; gap: 16px; padding: 22px; border-radius: 28px; }
.steps h3 { font-size: 1.15rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 16px; }
.step-n { font: 800 44px/.9 var(--font-display); color: var(--accent); min-width: 28px; }

.lp-final { margin: 88px 0 0; padding: 56px 24px; border-radius: 36px; text-align: center; }
.lp-final h2 { font-size: clamp(1.8rem, 5vw, 3rem); }
.lp-final p { margin: 10px 0 24px; }
.lp-foot { display: flex; justify-content: space-between; padding-top: 36px; padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; }

/* Efectele paginii de prezentare */
.lp-nav { animation: fade-in .8s ease both; }
.lp-hero-copy > * { animation: rise-long 1.1s cubic-bezier(.16, 1, .3, 1) both; }
.lp-hero-copy > :nth-child(2) { animation-delay: .12s; }
.lp-hero-copy > :nth-child(3) { animation-delay: .24s; }
.lp-hero-copy > :nth-child(4) { animation-delay: .36s; }
.demo { animation: rise-long 1.2s cubic-bezier(.16, 1, .3, 1) .25s both; }
/* task-urile din demo urcă pe rând, ca în aplicație */
.demo-list .task-wrap { animation: rise-long 1s cubic-bezier(.16, 1, .3, 1) both; }
.demo-list .task-wrap:nth-child(1) { animation-delay: .65s; }
.demo-list .task-wrap:nth-child(2) { animation-delay: .75s; }
.demo-list .task-wrap:nth-child(3) { animation-delay: .85s; }
.demo-list .task-wrap:nth-child(4) { animation-delay: .95s; }
.demo-hint { animation: fade-in .8s ease 1.6s both; }

.reveal { opacity: 0; transform: translate3d(0, 44px, 0); }
.reveal.in { opacity: 1; transform: none; transition: opacity .9s ease, transform 1s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 110ms); }

/* micile ilustrații prind viață când cardul lor intră în ecran */
.feat.reveal .feat-art.swatches i, .feat.reveal .feat-art.thumbs > * { opacity: 0; transform: scale(.4); }
.feat.in .feat-art.swatches i, .feat.in .feat-art.thumbs > * { opacity: 1; transform: none; transition: opacity .4s, transform .6s var(--spring); }
.feat.in .feat-art > :nth-child(1) { transition-delay: .35s; }
.feat.in .feat-art > :nth-child(2) { transition-delay: .43s; }
.feat.in .feat-art > :nth-child(3) { transition-delay: .51s; }
.feat.in .feat-art > :nth-child(4) { transition-delay: .59s; }
.feat.in .feat-art > :nth-child(5) { transition-delay: .67s; }
.feat.in .feat-art > :nth-child(6) { transition-delay: .75s; }
.feat.reveal .feat-art.notif { opacity: 0; transform: translate3d(0, -16px, 0) scale(.96); }
.feat.in .feat-art.notif { opacity: 1; transform: none; transition: opacity .5s .4s, transform .8s var(--spring) .4s; }
.feat.reveal .swipe-knob { right: calc(100% - 47px); }
.feat.reveal .swipe-track { background-size: 0% 100%; }
.feat.in .swipe-knob { right: 5px; transition: right 1.1s cubic-bezier(.3, .7, .2, 1) .5s; }
.feat.in .swipe-track { background-size: 100% 100%; transition: background-size 1.1s cubic-bezier(.3, .7, .2, 1) .5s; }
.feat.reveal .hello-pill, .feat.reveal .link-pill { opacity: 0; transform: scale(.7); }
.feat.in .hello-pill, .feat.in .link-pill { opacity: 1; transform: none; transition: opacity .4s .4s, transform .7s var(--spring) .4s; }
.steps li.in .step-n { animation: pop .7s var(--spring) calc(var(--i, 0) * 110ms + .35s) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.feat { transition: transform .35s var(--spring); }
@media (hover: hover) { .feat.in:hover { transform: translateY(-4px); transition-delay: 0s; } }

@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; gap: 40px; padding: 28px 0 64px; }
  .steps { grid-template-columns: 1fr; }
  .lp-steps { padding-top: 64px; }
  .lp-final { margin-top: 64px; }
}
@media (max-width: 620px) {
  .feat-grid { grid-template-columns: 1fr; }
  .lp-cta .btn { flex: 1 1 100%; }
}

/* ---------- 5. Formulare (cont, instalare) și admin ---------- */

.page-form { padding-top: env(safe-area-inset-top, 0px); }
.form-shell { max-width: 440px; margin: 0 auto; padding: 36px 16px calc(64px + env(safe-area-inset-bottom, 0px)); }
.form-shell.wide { max-width: 760px; }
.form-shell > .brand { margin: 0 0 22px 6px; }
.card { padding: 26px 22px; border-radius: 30px; margin-bottom: 16px; }
.card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.card h2 { font-size: 1.25rem; margin: 22px 0 12px; }
.card > h2:first-child { margin-top: 0; }
.card > .muted { margin-bottom: 18px; }

.form label, .card > label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.form input, .card > label input {
  display: block; width: 100%; margin-top: 6px;
  padding: 13px 14px;
  border: 0; border-radius: 14px;
  background: var(--field); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hair);
  font-size: 17px; font-weight: 400;
  -webkit-appearance: none; appearance: none;
}
.form input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.form .btn { width: 100%; margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.alt-link { margin-top: 18px; text-align: center; color: var(--muted); font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.checks { list-style: none; padding: 0; margin: 0 0 18px; font-size: 15px; }
.checks li { padding: 3px 0; }
.checks .ok { color: var(--good); }
.checks .bad { color: var(--bad); }
textarea.code { display: block; width: 100%; margin: 8px 0 12px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.steps-plain { padding-left: 22px; margin: 0 0 20px; }
.steps-plain li { margin-bottom: 6px; }
.pw { font-size: 17px; font-weight: 700; user-select: all; }

.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px; border-radius: 22px; }
.stat b { display: block; font: 800 30px/1.1 var(--font-display); }
.stat span { color: var(--muted); font-size: 14px; }
.inline-form { margin-top: 6px; }
.update-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.update-form input[type='file'] { flex: 1 1 220px; min-width: 0; padding: 10px; border-radius: 14px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); font-size: 15px; }
.table-scroll { overflow-x: auto; margin: 0 -8px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 8px; white-space: nowrap; }
.table td { padding: 12px 8px; border-top: 1px solid var(--hair); vertical-align: top; }
.table .actions { display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 150px; }

@media (max-width: 620px) {
  .grid2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- 6. Dashboard ---------- */

/* Aplicația e un cadru fix cât ecranul; derulează doar zona .scroll din interior.
   Când apare tastatura, JS pune .kb-open pe <html> și --vvh = înălțimea rămasă vizibilă. */
html:has(.page-app), .page-app { height: 100%; overflow: hidden; overscroll-behavior: none; }
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
/* Instalată pe Home Screen, pe iPhone, zona pentru elemente fixe e mai scundă decât ecranul
   (cu cât ocupă bara de stare), așa că „inset: 0" lasă o fâșie goală jos.
   Aici 100vh înseamnă exact înălțimea ecranului, deci dăm înălțimea explicit. */
@media (display-mode: standalone) {
  html:has(.page-app) { height: 100vh; min-height: calc(100% + env(safe-area-inset-top, 0px)); }
  .page-app { height: 100vh; }
  .app, #overlay { bottom: auto; height: 100vh; }
  .wall { bottom: auto; height: calc(100vh + 280px); }
}
.standalone:has(.page-app) { height: 100vh; min-height: calc(100% + env(safe-area-inset-top, 0px)); }
.standalone .page-app { height: 100vh; }
.standalone .app, .standalone #overlay { bottom: auto; height: 100vh; }
.standalone .wall { bottom: auto; height: calc(100vh + 280px); }
.kb-open .app, .kb-open #overlay { bottom: auto; height: var(--vvh); }
.view-host { flex: 1; min-height: 0; display: flex; }
.view { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.scroll {
  flex: 1; min-height: 0;
  overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) max(16px, calc((100% - 688px) / 2)) calc(env(safe-area-inset-bottom, 0px) + 48px);
}

/* Intrările în ecran: elementele urcă pe rând de jos — listele la deschiderea aplicației,
   task-urile la intrarea într-o listă. Întoarcerea la liste nu are animație. Se animă rândurile, niciodată un strămoș al barei de jos:
   pe iPhone, un câmp de text aflat într-un element animat cu transform își desenează cursorul decalat. */
.view.enter-home .top, .view.enter-home .banner,
.view.enter-home .list-wrap, .view.enter-home .list-card.new, .view.enter-home .install-slot,
.view.enter-fwd .bar, .view.enter-fwd .list-head, .view.enter-fwd .banner,
.view.enter-fwd .task-wrap, .view.enter-fwd .empty { animation: rise-long 1s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 75ms + 80ms); }
.view.enter-fwd .task-wrap { animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
.view.enter-home .top, .view.enter-fwd .bar, .view.enter-fwd .list-head { animation-delay: 0ms; }
.view.enter-home .swipe-hint, .view.enter-home .done-head, .view.enter-fwd .done-head { animation: fade-in .9s ease .6s both; }
.view.enter-fwd > .addbar-wrap { animation: fade-in .5s ease .15s both; }
@keyframes rise-long { from { opacity: 0; transform: translate3d(0, 48px, 0); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-fwd { from { opacity: 0; transform: translate3d(28px, 0, 0); } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.96); } }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 4px 20px; }
.top-date { color: var(--muted); font-size: 15px; font-weight: 600; }
.top h1 { font-size: clamp(1.6rem, 6.8vw, 2.1rem); }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; color: var(--text); font: 800 19px/1 var(--font-display); transition: transform .18s var(--spring); }
.avatar:active { transform: scale(.9); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 8px 14px 14px; border-radius: 24px; margin-bottom: 16px; }
.banner-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--tint); color: #fff; }
.banner div { flex: 1; }
.banner p { color: var(--muted); font-size: 15px; margin: 2px 0 10px; }
.banner p:last-child { margin-bottom: 0; }

.banner .btn { margin-top: 2px; }

.lists { display: block; }
.list-wrap { border-radius: 26px; margin-bottom: 12px; --r: 26px; }
.list-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 78px; padding: 14px 16px;
  border: 0; border-radius: inherit;
  color: var(--text); text-decoration: none; text-align: left;
  /* cardul ia culoarea listei */
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--c) 36%, transparent), color-mix(in srgb, var(--c) 8%, transparent) 75%),
    linear-gradient(145deg, var(--glass-a), var(--glass-b));
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none;
  will-change: transform;
}
.list-main { flex: 1; min-width: 0; }
.list-card h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.list-card p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.grip { display: grid; place-items: center; width: 44px; height: 48px; flex: none; margin-right: -8px; color: var(--muted); touch-action: none; cursor: grab; }
.grip .ic { width: 24px; height: 24px; }
.task-wrap.lifted .grip { cursor: grabbing; color: var(--text); }
.list-card.is-finished { filter: saturate(.55); }
.list-card.is-finished h3 { color: var(--muted); }
.orb {
  display: grid; place-items: center;
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  font-size: 23px; line-height: 1;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c), #fff 32%), var(--c));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -6px 10px -6px rgba(0, 0, 0, .25), 0 10px 18px -10px var(--c);
}
.orb.big { width: 64px; height: 64px; font-size: 30px; flex: none; transition: background .3s; }
.list-card.new { background: transparent; box-shadow: none; border: 1.5px dashed var(--hair); border-radius: 26px; transition: transform .2s var(--spring); }
.list-card.new:active { transform: scale(.98); }
.list-card.new .orb { background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
.swipe-hint { margin: 14px 0 0; }

/* O listă deschisă */
.list-view .scroll { padding-bottom: 120px; }
.list-view.no-addbar .scroll { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 48px); }
.bar { display: flex; justify-content: space-between; margin-bottom: 14px; }
.bar-right { display: flex; gap: 10px; }
.share-btn { position: relative; }
.share-btn.on::after { content: ''; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--bg); }
.list-head { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; padding: 0 4px 20px; }
/* iconița listei stă în dreptul titlului; restul (numărătoarea, notele) pe toată lățimea, dedesubt */
.list-head > * { grid-column: 1 / -1; }
.list-head > .list-emoji { grid-column: 1; display: grid; place-items: center; font-size: clamp(1.9rem, 8.4vw, 2.4rem); line-height: 1; color: var(--c); }
.list-head > h1 { grid-column: 2; min-width: 0; font-size: clamp(2rem, 9vw, 2.6rem); color: color-mix(in oklab, var(--c) 60%, var(--text)); overflow-wrap: anywhere; }
.list-sub { color: var(--muted); font-weight: 600; margin-top: 4px; }

.empty { text-align: center; padding: 44px 24px; color: var(--muted); }
.empty-t { font: 800 1.3rem/1.2 var(--font-display); color: var(--text); margin-bottom: 6px; }

.done-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 4px 10px; }
.done-toggle { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 6px 0; font-weight: 650; color: var(--muted); }
.done-toggle .ic { width: 18px; height: 18px; transition: transform .3s var(--spring); }
.done-toggle.open .ic { transform: rotate(90deg); }

/* Bara de adăugat — lipită de marginea de jos a cadrului (nu de fereastră), deci stă nemișcată la scroll */
.addbar-wrap {
  position: absolute; z-index: 20;
  left: 0; right: 0; bottom: 0;
  padding: 0 max(14px, calc((100% - 692px) / 2)) max(env(safe-area-inset-bottom, 0px), 12px);
  pointer-events: none;
}
.kb-open .addbar-wrap { padding-bottom: 10px; }
.addbar-wrap > * { pointer-events: auto; }
.addbar { display: flex; align-items: center; gap: 4px; height: 58px; padding: 0 7px; border-radius: 999px; }
.add-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 17px; outline: none; }
.add-input::placeholder { color: var(--muted); }
.add-more, .add-send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; transition: transform .18s var(--spring); }
.add-more { background: transparent; color: var(--muted); }
.add-send { background: var(--c, var(--tint)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.add-send:active, .add-more:active { transform: scale(.88); }
.parse-chip { display: inline-block; margin: 0 0 8px 8px; padding: 8px 14px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: pre; animation: rise .35s var(--spring) both; }

/* ---------- 7. Task-uri și swipe ---------- */

.task-wrap { position: relative; margin-bottom: 10px; border-radius: 22px; --pull: 0; --dx: 0px; }
.task-wrap.collapsing { height: 0 !important; margin-bottom: 0; opacity: 0; transition: height .24s var(--ease), margin .24s var(--ease), opacity .2s; }

/* Ce se vede sub rând în timp ce tragi */
.task-under { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 14px; border-radius: inherit; opacity: 0; transition: opacity .18s; font-size: 15px; white-space: nowrap; color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
/* o pastilă colorată care crește exact cât e descoperit de rând, fără să intre sub el */
.task-under.right { background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 55%, transparent)); justify-content: flex-start; clip-path: inset(0 calc(100% - var(--dx) + 5px) 0 0 round var(--r, 22px)); }
.task-under.left { background: linear-gradient(270deg, #FF4D5E, color-mix(in srgb, #FF4D5E 55%, transparent)); justify-content: flex-end; clip-path: inset(0 0 0 calc(100% - var(--dx) + 5px) round var(--r, 22px)); }
.task-wrap[data-dir='right'] .task-under.right,
.task-wrap[data-dir='left'] .task-under.left { opacity: calc(.35 + var(--pull) * .65); }
.task-under span { display: inline-block; opacity: calc((var(--pull) - .45) * 2.5); transform: scale(calc(.8 + var(--pull) * .2)); transition: transform .25s var(--spring); }
.task-wrap.armed .task-under span { transform: scale(1.1); transform-origin: left center; }
.task-wrap.armed .task-under.left span { transform-origin: right center; }

.task {
  display: flex; align-items: center; gap: 4px;
  min-height: 60px; padding: 8px 14px 8px 4px;
  border-radius: inherit;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  cursor: pointer;
  will-change: transform;
}
.task.is-new { animation: rise .45s var(--spring) both; }

.check { position: relative; width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; background: none; }
.check::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; border: 2.2px solid var(--c, var(--tint)); transition: background .2s, transform .2s var(--spring); }
.check:active::before { transform: scale(.82); }
.check::after { content: ''; position: absolute; left: 20.5px; top: 16px; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg) scale(0); transition: transform .25s var(--spring); }
.task.is-done .check::before, .task.leaving:not(.is-done) .check::before { background: var(--c, var(--tint)); }
.task.is-done .check::after, .task.leaving:not(.is-done) .check::after { transform: rotate(45deg) scale(1); }

.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 550; overflow-wrap: anywhere; }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--c) 70%, transparent); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.meta-list { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.meta-ic { width: 15px; height: 15px; }
.task-star { color: #FFC233; width: 20px; height: 20px; margin-left: 6px; }
.task-star svg { fill: currentColor; }

/* „Adaugă APP la ecranul principal": stă jos pe ecranul cu liste (sau după ultima listă, dacă sunt multe) */
.view.home > .scroll { display: flex; flex-direction: column; }
.install-slot { margin-top: auto; padding-top: 28px; --i: 6; }
.install-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 12px 14px 14px;
  border: 0; border-radius: 26px; text-align: left; color: var(--text);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--tint) 30%, transparent), color-mix(in srgb, var(--tint) 6%, transparent) 80%),
    linear-gradient(145deg, var(--glass-a), var(--glass-b));
  transition: transform .2s var(--spring);
}
.install-btn:active { transform: scale(.97); }
.install-ic { position: relative; flex: none; width: 46px; height: 46px; }
.install-ic img { width: 46px; height: 46px; border-radius: 24%; box-shadow: 0 8px 18px -8px rgba(40, 60, 160, .6); }
.install-plus { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 0 0 2.5px var(--bg); }
.install-plus .ic { width: 14px; height: 14px; }
.install-txt { flex: 1; min-width: 0; }
.install-txt b { display: block; font: 800 1.05rem/1.25 var(--font-display); letter-spacing: -.01em; }
.install-txt small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.install-go { width: 20px; height: 20px; color: var(--muted); }

.guide-hero { display: flex; align-items: center; gap: 14px; padding: 0 4px 4px; }
.guide-hero img { flex: none; border-radius: 24%; box-shadow: 0 10px 22px -10px rgba(40, 60, 160, .6); }
.guide-hero p { color: var(--muted); font-size: 15px; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.guide-step { display: flex; align-items: center; gap: 14px; padding: 14px; }
.guide-n { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--tint); color: #fff; font-weight: 800; }
.guide-txt { flex: 1; min-width: 0; }
.guide-txt b { display: block; font-weight: 700; }
.guide-txt small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.35; }
.guide-art { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--field); color: var(--accent); }
.guide-art .ic { width: 22px; height: 22px; }

/* Miniaturile și butonul „+" din dreapta unui task */
.gal { display: flex; align-items: center; flex: none; margin-left: 6px; padding: 4px 0 4px 4px; border: 0; background: none; }
.gal img, .gal .gal-vid, .gal-more { width: 36px; height: 36px; flex: none; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg) 70%, transparent), 0 4px 10px -4px rgba(0, 0, 0, .4); -webkit-touch-callout: none; }
.gal > * + * { margin-left: -14px; }
.gal-vid { display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--tint)) 45%, var(--bg)); color: #fff; }
.gal-vid .ic { width: 16px; height: 16px; }
.gal-more { display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-fg); font-size: 12px; font-weight: 700; }
.add-media { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; margin: 0 -6px 0 2px; border: 0; border-radius: 50%; background: none; color: var(--muted); transition: transform .18s var(--spring); }
.add-media:active { transform: scale(.85); }
.add-media .ic { width: 20px; height: 20px; }
.add-media.busy .ic { opacity: 0; }
.add-media.busy::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 2.4px solid var(--hair); border-top-color: var(--c, var(--tint)); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mutarea prin apăsare lungă */
.task-wrap.lifted { z-index: 30; transition: none; }
.task-wrap.lifted > .task, .task-wrap.lifted > .list-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 26px 50px -18px rgba(0, 0, 12, .75); }
.task-wrap.shifting { transition: transform .22s var(--ease); }

/* Vizualizarea pozelor / clipurilor */
#overlay > .viewer { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; background: rgba(4, 6, 16, .94); color: #F3F5FF; opacity: 0; transition: opacity .2s; touch-action: none; }
#overlay > .viewer.open { opacity: 1; }
.viewer-bar { display: flex; align-items: center; gap: 6px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px 8px 18px; flex: none; }
.viewer-bar .icon-btn { color: #F3F5FF; }
.viewer-bar .icon-btn.armed { color: var(--bad); background: rgba(255, 255, 255, .12); }
.viewer-count { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.viewer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(243, 245, 255, .6); font-size: 15px; padding: 0 8px; }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 12px); }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: 6px; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.viewer-stage video { width: 100%; height: 100%; }
.viewer-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }

/* Link public */
.share-box .btn-row { margin-bottom: 10px; }
.share-url { display: block; width: 100%; margin-bottom: 10px; padding: 11px 12px; border: 0; border-radius: 12px; background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); font-size: 14px; color: var(--muted); text-overflow: ellipsis; }

/* Pagina publică a unei liste partajate */
.form-shell.shared { max-width: 640px; }
.shared .list-head .small { margin-top: 10px; }
.task.static { cursor: default; touch-action: auto; user-select: text; -webkit-user-select: text; align-items: flex-start; padding-top: 6px; padding-bottom: 12px; }
.task.static .check { margin-top: 0; }
.task.static .task-main { padding-top: 12px; }
.task-notes { margin-top: 6px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.shared-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shared-media a { display: block; border-radius: 14px; overflow: hidden; }
.shared-media img, .shared-media .gal-vid { display: grid; place-items: center; width: 64px; height: 64px; object-fit: cover; border-radius: 14px; text-decoration: none; }
.shared-done { font-size: 1.1rem; color: var(--muted); margin: 22px 4px 12px; }
.shared-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; padding: 0 4px; }
.shared-foot .brand { font-size: 18px; }

/* ---------- 8. Sheet, toast, confetti ---------- */

#overlay { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
#overlay > * { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0 0 -60vh 0; z-index: 40; background: rgba(4, 6, 18, .5); opacity: 0; transition: opacity .35s; touch-action: none; }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: absolute; z-index: 41;
  left: 0; right: 0; bottom: 0;
  max-width: 600px; margin: 0 auto;
  max-height: calc(100% - env(safe-area-inset-top, 0px) - 28px);
  display: flex; flex-direction: column;
  border-radius: 34px 34px 0 0;
  transform: translateY(105%);
  transition: transform .5s var(--spring);
}
.sheet.open { transform: translateY(0); }
/* sub sheet, ca arcul animației să nu lase un gol jos */
.sheet::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 80px; background: var(--live-b); }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--muted); opacity: .5; margin: 9px auto 0; flex: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px 8px 22px; flex: none; touch-action: none; }
.sheet-head h2 { font-size: 1.35rem; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 16px calc(max(env(safe-area-inset-bottom, 0px), 16px) + 8px); }
.kb-open .sheet-body { padding-bottom: 16px; }
.sheet-form { display: flex; flex-direction: column; gap: 12px; }
.sheet-form > .btn { width: 100%; }
/* butonul principal rămâne la vedere deasupra tastaturii, oricât de lung e formularul */
.sheet-form > .btn.primary { position: sticky; bottom: 0; z-index: 3; flex: none; box-shadow: 0 0 0 6px var(--live-b), 0 -14px 22px -4px var(--live-b); }

.group { overflow: hidden; }
.group.pad { padding: 14px; }
.group-title { font: 600 14px/1.3 var(--font-body); letter-spacing: 0; color: var(--muted); margin: 8px 6px -4px; }
.cell { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 8px 16px; }
.cell + .cell, .pill-row + .cell { border-top: 1px solid var(--hair); }
.cell-l { font-weight: 550; flex: none; }
.cell select, .cell input[type='text'] { min-width: 0; flex: 1; text-align: right; text-align-last: right; border: 0; background: transparent; color: var(--accent); font-weight: 600; -webkit-appearance: none; appearance: none; outline-offset: 4px; padding: 6px 0; }
.cell select:disabled { color: var(--muted); opacity: .6; }
.cell input[type='datetime-local'] { min-width: 150px; min-height: 38px; border: 0; border-radius: 10px; padding: 6px 10px; background: var(--field); color: var(--text); }

.f-title, .f-notes { display: block; width: 100%; border: 0; background: transparent; resize: none; outline: none; overflow: hidden; }
.f-title { padding: 16px 16px 4px; font: 700 1.25rem/1.3 var(--font-display); }
.f-notes { padding: 6px 16px 14px; font-size: 16px; color: var(--muted); }
.f-title::placeholder, .f-notes::placeholder, .f-name::placeholder { color: var(--muted); opacity: .8; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

.pill-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 14px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--field); font-size: 15px; font-weight: 600; white-space: nowrap; transition: transform .18s var(--spring); }
.pill:active { transform: scale(.92); }
.pill.quiet { background: transparent; color: var(--muted); }

.switch { -webkit-appearance: none; appearance: none; position: relative; width: 52px; height: 32px; flex: none; margin: 0; border-radius: 999px; background: rgba(120, 124, 140, .4); transition: background .25s; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .3s var(--spring); }
.switch:checked { background: #34C77B; }
.switch:checked::after { transform: translateX(20px); }

.hint { font-size: 14px; color: var(--muted); padding: 0 6px; }
.hint .link { display: block; }
.hint.center { text-align: center; }

.list-preview { display: flex; align-items: center; gap: 14px; padding: 4px 4px 6px; }
.f-name { flex: 1; min-width: 0; border: 0; border-bottom: 2px solid var(--hair); border-radius: 0; background: transparent; padding: 8px 0; font: 800 1.5rem/1.2 var(--font-display); outline: none; }
.f-name:focus { border-color: var(--c); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 12px; justify-items: center; }
.swatch { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; padding: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--c), #fff 30%), var(--c)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); transition: transform .2s var(--spring); }
.swatch.on { outline: 2.5px solid var(--text); outline-offset: 3px; transform: scale(.9); }
.swatch.custom:not(.on) { background: conic-gradient(#FF5E6C, #FFC233, #2ECC8F, #2FB8FF, #9B6BFF, #FF5E6C); }
.swatch-custom { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
/* pe telefon, în sheet-ul de listă: culorile pe un singur rând care se derulează lateral, ca să rămână loc deasupra tastaturii */
@media (max-width: 620px) {
  .swatches.row { display: flex; gap: 12px; overflow-x: auto; margin: -6px -14px; padding: 6px 14px; scrollbar-width: none; overscroll-behavior: contain; }
  .swatches.row::-webkit-scrollbar { display: none; }
  .swatches.row .swatch { flex: none; }
  .list-preview .orb.big { width: 52px; height: 52px; font-size: 25px; }
}
/* pe telefon: două rânduri de iconițe (al treilea se ițește, ca să se vadă că se poate derula) */
@media (max-width: 620px) {
  .emojis { max-height: 112px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: -4px; padding: 4px; }
}
.emoji { height: 44px; border: 0; border-radius: 14px; background: transparent; font-size: 24px; line-height: 1; transition: transform .2s var(--spring), background .2s; }
.emoji.on { background: color-mix(in srgb, var(--c) 35%, transparent); transform: scale(1.08); }

.push-state { display: flex; gap: 10px; align-items: baseline; font-size: 15px; margin-bottom: 12px; }
.push-state:last-child { margin-bottom: 0; }
.push-state .dot { transform: translateY(-1px); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; padding-left: 12px; padding-right: 12px; font-size: 15px; }
.group.pad > .btn { width: 100%; }
details.group summary { font-weight: 600; cursor: pointer; list-style: none; }
details.group summary::-webkit-details-marker { display: none; }
details.group[open] summary { margin-bottom: 12px; }
details.group input { display: block; width: 100%; margin-bottom: 10px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--field); }
.sheet-form form .btn { width: 100%; }

.toast {
  position: absolute; z-index: 60;
  left: 16px; right: 16px; bottom: calc(max(env(safe-area-inset-bottom, 0px), 12px) + 76px);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: fit-content; max-width: min(460px, calc(100% - 32px)); margin: 0 auto;
  padding: 12px 18px;
  border-radius: 26px; font-size: 15px; font-weight: 600; line-height: 1.3;
  transform: translateY(24px) scale(.94); opacity: 0;
  transition: transform .4s var(--spring), opacity .25s;
}
.toast.open { transform: translateY(0) scale(1); opacity: 1; }
.toast button { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 700; white-space: nowrap; }

#overlay > .confetti { position: absolute; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; left: 50%; bottom: 22%; width: 9px; height: 14px; opacity: 0; animation: confetti 1.6s cubic-bezier(.12, .75, .3, 1) var(--d) forwards; }
@keyframes confetti {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--x), var(--y), 0) rotate(var(--r)); }
}

/* Cine a cerut mai puțină mișcare primește o interfață liniștită */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wall i { animation: none; }
}
