.calc-page{display:flex;flex-direction:column;align-items:center;padding:10px;overflow:hidden}.calc-container{width:100%;max-width:420px;background:var(--bi-surface);border-radius:20px;box-shadow:0 4px 20px #0000001a;display:flex;flex-direction:column;overflow:hidden}.calc-toolbar{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;background:var(--bi-surface)}.toolbar-btn{width:36px;height:36px;border:none;background:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--bi-text-muted);font-size:1.1rem;cursor:pointer;transition:all .2s}.toolbar-btn:hover{background:#f0f0f0;color:var(--bi-text)}.calc-toolbar .favorite-btn:hover{color:#ffc107;background:#ffc1071f}.toolbar-btn.active{background:#ff9500;color:#fff}.calc-screen{padding:20px 24px;background:var(--bi-surface);text-align:right;min-height:120px;display:flex;flex-direction:column;justify-content:flex-end}.calc-line1{font-size:2.5rem;font-weight:300;color:var(--bi-text);word-break:break-all;line-height:1.2;min-height:48px;transition:all .3s ease}.calc-line1.small{font-size:1.2rem;color:var(--bi-text-muted);min-height:24px}.calc-line2{font-size:1.2rem;color:var(--bi-text-muted);word-break:break-all;line-height:1.2;min-height:24px;transition:all .3s ease}.calc-line2.large{font-size:2.5rem;font-weight:300;color:var(--bi-text);min-height:48px}.calc-line1.error,.calc-line2.error{color:#ff6b6b}.scientific-panel{padding:8px 12px;background:#f8f8f8;border-top:1px solid #eee;display:none}.scientific-panel.show{display:block}.sci-row{display:flex;gap:8px;margin-bottom:8px}.sci-row:last-child{margin-bottom:0}.sci-btn{flex:1;height:40px;border:none;background:var(--bi-surface);border-radius:20px;font-size:.9rem;color:var(--bi-text-muted);cursor:pointer;transition:all .15s;box-shadow:0 1px 3px #0000001a}.sci-btn:hover{background:#f0f0f0;transform:translateY(-1px)}.sci-btn:active{transform:scale(.95)}.sci-btn.active{background:#ff9500;color:#fff}.calc-keyboard{padding:12px;background:var(--bi-surface-2)}.key-row{display:flex;gap:10px;margin-bottom:10px}.key-row:last-child{margin-bottom:0}.key-btn{flex:1;height:56px;border:none;background:var(--bi-surface);border-radius:50%;font-size:1.3rem;font-weight:400;color:var(--bi-text);cursor:pointer;transition:all .15s;box-shadow:0 2px 5px #00000014;display:flex;align-items:center;justify-content:center}.key-btn:hover{background:#f8f8f8;transform:translateY(-2px);box-shadow:0 4px 8px #0000001f}.key-btn:active{transform:scale(.92);box-shadow:0 1px 3px #0000001a}.key-btn.func{background:#e8e8e8;color:var(--bi-text);font-size:1.1rem}.key-btn.func:hover{background:#ddd}.key-btn.operator{background:#e8e8e8;color:var(--bi-text);font-size:1.5rem}.key-btn.operator:hover{background:#ddd}.key-btn.operator.active{background:#ff9500;color:#fff}.key-btn.equals{background:#ff9500;color:#fff;font-size:1.8rem}.key-btn.equals:hover{background:#ff8000}.history-sidebar{position:fixed;top:0;right:-320px;width:320px;height:100vh;background:var(--bi-surface);box-shadow:-2px 0 10px #0000001a;z-index:1050;transition:right .3s ease;display:flex;flex-direction:column}.history-sidebar.show{right:0}.history-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #eee}.history-header h6{margin:0;font-weight:600}.history-list{flex:1;overflow-y:auto;padding:12px}.history-item{padding:12px 16px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}.history-item:hover{background:#f8f8f8}.history-expr{font-size:.9rem;color:var(--bi-text-muted);margin-bottom:4px}.history-result{font-size:1.2rem;color:var(--bi-text);font-weight:500}.clear-history{padding:16px;border:none;background:#f8f8f8;color:#ff6b6b;font-weight:500;cursor:pointer;transition:background .2s}.clear-history:hover{background:#ffebee}.overlay{position:fixed;inset:0;background:#0000004d;z-index:1040;opacity:0;visibility:hidden;transition:all .3s}.overlay.show{opacity:1;visibility:visible}@media (max-width: 480px){.calc-page{padding:0}.calc-container{border-radius:0;max-width:100%;height:calc(100vh - 60px)}.calc-screen{flex:1;min-height:auto}.calc-line1{font-size:2rem}.calc-line1.small{font-size:1rem}.calc-line2.large{font-size:2rem}.key-btn{height:64px}.history-sidebar{width:100%;right:-100%}}@media (min-width: 481px) and (max-width: 768px){.calc-container{max-width:400px}}@keyframes press{0%{transform:scale(1)}50%{transform:scale(.92)}to{transform:scale(1)}}.key-btn.pressed{animation:press .15s ease}html[data-theme=dark] .scientific-panel,html[data-theme=dark] .clear-history{background:var(--bi-surface-2)}html[data-theme=dark] .toolbar-btn:hover,html[data-theme=dark] .sci-btn:hover,html[data-theme=dark] .key-btn:hover,html[data-theme=dark] .history-item:hover{background:#273449}html[data-theme=dark] .clear-history:hover{background:#3d2028}html[data-theme=dark] .key-btn.func,html[data-theme=dark] .key-btn.operator{background:#2d3a4d}html[data-theme=dark] .key-btn.func:hover,html[data-theme=dark] .key-btn.operator:hover{background:#38465c}html[data-theme=dark] .history-item{border-bottom-color:#334155}html[data-theme=dark] .scientific-panel{border-top-color:#334155}
