.sc-wrap { max-width: 860px; margin: 0 auto; }
.sc-display { background: #15132e; color: #f0eefb; border-radius: 18px; padding: 10px 16px 14px; margin-bottom: 12px; }
.sc-flags { display: flex; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .05em; color: #a5a1d6; min-height: 16px; }
#sc-expr { width: 100%; background: transparent; border: 0; color: #f0eefb; font-size: clamp(20px, 5.5vw, 26px); text-align: right; padding: 4px 0; min-height: 40px; font-variant-numeric: tabular-nums; outline: none; caret-color: var(--c); }
#sc-expr::placeholder { color: #6f6b99; }
#sc-res { display: block; text-align: right; font-size: clamp(30px, 9vw, 44px); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; min-height: 50px; }
#sc-res.preview { color: #8a86b8; font-size: clamp(22px, 6vw, 30px); }
#sc-res.err { color: #ff8a8a; font-size: 18px; font-weight: 700; }
.sc-pads { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
@media (max-width: 700px) { .sc-pads { grid-template-columns: 1fr; } }
.sc-sci { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-content: start; }
.sc-num { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sc-pads button { font: inherit; font-weight: 700; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; min-height: 48px; cursor: pointer; padding: 0 2px; transition: transform .06s, background .12s; touch-action: manipulation; }
.sc-pads button:active { transform: scale(.96); }
.sc-sci button { font-size: 15px; background: var(--bg); min-height: 44px; }
.sc-sci button.fn { font-size: 13px; color: var(--muted); }
.sc-sci button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sc-num button { font-size: 21px; min-height: 54px; }
.sc-num .op { background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--c); font-size: 23px; }
.sc-num .clr { color: var(--bad); }
.sc-num .eq { grid-column: span 2; background: var(--c); color: #fff; border-color: var(--c); font-size: 26px; }
.sc-hist { max-width: 860px; margin: 16px auto 0; }
.sc-hist-head { display: flex; align-items: center; justify-content: space-between; }
.sc-hist-head h3 { margin: 0; font-size: 17px; }
.sc-hist-head .btn { min-height: 36px; padding: 4px 12px; font-size: 14px; }
#sc-hist { list-style: none; padding: 0; margin: 8px 0; max-height: 220px; overflow: auto; }
#sc-hist li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-variant-numeric: tabular-nums; }
#sc-hist li:hover { background: var(--bg); }
#sc-hist li span { color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
#sc-hist li b { white-space: nowrap; }
.sc-small { font-size: 13px; }
