:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  --bg: #fff; --text: #17231d; --muted: #526259;
  --field: #f6f8f5; --line: #ced8cf; --accent: #276442;
  --button-text: #fff; --error: #a12b25;
  background: var(--bg); color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #10150f; --text: #f0f5ee; --muted: #b6c4b7;
    --field: #1b251d; --line: #435446; --accent: #a3d4ac;
    --button-text: #163521; --error: #ffb4a8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10150f; --text: #f0f5ee; --muted: #b6c4b7;
  --field: #1b251d; --line: #435446; --accent: #a3d4ac;
  --button-text: #163521; --error: #ffb4a8;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
main { max-width: 660px; margin: auto; padding: 28px 24px max(32px, env(safe-area-inset-bottom)); }
.brand { font-size: 12px; font-weight: 750; letter-spacing: .13em; color: var(--accent); }
.brand span { margin-inline-start: 8px; color: var(--muted); font-weight: 500; }
.heading-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 18px; }
h1 { margin: 0; font-size: clamp(26px, 5vw, 34px); line-height: 1.3; flex: 1 1 220px; min-width: 0; letter-spacing: -.03em; overflow-wrap: anywhere; }
#language { width: auto; max-width: 100%; padding: 9px; font-size: 14px; }
p { line-height: 1.65; overflow-wrap: anywhere; }
.intro { color: var(--muted); margin: 14px 0 28px; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
label { display: block; font-size: 14px; font-weight: 650; margin: 22px 0 8px; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 16px; }
select { min-height: 46px; }
#language { min-height: 40px; }
textarea { resize: vertical; line-height: 1.6; min-height: 180px; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { font-size: 13px; color: var(--muted); margin: 7px 0 0; }
.message-meta { display: flex; align-items: baseline; gap: 16px; }
.message-meta p { min-width: 0; }
#message-count { white-space: nowrap; }
details { margin-top: 22px; padding: 14px 0; border-top: 1px solid var(--line); }
summary { cursor: pointer; color: var(--muted); font-size: 13px; }
button { max-width: 100%; min-height: 48px; border: 0; border-radius: 12px; padding: 14px 22px; background: var(--accent); color: var(--button-text); font-weight: 650; cursor: pointer; overflow-wrap: anywhere; }
#submit { width: 100%; margin-top: 22px; }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--accent); text-underline-offset: 3px; }
#status { min-height: 24px; margin: 10px 0; font-size: 14px; overflow-wrap: anywhere; }
#status[data-error="true"] { color: var(--error); }
footer { text-align: center; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; color: var(--muted); font-size: 13px; }
footer p { margin: 0 0 6px; }
#success { padding: 26px 0; }
.success-mark { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--button-text); display: grid; place-items: center; font-size: 28px; }
h2 { font-size: 23px; line-height: 1.5; }
dl { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 24px 0; }
dt { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
dd { margin: 0; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
#receipt-email { overflow-wrap: anywhere; font-weight: 600; }
[hidden] { display: none !important; }
@media (max-width: 400px) { main { padding: 22px 18px 28px; } .heading-row { align-items: flex-start; } }
