:root {
  color-scheme: light dark;
  --bg: #ffffff; --ink: #1b2128; --muted: #5d6874; --line: #d5dade; --field: #f4f5f7;
  --accent: #1f5a85; --accent-ink: #ffffff; --bad: #b8322a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d232a; --ink: #e6e9ec; --muted: #9aa4ae; --line: #2f3740; --field: #14181d;
    --accent: #6aa6d6; --accent-ink: #0e1418; --bad: #ec6d63;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
form, .done { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
header { display: flex; align-items: center; justify-content: space-between; }
h1 { margin: 0; font-size: 18px; }
label, .label { margin: 8px 0 0; font-weight: 600; font-size: 13px; }
input, textarea { width: 100%; font: inherit; color: inherit; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
textarea { resize: vertical; }
button { font: inherit; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ghost { border: 0; font-size: 20px; line-height: 1; padding: 4px 8px; }
.link { border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-size: 13px; }
.section { display: flex; flex-direction: column; gap: 6px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }
.attachments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.attachments li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.attachments img, .attachments video { width: 100%; max-height: 160px; object-fit: contain; background: var(--field); border-radius: 4px; }
.attachments .name { flex: 1 1 auto; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.trail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.trail-head .label { margin: 0; }
summary { cursor: pointer; font-size: 13px; }
.trail { margin: 6px 0 0; padding-left: 20px; font-size: 12px; max-height: 140px; overflow-y: auto; overflow-wrap: anywhere; }
.trail .bad, .error { color: var(--bad); }
.error { margin: 4px 0 0; font-size: 13px; }
.mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 100vh; padding: 0 12px; font-weight: 600; font-size: 13px; }
#send { position: sticky; bottom: 8px; box-shadow: 0 0 0 8px var(--bg); }
.types { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.types legend { padding: 0; margin-bottom: 6px; }
.choice { flex: 1 1 160px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; font-weight: 500; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.choice input { width: auto; margin: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.stars { border: 0; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.stars legend { padding: 0; margin-bottom: 4px; }
.stars label { margin: 0; font-size: 30px; line-height: 1; font-weight: 400; color: var(--muted); cursor: pointer; padding: 2px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.stars label:has(input:checked), .stars label:has(~ label input:checked), .stars label:hover, .stars label:has(~ label:hover) { color: #c98a06; }
.stars label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.attachments a { display: block; width: 100%; }
