:root {
    --z-input: 1;
    --z-falling-keys: 10;
    --z-dropdown: 100;
    --z-cursor: 1000;
}

body {
    margin: 40px auto;
    max-width: 650px;
    line-height: 1.7;
    font-size: 18px;
    color: #444;
    padding: 0 10px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: 0.04em;
    font-feature-settings: "case" on;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
}

main { flex: 1; }
footer { margin-top: 3em; }

h1, h2, h3 {
    line-height: 1.2
}

button { cursor: pointer; }

img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.left {
    float: left;
    margin: 0 1em 0.5em 0;
    max-width: 220px;
}

h2 { clear: both; }

header form:focus-within { outline: 2px solid #4a90e2; outline-offset: -1px; }
header form input:focus, header form button:focus { outline: none; }
header form:focus-within #header-suggest { outline: 2px solid #4a90e2; outline-offset: -1px; border-color: #4a90e2; }

#runic-toggle {
    font: inherit;
    padding: 4px 8px;
    background: #fff;
    border: 1px solid #999;
    border-left: none;
    cursor: pointer;
    min-width: 36px;
}
#runic-toggle[aria-pressed="true"] { background: #f0e6d2; }

.fall-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.fall-wrap input { position: relative; z-index: var(--z-input); }
.key-fall__layer { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: var(--z-falling-keys); }
.key-fall__glyph {
    position: absolute;
    font-size: 1rem;
    font-weight: 500;
    will-change: transform, opacity;
    animation-name: key-fall-arrive;
    animation-timing-function: cubic-bezier(.2,.9,.2,1);
    animation-fill-mode: forwards;
    text-shadow: 0 0 6px currentColor, 0 0 12px color-mix(in srgb, currentColor 40%, transparent);
}
@keyframes key-fall-arrive {
    0%   { transform: translate(var(--driftX,0), var(--fromY,-120px)) rotate(var(--rot,0deg)) scale(1.15); opacity: 0; }
    40%  { opacity: 1; }
    85%  { transform: translate(var(--driftX,0), 3px) rotate(0deg) scale(.98); }
    100% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; filter: brightness(1.25); }
}



