:root {
    color-scheme: dark;
    --bg: #0c1013;
    --bg-raised: #12181b;
    --surface: #182024;
    --surface-2: #1f292e;
    --line: rgba(214, 232, 226, 0.08);
    --line-strong: rgba(214, 232, 226, 0.15);
    --text: #e6ece9;
    --text-2: #9eaba6;
    --text-3: #6b7873;
    --accent: #7fdcc0;
    --accent-strong: #a8eed9;
    --accent-ink: #0b1a15;
    --accent-soft: rgba(127, 220, 192, 0.12);
    --danger: #f0958a;
    --glass: rgba(214, 232, 226, 0.26);
    --glass-strong: rgba(214, 232, 226, 0.52);
    --floor-shadow: rgba(0, 0, 0, 0.45);
    --font-sans: 'Geist', 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 24px;
    --shadow-pop: 0 24px 60px -18px rgba(2, 10, 7, 0.75), 0 0 0 1px var(--line-strong);
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
    --z-overlay: 10;
    --z-toast: 20;
    --z-banner: 30;
    --gutter: clamp(16px, 3vw, 28px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(120% 70% at 50% -20%, rgba(127, 220, 192, 0.07), transparent 60%),
        radial-gradient(80% 50% at 85% 110%, rgba(62, 99, 221, 0.05), transparent 70%);
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
    overflow: hidden;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

svg {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

button:disabled {
    cursor: default;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 5px;
    color: var(--text-2);
    background: var(--surface-2);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35), 0 0 0 1px var(--line);
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: var(--z-banner);
    padding: 10px 14px;
    border-radius: var(--r-sm);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 12px;
}

.app {
    height: 100dvh;
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    padding:
        max(env(safe-area-inset-top), 0px) max(env(safe-area-inset-right), var(--gutter)) max(env(safe-area-inset-bottom), 16px) max(env(safe-area-inset-left), var(--gutter));
    row-gap: 14px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}