*,:before,:after{box-sizing:border-box}body{color:#f8fafc;background:#0f172a;min-height:100dvh;margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.app{flex-direction:column;gap:16px;max-width:420px;margin:0 auto;padding:16px;display:flex}.calculator{background:#1e293b;border-radius:24px;padding:16px;box-shadow:0 20px 40px #00000059}.display{text-align:right;overflow-wrap:anywhere;padding:16px 8px 24px}.display__previous{color:#94a3b8;min-height:1.5rem;font-size:1.1rem}.display__current{font-size:clamp(2.5rem,12vw,3.5rem);font-weight:300;line-height:1.1}.keypad{grid-template-columns:repeat(4,1fr);gap:12px;display:grid}.key{min-height:64px;color:inherit;cursor:pointer;background:#334155;border:none;border-radius:16px;font-size:1.5rem;transition:filter .1s,transform 50ms}.key:hover{filter:brightness(1.15)}.key:active{transform:scale(.96)}.key--zero{grid-column:span 2}.key--clear{background:#ef4444;grid-column:span 3;font-size:1.25rem}.key--operator{color:#1e293b;background:#f59e0b}.key--equals{color:#1e293b;background:#22c55e}.pbb__bbk,.bbq{font-size:1rem}.pbb__white{background:#60f;font-size:1rem}.pbb__musco{background:#802b00;font-size:1rem}.bbk{background:olive;font-size:1rem}.pbb__bbk__btn,.bbq__btn,.calc__btn{color:#fff;background:#334155;border:none;border-radius:10px;width:100%;padding:10px}.selected{background:#0cf}.muted{opacity:.25}.history{background:#1e293b;border-radius:24px;padding:16px 20px}.history__title{text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;margin:0 0 12px;font-size:1rem}.history__empty{color:#64748b;margin:0}.history__list{max-height:50dvh;margin:0;padding:0;list-style:none;overflow-y:auto}.history__item{border-bottom:1px solid #334155;justify-content:space-between;align-items:center;padding:10px 0;display:flex}.history__item:last-child{border-bottom:none}.history__expression{color:#94a3b8;overflow-wrap:anywhere}.history__result{justify-content:end;font-weight:600;display:flex}@media (min-width:768px){.app{flex-direction:row;align-items:flex-start;max-width:860px;padding:48px 24px}.calculator{flex:0 0 380px}.history{flex:1;min-height:100%}.history__list{max-height:480px}}
