:root {
    --ink: #070a12;
    --panel: #0e1420;
    --raised: #161f2e;
    --line: rgba(150, 175, 210, .13);
    --line-strong: rgba(150, 175, 210, .26);
    --text: #eaf0fa;
    --muted: #93a4bd;
    --dim: #6c7d95;
    --action: #edf3ff;
    --on-action: #08101c;
    --good: #86e08a;
    --warn: #ffd27a;
    --bad: #ff8098;
    --cyan: #4bd6f0;
    --violet: #9d7bff;
    --lime: #a9e05a;
    --amber: #f0a95c;

    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 22px;
    --sheet-max: 460px;
    --safe-b: max(16px, env(safe-area-inset-bottom), var(--host-safe-b, 0px));
    --safe-t: max(14px, env(safe-area-inset-top), var(--host-safe-t, 0px));
    --safe-l: max(12px, env(safe-area-inset-left));
    --safe-r: max(12px, env(safe-area-inset-right));
    --zone-height: 38%;
    --stage-bottom: calc(38% + 18px);
    --toast-bottom: calc(38% + 62px);
    --coach-bottom: calc(38% + 118px);
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--ink);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.35;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    overscroll-behavior: none;
}

[hidden] { display: none !important; }

.game-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 360px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 30%, rgba(24, 62, 120, .16), transparent 46%),
        linear-gradient(rgba(4, 7, 15, .5), rgba(4, 7, 15, .68)),
        url('../assets/contour-arena-v1.webp') center / cover no-repeat,
        linear-gradient(180deg, #080d18 0%, #05070f 100%);
}

.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

.eyebrow { color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--action); transition: width .5s ease; }

.connection {
    position: absolute;
    left: 50%;
    top: var(--safe-t);
    z-index: 9;
    transform: translateX(-50%);
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(9, 14, 24, .88);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

@keyframes sheet-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dialog-in { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translate(-50%, 6px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
