/* KarobarOS os-29 — Classic calculator restore.
   Fixed-size card: one-line expression, one fixed result line, classic
   4-column keypad. NO internal scrolling, NO growing/shrinking parts.
   Loaded last so it supersedes the legacy scrollable .quick-calc rules
   and the os-shared .shared-calc* rules in style.css. */

/* — The classic card (standalone page + inside the popup) — */
.classic-calc{background:#fff;color:#1d2126;border:1px solid #e4e1d8;border-radius:16px;padding:12px;box-shadow:0 6px 24px #00000014}
.classic-calc .calc-screen{background:#f6f5f0;border:1px solid #e9e6dc;border-radius:12px;padding:10px 10px 8px;margin:0;text-align:right}
.classic-calc .calc-screen small{display:block;min-height:14px;color:#7a766b;font-size:11px}
.classic-calc .calc-screen input{display:block;width:100%;box-sizing:border-box;border:0;background:transparent!important;color:#1d2126;font-size:22px;font-weight:600;text-align:right;padding:2px 0;white-space:nowrap}
.classic-calc .calc-screen strong{display:block;min-height:29px;font-size:24px;line-height:1.2;color:#1d2126;white-space:nowrap;overflow:hidden}
.classic-calc .calc-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:8px}
.classic-calc .calc-keys button{min-height:46px;padding:5px;font-size:17px;font-weight:600;border-radius:10px;background:#f1efe8;border:1px solid #e0ddd0;color:#1d2126;cursor:pointer}
.classic-calc .calc-keys button:active{transform:scale(.97)}
.classic-calc .calc-keys button.primary{background:#ed612d;border-color:#ed612d;color:#fff}

/* Standalone Calculator page: roomier classic proportions. */
#app .classic-calc{padding:14px}
#app .classic-calc .calc-screen input{font-size:26px}
#app .classic-calc .calc-screen strong{min-height:36px;font-size:29px}
#app .classic-calc .calc-keys button{min-height:52px;font-size:18px}

/* — The popup pane: fixed size, never scrolls — */
#quickCalc{position:fixed;right:20px;bottom:76px;width:288px;max-height:none;overflow:hidden;padding:12px;background:#fff;color:#1d2126;border:1px solid #e4e1d8;border-radius:16px;box-shadow:0 18px 50px #00000045;z-index:1000}
#quickCalc .classic-calc{background:transparent;border:0;border-radius:0;box-shadow:none;padding:0}
#quickCalc .calc-screen input{font-size:20px}
#quickCalc .calc-screen strong{min-height:26px;font-size:22px}
#quickCalc .calc-keys button{min-height:40px;font-size:16px}
.calc-pane-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.calc-pane-header b{font-size:15px;color:#1d2126}
.calc-pane-header button{width:30px;height:30px;min-height:30px;padding:0;border-radius:8px;background:#f1efe8;border:1px solid #e0ddd0;color:#1d2126;font-size:16px;line-height:1;cursor:pointer}
#quickCalc .apply-calculation{width:100%;margin-top:8px;min-height:42px;background:#ed612d;border:1px solid #ed612d;color:#fff;border-radius:10px;font-weight:700;cursor:pointer}
#quickCalc .calculator-cancel{width:100%;margin-top:6px;min-height:38px;padding:6px;background:transparent;border:1px solid #e0ddd0;border-radius:10px;color:#1d2126;cursor:pointer}
#quickCalc #calculatorMessage{height:15px;margin:5px 0 0;font-size:11px;line-height:15px;color:#b43223;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Mobile/tablet: popup phir bhi FIXED 288px — os-36 (Round 2, item 3).
   Pehle yahan width:auto + left/right:12px tha, jis se tablet par
   744px aur mobile par 366px chaura ho jata tha (spec: har width
   par chhota fixed 288px popup). Ab right-aligned 288px; bohat
   tang screen par max-width usay screen ke andar rakhta hai —
   digits auto-fit (calculator.js) pehle ki tarah kaam karta hai. */
@media(max-width:899px){
 #quickCalc{left:auto;right:12px;width:288px;max-width:calc(100vw - 24px);bottom:calc(76px + env(safe-area-inset-bottom))}
}
@media print{#quickCalc{display:none!important}}
