@font-face { font-family: 'Baloo 2'; font-weight: 400 800; font-display: swap; src: url(/fonts/baloo2-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo 2'; font-weight: 400 800; font-display: swap; src: url(/fonts/baloo2-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+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bangers'; font-display: swap; src: url(/fonts/bangers-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bangers'; font-display: swap; src: url(/fonts/bangers-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+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Mali'; font-weight: 400; font-display: swap; src: url(/fonts/mali-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mali'; font-weight: 400; font-display: swap; src: url(/fonts/mali-400-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+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Mali'; font-weight: 700; font-display: swap; src: url(/fonts/mali-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mali'; font-weight: 700; font-display: swap; src: url(/fonts/mali-700-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+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --pink: #ff6fa5;
  --pink-soft: #ffd6e7;
  --lilac: #e9ddff;
  --ink: #4a3552;
  --yellow: #ffd166;
  --mint: #9be3c9;
  --white: #fffafc;
  --shadow: 0 6px 0 rgba(74, 53, 82, .15), 0 18px 40px rgba(255, 111, 165, .18);
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  color: var(--ink);
  min-height: 100dvh;
  background: linear-gradient(160deg, #ffe3ee 0%, #f3e8ff 55%, #e3f5ff 100%) fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--pink); }

.floaters { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.floaters span {
  position: absolute; bottom: -40px; font-size: 22px; opacity: .55;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-115vh) rotate(40deg); }
}
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.app { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }

/* ---------- companion ---------- */
.companion { display: flex; align-items: flex-end; gap: 10px; margin: 8px 0 18px; }
.mochi-wrap { flex: 0 0 auto; width: 118px; height: 118px; background: none; border: 0; padding: 0; cursor: pointer; }
.mochi { width: 100%; height: 100%; overflow: visible; }
.mochi .body { animation: bob 2.6s ease-in-out infinite; transform-origin: 100px 180px; }
.mochi .tail { animation: wag 1.6s ease-in-out infinite; transform-origin: 145px 150px; }
.mochi .eyes-normal { animation: blink 4.5s infinite; transform-origin: 100px 118px; }
.mochi .hat { transform-origin: 127px 68px; animation: hatWiggle 3.5s ease-in-out infinite; }
.mochi.mood-happy .eyes-normal, .mochi.mood-love .eyes-normal, .mochi.mood-excited .eyes-normal { display: none !important; }
.mochi.mood-happy .eyes-happy, .mochi.mood-excited .eyes-happy { display: inline !important; }
.mochi.mood-love .eyes-love { display: inline !important; }
.mochi.mood-excited .mouth-smile, .mochi.mood-love .mouth-smile { display: none !important; }
.mochi.mood-excited .mouth-open, .mochi.mood-love .mouth-open { display: inline !important; }
.mochi.mood-excited .body { animation: jump .5s ease-in-out 3; }
.mochi.mood-thinking .body { animation: tilt 2s ease-in-out infinite; }
.mochi-wrap.boop .mochi { animation: squish .4s ease; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes wag { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-14deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes hatWiggle { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(6deg); } }
@keyframes jump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-22px) scale(1.04, .96); } }
@keyframes tilt { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes squish { 0% { transform: scale(1); } 40% { transform: scale(1.12, .88); } 100% { transform: scale(1); } }

.speech {
  position: relative; flex: 1; background: var(--white); border: 3px solid var(--ink);
  border-radius: 22px; padding: 14px 18px; min-height: 64px; box-shadow: var(--shadow);
  margin-bottom: 26px; font-size: 1.08rem; line-height: 1.45;
}
.speech::before {
  content: ''; position: absolute; left: -16px; bottom: 16px; width: 22px; height: 22px;
  background: var(--white); border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: skewY(-35deg) rotate(20deg); border-bottom-left-radius: 4px;
}
.speech p { margin: 0; white-space: pre-line; }
.speech p.typing::after { content: '▍'; animation: caret .8s steps(1) infinite; color: var(--pink); }
@keyframes caret { 50% { opacity: 0; } }

.steps { display: flex; justify-content: center; gap: 10px; margin: -4px 0 18px; }
.steps span {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .6); border: 2px dashed rgba(74, 53, 82, .3); font-size: 18px; filter: grayscale(1); opacity: .6;
}
.steps span.done { background: var(--mint); border: 2px solid var(--ink); filter: none; opacity: 1; }
.steps span.active { background: var(--yellow); border: 2px solid var(--ink); filter: none; opacity: 1; transform: scale(1.15); }

/* ---------- common ---------- */
.scene { animation: sceneIn .5s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes sceneIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.card {
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.card.center { text-align: center; }
h1, h2 { margin: 0 0 10px; line-height: 1.15; }
.title { font-size: clamp(1.8rem, 6vw, 2.6rem); text-align: center; }
.title.big { font-size: clamp(2rem, 8vw, 3.2rem); }
.name { color: var(--pink); }
.scene-title { text-align: center; font-size: 1.6rem; }
.sub { text-align: center; margin: 0 0 10px; opacity: .7; font-size: 1.1rem; }
.hint { font-size: .92rem; opacity: .75; text-align: center; }
.card .hint { text-align: left; }
.error { color: #d6336c; font-weight: 600; min-height: 1.2em; margin: 8px 0 0; text-align: center; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=date], input[type=text], input[type=url], textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  padding: 12px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff;
  outline: none; transition: box-shadow .15s;
}
input:focus, textarea:focus { box-shadow: 0 0 0 4px var(--pink-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 1.05rem; text-decoration: none;
  color: var(--ink); background: var(--pink); color: #fff;
  border: 3px solid var(--ink); border-radius: 999px; padding: 12px 22px; margin-top: 14px;
  box-shadow: 0 5px 0 var(--ink); cursor: pointer; transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn:disabled { background: #d9cfe0; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 rgba(74, 53, 82, .4); }
.btn.big { font-size: 1.25rem; padding: 14px 30px; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.round { width: 52px; height: 52px; padding: 0; margin: 0; }
.btn.busy { pointer-events: none; opacity: .75; }
.card .btn:not(.ghost):only-of-type, form .btn { width: 100%; }
.link { display: block; margin: 12px auto 0; background: none; border: 0; font: inherit; color: var(--ink); opacity: .6; cursor: pointer; text-decoration: underline; }

.loader { display: flex; gap: 10px; justify-content: center; padding: 40px; }
.loader span { width: 16px; height: 16px; border-radius: 50%; background: var(--pink); animation: jump 1s infinite; }
.loader span:nth-child(2) { animation-delay: .15s; }
.loader span:nth-child(3) { animation-delay: .3s; }

/* ---------- countdown ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0 18px; }
.countdown div {
  background: var(--white); border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow);
  text-align: center; padding: 14px 4px;
}
.countdown b { display: block; font-size: clamp(1.8rem, 9vw, 3.2rem); line-height: 1; color: var(--pink); font-variant-numeric: tabular-nums; }
.countdown small { font-size: .85rem; opacity: .7; }
.countdown.small div { box-shadow: none; padding: 8px 2px; border-width: 2px; }
.countdown.small b { font-size: 1.7rem; }
.teaser { text-align: center; font-size: 1.15rem; min-height: 1.6em; transition: opacity .4s; }

.age-badge { margin: 6px 0 14px; }
.age-badge span {
  display: inline-block; font-family: 'Bangers', 'Baloo 2', sans-serif; font-size: 3rem; letter-spacing: 2px;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; width: 110px; height: 110px;
  line-height: 104px; transform: rotate(-8deg); box-shadow: var(--shadow); animation: pop 1.2s ease-in-out infinite alternate;
}
@keyframes pop { to { transform: rotate(6deg) scale(1.06); } }

/* ---------- day ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font: inherit; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 14px;
  cursor: pointer; color: var(--ink); transition: transform .1s;
}
.chip:hover { transform: scale(1.05); }
.chip.selected { background: var(--yellow); }

/* ---------- restaurants ---------- */
.restaurants { display: grid; gap: 14px; margin-bottom: 14px; }
.resto {
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  display: grid; grid-template-columns: 58px 1fr; gap: 4px 14px; align-items: center;
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  transition: transform .15s;
}
.resto:hover { transform: translateY(-3px) rotate(-.5deg); }
.resto.selected { background: #fff4d6; outline: 4px solid var(--yellow); }
.resto .emoji { grid-row: span 3; font-size: 2.2rem; width: 58px; height: 58px; display: grid; place-items: center; background: var(--pink-soft); border-radius: 50%; border: 2px solid var(--ink); }
.resto h3 { margin: 0; font-size: 1.25rem; }
.resto .tag { font-weight: 600; color: var(--pink); font-size: .95rem; }
.resto p { margin: 2px 0 0; font-size: .95rem; opacity: .85; }
.resto .row { grid-column: 2; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: .9rem; }
.custom summary { font-weight: 600; cursor: pointer; font-size: 1.1rem; list-style: none; }
.custom summary::-webkit-details-marker { display: none; }

/* ---------- photos ---------- */
.progress { position: relative; height: 30px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; margin: 6px 0 18px; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(45deg, var(--pink), var(--pink) 12px, #ff8fbb 12px, #ff8fbb 24px); transition: width .5s; }
.progress span { position: relative; display: block; text-align: center; font-weight: 700; line-height: 24px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.slot {
  background: var(--white); border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.slot .pic {
  position: relative; aspect-ratio: 4 / 3; background: repeating-linear-gradient(-45deg, #fff0f6, #fff0f6 10px, #fbe4ef 10px, #fbe4ef 20px);
  display: grid; place-items: center; border: 0; border-bottom: 3px solid var(--ink); cursor: pointer; font: inherit; color: var(--ink); padding: 0; width: 100%;
}
.slot .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .pic .plus { font-size: 2.4rem; }
.slot .pic .plus small { display: block; font-size: .85rem; font-weight: 600; }
.slot .num { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-weight: 700; }
.slot.filled .num { background: var(--mint); }
.slot.uploading .pic::after { content: 'Feltöltés…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .75); font-weight: 700; z-index: 3; }
.slot .info { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.slot h4 { margin: 0; font-size: 1.05rem; }
.slot p { margin: 0; font-size: .9rem; opacity: .8; }
.slot textarea { font-size: .9rem; padding: 8px 10px; border-width: 2px; border-radius: 12px; resize: none; margin-top: 6px; min-height: 58px; }
.slot .remove { align-self: flex-end; background: none; border: 0; font: inherit; font-size: .85rem; color: #d6336c; cursor: pointer; }
.sticky { position: sticky; bottom: 14px; width: 100%; z-index: 5; }

/* ---------- comic ---------- */
.drawing { text-align: center; padding: 40px 10px; }
.drawing .pencil { font-size: 4rem; display: inline-block; animation: scribble .6s ease-in-out infinite alternate; }
.drawing p { font-size: 1.2rem; }
@keyframes scribble { from { transform: translate(-20px, 0) rotate(-10deg); } to { transform: translate(20px, 8px) rotate(10deg); } }
.page-frame { perspective: 1400px; }
.page-frame img {
  display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow); background: #fff;
  transform-origin: left center;
}
.page-frame img.flip-next { animation: flipNext .45s ease; }
.page-frame img.flip-prev { animation: flipPrev .45s ease; }
@keyframes flipNext { from { transform: rotateY(-70deg); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes flipPrev { from { transform: rotateY(70deg); opacity: .2; } to { transform: none; opacity: 1; } }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 16px 0 4px; font-weight: 700; font-size: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.actions .btn { margin-top: 10px; }
#to-final { display: flex; margin: 22px auto 0; }

/* ---------- final ---------- */
.ticket { text-align: center; background: linear-gradient(180deg, #fff 0%, #fff4f9 100%); position: relative; }
.ticket::before, .ticket::after {
  content: ''; position: absolute; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
  background: #f3e8ff; border: 3px solid var(--ink);
}
.ticket::before { left: -17px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -17px; clip-path: inset(0 50% 0 0); }
.ticket-label { text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 700; opacity: .6; margin: 0 0 6px; }
.ticket h2 { font-size: 2.2rem; }
.ticket-date { font-size: 1.4rem; font-weight: 700; color: var(--pink); margin: 4px 0 8px; }
.ticket-place { font-size: 1.15rem; }
.ticket-place a { font-weight: 700; }
.love { margin-top: 22px; font-size: 1.15rem; }

.footer { position: relative; z-index: 1; text-align: center; font-size: .85rem; opacity: .55; padding: 10px 0 24px; }

@media (max-width: 520px) {
  .mochi-wrap { width: 92px; height: 92px; }
  .speech { font-size: 1rem; padding: 12px 14px; }
  .card { padding: 18px; }
  .slots { grid-template-columns: 1fr 1fr; gap: 10px; }
  .slot .info { padding: 8px 10px 10px; }
  .slot h4 { font-size: .95rem; }
  .slot p { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.missions { text-align: left; background: #fff6fa; border: 2px dashed var(--pink); border-radius: 16px; padding: 12px 16px; margin: 14px 0; }
.missions-title { font-weight: 700; margin: 0 0 4px; }
.missions .hint { text-align: left; margin: 0 0 8px; }
.missions ol { margin: 0; padding-left: 1.4em; line-height: 1.7; }
