.ratio-panel{
    position:fixed;
    left:50%;
    bottom:0;

    transform:
    translateX(-50%)
    translateY(100%);

    width:calc(100% - 18px);
    max-width:430px;

    height: auto;

    padding:46px 18px 34px;

    display:grid;
    grid-template-columns:repeat(3,1fr);
    grid-template-rows:auto auto;
    column-gap:12px;
    row-gap:12px;
    align-items:start;

    background:rgba(255,255,255,0.96);

    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);

    border-radius:34px 34px 0 0;

    border:1px solid rgba(0,0,0,0.05);

    box-shadow:
    0 -10px 35px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.9);

    pointer-events:none;

    overflow-y:auto;
    overflow-x:hidden;

    scrollbar-width:none;

    z-index:1000;

    transition:
    transform .65s cubic-bezier(.16,1,.3,1);
}

/* =========================================================
   HIDE SCROLLBAR
========================================================= */

.ratio-panel::-webkit-scrollbar{
    display:none;
}

/* =========================================================
   PANEL HANDLE
========================================================= */

.ratio-panel::before{
    content:"";

    position:absolute;

    top:12px;
    left:50%;

    transform:translateX(-50%);

    width:60px;
    height:6px;

    border-radius:999px;

    background:#cfcfcf;

    z-index:100;
}

/* =========================================================
   PANEL ACTIVE
========================================================= */

.ratio-panel.active{

    transform:
    translateX(-50%)
    translateY(0);

    pointer-events:auto;
}

/* =========================================================
   RATIO OPTION
========================================================= */

.ratio-option{

    position:relative;

    width:100%;
    height:104px;

    border:none;
    outline:none;

    border-radius:28px;

    background:linear-gradient(
    180deg,
    #ffffff 0%,
    #f3f4f7 100%);

    color:#222;

    font-size:30px;
    font-weight:700;

    letter-spacing:-1px;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    transition:
    transform .15s ease,
    border .20s ease,
    box-shadow .20s ease;

    box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 4px 12px rgba(0,0,0,.08);
}

/* =========================================================
   ALL BUTTON - FULL WIDTH
========================================================= */

.ratio-option:first-child{
    grid-column: span 3;
    height:120px;
    font-size:38px;
    align-self:start;
}

/* =========================================================
   INNER SHINE
========================================================= */

.ratio-option::after{

    content:"";

    position:absolute;
    inset:1px;

    border-radius:27px;

    background:linear-gradient(
    180deg,
    rgba(255,255,255,.7),
    rgba(255,255,255,0));

    pointer-events:none;
}

/* =========================================================
   PRESS EFFECT
========================================================= */

.ratio-option:active{
    transform:scale(.95);
}

/* =========================================================
   ACTIVE OPTION
========================================================= */

.ratio-option.active{

    background:#ffffff;

    color:#000000;

    border:2px solid #000000;

    box-shadow:
    0 4px 12px rgba(0,0,0,.08);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width: 420px){

    .ratio-panel{
        height: auto;
        column-gap:10px;
        row-gap:10px;
    }

    .ratio-option{
        height: 92px;
        font-size: 28px;
        border-radius:24px;
    }

    .ratio-option:first-child{
        height: 104px;
        font-size: 32px;
    }

}

/* =========================================================
   BACKDROP — panel ke peeche, poori screen
========================================================= */

.ratio-backdrop{
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    z-index:999;
    background:rgba(0,0,0,0);
    visibility:hidden;
    pointer-events:none;
    transition:background 0.35s ease,
               visibility 0s linear 0.35s;
}

.ratio-backdrop.active{
    background:rgba(0,0,0,0.35);
    visibility:visible;
    pointer-events:auto;
    transition:background 0.35s ease;
}

.ratio-panel{
    overscroll-behavior:contain;
}