/* Shared phone UI for the calculators: see mobile-ui.js. Motion kept slow on purpose (owner 7 Nov: "too aggressive"). */
.apm-cue{position:fixed;left:0;right:0;margin-inline:auto;width:max-content;bottom:calc(16px + env(safe-area-inset-bottom));z-index:45;transform:translateY(12px);display:flex;align-items:center;gap:12px;min-height:52px;max-width:calc(100vw - 32px);padding:7px 7px 7px 20px;border:0;border-radius:999px;background:#13202c;color:#fff;font-family:inherit;font-size:15px;font-weight:600;line-height:1.2;text-align:left;box-shadow:0 10px 28px rgba(10,20,30,.3);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .55s ease,transform .55s cubic-bezier(.22,.61,.36,1)}
.apm-cue.on{opacity:1;transform:none;pointer-events:auto}
.apm-cue small{display:block;margin-top:2px;font-weight:400;font-size:12.5px;opacity:.72}
.apm-cue i{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;background:#16a34a}
.apm-cue i b{display:grid;place-items:center;transition:transform .6s cubic-bezier(.22,.61,.36,1)}
.apm-cue.up i b{transform:rotate(180deg)}
.apm-cue i svg{animation:apm-bob 2.6s ease-in-out infinite}
.apm-cue:focus-visible{outline:3px solid #16a34a;outline-offset:3px}
@keyframes apm-bob{0%,100%{transform:translateY(-1.5px)}50%{transform:translateY(1.5px)}}
.apm-flash{outline:3px solid #16a34a !important;outline-offset:4px;border-radius:14px;transition:outline-color 1.2s ease}
.apm-flash.apm-fade{outline-color:transparent !important}

/* picker button: looks like a field, holds an icon + label */
.apm-pick{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:6px 12px;border:1.5px solid hsl(var(--border, 214 15% 86%));border-radius:12px;background:hsl(var(--card, 0 0% 100%));color:inherit;font:inherit;font-size:16px;text-align:left;cursor:pointer}
.apm-pick:focus-visible{outline:3px solid #16a34a;outline-offset:2px}
.apm-pick-l{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.apm-pick-l small{display:block;font-size:12.5px;color:hsl(var(--muted-foreground, 220 6% 38%));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apm-pick-c{color:hsl(var(--muted-foreground, 220 6% 38%));flex:none}

/* bottom sheet */
.apm-sheet{position:fixed;inset:0;z-index:60}
.apm-sheet-bd{position:absolute;inset:0;background:rgba(10,15,25,.45);opacity:0;transition:opacity .45s ease}
.apm-sheet-p{position:absolute;left:0;right:0;bottom:0;max-height:82vh;display:flex;flex-direction:column;background:hsl(var(--card, 0 0% 100%));color:hsl(var(--foreground, 140 12% 8%));border-radius:18px 18px 0 0;padding:8px 0 calc(8px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .45s cubic-bezier(.22,.61,.36,1);box-shadow:0 -10px 30px rgba(0,0,0,.18)}
.apm-sheet.on .apm-sheet-bd{opacity:1}
.apm-sheet.on .apm-sheet-p{transform:none}
.apm-sheet-h{display:flex;align-items:center;justify-content:space-between;padding:6px 8px 6px 16px}
.apm-sheet-h b{font-size:17px}
.apm-x{width:44px;height:44px;border:0;background:none;font-size:18px;color:inherit;cursor:pointer;border-radius:10px}
.apm-q{margin:4px 16px 8px;min-height:46px;padding:0 14px;border:1.5px solid hsl(var(--border, 214 15% 86%));border-radius:12px;font:inherit;font-size:16px}
.apm-list{list-style:none;margin:0;padding:0 8px;overflow:auto;-webkit-overflow-scrolling:touch}
.apm-list li[data-v]{display:flex;align-items:center;gap:12px;min-height:52px;padding:6px 10px;border-radius:12px;cursor:pointer}
.apm-list li[data-v]:hover,.apm-list li[data-v]:focus{background:hsl(var(--muted, 210 14% 95%));outline:none}
.apm-list li[aria-selected="true"]{background:hsl(142 70% 45% / .14);font-weight:600}
.apm-list li small{display:block;font-size:12.5px;font-weight:400;color:hsl(var(--muted-foreground, 220 6% 38%))}
.apm-list .apm-g{padding:12px 10px 4px;font-size:12.5px;font-weight:700;color:hsl(var(--muted-foreground, 220 6% 38%));text-transform:uppercase;letter-spacing:.04em}
.apm-list .apm-none{padding:16px 10px;color:hsl(var(--muted-foreground, 220 6% 38%))}
.apm-list img{flex:none}
html.apm-lock{overflow:hidden}
@media (prefers-reduced-motion:reduce){.apm-cue,.apm-cue i b,.apm-sheet-bd,.apm-sheet-p{transition:none}.apm-cue i svg{animation:none}}
@media print{.apm-cue,.apm-sheet{display:none}}
