@font-face
{
    font-family: Chakra;
    src: url("./fonts/chakra-petch-600.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}
@font-face
{
    font-family: Chakra;
    src: url("./fonts/chakra-petch-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face
{
    font-family: Source;
    src: url("./fonts/source-sans-3-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face
{
    font-family: Source;
    src: url("./fonts/source-sans-3-600.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}
@font-face
{
    font-family: JetBrains;
    src: url("./fonts/jetbrains-mono-500.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}
:root
{
    color-scheme: dark;
    --paper: #F4EFE6;
    --dust: #A39C90;
    --sodium: #E8A15A;
    --tracer: #3EE0D2;
    --glass: rgba(12, 11, 9, 0.78);
    --track: #241F1A;
    font-family: Source, sans-serif;
    color: var(--paper);
    background: #100F0C;
}
*
{
    box-sizing: border-box;
}
body
{
    margin: 0;
    height: 100dvh;
    overflow: hidden;
}
#yard, #ui
{
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}
#yard
{
    display: block;
    touch-action: none;
}
#ui
{
    pointer-events: none;
}
[hidden]
{
    display: none !important;
}
button, a
{
    -webkit-tap-highlight-color: transparent;
}
button
{
    font: 600 15px Chakra, sans-serif;
    color: #1A120C;
    cursor: pointer;
    border: 0;
    border-radius: 8px;
    background: var(--sodium);
    padding: 12px 22px;
}
button:hover
{
    background: #FFC27A;
}
button:focus-visible, a:focus-visible
{
    outline: 2px solid var(--tracer);
    outline-offset: 4px;
}
.vignette
{
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, #C46B4A 100%);
    opacity: 0;
}
.modal
{
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: auto;
}
.modal.dim
{
    background: rgba(8, 7, 6, 0.45);
}
.card
{
    width: min(420px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 28px 32px;
    background: var(--glass);
    border: 1px solid rgba(244, 239, 230, 0.16);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 70px rgba(0, 0, 0, 0.18);
}
.card.compact
{
    max-width: 360px;
}
.eyebrow
{
    font: 600 12px Chakra, sans-serif;
    letter-spacing: 0.18em;
    color: var(--sodium);
    margin: 0 0 18px;
}
h1, h2
{
    font-family: Chakra, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 0.95;
    margin: 0;
}
h1
{
    font-size: 64px;
}
h2
{
    font-size: 40px;
    margin-bottom: 20px;
}
.arena
{
    margin: 8px 0 0;
    color: var(--dust);
    font-size: 16px;
}
.premise
{
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.45;
}
.primary
{
    margin-top: 20px;
}
.legend, .cells
{
    font-size: 13px;
    line-height: 1.5;
    color: var(--dust);
    margin: 14px 0 0;
}
.legend span
{
    display: block;
    margin-top: 5px;
}
.sound
{
    display: block;
    padding: 3px 0;
    font: 400 13px Source, sans-serif;
    color: var(--dust);
    background: transparent;
    margin-top: 10px;
}
.sound:hover
{
    color: var(--paper);
    background: transparent;
}
.credit
{
    display: inline-block;
    margin-top: 16px;
    color: var(--dust);
    font-size: 12px;
    text-underline-offset: 3px;
}
.stats
{
    margin: 6px 0;
    font-size: 16px;
    color: var(--dust);
}
.actions
{
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.ghost
{
    background: transparent;
    border: 1px solid rgba(244, 239, 230, 0.3);
    color: var(--paper);
}
.ghost:hover
{
    background: rgba(244, 239, 230, 0.08);
}
.hud
{
    position: absolute;
    inset: 0;
}
.wave
{
    position: absolute;
    top: calc(20px + env(safe-area-inset-top));
    left: 50%;
    text-align: center;
    transform: translateX(-50%);
    font: 600 13px Chakra, sans-serif;
    letter-spacing: 0.16em;
    white-space: nowrap;
}
.wave small
{
    display: block;
    font: 400 12px Source, sans-serif;
    color: var(--dust);
    letter-spacing: normal;
    margin-top: 5px;
}
.dropped
{
    position: absolute;
    right: calc(20px + env(safe-area-inset-right));
    top: calc(20px + env(safe-area-inset-top));
    text-align: right;
}
.label
{
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--dust);
}
.dropped .label
{
    font-size: 12px;
}
.dropped strong
{
    display: block;
    font: 600 26px Chakra, sans-serif;
    margin-top: 2px;
}
.vitals
{
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: calc(20px + env(safe-area-inset-left));
    width: 188px;
    display: grid;
    gap: 6px;
}
.vital-label
{
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--dust);
}
.bar
{
    width: 100%;
    height: 8px;
    background: var(--track);
    border-radius: 999px;
    overflow: hidden;
}
.bar i
{
    display: block;
    width: 100%;
    height: 100%;
    background: #7EB6FF;
    border-radius: inherit;
}
.bar.health i
{
    background: #F08A4B;
}
.low .bar.health i
{
    animation: pulse 0.8s ease-in-out infinite;
}
.ammo
{
    position: absolute;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    text-align: center;
}
.ammo strong
{
    display: block;
    font: 500 28px JetBrains, monospace;
    margin-top: 5px;
}
.ammo strong span.empty
{
    color: #E7B15A;
}
.reload-track
{
    width: 104px;
    height: 3px;
    margin: 7px auto 0;
    background: var(--track);
    opacity: 0;
}
.reload-track i
{
    display: block;
    width: 100%;
    height: 100%;
    background: var(--tracer);
    transform-origin: left center;
    transform: scaleX(0);
}
.crosshair
{
    position: absolute;
    left: 50%;
    top: 50%;
    color: rgba(244, 239, 230, 0.8);
}
.crosshair i
{
    position: absolute;
    display: block;
    background: currentColor;
}
.crosshair i:nth-child(1)
{
    width: 8px;
    height: 1px;
    left: -13px;
}
.crosshair i:nth-child(2)
{
    width: 8px;
    height: 1px;
    left: 5px;
}
.crosshair i:nth-child(3)
{
    width: 1px;
    height: 8px;
    top: -13px;
}
.crosshair i:nth-child(4)
{
    width: 1px;
    height: 8px;
    top: 5px;
}
.crosshair.hit
{
    color: var(--tracer);
}
.hint
{
    position: absolute;
    top: calc(72px + env(safe-area-inset-top));
    width: calc(100% - 40px);
    left: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--paper);
    text-shadow: 0 1px 5px #000;
}
.pause
{
    position: absolute;
    left: calc(20px + env(safe-area-inset-left));
    top: calc(20px + env(safe-area-inset-top));
    pointer-events: auto;
    border: 1px solid rgba(244, 239, 230, 0.2);
    color: var(--dust);
    font: 400 12px Source, sans-serif;
    background: var(--glass);
    padding: 8px 12px;
}
.pause:hover
{
    background: #2E2B26;
}
.controls
{
    position: absolute;
    inset: 0;
    touch-action: none;
}
.stick
{
    position: absolute;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 112px;
    height: 112px;
    pointer-events: auto;
    touch-action: none;
    border-radius: 999px;
    border: 1px solid rgba(244, 239, 230, 0.2);
    background: rgba(12, 11, 9, 0.55);
}
.stick.left
{
    left: calc(16px + env(safe-area-inset-left));
}
.stick.right
{
    right: calc(16px + env(safe-area-inset-right));
}
.nub
{
    position: absolute;
    width: 44px;
    height: 44px;
    left: 33px;
    top: 33px;
    border-radius: 50%;
    background: rgba(244, 239, 230, 0.85);
    pointer-events: none;
}
.fire-controls
{
    position: absolute;
    right: calc(40px + env(safe-area-inset-right));
    bottom: calc(144px + env(safe-area-inset-bottom));
    display: grid;
    gap: 10px;
}
.fire-controls button
{
    pointer-events: auto;
    touch-action: none;
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 999px;
    background: var(--glass);
    color: var(--paper);
    border: 1px solid rgba(244, 239, 230, 0.2);
    font: 400 12px Source, sans-serif;
}
.fire-controls button:hover, .fire-controls button:active
{
    background: #3A342C;
}
.controls.drag .fire-controls
{
    bottom: 20px;
    right: 20px;
    display: flex;
}
@keyframes pulse
{
    50%
    {
        opacity: 0.45;
    }
}
@media (max-width: 767px), (pointer: coarse)
{
    h1
    {
        font-size: 40px;
    }
    .card
    {
        padding: 28px 32px;
    }
    .wave
    {
        top: calc(14px + env(safe-area-inset-top));
        left: 57%;
        font-size: 11px;
    }
    .wave small
    {
        font-size: 11px;
    }
    .dropped
    {
        right: calc(14px + env(safe-area-inset-right));
        top: calc(14px + env(safe-area-inset-top));
    }
    .dropped .label
    {
        font-size: 10px;
    }
    .dropped strong
    {
        font-size: 22px;
    }
    .vitals
    {
        top: calc(14px + env(safe-area-inset-top));
        left: calc(14px + env(safe-area-inset-left));
        bottom: auto;
        width: 132px;
    }
    .ammo
    {
        bottom: calc(18px + env(safe-area-inset-bottom));
    }
    .ammo strong
    {
        font-size: 22px;
    }
    .ammo .label
    {
        font-size: 10px;
    }
    .pause
    {
        top: calc(90px + env(safe-area-inset-top));
        left: calc(14px + env(safe-area-inset-left));
    }
    .hint
    {
        top: 123px;
        font-size: 12px;
    }
}
@media (prefers-reduced-motion: reduce)
{
    *, *::before, *::after
    {
        animation: none !important;
    }
}
