:root { --berry: #3B4CCA; }
* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; overflow: hidden; background: #000; }
body { font-family: 'VT323', monospace; font-size: 18px; color: #000; image-rendering: pixelated; user-select: none; -webkit-font-smoothing: none; touch-action: none; }
.chi { font-family: 'Silkscreen', monospace; font-size: 11px; letter-spacing: 0; }
.screen { position: absolute; inset: 0; overflow: hidden; }
.menubar { position: absolute; top: 0; left: 0; right: 0; height: 22px; background: #fff; border-bottom: 1px solid #000; display: flex; align-items: center; z-index: 9000; }
.menubar.flash { animation: flash .3s steps(1) infinite; }
@keyframes flash { 50% { background: #000; color: #fff; } }
.mtitle { padding: 0 10px; height: 22px; line-height: 22px; cursor: default; }
.mtitle.on { background: #000; color: #fff; }
.mdrop { position: absolute; top: 21px; background: #fff; border: 1px solid #000; box-shadow: 2px 2px 0 #000; min-width: 190px; z-index: 9100; padding: 2px 0; }
.mitem { padding: 1px 16px; white-space: nowrap; cursor: default; }
.mitem:hover:not(.dis) { background: #000; color: #fff; }
.mitem.dis { color: #888; }
.msep { border-top: 1px dotted #000; margin: 3px 0; }
.win { position: absolute; background: #fff; border: 1px solid #000; box-shadow: 1px 1px 0 #000, 2px 2px 0 #000; display: flex; flex-direction: column; }
.tbar { height: 20px; border-bottom: 1px solid #000; position: relative; flex-shrink: 0; cursor: default; display: flex; align-items: center; justify-content: center; }
.win.active .tbar { background: repeating-linear-gradient(#fff 0 2px, #000 2px 3px); background-clip: content-box; padding: 3px 2px; }
.ttext { background: #fff; padding: 0 8px; position: relative; z-index: 1; line-height: 14px; white-space: nowrap; overflow: hidden; max-width: 70%; }
.closebox, .zoombox { position: absolute; top: 3px; width: 13px; height: 13px; border: 1px solid #000; background: #fff; z-index: 2; box-shadow: 0 0 0 2px #fff; }
.closebox { left: 8px; } .zoombox { right: 8px; }
.zoombox::after { content: ''; position: absolute; left: 0; top: 0; width: 7px; height: 7px; border-right: 1px solid #000; border-bottom: 1px solid #000; }
.closebox:active { background: #000; }
.wbody { flex: 1; overflow: auto; position: relative; }
.wbody::-webkit-scrollbar { width: 15px; height: 15px; }
.wbody::-webkit-scrollbar-track { background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0/2px 2px; border-left: 1px solid #000; }
.wbody::-webkit-scrollbar-thumb { background: #fff; border: 1px solid #000; }
.grip { position: absolute; right: 0; bottom: 0; width: 15px; height: 15px; border-left: 1px solid #000; border-top: 1px solid #000; background: #fff; cursor: nwse-resize; z-index: 3; }
.grip::after { content: ''; position: absolute; left: 3px; top: 3px; width: 6px; height: 6px; border: 1px solid #000; box-shadow: 2px 2px 0 -1px #fff, 3px 3px 0 0 #000; }
.btn { border: 1px solid #000; border-radius: 8px; background: #fff; padding: 1px 14px; min-width: 64px; font-family: inherit; font-size: 18px; cursor: default; }
.btn:active { background: #000; color: #fff; }
.btn.def { box-shadow: 0 0 0 1px #fff, 0 0 0 4px #000; border-radius: 8px; }
.dialog { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); background: #fff; border: 1px solid #000; padding: 3px; z-index: 9500; box-shadow: 2px 2px 0 #000; max-width: 92vw; }
.dialog > div { border: 3px solid #000; padding: 14px 18px; }
.icon { position: absolute; width: 84px; text-align: center; cursor: default; z-index: 5; }
.icon .lbl { display: inline-block; background: #fff; padding: 0 3px; line-height: 16px; font-size: 16px; }
.icon.sel .lbl { background: #000; color: #fff; }
.icon.sel svg { filter: invert(1); }
.rubber { position: absolute; border: 1px dotted #000; z-index: 4; pointer-events: none; }
.calc-key { border: 1px solid #000; background: #fff; height: 26px; font-family: inherit; font-size: 18px; box-shadow: 1px 1px 0 #000; }
.calc-key:active { background: #000; color: #fff; }
.tool { width: 28px; height: 26px; border: 1px solid #000; margin: -1px 0 0 -1px; display: flex; align-items: center; justify-content: center; background: #fff; font-size: 16px; }
.tool.on { background: #000; color: #fff; }
.tile { position: absolute; border: 1px solid #000; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; transition: left .08s, top .08s; }
.bezel { position: absolute; inset: 0; background: #d8d2b8; display: flex; align-items: center; justify-content: center; }
.crt { position: relative; background: #000; border-radius: 18px; padding: 22px; box-shadow: inset 0 0 0 4px #b9b298, 0 8px 0 #a59f86; }
.safe { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; z-index: 9999; }
.eject { animation: ej 1s ease-in forwards; }
@keyframes ej { to { transform: translateY(-120vh) rotate(-30deg); } }
textarea, input { font-family: inherit; font-size: 18px; outline: none; }
.berry-blue { color: var(--berry); }
.watch { cursor: wait; }