/* Kis naplóm – Holdfény levendula téma */
:root {
  --page: #22212A;
  --surface: #2D2C38;
  --surface-2: #363545;
  --border: #46445A;
  --border-soft: #3B3A4B;
  --text: #ECE8F5;
  --text-2: #B9B3CC;
  --text-3: #8C86A3;
  --lav: #D8B4F0;
  --lav-deep: #B48BD6;
  --rose: #F0A9C8;
  --rose-deep: #C7739B;
  --period: #5E3A5E;
  --period-strong: #8A4A7A;
  --fertile: #3E4A63;
  --mint: #9FD3B5;
  --gold: #E9CF8E;
  --note: #EDE3F7;
  --note-text: #3A3046;
  --note-2: #F7E4EC;
  --note-3: #E2F1E8;
  --danger: #F29A9A;
  --radius: 14px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --hand: "Caveat", "Segoe Print", cursive;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* csillagos háttér */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #ffffff30 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, #ffffff28 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 72%, #D8B4F02a 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 84%, #ffffff22 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 55%, #F0A9C826 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 40%, #ffffff18 50%, transparent 51%);
}

/* ---------- PIN képernyő ---------- */
.lock {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.lock-card {
  width: 100%; max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px 24px 28px;
  text-align: center;
}
.lock-moon { width: 56px; height: 56px; margin: 0 auto 6px; color: var(--lav); }
.lock h1 { font-family: var(--hand); font-weight: 600; font-size: 36px; margin: 0; color: var(--lav); line-height: 1.1; }
.lock p { margin: 4px 0 20px; color: var(--text-2); font-size: 14px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 8px; min-height: 16px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--lav); transition: background .15s, transform .15s; }
.pin-dots span.on { background: var(--lav); transform: scale(1.1); }
.pin-error { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-pad button {
  height: 60px; border-radius: 50%; aspect-ratio: 1; justify-self: center;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 22px; font-weight: 600; transition: background .12s, transform .08s;
}
.pin-pad button:hover { background: #403F52; }
.pin-pad button:active { transform: scale(.94); background: var(--period); }
.pin-pad button.ghost { background: transparent; border-color: transparent; font-size: 14px; color: var(--text-2); }
.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }

/* ---------- fejléc + navigáció ---------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 20px 40px; }
header.top {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 22px;
}
.logo { font-family: var(--hand); font-size: 30px; font-weight: 600; color: var(--lav); white-space: nowrap; margin-right: auto; line-height: 1; }
.logo small { color: var(--rose); font-size: 22px; }
nav.tabs { display: flex; gap: 4px; }
nav.tabs button {
  background: none; border: none; padding: 8px 14px; border-radius: 999px;
  color: var(--text-2); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 7px;
}
nav.tabs button:hover { color: var(--text); background: var(--surface); }
nav.tabs button.active { color: var(--page); background: var(--lav); }
nav.tabs svg, nav.bottom svg { width: 18px; height: 18px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2);
}
.icon-btn:hover { color: var(--lav); border-color: var(--lav-deep); }
.icon-btn svg { width: 18px; height: 18px; }

nav.bottom { display: none; }

/* ---------- általános elemek ---------- */
h2.page-title { font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--lav); margin: 0; line-height: 1.2; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { font-family: var(--hand); font-size: 22px; color: var(--rose); }
.page-head .spacer { flex: 1; }
.card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px;
}
.card h3 { margin: 0 0 12px; font-family: var(--serif); font-weight: 500; font-size: 19px; color: var(--text); }
.card h3 .hand { font-family: var(--hand); color: var(--rose); font-size: 22px; margin-left: 4px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }

input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; min-height: 40px; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--lav-deep); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { filter: invert(.8); }
textarea { resize: vertical; min-height: 70px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); flex: 1; min-width: 120px; }

.btn {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px;
  padding: 9px 18px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; white-space: nowrap;
}
.btn:hover { border-color: var(--lav-deep); }
a.btn { text-decoration: none; }
.btn.primary { background: var(--lav); border-color: var(--lav); color: var(--page); }
.btn.primary:hover { background: #E4C8F6; }
.btn.small { padding: 5px 12px; min-height: 32px; font-size: 13px; }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); }
.btn svg { width: 16px; height: 16px; }
.del {
  border: none; background: none; color: var(--text-3); width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.del:hover { color: var(--danger); background: #ffffff0d; }
.del svg { width: 15px; height: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; color: var(--text-2);
}
.chip.on { background: var(--period); border-color: var(--rose-deep); color: var(--text); }
.chip.on.lav { background: #4B3E66; border-color: var(--lav-deep); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.seg button { border: none; background: none; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.seg button.on { background: var(--lav); color: var(--page); }

.empty { text-align: center; padding: 24px 10px; color: var(--text-3); }
.empty .hand { font-family: var(--hand); font-size: 22px; color: var(--text-2); display: block; }

/* washi-tape cetli */
.note {
  position: relative; background: var(--note); color: var(--note-text);
  border-radius: 4px; padding: 20px 16px 14px; transform: rotate(-.6deg);
}
.note.pink { background: var(--note-2); }
.note.mint { background: var(--note-3); }
.note::before {
  content: ""; position: absolute; top: -9px; left: 24px; width: 70px; height: 18px;
  background: var(--rose); opacity: .75; transform: rotate(-3deg); border-radius: 2px;
}
.note.pink::before { background: var(--lav); left: auto; right: 24px; transform: rotate(4deg); }
.note.mint::before { background: var(--gold); }
.note h4 { font-family: var(--hand); font-size: 24px; font-weight: 600; margin: 0 0 6px; line-height: 1; }
.note .faint { color: #6E6380; }

.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--lav); border-radius: 99px; transition: width .4s; }
.bar.rose > i { background: var(--rose); }
.bar.mint > i { background: var(--mint); }

.money-in { color: var(--mint); }
.money-out { color: var(--rose); }

/* ---------- naptár ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--text-3); font-weight: 700; padding-bottom: 2px; letter-spacing: .04em; }
.day {
  position: relative; min-height: 96px; border-radius: 12px; padding: 6px 7px;
  background: var(--surface); border: 1px solid var(--border-soft); text-align: left;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden; transition: border-color .12s;
}
.day:hover { border-color: var(--border); }
.day.other { opacity: .35; }
.day .num { font-size: 13px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.day.today .num span.n { background: var(--lav); color: var(--page); border-radius: 99px; padding: 0 7px; }
.day.sel { border-color: var(--lav); box-shadow: 0 0 0 1px var(--lav) inset; }
.day.period { background: var(--period); border-color: #74466F; }
.day.period-pred { border: 1.5px dashed var(--rose-deep); }
.day.fertile { background: var(--fertile); }
.day.ovul .num::after { content: "✧"; color: var(--gold); margin-left: auto; }
.day .sticker { position: absolute; right: 6px; bottom: 4px; font-size: 20px; line-height: 1; }
.day .flow { font-size: 9px; letter-spacing: 1px; color: var(--rose); }
.day .ev {
  font-size: 11px; line-height: 1.3; padding: 1px 5px; border-radius: 0 5px 5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #ffffff10; color: var(--text);
}
.day .ev.more { background: none; color: var(--text-3); padding: 0 2px; }
.day .tint { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }

.day-panel .date-big { font-family: var(--serif); font-size: 24px; color: var(--lav); margin: 0; line-height: 1.2; }
.day-panel .weekday { font-family: var(--hand); font-size: 22px; color: var(--rose); }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; margin: 16px 0 8px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.li {
  display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px;
  border: 1px solid transparent;
}
.li .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.li .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.li .time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.stickers { display: flex; flex-wrap: wrap; gap: 4px; }
.stickers button {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-soft); background: var(--surface-2); font-size: 18px;
}
.stickers button.on { border-color: var(--lav); background: #4B3E66; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; }
.swatches button.on { border-color: var(--text); }
.flow-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.flow-pick button {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 8px 2px 6px;
  font-size: 11px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.flow-pick button .drops { color: var(--rose); font-size: 13px; letter-spacing: -1px; height: 18px; }
.flow-pick button.on { background: var(--period); border-color: var(--rose); color: var(--text); }

/* összefoglaló sáv */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 12px 14px; }
.stat .label { font-size: 12px; color: var(--text-3); font-weight: 700; letter-spacing: .04em; }
.stat .value { font-size: 20px; font-weight: 700; margin-top: 2px; }
.stat .value.hand { font-family: var(--hand); font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--rose); }

/* ---------- teendők ---------- */
.todo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.todo { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.todo.done .t { text-decoration: line-through; color: var(--text-3); }
.check {
  width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--lav-deep); background: none; flex: none;
  display: inline-flex; align-items: center; justify-content: center; color: var(--page);
}
.check.on { background: var(--lav); border-color: var(--lav); }
.check svg { width: 15px; height: 15px; }
.todo .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #ffffff10; color: var(--text-2); white-space: nowrap; }
.badge.late { background: #6A3A4A; color: #FFD2DC; }
.badge.today { background: #4B3E66; color: var(--lav); }

/* ---------- pénz ---------- */
.money-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cat-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- spórolás ---------- */
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.goal .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.goal .emoji { font-size: 28px; line-height: 1; }
.goal .name { font-family: var(--serif); font-size: 20px; }
.goal .amounts { display: flex; justify-content: space-between; font-size: 13px; margin: 8px 0 12px; }
.goal .plan { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.goal .plan b { color: var(--lav); }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }

/* ---------- ciklus ---------- */
.cycle-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.moon-ring { position: relative; width: 240px; height: 240px; margin: 4px auto 10px; }
.moon-ring svg { width: 100%; height: 100%; }
.moon-ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.moon-ring .center .big { font-family: var(--serif); font-size: 46px; color: var(--lav); line-height: 1; }
.moon-ring .center .hand { font-family: var(--hand); font-size: 22px; color: var(--rose); }
.phase-name { text-align: center; font-weight: 700; margin-bottom: 4px; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.hist-row:last-child { border-bottom: none; }
.hist-drops { color: var(--rose); letter-spacing: 1px; font-size: 12px; flex: 1; text-align: right; }

/* ---------- beállítások modál ---------- */
.modal-back { position: fixed; inset: 0; background: #0e0d14b3; display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; }
.modal h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 14px; color: var(--lav); font-size: 22px; }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--lav); color: var(--page); font-weight: 700; padding: 10px 18px; border-radius: 99px;
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 60; font-size: 14px;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reszponzív ---------- */
@media (max-width: 1020px) {
  .cal-layout, .todo-layout, .money-layout, .cycle-layout { grid-template-columns: minmax(0, 1fr); }
  nav.tabs button span { display: none; }
  nav.tabs button { padding: 9px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .shell { padding: 0 16px calc(84px + env(safe-area-inset-bottom)); }
  header.top { padding: 12px 0 10px; margin-bottom: 16px; position: sticky; top: 0; background: var(--page); z-index: 20; }
  .logo { font-size: 26px; }
  nav.tabs { display: none; }
  nav.bottom {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  nav.bottom button {
    flex: 1; background: none; border: none; color: var(--text-3);
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; padding: 4px 0;
  }
  nav.bottom button svg { width: 22px; height: 22px; }
  nav.bottom button.active { color: var(--lav); }
  h2.page-title { font-size: 25px; }
  .cal-grid { gap: 3px; }
  .day { min-height: 54px; padding: 4px; border-radius: 9px; align-items: center; }
  .day .num { font-size: 12px; justify-content: center; }
  .day.ovul .num::after { display: none; }
  .day .ev { display: none; }
  .day .ev-dots { display: flex !important; }
  .day .sticker { position: static; font-size: 14px; }
  .day .flow { display: none; }
  .summary { gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .value { font-size: 17px; }
  .card { padding: 15px; }
  .moon-ring { width: 210px; height: 210px; }
  .cat-row { grid-template-columns: 90px 1fr auto; }
  #toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
.ev-dots { display: none; gap: 2px; justify-content: center; }
.ev-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }

/* =========================================================
   Mozgás – finom, egységes, prémium animációk
   ========================================================= */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45);
}

/* gombok, kártyák – tapintható visszajelzés */
.btn, .icon-btn, .chip, .stickers button, .swatches button, .flow-pick button, .check, .del, .seg button, nav.tabs button, nav.bottom button {
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), color .25s var(--ease-out), transform .25s var(--ease-spring), box-shadow .25s var(--ease-out);
}
.btn:active, .icon-btn:active, .chip:active, .stickers button:active, .flow-pick button:active, .seg button:active { transform: scale(.95); }
.btn.primary { box-shadow: 0 6px 20px -8px #D8B4F099; }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -8px #D8B4F0b3; }
.stickers button:hover, .swatches button:hover { transform: translateY(-2px) scale(1.06); }
.stickers button.on, .swatches button.on { transform: scale(1.08); }
.card, .stat { transition: border-color .3s var(--ease-out), transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.stat:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: 0 14px 30px -18px #000; }
.li, .todo { transition: background-color .25s var(--ease-out), transform .3s var(--ease-out); }
.li:hover, .todo:hover { background: #3c3b4d; }
.note { transition: transform .45s var(--ease-spring); }
.note:hover { transform: rotate(0deg) translateY(-3px); }

/* fülek – csúszó kijelölés */
nav.tabs { position: relative; }
nav.tabs .ind {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 999px; background: var(--lav);
  transition: left .45s var(--ease-out), width .45s var(--ease-out); z-index: 0;
  box-shadow: 0 8px 22px -10px #D8B4F0cc;
}
nav.tabs button { position: relative; z-index: 1; }
nav.tabs button.active { background: transparent; color: var(--page); }
nav.bottom .ind {
  position: absolute; top: 4px; height: 3px; width: 0; left: 0; border-radius: 99px; background: var(--lav);
  transition: left .45s var(--ease-out), width .45s var(--ease-out);
}
@media (min-width: 721px) { nav.bottom .ind { display: none; } }
nav.bottom button.active svg { animation: bob .5s var(--ease-spring); }
@keyframes bob { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-4px) scale(1.12); } 100% { transform: none; } }

.logo .hello { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 12px; letter-spacing: .02em; vertical-align: 4px; }
@media (max-width: 720px) { .logo .hello { display: none; } }

/* nézet belépés – lépcsőzetes felúszás */
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(3px); } }
.rise { animation: rise .7s var(--ease-out) backwards; }
main.enter .page-head { animation: rise .6s var(--ease-out) backwards; }
.shell-in header.top { animation: fadeDown .7s var(--ease-out) backwards; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* naptár */
.day { transition: border-color .25s var(--ease-out), transform .3s var(--ease-out), background-color .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.day:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px #000; }
.day.sel { animation: selPulse .5s var(--ease-out); }
@keyframes selPulse { 0% { box-shadow: 0 0 0 0 #D8B4F099, 0 0 0 1px var(--lav) inset; } 100% { box-shadow: 0 0 0 7px #D8B4F000, 0 0 0 1px var(--lav) inset; } }
main.enter .cal-grid .day { animation: dayIn .55s var(--ease-out) backwards; }
main.enter .cal-grid .day:nth-child(7n+1) { animation-delay: .08s; }
main.enter .cal-grid .day:nth-child(7n+2) { animation-delay: .11s; }
main.enter .cal-grid .day:nth-child(7n+3) { animation-delay: .14s; }
main.enter .cal-grid .day:nth-child(7n+4) { animation-delay: .17s; }
main.enter .cal-grid .day:nth-child(7n+5) { animation-delay: .20s; }
main.enter .cal-grid .day:nth-child(7n+6) { animation-delay: .23s; }
main.enter .cal-grid .day:nth-child(7n) { animation-delay: .26s; }
@keyframes dayIn { from { opacity: 0; transform: scale(.92); } }
.cal-grid.slide-l { animation: slideL .45s var(--ease-out); }
.cal-grid.slide-r { animation: slideR .45s var(--ease-out); }
@keyframes slideL { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.day .sticker { transition: transform .4s var(--ease-spring); }
.day:hover .sticker { transform: rotate(-12deg) scale(1.15); }

/* sávok, gyűrűk */
main.enter .bar > i { animation: growX 1s var(--ease-out) backwards; animation-delay: .25s; transform-origin: left; }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
main.enter .ring svg circle:nth-child(2) { animation: ringIn 1.2s var(--ease-out) backwards; animation-delay: .2s; }
@keyframes ringIn { from { stroke-dasharray: 0 999; } }
main.enter .moon-ring svg { animation: spinIn 1.1s var(--ease-out) backwards; }
@keyframes spinIn { from { opacity: 0; transform: rotate(-70deg) scale(.9); } to { opacity: 1; transform: none; } }
.moon-ring svg > circle:last-child { animation: glow 3.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 #D8B4F000); } 50% { filter: drop-shadow(0 0 8px #D8B4F0cc); } }

/* teendő pipa */
.check.pop { animation: checkPop .5s var(--ease-spring); }
.check.pop svg { animation: draw .45s var(--ease-out) .08s backwards; stroke-dasharray: 24; }
@keyframes checkPop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.check:hover { border-color: var(--lav); box-shadow: 0 0 0 4px #D8B4F01f; }

/* PIN képernyő */
.enter-pop { animation: popIn .8s var(--ease-out) backwards; }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.96); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.lock-card { box-shadow: 0 30px 80px -40px #000, 0 0 0 1px #ffffff05 inset; }
.lock-moon.float { animation: float 5s ease-in-out infinite; filter: drop-shadow(0 0 14px #D8B4F066); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-6deg); } }
.pin-dots span { transition: background-color .2s var(--ease-out), transform .3s var(--ease-spring), box-shadow .3s var(--ease-out); }
.pin-dots span.on { box-shadow: 0 0 10px #D8B4F088; }
.pin-dots span.pop { animation: dotPop .35s var(--ease-spring); }
@keyframes dotPop { 0% { transform: scale(.4); } 70% { transform: scale(1.35); } 100% { transform: scale(1.1); } }
.pin-pad button.ok { background: var(--lav); border-color: var(--lav); color: var(--page); display: flex; align-items: center; justify-content: center; }
.pin-pad button.ok svg { width: 24px; height: 24px; }
.pin-pad button { transition: background-color .2s var(--ease-out), transform .2s var(--ease-spring), box-shadow .3s var(--ease-out); }
.pin-pad button:not(.ghost):hover { box-shadow: 0 0 0 5px #D8B4F014; }
.lock-card.unlock { animation: unlock .45s var(--ease-in) forwards; }
@keyframes unlock { to { opacity: 0; transform: scale(1.06) translateY(-8px); filter: blur(6px); } }
.lock-card.unlock .pin-dots span { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 12px #9FD3B5aa; }

/* modál */
.modal-back.in { animation: fadeIn .3s var(--ease-out); }
.modal-back.in .modal { animation: modalIn .45s var(--ease-out); }
.modal-back.out { animation: fadeOut .2s var(--ease-in) forwards; }
.modal-back.out .modal { animation: modalOut .2s var(--ease-in) forwards; }
.modal-back { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { box-shadow: 0 40px 90px -30px #000; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* toast – rugós */
#toast { transition: opacity .3s var(--ease-out), transform .45s var(--ease-spring); box-shadow: 0 14px 34px -12px #D8B4F0aa; }

/* admin */
.admin-shell.enter .card { animation: rise .7s var(--ease-out) backwards; }
.admin-shell.enter .card:nth-of-type(2) { animation-delay: .08s; }
.admin-shell.enter .card:nth-of-type(3) { animation-delay: .16s; }
.edit-box.enter-pop { animation-duration: .45s; }

/* akadálymentesség: csökkentett mozgás */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
