:root { --bg0: #10151e; --bg1: #1b2432; --panel: #2c3442; --panel2: #394354; --edge: #0c1118; --display: #cfe0ae; --display2: #b9cd8a; --displayText: #1f2a12; --buttonText: #f4f7fb; --shadow: rgba(0, 0, 0, 0.35); --btnTop: #444c58; --btnBottom: #2f3640; --btnAccentTop: #3f526b; --btnAccentBottom: #2b394c; --btnAltTop: #525c69; --btnAltBottom: #3a434f; --btnDangerTop: #584042; --btnDangerBottom: #402d2f; --btnEscapeTop: #6a4a2a; --btnEscapeBottom: #4a331d; --btnEnterTop: #4f7f4d; --btnEnterBottom: #355a34; --btnText: #eef2f7; } * { box-sizing: border-box; } html, body { margin: 0; min-height: 100%; overflow-y: hidden; } body { min-height: 100vh; font-family: Arial, sans-serif; color: var(--buttonText); background: var(--bg0); } .app-shell { min-height: 100vh; display: grid; align-items: start; justify-items: center; padding: 0; } .calculator { width: 100%; max-width: 460px; height: 100vh; max-height: 100vh; padding: 8px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; border-radius: 8px; background: var(--panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); justify-content: stretch; align-content: start; overflow: hidden; } .display-block, .display-panel, .display-buttons-panel, .keypad-panel, .functions-panel, .trigo-panel { border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.06); background: rgba(6, 10, 16, 0.16); box-shadow: none; } .display-block { display: grid; gap: 0; align-self: start; justify-items: stretch; grid-template-rows: auto auto; row-gap: 0; } .display-panel { position: relative; width: 100%; padding: 16px; padding-bottom: 8px; background: var(--display); color: var(--displayText); font-family: "Courier New", monospace; overflow: hidden; box-sizing: border-box; height: 138px; min-height: 138px; max-height: 138px; margin-bottom: 0; } .display-grid { height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: repeat(4, minmax(0, auto)); align-content: start; gap: 2px; } .stack-cell { display: grid; grid-template-columns: 2.2ch auto minmax(0, 1fr); align-items: center; gap: 8px; font-size: 20px; line-height: 1; min-height: 0; padding-block: 0; } .stack-label { text-align: right; opacity: 0.78; } .stack-value { min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; justify-self: end; font-size: 20px; } .display-buttons-panel { padding: 8px; min-height: 0; background: rgba(6, 10, 16, 0.16); } .display-buttons-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-content: start; align-items: stretch; } .display-button-spacer { pointer-events: none; visibility: hidden; background: transparent; border-color: transparent; box-shadow: none; } .display-button { background: linear-gradient(180deg, var(--btnTop), var(--btnBottom)); color: #eef2f7; box-shadow: none; } .display-button-symbol { display: inline-flex; align-items: center; justify-content: center; min-width: 1.2em; font-size: 1.05em; line-height: 1; font-weight: 800; transform: translateY(-0.01em); } .paste-symbol { font-size: 1em; } .display-buttons-grid > button { padding: 6px 8px; } .menu-popup { position: fixed; z-index: 20; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 6px; background: rgba(16, 21, 30, 0.96); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32); backdrop-filter: blur(2px); } .menu-popup-item { width: 100%; min-width: 0; padding: 6px 10px; border-radius: 5px; background: linear-gradient(180deg, var(--btnAltTop), var(--btnAltBottom)); text-align: left; font-weight: 700; } .menu-popup-item.is-active { outline: 1px solid rgba(207, 224, 174, 0.7); outline-offset: 0; } .key-escape { background: linear-gradient(180deg, var(--btnEscapeTop), var(--btnEscapeBottom)); color: #eef2f7; } .keypad-panel, .functions-panel, .trigo-panel { padding: 8px; min-height: 0; } .calculator > .display-block, .calculator > .display-buttons-panel, .calculator > .keypad-scroll-area { justify-self: stretch; } .keypad-scroll-area { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(46, 105, 135, 1); } .status-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 8px 12px; min-height: 30px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: rgba(31, 42, 18, 0.96); background: rgba(255, 246, 170, 0.92); border-bottom: 1px solid rgba(31, 42, 18, 0.2); transform: translateY(-100%); opacity: 0; transition: transform 180ms ease, opacity 180ms ease; pointer-events: none; } .status-bar.is-visible { transform: translateY(0); opacity: 1; } .status-bar.is-error { color: #fff; background: rgba(72, 14, 14, 0.98); border-bottom-color: rgba(255, 255, 255, 0.12); } .keypad-grid, .functions-grid, .trigo-grid { display: grid; gap: 8px; } .keypad-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1.7fr)); } .functions-grid, .trigo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); } button { border: 1px solid rgba(14, 18, 25, 0.85); border-radius: 8px; padding: 8px 8px; font: inherit; font-weight: 700; color: var(--btnText); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); cursor: pointer; box-shadow: none; transition: filter 120ms ease, opacity 120ms ease; line-height: 1; } button:hover { filter: brightness(1.06); } button:active { transform: none; box-shadow: none; } .stack-copy-button:active { animation: stack-copy-flash 140ms ease-out; } @keyframes stack-copy-flash { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.7; } } .stack-copy-button { padding: 4px; min-width: 24px; width: 24px; height: 24px; display: inline-grid; place-items: center; opacity: 0; pointer-events: none; transform: scale(1); background: transparent; border: none; box-shadow: none; color: rgba(31, 42, 18, 0.58); margin-left: 0; } .stack-cell:last-child { margin-bottom: 4px; } .stack-copy-button svg { width: 15px; height: 15px; fill: #0a0a0a; display: block; } .stack-copy-button.is-visible { opacity: 0.7; pointer-events: auto; transform: scale(1); } .stack-copy-button:hover { opacity: 1; filter: none; color: rgba(31, 42, 18, 0.85); } .stack-copy-button:active { transform: scale(1); color: rgba(31, 42, 18, 0.95); } .stack-copy-button:focus-visible { outline: 1px solid rgba(31, 42, 18, 0.35); outline-offset: 2px; } .key-default { background: linear-gradient(180deg, var(--btnTop), var(--btnBottom)); color: #eef2f7; } .keypad-grid > button { min-height: 1.7em; } #keypadGrid > button { min-height: calc(1.7em * 1.7); padding-top: calc(8px * 1.7); padding-bottom: calc(8px * 1.7); } #keypadGrid > button.key-default, #keypadGrid > button.key-accent, #keypadGrid > button.key-danger, #keypadGrid > button.key-enter { min-height: calc(1.7em * 1.7); } .key-accent { background: linear-gradient(180deg, var(--btnAccentTop), var(--btnAccentBottom)); color: #eef2f7; } .key-danger { background: linear-gradient(180deg, var(--btnDangerTop), var(--btnDangerBottom)); color: #eef2f7; } .key-enter { background: linear-gradient(180deg, var(--btnEnterTop), var(--btnEnterBottom)); color: #eef2f7; padding-inline: 6px; } .hidden-input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }