:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --ink: #16202b;
    --ink-soft: #5a6b7b;
    --ink-faint: #8a99a8;
    --line: #e1e8ef;
    --brand: #0e7c86;
    --brand-strong: #0a5b63;
    --brand-tint: #d9eef0;
    --danger: #c0392b;
    --danger-tint: #fbe6e3;
    --warn: #b7791f;
    --warn-tint: #fbf0db;
    --shell: #10262a;
    --on-shell: rgba(255, 255, 255, 0.92);
    --on-shell-soft: rgba(255, 255, 255, 0.55);
    --on-shell-line: rgba(255, 255, 255, 0.08);
    --on-brand: #ffffff;
    --code-bg: #0f2226;
    --code-ink: #d5e4e6;
    --scrim: rgba(20, 40, 60, 0.45);

    --radius: 18px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --shadow: 0 6px 24px rgba(20, 40, 60, 0.08);
    --shadow-sm: 0 2px 8px rgba(20, 40, 60, 0.06);
    --hairline: 1px solid var(--line);

    --space-1: 4px;
    --space-2: 6px;
    --space-3: 8px;
    --space-4: 12px;
    --space-5: 16px;
    --space-6: 20px;
    --space-7: 28px;
    --space-8: 40px;

    --text-xs: 0.72rem;
    --text-sm: 0.8rem;
    --text-md: 0.88rem;
    --text-base: 0.95rem;
    --text-lg: 1.1rem;
    --text-xl: 1.35rem;
    --leading-tight: 1.25;
    --leading-normal: 1.55;
    --weight-medium: 600;
    --weight-bold: 700;
    --tracking-caps: 0.06em;

    --control-py: 15px;
    --control-px: 20px;
    --control-font: 1rem;
    --control-width: 100%;
    --brand-shadow: 0 8px 20px rgba(14, 124, 134, 0.28);
    --focus-ring: 0 0 0 3px var(--brand-tint);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    --z-sticky: 20;
    --z-dropdown: 30;
    --z-scrim: 40;
    --z-dialog: 50;
    --z-toast: 60;
    --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, ui-monospace, monospace;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
}

:root[data-density="compact"] {
    --control-py: 9px;
    --control-px: 15px;
    --control-font: 0.9rem;
    --control-width: auto;
    --brand-shadow: none;
    --radius: 12px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(20, 40, 60, 0.08), 0 1px 8px rgba(20, 40, 60, 0.04);
    --shadow-sm: 0 1px 2px rgba(20, 40, 60, 0.07);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.45;
    overscroll-behavior: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
}
