*{
    box-sizing:border-box;
}

:root{
    --sky:#70d3f5;
    --sky-light:#eafaff;
    --blue:#1673c9;
    --blue-dark:#103f72;
    --yellow:#ffd84d;
    --orange:#ff9e2c;
    --green:#39b96b;
    --green-light:#e5f9eb;
    --pink:#ff7ea8;
    --text:#17345c;
    --muted:#6b7d92;
    --white:#ffffff;
    --border:#dbe8f1;
    --shadow:0 10px 28px rgba(30,89,130,.12);
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    min-height:100vh;
    background:#eaf8ff;
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
    font-size:16px;
    line-height:1.45;
}

button,
input{
    font:inherit;
}

button{
    -webkit-tap-highlight-color:transparent;
}

.app-shell{
    width:100%;
    max-width:600px;
    min-height:100vh;
    margin:0 auto;
    background:
        linear-gradient(
            180deg,
            #dff7ff 0,
            #f8fdff 45%,
            #f3fbf5 100%
        );
    overflow:hidden;
}


/* HERO */

.hero{
    position:relative;
    min-height:290px;
    overflow:hidden;
    background:
        linear-gradient(
            180deg,
            #65ccef 0%,
            #a8e8fb 72%,
            #dff8e7 100%
        );
    border-radius:0 0 34px 34px;
}

.hero:after{
    content:"";
    position:absolute;
    left:-5%;
    right:-5%;
    bottom:-48px;
    height:90px;
    background:#8edb7c;
    border-radius:50% 50% 0 0;
}

.hero-sky{
    position:absolute;
    inset:0;
    pointer-events:none;
}

.sun{
    position:absolute;
    top:20px;
    left:20px;
    font-size:42px;
    filter:drop-shadow(0 3px 5px rgba(255,180,0,.3));
}

.cloud{
    position:absolute;
    font-size:48px;
    opacity:.75;
}

.cloud-1{
    top:35px;
    right:22px;
}

.cloud-2{
    top:105px;
    left:-8px;
    font-size:38px;
}

.hero-content{
    position:relative;
    z-index:2;
    padding:32px 18px 75px;
}

.brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:11px;
    color:white;
    text-align:left;
}

.brand img{
    width:58px;
    height:58px;
    border-radius:16px;
    object-fit:cover;
    background:white;
    border:4px solid white;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
}

.brand-star{
    width:58px;
    height:58px;
    display:grid;
    place-items:center;
    border-radius:18px;
    background:var(--yellow);
    color:#fff;
    font-size:34px;
    text-shadow:0 2px 2px rgba(0,0,0,.15);
    border:4px solid #fff;
}

.brand h1{
    margin:0;
    color:#fff;
    font-size:32px;
    line-height:1;
    letter-spacing:-1px;
    text-shadow:0 3px 0 #2575ad;
}

.brand span{
    display:block;
    margin-top:6px;
    font-size:13px;
    font-weight:700;
    color:#fff;
}

.welcome-bubble{
    position:relative;
    max-width:380px;
    margin:30px auto 0;
    padding:16px 19px;
    background:#fff;
    border-radius:22px;
    box-shadow:var(--shadow);
    text-align:center;
}

.welcome-bubble:after{
    content:"";
    position:absolute;
    bottom:-11px;
    left:44px;
    width:22px;
    height:22px;
    background:#fff;
    transform:rotate(45deg);
}

.welcome-bubble strong{
    display:block;
    font-size:19px;
    color:var(--blue-dark);
}

.welcome-bubble span{
    display:block;
    margin-top:3px;
    color:var(--muted);
    font-size:14px;
}


/* CHILDREN */

main{
    padding:0 14px 26px;
}

.children-section{
    margin-top:-26px;
    position:relative;
    z-index:5;
    transition:.25s ease;
}

.children-section.is-hidden{
    display:none;
}

.section-title{
    display:flex;
    align-items:center;
    gap:11px;
    padding:13px 15px;
    margin-bottom:13px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    box-shadow:var(--shadow);
}

.title-icon{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    flex:0 0 46px;
    border-radius:15px;
    background:#fff2c4;
    font-size:26px;
}

.section-title h2{
    margin:0;
    font-size:21px;
}

.section-title p{
    margin:1px 0 0;
    color:var(--muted);
    font-size:13px;
}

.children-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:13px;
}

.child-card{
    position:relative;
    border:2px solid transparent;
    border-radius:24px;
    padding:15px 10px 13px;
    background:#fff;
    color:var(--text);
    box-shadow:var(--shadow);
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease;
}

.child-card:active{
    transform:scale(.97);
}

.child-card:hover{
    box-shadow:0 13px 30px rgba(30,89,130,.18);
}

.child-photo-wrap{
    position:relative;
    width:116px;
    height:116px;
    margin:0 auto 9px;
}

.child-photo{
    width:116px;
    height:116px;
    display:block;
    object-fit:cover;
    border-radius:50%;
    border:6px solid #fff;
    box-shadow:0 0 0 4px #8bdcf5;
    background:#eaf8ff;
}

.child-photo-placeholder{
    display:grid;
    place-items:center;
    color:#fff;
    background:linear-gradient(145deg,#69c9ef,#3e93dc);
    font-size:46px;
    font-weight:800;
}

.crown{
    position:absolute;
    top:-13px;
    right:-5px;
    font-size:30px;
    transform:rotate(10deg);
    filter:drop-shadow(0 3px 2px rgba(0,0,0,.12));
}

.child-name{
    display:block;
    font-size:20px;
    font-weight:800;
}

.tap-hint{
    display:block;
    margin-top:2px;
    color:var(--muted);
    font-size:12px;
}


/* MISSION */

.mission-area{
    display:none;
}

.mission-area.is-visible{
    display:block;
    animation:appear .28s ease;
}

@keyframes appear{
    from{
        opacity:0;
        transform:translateY(10px);
    }
    to{
        opacity:1;
        transform:none;
    }
}

.mission-profile{
    display:flex;
    align-items:center;
    gap:12px;
    padding:4px 0 15px;
}

.back-button{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border:0;
    border-radius:14px;
    background:#fff;
    color:var(--blue-dark);
    font-size:25px;
    box-shadow:var(--shadow);
    cursor:pointer;
}

.selected-child-photo{
    width:64px;
    height:64px;
    flex:0 0 64px;
}

.selected-child-photo img,
.selected-placeholder{
    width:64px;
    height:64px;
    object-fit:cover;
    border-radius:50%;
    border:4px solid #fff;
    box-shadow:0 0 0 3px #72d4f3;
}

.selected-placeholder{
    display:grid;
    place-items:center;
    background:#55aee4;
    color:#fff;
    font-size:28px;
    font-weight:800;
}

.selected-child-text span{
    color:#ff8c27;
    font-size:13px;
    font-weight:800;
}

.selected-child-text h2{
    margin:0;
    font-size:25px;
}

.motivation-card{
    display:flex;
    align-items:center;
    gap:11px;
    padding:15px;
    margin-bottom:15px;
    background:#fff8d9;
    border:1px solid #f4dfa1;
    border-radius:20px;
    box-shadow:0 5px 15px rgba(165,130,20,.08);
}

.motivation-star{
    font-size:34px;
}

.motivation-card strong{
    display:block;
    color:#9a5d00;
    font-size:17px;
}

.motivation-card p{
    margin:3px 0 0;
    color:#826f4c;
    font-size:12px;
}

.mission-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin:8px 2px 11px;
}

.mini-label{
    color:var(--blue);
    font-size:11px;
    font-weight:800;
    letter-spacing:.5px;
}

.mission-header h2{
    margin:1px 0 0;
    font-size:23px;
}

.progress-badge{
    min-width:57px;
    padding:8px 10px;
    border-radius:30px;
    background:#e4f7eb;
    color:#19834a;
    font-size:13px;
    font-weight:800;
    text-align:center;
}

.missions-list{
    display:grid;
    gap:10px;
}

.mission-card{
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;
    min-height:78px;
    padding:11px;
    background:#fff;
    border:2px solid #edf3f7;
    border-radius:20px;
    box-shadow:0 5px 16px rgba(30,89,130,.08);
    cursor:pointer;
    transition:.18s ease;
}

.mission-card:has(.mission-check:checked){
    background:var(--green-light);
    border-color:#a9e7ba;
}

.mission-card:active{
    transform:scale(.985);
}

.mission-check{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.mission-icon{
    width:55px;
    height:55px;
    flex:0 0 55px;
    display:grid;
    place-items:center;
    border-radius:17px;
    background:#edf8ff;
    font-size:31px;
}

.mission-content{
    min-width:0;
    flex:1;
}

.mission-content strong{
    display:block;
    color:var(--blue-dark);
    font-size:15px;
    line-height:1.2;
}

.mission-meta{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    margin-top:6px;
}

.points{
    display:inline-block;
    padding:3px 8px;
    border-radius:10px;
    background:#ffe27b;
    color:#765500;
    font-size:11px;
    font-weight:800;
}

.repeat{
    color:var(--muted);
    font-size:10px;
}

.check-visual{
    width:31px;
    height:31px;
    flex:0 0 31px;
    display:grid;
    place-items:center;
    border:2px solid #9db1c2;
    border-radius:9px;
    color:transparent;
    font-size:20px;
    font-weight:900;
    transition:.18s ease;
}

.mission-card:has(.mission-check:checked) .check-visual{
    background:#35b965;
    border-color:#35b965;
    color:#fff;
}

.mission-card:has(.mission-check:checked) .mission-content strong{
    color:#217a47;
}

.mission-complete{
    display:none;
    margin-top:15px;
    padding:20px 15px;
    text-align:center;
    background:linear-gradient(145deg,#fff5a9,#fffdf0);
    border:2px solid #ffd54a;
    border-radius:23px;
    box-shadow:0 8px 20px rgba(220,164,20,.13);
}

.mission-complete.show{
    display:block;
    animation:pop .35s ease;
}

@keyframes pop{
    0%{transform:scale(.9);opacity:0}
    100%{transform:scale(1);opacity:1}
}

.complete-star{
    font-size:50px;
}

.mission-complete strong{
    display:block;
    color:#21834b;
    font-size:23px;
}

.mission-complete span{
    display:block;
    margin-top:4px;
    color:#7b704d;
    font-size:13px;
}

.reward-message{
    display:flex;
    align-items:center;
    gap:11px;
    margin-top:15px;
    padding:13px 14px;
    background:#e9f5ff;
    border-radius:17px;
    color:#315b80;
}

.reward-message > span{
    font-size:28px;
}

.reward-message strong{
    display:block;
    font-size:14px;
}

.reward-message div span{
    display:block;
    font-size:12px;
    margin-top:1px;
}


/* EMPTY */

.empty-state{
    padding:30px 18px;
    text-align:center;
    background:#fff;
    border:1px solid var(--border);
    border-radius:22px;
    box-shadow:var(--shadow);
}

.empty-icon{
    font-size:44px;
}

.empty-state strong{
    display:block;
    margin-top:5px;
    font-size:18px;
}

.empty-state p{
    margin:4px 0 0;
    color:var(--muted);
    font-size:13px;
}


/* FOOTER */

footer{
    padding:28px 14px 38px;
    text-align:center;
    color:#55708a;
}

footer strong{
    margin:0 7px;
}

footer small{
    display:block;
    margin-top:8px;
    font-size:14px;
}


/* LEBAR HP KECIL */

@media(max-width:380px){

    .brand h1{
        font-size:28px;
    }

    .brand img,
    .brand-star{
        width:52px;
        height:52px;
    }

    .child-photo-wrap,
    .child-photo{
        width:100px;
        height:100px;
    }

    .child-name{
        font-size:18px;
    }

    .mission-icon{
        width:50px;
        height:50px;
        flex-basis:50px;
        font-size:27px;
    }

    .mission-card{
        padding:9px;
    }
}


/* TABLET/DESKTOP: tetap seperti aplikasi HP yang diperbesar */

@media(min-width:601px){

    body{
        padding:20px 0;
    }

    .app-shell{
        border-radius:30px;
        box-shadow:0 20px 60px rgba(22,70,110,.16);
    }

    .hero{
        border-radius:30px 30px 34px 34px;
    }
}


/* FOOTER BRAND — diperbesar agar lebih nyaman dilihat */
.footer-brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin-bottom:10px;
}

.footer-brand img,
.footer-brand .brand-star{
    width:72px;
    height:72px;
    flex:0 0 72px;
    border-radius:18px;
    object-fit:cover;
}

.footer-brand .brand-star{
    display:grid;
    place-items:center;
    background:#fff;
    color:#f4b400;
    font-size:38px;
    box-shadow:0 4px 12px rgba(30,87,120,.10);
}

.footer-brand > div:last-child{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}

.footer-brand strong{
    color:#123f71;
    font-size:29px;
    line-height:1.1;
    font-weight:900;
}

.footer-brand span{
    color:#1681c7;
    font-size:15px;
    font-weight:800;
    line-height:1.3;
}

.footer-credit{
    display:block;
    width:100%;
    margin-top:11px;
    color:#71869a;
    font-size:13px;
    font-weight:700;
    text-align:center;
}

@media(max-width:380px){
    .footer-brand{
        gap:11px;
    }

    .footer-brand img,
    .footer-brand .brand-star{
        width:64px;
        height:64px;
        flex-basis:64px;
    }

    .footer-brand strong{
        font-size:25px;
    }

    .footer-brand span{
        font-size:13px;
    }
}
