/* Calm settings control and the text-size choice. First-party, no images or fonts. Used by the hub and both games. */
html[data-text-size="large"] { font-size: 112.5%; }
html[data-text-size="larger"] { font-size: 125%; }
html[data-motion="reduced"] { scroll-behavior: auto; }

/* Own colours, so the panel is readable on any page. Meadow by default; Dusk follows the chosen theme. */
/* Calm button system, as on the site: an outlined button (white with green text and a 1px green border) and a plain card panel. */
.calm-root { display: contents; --c-bg: #ffffff; --c-ink: #1f2a24; --c-muted: #46524b; --c-border: #ddd8ce; --c-btn: #ffffff; --c-btn-ink: #1f4d36; --c-btn-line: #1f4d36; --c-focus: #0b0b0b; --c-halo: #ffd500; --c-note: #e8f1ea; --c-shadow: rgba(0, 0, 0, .08); --c-radius: 12px; }
[data-calm-theme="dusk"] .calm-root { --c-bg: #263642; --c-ink: #E6EDEA; --c-muted: #A9B8B8; --c-border: #8FA6A6; --c-btn: #263642; --c-btn-ink: #B3D9C6; --c-btn-line: #B3D9C6; --c-focus: #F2D58A; --c-halo: #000000; --c-note: #2A3A45; --c-shadow: rgba(0, 0, 0, .4); }

.calm-toggle, .calm-button { font: inherit; font-family: var(--font, ui-monospace, Menlo, Consolas, monospace); min-height: 44px; min-width: 44px; padding: .4rem .8rem; color: var(--c-btn-ink); background: var(--c-btn); border: 1px solid var(--c-btn-line); border-radius: 10px; box-shadow: none; cursor: pointer; font-weight: 600; }
.calm-toggle, .calm-button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.calm-toggle:focus-visible, .calm-button:focus-visible, .calm-panel input:focus-visible { outline: 5px solid var(--c-focus); outline-offset: 3px; box-shadow: 0 0 0 9px var(--c-halo); }
.calm-panel { flex: 0 0 100%; box-sizing: border-box; margin: .5rem 0; padding: .8rem 1rem; color: var(--c-ink); background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--c-radius, 12px); box-shadow: 0 1px 3px var(--c-shadow); font-weight: 700; font: inherit; font-family: var(--font, ui-monospace, Menlo, Consolas, monospace); font-size: 1rem; line-height: 1.5; text-align: left; }
.calm-panel[hidden] { display: none; }
.calm-title { margin: 0 0 .5rem; font-size: 1.1rem; }
.calm-title, .calm-fieldset legend, .calm-check { color: var(--c-ink); }
.calm-row { margin: 0 0 .5rem; }
.calm-check { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; margin-right: 1rem; }
.calm-panel input[type="checkbox"], .calm-panel input[type="radio"] { width: 1.5rem; height: 1.5rem; flex: none; accent-color: var(--c-btn-ink); }
.calm-hint, .calm-note { margin: 0 0 .25rem; color: var(--c-muted); font-size: .9rem; }
.calm-fieldset { margin: 0 0 .75rem; padding: 0; border: 0; }
.calm-fieldset legend { padding: 0; font-weight: 700; }
.calm-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .5rem 0; }
.calm-panel .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .calm-root * { transition: none !important; animation: none !important; } }
