/* ===== Panda — komunitné tamagoči ===== */
:root {
    --green: #3f9d63;
    --green-deep: #2c7a4b;
    --green-grad: linear-gradient(135deg, #47ab6e, #2c7a4b);
    --mint: #e6f4ea;
    --blush: #f299ac;
    --sun: #f7c948;
    --ink: #2c2a26;
    --muted: #8a857b;
    --bg: #f6f3ea;
    --card: #ffffff;
    --radius: 24px;
    --shadow: 0 4px 18px rgba(60, 52, 31, .08);
    --shadow-pop: 0 10px 30px rgba(44, 122, 75, .25);
}
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 16px;
    background:
        radial-gradient(1200px 400px at 50% -160px, #eaf5ec 0%, transparent 70%),
        var(--bg);
    color: var(--ink);
}
h1, h2, h3, .font-cute { font-family: 'Baloo 2', 'Nunito', sans-serif; }

.shell { max-width: 620px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }

/* ---- horná lišta ---- */
.topbar {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between;
    padding: max(10px, env(safe-area-inset-top)) 16px 8px;
    background: linear-gradient(180deg, rgba(246, 243, 234, .96) 70%, rgba(246, 243, 234, 0));
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); }
.brand-face { font-size: 1.7rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.15)); }
.brand-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: .2px; }
.brand-leaf { font-size: 1.1rem; transform: rotate(8deg); }

/* ---- karty ---- */
.card-p {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
}
.toast-msg {
    background: #ddf3e4; color: #1d5c38; border-radius: 16px;
    padding: 11px 15px; margin-bottom: 12px; font-weight: 700; font-size: .92rem;
    animation: pop .3s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: var(--shadow);
}
@keyframes pop { from { transform: translateY(-10px) scale(.97); opacity: 0; } }

/* ---- nálada ---- */
.mood-hero { display: flex; align-items: center; gap: 16px; }
.mood-ring { position: relative; width: 92px; height: 92px; flex: 0 0 92px; }
.mood-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.mood-ring .ava {
    position: absolute; inset: 8px; border-radius: 50%;
    background-size: cover; background-position: center top;
    border: 2.5px solid #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.mood-emoji {
    position: absolute; right: -3px; bottom: -3px; font-size: 1.5rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.2));
    animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-3px) rotate(6deg); } }
.mood-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.25rem; line-height: 1.15; }
.mood-sub { color: var(--muted); font-size: .88rem; font-weight: 600; }
.mood-score { font-weight: 800; }
.trend-up { color: var(--green-deep); }
.trend-down { color: #c25454; }

.mood-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 14px; }
.mbar { font-size: .8rem; font-weight: 700; }
.mbar .lbl { display: flex; justify-content: space-between; margin-bottom: 3px; color: var(--muted); }
.mbar .lbl b { color: var(--ink); }
.mbar .track { height: 8px; border-radius: 99px; background: #efece3; overflow: hidden; }
.mbar .fill { height: 100%; border-radius: 99px; background: var(--green-grad); transition: width .6s ease; }
.mbar.low .fill { background: linear-gradient(90deg, #e58f8f, #c25454); }
.mbar.mid .fill { background: linear-gradient(90deg, #f0c95c, #dca431); }

/* ---- denná úloha ---- */
.task-card {
    background: linear-gradient(135deg, #fff8e6, #fdefcf);
    border: 1.5px dashed #e8c96a;
}
.task-flag { font-size: .74rem; font-weight: 800; letter-spacing: .06em; color: #a07714; text-transform: uppercase; }
.task-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.1rem; margin: 3px 0 4px; }
.task-body { font-size: .9rem; color: #6b5d34; }
.task-done { color: var(--green-deep); font-weight: 800; }
.task-card.done { background: #eaf6ee; border-color: #9fd4b2; padding: 12px 16px; }
.done-flag { color: var(--green-deep); }
.task-done-title { font-weight: 700; font-size: .92rem; color: #4d6f5a; margin-top: 2px; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.need-tip {
    margin-top: 12px; background: #fdf6dd; color: #8a6d1f; border-radius: 14px;
    padding: 9px 13px; font-size: .85rem; font-weight: 700;
}

/* ---- členské chip-y ---- */
.who { display: inline-flex; align-items: center; gap: 8px; }
.ava-dot {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: .95rem;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.ava-dot.panda { background: #2c2a26; font-size: 1.05rem; }

/* ---- príspevky ---- */
.post-card { padding: 0; overflow: hidden; }
.post-img-wrap { position: relative; background: #f2efe6; }
.post-img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.post-chip {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255, 255, 255, .92); border-radius: 99px;
    font-size: .78rem; font-weight: 800; padding: 5px 12px;
    box-shadow: var(--shadow);
}
.gif-chip {
    position: absolute; top: 12px; right: 12px;
    background: var(--ink); color: #fff; border-radius: 8px;
    font-size: .68rem; font-weight: 800; padding: 3px 8px; letter-spacing: .08em;
}
.post-body { padding: 13px 15px 6px; }
.post-caption { font-size: .95rem; margin: 8px 0 0; }
.post-meta { color: var(--muted); font-size: .78rem; font-weight: 600; }

.post-actions { display: flex; gap: 6px; padding: 6px 9px 8px; }
.act-btn {
    border: 0; background: transparent; border-radius: 14px;
    padding: 7px 12px; font-weight: 800; font-size: .92rem; color: var(--muted);
    display: inline-flex; align-items: center; gap: 6px;
    transition: transform .12s ease, background .15s, color .15s;
}
.act-btn:active { transform: scale(.9); }
.act-btn.paw.on { color: var(--green-deep); background: var(--mint); }
.act-btn.paw.on .paw-ico { animation: paw-pop .35s cubic-bezier(.34, 1.8, .64, 1); }
@keyframes paw-pop { 40% { transform: scale(1.45) rotate(-12deg); } }

.comments { border-top: 1px solid #f2efe6; padding: 10px 15px 12px; }
.comment { display: flex; gap: 9px; margin-bottom: 9px; }
.comment .ava-dot { width: 28px; height: 28px; flex: 0 0 28px; font-size: .8rem; }
.comment-body { font-size: .89rem; line-height: 1.45; }
.comment-body b { font-weight: 800; }
.comment.from-panda .comment-body {
    background: var(--mint); border-radius: 4px 14px 14px 14px; padding: 7px 11px;
}
.comment-form { display: flex; gap: 8px; margin-top: 4px; }
.comment-form input {
    flex: 1; border: 1.5px solid #ece8dd; border-radius: 99px;
    padding: 8px 15px; font-size: .89rem; outline: 0; background: #faf8f2;
    font-family: inherit;
}
.comment-form input:focus { border-color: var(--green); background: #fff; }
.comment-form button {
    border: 0; width: 38px; height: 38px; border-radius: 50%;
    background: var(--green-grad); color: #fff; flex: 0 0 38px;
}

/* ---- spodná navigácia ---- */
.tabbar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 620px; z-index: 60;
    display: flex; align-items: flex-end; justify-content: space-around;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid #eee9dd;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.tabbar a {
    flex: 1; text-align: center; text-decoration: none;
    color: #a9a396; font-size: .68rem; font-weight: 800;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar a i { font-size: 1.45rem; line-height: 1; }
.tabbar a.active { color: var(--green-deep); }
.tabbar .fab {
    flex: 0 0 64px; width: 64px; height: 64px; margin-top: -30px;
    border-radius: 50%; background: var(--green-grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; box-shadow: var(--shadow-pop);
    border: 4px solid var(--bg);
    transition: transform .15s ease;
}
.tabbar .fab:active { transform: scale(.92); }

/* ---- landing ---- */
.hero { text-align: center; padding: 18px 6px 6px; }
.hero-ava {
    width: 168px; height: 168px; border-radius: 50%; object-fit: cover; object-position: center top;
    border: 6px solid #fff; box-shadow: var(--shadow-pop);
    animation: float 4s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-7px); } }
.hero h1 { font-size: 2rem; font-weight: 800; margin: 14px 0 4px; }
.hero .lead-p { color: var(--muted); font-weight: 600; font-size: .98rem; margin: 0 12px; }
.deco-bar { font-size: 1.2rem; letter-spacing: 12px; margin-top: 10px; opacity: .8; }

.join-form input {
    border: 2px solid #ece8dd; border-radius: 18px; padding: 12px 16px;
    font-size: 1rem; width: 100%; outline: 0; margin-bottom: 10px; font-family: inherit;
    background: #fff;
}
.join-form input:focus { border-color: var(--green); }
.btn-panda {
    display: block; width: 100%; border: 0; border-radius: 18px;
    background: var(--green-grad); color: #fff; font-weight: 800;
    font-family: 'Baloo 2', sans-serif; font-size: 1.15rem; padding: 13px;
    box-shadow: var(--shadow-pop); transition: transform .15s ease;
    text-align: center; text-decoration: none;
}
.btn-panda:active { transform: scale(.97); }
.btn-panda:disabled { opacity: .6; }
.btn-panda.secondary { background: #fff; color: var(--green-deep); box-shadow: var(--shadow); border: 2px solid var(--mint); }

.how { display: flex; gap: 10px; margin-top: 14px; }
.how .step {
    flex: 1; background: var(--card); border-radius: 20px; padding: 13px 10px;
    text-align: center; box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; color: var(--muted);
}
.how .step .big { font-size: 1.7rem; display: block; margin-bottom: 5px; }

/* ---- nový príspevok ---- */
.mode-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.mode-tabs button {
    flex: 1; border: 2px solid #ece8dd; background: #fff; border-radius: 16px;
    padding: 10px 4px; font-weight: 800; font-size: .86rem; color: var(--muted);
    font-family: inherit; transition: all .15s;
}
.mode-tabs button.on { border-color: var(--green); color: var(--green-deep); background: var(--mint); }
.type-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.type-chips label { cursor: pointer; }
.type-chips input { display: none; }
.type-chips span {
    display: inline-block; border-radius: 99px; padding: 7px 13px;
    background: #fff; border: 2px solid #ece8dd; font-size: .85rem; font-weight: 800;
    transition: all .15s;
}
.type-chips input:checked + span { border-color: var(--green); background: var(--mint); color: var(--green-deep); }
.prompt-box textarea, .caption-box input {
    width: 100%; border: 2px solid #ece8dd; border-radius: 18px; padding: 12px 15px;
    font-size: .95rem; outline: 0; font-family: inherit; background: #fff; resize: vertical;
}
.prompt-box textarea:focus, .caption-box input:focus { border-color: var(--green); }
.hint { color: var(--muted); font-size: .8rem; font-weight: 600; margin-top: 6px; }
.hint .ex { cursor: pointer; text-decoration: underline dotted; }

.photo-drop {
    border: 2.5px dashed #d8d2c2; border-radius: 20px; background: #fff;
    padding: 22px 12px; text-align: center; color: var(--muted); font-weight: 700;
    cursor: pointer; transition: border-color .15s;
}
.photo-drop:hover { border-color: var(--green); }
.photo-drop img { max-width: 100%; max-height: 220px; border-radius: 14px; }

.gen-status { text-align: center; padding: 26px 10px; }
.gen-status .panda-walk { font-size: 2.6rem; display: inline-block; animation: bob 1.1s ease-in-out infinite; }
.gen-status .msg { font-weight: 800; color: var(--green-deep); margin-top: 8px; font-family: 'Baloo 2', sans-serif; }
.gen-status .sub { color: var(--muted); font-size: .8rem; font-weight: 600; }

.preview-wrap { text-align: center; }
.preview-wrap img {
    max-width: 100%; border-radius: 20px; box-shadow: var(--shadow-pop);
    border: 5px solid #fff;
}

/* ---- panda profil ---- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
    background: var(--card); border-radius: 18px; padding: 12px 6px; text-align: center;
    box-shadow: var(--shadow);
}
.stat .num { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--green-deep); }
.stat .lbl { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.sparkline { width: 100%; height: 72px; }
.carer-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.carer-row + .carer-row { border-top: 1px solid #f2efe6; }
.carer-count { margin-left: auto; font-weight: 800; color: var(--green-deep); font-size: .9rem; }

.section-t {
    font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.02rem;
    margin: 18px 2px 10px; display: flex; align-items: center; gap: 7px;
}

/* ---- stránkovanie ---- */
.pagination { justify-content: center; gap: 6px; margin: 16px 0 0; --bs-pagination-border-radius: 14px; }
.pagination .page-link { border-radius: 14px; color: var(--ink); border-color: #ece8dd; font-weight: 700; }
.pagination .page-item.active .page-link { background: var(--green-grad); border-color: transparent; }

.empty-p { text-align: center; padding: 40px 16px; color: var(--muted); font-weight: 700; }
.empty-p .big { font-size: 3rem; display: block; margin-bottom: 8px; }
