:root{
    --bg1:#fff7f8;
    --bg2:#ffe4ef;
    --bg3:#f8c4da;
    --pink:#f4a9c1;
    --pink2:#ef8a74;
    --text:#26314b;
    --muted:#7f7684;
    --card: rgba(255,255,255,0.82);
    --stroke: rgba(35,31,39,0.10);
    --shadow: 0 18px 55px rgba(35,31,39,0.12);
    --radius: 22px;
    --focus: 0 0 0 4px rgba(196,84,135,0.18);
}

*{ box-sizing:border-box; }
html,
body{
    min-height:100%;
}

html{
    background: linear-gradient(160deg, #fde7f0 0%, #f8d1df 52%, #f4c3d6 100%);
}

body{
    margin:0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    min-height:100svh;
    overflow-x:hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(244,169,193,0.26), rgba(244,169,193,0) 34%),
        radial-gradient(circle at 86% 76%, rgba(232,172,203,0.20), rgba(232,172,203,0) 30%),
        linear-gradient(160deg, #fde7f0 0%, #f8d1df 52%, #f4c3d6 100%);
    position: relative;
}

.bg{
    position: fixed;
    inset: 0;
    z-index: 0;
}

.bg::before{
    content:"";
    position:absolute;
    inset:-22%;
    background-image:url('../images/logo.png');
    background-repeat:repeat;
    background-size:170px auto;
    opacity:.08;
    transform:rotate(-24deg) scale(1.18);
    transform-origin:center;
    pointer-events:none;
}

.blob{
    position:absolute;
    width:620px;
    height:620px;
    border-radius:50%;
    filter: blur(58px);
    opacity:.68;
    animation: float 10s ease-in-out infinite;
}

.blob-1{
    left:-150px;
    top:-170px;
    background: radial-gradient(circle at 30% 30%, rgba(226,116,154,0.44), rgba(255,188,214,0.30) 42%, rgba(255,255,255,0) 72%);
}

.blob-2{
    right:-200px;
    bottom:-220px;
    background: radial-gradient(circle at 60% 40%, rgba(232,172,203,0.38), rgba(247,194,221,0.24) 46%, rgba(255,255,255,0) 74%);
    animation-delay:-3.2s;
}

.grain{
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 10% 20%, rgba(0,0,0,.06) 0 1px, transparent 2px 100%),
        radial-gradient(circle at 70% 80%, rgba(0,0,0,.05) 0 1px, transparent 2px 100%),
        radial-gradient(circle at 40% 60%, rgba(0,0,0,.04) 0 1px, transparent 2px 100%),
        radial-gradient(circle at 80% 30%, rgba(0,0,0,.05) 0 1px, transparent 2px 100%);
    background-size: 180px 180px;
    opacity:.12;
    mix-blend-mode: soft-light;
}

@keyframes float{
    0%,100%{ transform: translateY(0) translateX(0) scale(1); }
    50%{ transform: translateY(14px) translateX(8px) scale(1.02); }
}

.page{
    min-height:100svh;
    display:grid;
    place-items:center;
    place-content:center;
    padding: 38px 16px;
    position: relative;
    z-index: 2;
    row-gap: 16px;
}

.heroBrand{
    position: relative;
    z-index: 3;
    margin-bottom: 2px;
    display: grid;
    place-items: center;
    gap: 0;
    padding: 6px 18px 2px;
    isolation: isolate;
    animation: none;
}
.heroBrand::before{
    content:"";
    position:absolute;
    inset:-16px -56px -8px;
    border-radius:999px;
    background: radial-gradient(circle at center, rgba(255,214,232,.42), rgba(255,214,232,.24) 30%, rgba(255,214,232,0) 74%);
    filter: blur(16px);
    z-index:-1;
    pointer-events:none;
}


.heroBrand__logo{
    width:clamp(112px, 18vw, 168px);
    height:auto;
    max-height:210px;
    object-fit:contain;
    display:block;
}

.heroBrand__badge{
    font-weight: 950;
    font-size: clamp(48px, 7.8vw, 94px);
    letter-spacing: -1.4px;
    background: linear-gradient(120deg, #190913 0%, #5f123f 24%, #ff2d86 58%, #2a0d1d 100%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 0 rgba(255,255,255,.24), 0 14px 36px rgba(255,45,134,.22);
    animation: shimmerText 8s linear infinite;
}

.heroBrand__spark{
    width: clamp(120px, 18vw, 260px);
    height: 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 50%, rgba(255,122,182,.55), rgba(255,255,255,0) 65%);
    opacity: .85;
    animation: none;
}

@keyframes shimmerText{
    0%{ background-position: 0% 50%; }
    100%{ background-position: 300% 50%; }
}

@keyframes heroFloat{
    0%,100%{ transform: translateY(0); }
    50%{ transform: translateY(-8px); }
}

@keyframes sparkPulse{
    0%,100%{ transform: scaleX(.92); opacity: .65; }
    50%{ transform: scaleX(1.08); opacity: .95; }
}

@media (max-width: 640px){
    .bg::before{
        background-size:130px auto;
    }

    .heroBrand{
        margin-bottom: 10px;
    }

    .heroBrand__logo{
        width:96px;
        max-height:156px;
    }
}

.card{
    width:min(520px, 92vw);
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow:hidden;
    position:relative;
    animation: popIn .55s ease both;
}

@keyframes popIn{
    from{ opacity:0; transform: translateY(14px) scale(.98); }
    to{ opacity:1; transform: translateY(0) scale(1); }
}

.card::before{
    content:"";
    position:absolute;
    inset:-1px;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,122,182,.55), rgba(255,255,255,.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events:none;
}

.card__header{
    padding: 26px 26px 18px;
    text-align: center;
}

.brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin-bottom: 14px;
}

.brand__dot{
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--pink2));
    box-shadow: 0 10px 20px rgba(255,122,182,0.28);
}

.brand__name{
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 16px;
}

.title{
    margin:0;
    font-size: 26px;
    letter-spacing: -0.45px;
}

.subtitle{
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 17px;
}

.form{
    padding: 12px 26px 26px;
}

.grid{
    display:grid;
    gap: 14px;
}

.field{
    display:grid;
    gap: 8px;
}

.field__label{
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
}

.field__control{
    position:relative;
}

input{
    width:100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(35,31,39,0.12);
    background: rgba(255,255,255,0.82);
    padding: 0 14px;
    font-size: 16px;
    outline:none;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

input:focus{
    border-color: rgba(255,122,182,.55);
    box-shadow: var(--focus);
    transform: translateY(-1px);
}

.hint{
    margin-top: 6px;
    font-size: 13px;
    color: rgba(111,102,118,0.92);
}

.alert{
    border-radius: 14px;
    padding: 12px 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(35,31,39,0.08);
}

.alert__title{
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 4px;
}

.alert__text{
    font-size: 14px;
    line-height: 1.4;
}

.alert--error{
    color: #7a1b15;
    background: rgba(180, 35, 24, 0.10);
    border-color: rgba(180, 35, 24, 0.30);
}

.btn{
    width:100%;
    height: 48px;
    border-radius: 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 10px;
    font-weight: 850;
    letter-spacing: .2px;
    font-size: 15px;
    cursor:pointer;
    position:relative;
    overflow:hidden;
    border: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn--primary{
    color:#1f1622;
    background: linear-gradient(135deg, rgba(255,122,182,.78), rgba(255,255,255,.96));
    box-shadow: inset 0 0 0 1px rgba(35,31,39,0.10), 0 18px 40px rgba(255,122,182,0.18);
}

.btn--primary:hover{
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(35,31,39,0.10), 0 22px 55px rgba(255,122,182,0.24);
}

.btn:focus-visible{
    box-shadow: inset 0 0 0 1px rgba(35,31,39,0.10), var(--focus), 0 18px 40px rgba(255,122,182,0.18);
}

.btn__shine{
    position:absolute;
    inset:-120% -40%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.65), rgba(255,255,255,0) 55%);
    transform: rotate(18deg);
    animation: shine 3.2s ease-in-out infinite;
    pointer-events:none;
}

@keyframes shine{
    0%,100%{ transform: translateX(-8%) rotate(18deg); opacity:.55; }
    50%{ transform: translateX(10%) rotate(18deg); opacity:.85; }
}

.below{
    margin-top: 14px;
    display:flex;
    justify-content:center;
    align-items:center;
    gap: 10px;
    font-size: 14px;
    flex-wrap: wrap;
}

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

.plainLink{
    color: rgba(35,31,39,0.90);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.plainLink:hover{
    text-decoration-style: solid;
}

.fineprint{
    margin-top: 14px;
    text-align:center;
    font-size: 13px;
    color: rgba(111,102,118,0.92);
    line-height: 1.45;
}

.terms{
    margin-top: 8px;
    margin-bottom: 4px;
}

.check{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(35,31,39,0.08);
    box-shadow: 0 10px 22px rgba(35,31,39,0.06);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.check:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(35,31,39,0.08);
    background: rgba(255,255,255,0.66);
}

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

.check__box{
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 7px;
    flex: 0 0 20px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(35,31,39,0.14);
    box-shadow: inset 0 0 0 1px rgba(255,122,182,0.10);
    position: relative;
    transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.check__text{
    font-size: 15px;
    color: rgba(35,31,39,0.90);
    line-height: 1.45;
}

.check__input:checked + .check__box{
    background: linear-gradient(135deg, rgba(255,122,182,.92), rgba(255,255,255,.85));
    border-color: rgba(255,122,182,.55);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55), 0 10px 22px rgba(255,122,182,0.22);
    transform: translateY(-1px);
}

.check__input:checked + .check__box::after{
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border-right: 2px solid rgba(35,31,39,0.95);
    border-bottom: 2px solid rgba(35,31,39,0.95);
    transform: rotate(45deg);
}

.check:focus-within{
    box-shadow: 0 0 0 4px rgba(255,122,182,0.18), 0 14px 28px rgba(35,31,39,0.08);
}

.policyToggle{
    appearance:none;
    border:0;
    padding:0;
    margin:0 2px;
    background:none;
    color: rgba(35,31,39,0.96);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    cursor:pointer;
}

.policyToggle:hover{
    text-decoration-style: solid;
}

.policyPanel{
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,122,182,0.22);
    background: rgba(255,255,255,0.84);
    box-shadow: 0 18px 32px rgba(35,31,39,0.08);
    overflow: hidden;
}

.policyPanel__header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(35,31,39,0.08);
    background: linear-gradient(135deg, rgba(255,122,182,0.12), rgba(255,255,255,0.72));
}

.policyPanel__title{
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .2px;
}

.policyPanel__close{
    appearance:none;
    border: 1px solid rgba(35,31,39,0.10);
    background: rgba(255,255,255,0.88);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
    cursor:pointer;
}

.policyPanel__body{
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(35,31,39,0.92);
}

.policyPanel__body h3,
.policyPanel__body h4{
    margin: 16px 0 8px;
    color: var(--text);
}

.policyPanel__body h3{
    font-size: 16px;
}

.policyPanel__body h4{
    font-size: 13px;
    letter-spacing: .05em;
}

.policyPanel__body p,
.policyPanel__body ul{
    margin: 0 0 10px;
}

.policyPanel__body ul{
    padding-left: 18px;
}

.policyPanel__body::-webkit-scrollbar{
    width: 10px;
}

.policyPanel__body::-webkit-scrollbar-thumb{
    background: rgba(255,122,182,0.34);
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.75);
}

.policyPanel__body::-webkit-scrollbar-track{
    background: rgba(255,255,255,0.45);
}

.btn:disabled,
.btn[aria-disabled="true"]{
    cursor: not-allowed;
    transform: none !important;
    box-shadow: inset 0 0 0 1px rgba(35,31,39,0.08), 0 10px 24px rgba(35,31,39,0.08);
    background: linear-gradient(135deg, rgba(230,230,235,.95), rgba(255,255,255,.90));
    color: rgba(35,31,39,0.45);
}

.btn:disabled .btn__shine,
.btn[aria-disabled="true"] .btn__shine{
    opacity: 0.18;
    animation: none;
}

/* =========================
   VISUAL POLISH OVERRIDES
   ========================= */

.page{
    min-height: 100svh;
    padding: 46px 18px;
    place-content: center;
}

.card{
    width: min(560px, 92vw);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(35,31,39,.14);
}

.card__header,
.form{
    padding-left: 30px;
    padding-right: 30px;
}

.title{
    font-size: clamp(40px, 6vw, 52px);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.field__control input,
input{
    min-height: 50px;
    border-radius: 16px;
}

.page--auth{
    padding:
        max(28px, env(safe-area-inset-top))
        18px
        max(24px, env(safe-area-inset-bottom));
}

.card--access{
    width:min(100%, 560px);
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,248,251,.96));
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
}

.policyPanel__body{
    max-height:min(42svh, 320px);
}

.page--access{
    place-items:start center;
    place-content:start center;
    padding-top:max(28px, env(safe-area-inset-top));
    padding-bottom:max(24px, env(safe-area-inset-bottom));
}

@media (max-width: 640px){
    body{
        overflow-y:auto;
    }

    .page--access{
        place-content:start;
        padding:
            max(24px, env(safe-area-inset-top))
            14px
            max(20px, env(safe-area-inset-bottom));
    }

    .card--access{
        width:min(100%, calc(100vw - 28px));
    }

    .title{
        font-size: clamp(32px, 9vw, 42px);
    }

    .subtitle{
        font-size:16px;
    }
}

@media (max-width: 420px){
    .card__header,
    .form{
        padding-left:18px;
        padding-right:18px;
    }
}

/* Pink Pact invite refresh */

.heroBrand__badge{
    background:none;
    color:#c45487;
    text-shadow:none;
    display:inline-block;
    animation:heroFloat 2.8s ease-in-out infinite;
    font-size:clamp(42px, 6vw, 72px);
}

.brand{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:11px 20px;
    border-radius:18px;
    background:linear-gradient(180deg, #f4b0c5, #ef8a74);
    color:#fff;
    box-shadow:0 16px 30px rgba(239,138,116,.22);
}

.brand__dot{
    background:#fff;
    box-shadow:none;
}

.brand__name{
    color:#fff;
    font-size:20px;
    font-weight:900;
    letter-spacing:.01em;
}

.title,
.field__label{
    color:#c45487;
}

.title{
    font-size:clamp(28px, 3.3vw, 34px);
    line-height:1.1;
}

.subtitle{
    font-size:17px;
    color:#7f7684;
}

.field__label{
    font-weight:800;
}

.check{
    background:rgba(255,255,255,.78);
}

.btn--primary{
    color:#fff;
    background:linear-gradient(180deg, #f3a1c0, #ef8a74);
    box-shadow:0 18px 38px rgba(215,112,150,.24);
}

.fineprint{
    color:#c45487;
    font-weight:700;
}

@media (max-width: 640px){
    .brand{
        padding:10px 14px;
    }
}

/* Pink coral invite button lock */

.brand,
.btn--primary{
    background:linear-gradient(180deg, #f3a1c0, #ef8a74) !important;
    color:#fff !important;
}

.btn:disabled,
.btn[aria-disabled="true"]{
    background:linear-gradient(180deg, rgba(243,161,192,.88), rgba(239,138,116,.88)) !important;
    color:rgba(255,255,255,.94) !important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.18), 0 14px 30px rgba(239,138,116,.18) !important;
}


