:root {
    --ink: #244941;
    --muted: #708078;
    --gold: #a78243;
    --paper: #fbfaf1;
    --line: #ced6c8;
    --green: #2d6054;
}

* {
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea,
[contenteditable="true"],
[contenteditable=""] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

html,
body {
    margin: 0;
    overflow: hidden;
    touch-action: none;
    background: linear-gradient(180deg, #3f8ad4 0%, #9bd0f6 65%, #cbe7fb 100%);
    color: var(--ink);
    font-family: system-ui, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: 14px;
}

button, a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button {
    font: inherit;
    cursor: pointer;
    color: inherit;
    border: 0;
}

button:focus-visible, a:focus-visible {
    outline: 3px solid #ba8b35;
    outline-offset: 4px;
}

button:disabled {
    opacity: 0.5;
    cursor: wait;
}

button[hidden], [hidden] {
    display: none !important;
}

#world {
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
    outline: 0;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(16, 48, 84, 0.14));
    opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
