:root{
    --bg:#f2f6fb;
    --card:#ffffff;
    --accent:#5b9df9;
    --muted:#708090;
    --btn-bg: linear-gradient(180deg, #ffffff, #e6f0ff);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
    margin:0;
    font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: radial-gradient(1200px 600px at 10% 10%, #f7fbff, transparent),
    radial-gradient(900px 400px at 90% 90%, #eef6ff, transparent),
    var(--bg);
    color:#0b2540;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px;
}

.app {
    width:100%;
    max-width:1100px;
    background:var(--card);
    border-radius:18px;
    box-shadow: 0 20px 40px rgba(9,30,66,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
    padding:22px;
}

header{
    display:flex;
    gap:12px;
    align-items:center;
    margin-bottom:16px;
}
.logo{
    width:56px;
    height:56px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#6fb3ff,#3b82f6);
    color:white;
    font-weight:700;
    box-shadow: 0 6px 18px rgba(59,130,246,0.18);
}
h1{font-size:18px;margin:0}
p.lead{margin:0;color:var(--muted);font-size:13px}

.controls{
    margin-top:12px;
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
}

.left-controls{display:flex;gap:8px;align-items:center}
.btn {
    background:var(--btn-bg);
    border:1px solid rgba(11,37,64,0.06);
    padding:8px 12px;
    border-radius:10px;
    font-size:14px;
    cursor:pointer;
    box-shadow: 0 6px 14px rgba(11,37,64,0.04);
    transition:transform .14s ease, box-shadow .14s ease, opacity .12s;
    user-select:none;
}
.btn:active{transform:translateY(1px)}
.btn.ghost{background:transparent;border:1px solid rgba(11,37,64,0.06);}

.grid-wrap{
    margin-top:18px;
    border-radius:12px;
    padding:18px;
    background: linear-gradient(180deg, rgba(95,160,255,0.03), rgba(95,160,255,0.01));
    border: 1px dashed rgba(59,130,246,0.05);
}

.grid{
    display:grid;
    gap:10px;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    align-items:stretch;
}

.bubble-btn{
    --size:78px;
    height:var(--size);
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-weight:600;
    background: linear-gradient(180deg,#ffffff,#f0f8ff);
    border: 1px solid rgba(11,37,64,0.06);
    cursor:pointer;
    box-shadow: 0 8px 18px rgba(11,37,64,0.06);
    transition: transform .18s cubic-bezier(.2,.9,.3,1), opacity .18s ease, filter .12s ease;
    position:relative;
    overflow:hidden;
    -webkit-tap-highlight-color: transparent; /* для Android Chrome / WebView */
    -webkit-user-select: none; /* запрет выделения текста */
    user-select: none;
    outline: none;
}
.bubble-btn:active{transform:translateY(2px) scale(.995)}
.bubble-btn:focus{
    outline:3px solid rgba(91,157,249,0.14);
    box-shadow: none;
}

/* disappear animation */
.popping {
    animation: pop-and-fade .45s forwards;
}
@keyframes pop-and-fade {
    0% { transform: scale(1) rotate(0deg); opacity:1; filter: blur(0px); }
    45% { transform: scale(1.18) rotate(-4deg); opacity:1; }
    100% { transform: scale(.02) rotate(12deg); opacity:0; filter: blur(4px); }
}

/* responsive tweak */
@media (max-width:560px){
    body{padding:14px; align-items:flex-start}
    .logo{width:48px;height:48px;border-radius:10px}
    .bubble-btn{--size:64px}
}