:root{--gold:#dfb968;--wood:#4a2b16;--green:#14341f;--cream:#f3ddb1;--shadow:rgba(0,0,0,.55);--glass:rgba(20,34,20,.62);--edge:rgba(225,185,104,.65)}*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:Georgia,'Times New Roman',serif;background:#160e08;color:var(--cream);overflow:clip}.app{position:relative;min-height:100svh;width:100vw;display:flex;justify-content:center;align-items:stretch}.bg{position:fixed;inset:0;background:url('/assets/background.png') center/cover no-repeat}.shade{position:fixed;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.22),rgba(0,0,0,.08) 45%,rgba(0,0,0,.45));pointer-events:none}.top{position:fixed;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(94vw,520px);z-index:5;display:flex;justify-content:space-between;align-items:center}.brand{font-size:1.25rem;color:var(--gold);text-shadow:0 2px 5px #000}.icon{width:44px;height:44px;border-radius:50%;border:1.5px solid var(--edge);background:rgba(33,24,14,.7);color:var(--gold);font-size:1.4rem;box-shadow:0 8px 22px #0008}.calc-wrap{position:relative;z-index:2;width:min(94vw,520px);height:100svh;padding-top:12px;padding-left:18px;padding-right:18px;padding-bottom:calc(60px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:6px;justify-content:flex-end}.glass{border:1.5px solid var(--edge);background:linear-gradient(145deg,rgba(16,48,27,.68),rgba(34,21,12,.58));box-shadow:0 12px 35px var(--shadow),inset 0 1px rgba(255,255,255,.12);backdrop-filter:blur(7px);border-radius:24px}.screen{min-height:120px;flex:1;padding:10px 22px;display:flex;flex-direction:column;justify-content:flex-end;background:transparent!important;border:none!important;backdrop-filter:none!important;box-shadow:none!important}.mode{font-size:1rem;color:var(--gold);align-self:flex-start}.display{font-size:clamp(2.5rem,10vw,4rem);line-height:1.05;text-align:right;text-shadow:0 3px 10px #000;overflow:hidden;text-overflow:ellipsis}.expression{text-align:right;color:#e7c77dcc;font-size:0.67rem;min-height:1.4em}.keys{padding:8px;display:grid;grid-template-columns:repeat(4,1fr);gap:5px;background:transparent!important;border:none!important;backdrop-filter:none!important;box-shadow:none!important}.keys button,.scientific button{aspect-ratio:3/2;border-radius:50%;border:2px solid var(--edge);background:radial-gradient(circle at 35% 25%,rgba(120,80,38,.9),rgba(45,28,14,.95));color:var(--cream);font-size:clamp(0.67rem,3.9vw,1.1rem);font-family:Georgia,serif;box-shadow:0 7px 13px #0009,inset 0 2px 3px rgba(255,255,255,.14)}.keys .op{background:radial-gradient(circle at 35% 25%,rgba(38,82,45,.95),rgba(16,43,24,.95));color:var(--gold)}button:active{transform:translateY(2px);filter:brightness(1.18)}.equals{height:33px;border-radius:26px;border:2px solid var(--edge);background:linear-gradient(145deg,rgba(34,82,34,.9),rgba(32,54,25,.95));color:var(--gold);font-size:2.2rem;font-family:Georgia,serif;box-shadow:0 12px 25px #0009}.scientific{padding:12px;display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.scientific button{font-size:1rem}.hidden{display:none}.bottom{position:fixed;bottom:max(10px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(94vw,560px);height:54px;z-index:5;display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden}.bottom button{border:0;border-right:1px solid rgba(223,185,104,.25);background:rgba(60,35,16,.5);color:var(--gold);font-family:Georgia,serif;font-size:1.4rem}.bottom span{display:block;font-size:.72rem;margin-top:2px}.bottom .active{background:rgba(18,53,27,.82)}.drawer{position:fixed;z-index:10;top:0;bottom:0;width:min(88vw,380px);padding:26px 18px;transition:transform .22s ease;overflow:auto}.drawer.right{right:0;transform:translateX(105%)}.drawer.left{left:0;transform:translateX(-105%)}.drawer.open{transform:translateX(0)}.drawer-head{display:flex;justify-content:space-between;align-items:center}.drawer h2{margin:0;color:var(--gold)}.drawer-head button{width:40px;height:40px;border-radius:50%;border:1px solid var(--edge);background:#27180e;color:var(--gold);font-size:1.6rem}.history-list{display:grid;gap:10px;margin:18px 0}.history-item{padding:12px;border-radius:16px;border:1px solid rgba(223,185,104,.35);background:rgba(43,25,13,.65)}.history-item strong{display:block;text-align:right;font-size:1.45rem;color:var(--gold)}.wide{width:100%;min-height:48px;border-radius:16px;border:1px solid var(--edge);background:#3a2414;color:var(--gold);font-family:Georgia,serif;font-size:1rem}.toggle{display:block;margin:18px 0;font-size:1.1rem}.note{color:#e6cfa0cc;line-height:1.4}.light .shade{background:linear-gradient(180deg,rgba(255,230,190,.08),rgba(0,0,0,.04) 55%,rgba(0,0,0,.18))}.light .glass{background:linear-gradient(145deg,rgba(236,214,171,.45),rgba(76,43,18,.35))}@media (min-width:800px){.calc-wrap{width:min(48vw,520px);margin-left:-28vw}.drawer.right{width:340px}.top{width:min(48vw,520px);margin-left:-28vw}.bottom{width:min(48vw,560px);margin-left:-28vw}.keys{gap:12px}.screen{min-height:160px}}@media (max-height:760px){.screen{min-height:82px}.display{font-size:1.7rem}.keys{gap:5px;padding:8px}.equals{height:33px}.calc-wrap{gap:6px;padding-top:8px}.bottom{height:54px}}
