:root{
    --bg:#0d0d12;
    --card:#17171f;
    --card2:#20202a;
    --text:#f7f5fb;
    --muted:#8f8b99;
    --border:rgba(255,255,255,.07);
    --accent:#ff5f8f;
    --accent2:#b85cff;
    --good:#71d69a;
    --danger:#ff7777;
}

*{
    box-sizing:border-box;
}

html,body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

body{
    min-height:100vh;
}

button,
input,
select,
textarea{
    font:inherit;
}

button{
    cursor:pointer;
}

.app{
    max-width:680px;
    margin:0 auto;
    padding:
        env(safe-area-inset-top)
        18px
        calc(90px + env(safe-area-inset-bottom));
}

.top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:22px 2px 18px;
}

.eyebrow{
    text-transform:uppercase;
    letter-spacing:.14em;
    font-size:11px;
    color:var(--muted);
    font-weight:700;
}

h1,h2,h3{
    margin:3px 0 0;
}

h1{
    font-size:28px;
}

h2{
    font-size:24px;
}

h3{
    font-size:21px;
}

.avatar,
.roundBtn{
    border:1px solid var(--border);
    background:var(--card);
    color:var(--text);
    border-radius:50%;
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
}

.hero{
    position:relative;
    overflow:hidden;
    border-radius:28px;
    padding:26px;
    background:linear-gradient(135deg,#251925,#191827);
    border:1px solid var(--border);
    min-height:245px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}

.heroGlow{
    position:absolute;
    width:220px;
    height:220px;
    border-radius:50%;
    right:-70px;
    top:-90px;
    background:
        radial-gradient(
            circle,
            rgba(255,95,143,.44),
            rgba(184,92,255,.1) 55%,
            transparent 72%
        );
}

.heroText{
    position:relative;
    z-index:1;
}

.heroKicker{
    color:#ffc4d6;
    font-size:14px;
    font-weight:700;
    margin-bottom:10px;
}

.heroTitle{
    font-size:31px;
    line-height:1.03;
    max-width:420px;
    font-weight:800;
}

.heroSub{
    color:#bcb6c7;
    margin-top:12px;
    max-width:430px;
    line-height:1.45;
}

.primary,
.secondary{
    width:100%;
    border:0;
    border-radius:18px;
    padding:15px 18px;
    font-weight:800;
}

.primary{
    color:#fff;
    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent2)
        );
}

.secondary{
    color:var(--text);
    background:var(--card2);
    border:1px solid var(--border);
}

.big{
    position:relative;
    z-index:1;
    margin-top:24px;
}

.sectionHead,
.pageTitle{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin:28px 2px 12px;
}

.sectionHead h2{
    font-size:18px;
}

.linkBtn{
    background:none;
    border:0;
    color:#ff8db0;
}

.stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.stat{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:20px;
    padding:16px;
}

.stat b{
    display:block;
    font-size:24px;
}

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

.list{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.item{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:20px;
    padding:15px;
    display:flex;
    gap:12px;
    align-items:center;
}

.item.clickable{
    cursor:pointer;
}

.itemIcon{
    width:45px;
    height:45px;
    flex:0 0 45px;
    border-radius:15px;
    background:
        linear-gradient(
            145deg,
            rgba(255,95,143,.2),
            rgba(184,92,255,.16)
        );
    display:grid;
    place-items:center;
    font-size:20px;
}

.itemMain{
    min-width:0;
    flex:1;
}

.itemTitle{
    font-weight:750;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.itemSub{
    font-size:13px;
    color:var(--muted);
    margin-top:4px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.badge{
    font-size:11px;
    padding:6px 8px;
    border-radius:999px;
    background:#292735;
    color:#cfc9d7;
    white-space:nowrap;
}

.badge.good{
    background:rgba(113,214,154,.12);
    color:var(--good);
}

.badge.pink{
    background:rgba(255,95,143,.12);
    color:#ff9ebb;
}

.empty{
    padding:28px;
    text-align:center;
    color:var(--muted);
    background:var(--card);
    border-radius:20px;
    border:1px dashed var(--border);
}

.page{
    display:none;
}

.page.active{
    display:block;
}

.segmented{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:7px;
    background:var(--card);
    padding:5px;
    border-radius:16px;
    margin:0 0 14px;
}

.seg{
    border:0;
    background:transparent;
    color:var(--muted);
    border-radius:12px;
    padding:10px;
}

.seg.active{
    background:var(--card2);
    color:var(--text);
}

.scoreCard{
    text-align:center;
    padding:30px;
    border-radius:28px;
    background:
        linear-gradient(
            150deg,
            #231821,
            #181722
        );
    border:1px solid var(--border);
    margin-bottom:12px;
}

.scoreIcon{
    font-size:35px;
    margin-bottom:8px;
}

.scoreCard b{
    font-size:54px;
    display:block;
}

.scoreCard span{
    color:var(--muted);
}

.bottom{
    position:fixed;
    left:50%;
    transform:translateX(-50%);
    bottom:0;
    width:min(680px,100%);
    display:grid;
    grid-template-columns:1fr 1fr .8fr 1fr 1fr;
    align-items:end;
    padding:
        10px
        12px
        calc(10px + env(safe-area-inset-bottom));
    background:rgba(13,13,18,.92);
    backdrop-filter:blur(18px);
    border-top:1px solid var(--border);
    z-index:20;
}

.navBtn{
    border:0;
    background:transparent;
    color:#777381;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
    padding:4px 2px;
}

.navBtn span{
    font-size:21px;
}

.navBtn small{
    font-size:10px;
}

.navBtn.active{
    color:#fff;
}

.createNav span{
    width:48px;
    height:48px;
    border-radius:16px;
    display:grid;
    place-items:center;
    color:#fff;
    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent2)
        );
    font-size:27px;
}

.sheetBackdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.58);
    opacity:0;
    visibility:hidden;
    transition:.2s;
    z-index:30;
}

.sheetBackdrop.open{
    opacity:1;
    visibility:visible;
}

.sheet{
    position:fixed;
    z-index:31;
    left:50%;
    bottom:0;
    transform:translate(-50%,110%);
    transition:.25s ease;
    width:min(680px,100%);
    background:#15151c;
    border:1px solid var(--border);
    border-radius:28px 28px 0 0;
    padding:
        10px
        18px
        calc(20px + env(safe-area-inset-bottom));
}

.sheet.open{
    transform:translate(-50%,0);
}

.grab{
    width:42px;
    height:4px;
    border-radius:99px;
    background:#3a3741;
    margin:3px auto 14px;
}

.sheetTop{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}

.closeSheet{
    border:0;
    background:var(--card2);
    color:var(--text);
    border-radius:50%;
    width:38px;
    height:38px;
    font-size:22px;
}

label{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin:12px 0;
}

input,
select,
textarea{
    width:100%;
    margin-top:7px;
    border:1px solid var(--border);
    background:var(--card2);
    color:var(--text);
    border-radius:16px;
    padding:14px;
    outline:none;
}

textarea{
    min-height:120px;
    resize:none;
}

input:focus,
select:focus,
textarea:focus{
    border-color:rgba(255,95,143,.55);
}

.hint{
    font-size:12px;
    color:var(--muted);
    line-height:1.5;
    margin:10px 2px 16px;
}

.inviteResult{
    margin-top:14px;
}

.hidden{
    display:none;
}

.inviteUrl{
    background:var(--card2);
    border-radius:14px;
    padding:12px;
    word-break:break-all;
    font-size:13px;
    margin-bottom:10px;
}

.toast{
    position:fixed;
    left:50%;
    bottom:100px;
    transform:translate(-50%,15px);
    opacity:0;
    pointer-events:none;
    background:#292731;
    border:1px solid var(--border);
    color:#fff;
    border-radius:14px;
    padding:11px 14px;
    font-size:13px;
    transition:.2s;
    z-index:60;
    max-width:90%;
    text-align:center;
}

.toast.show{
    opacity:1;
    transform:translate(-50%,0);
}

@media(max-width:380px){
    .heroTitle{
        font-size:27px;
    }

    .stat{
        padding:13px 10px;
    }

    .stat b{
        font-size:21px;
    }
}
