:root {
  color-scheme: light;
  --paper: #f5f1e9;
  --surface: #fffdf8;
  --surface-muted: #eee9df;
  --ink: #20252a;
  --muted: #677079;
  --rule: #d8d1c5;
  --action: #245899;
  --action-soft: #e7eef8;
  --support: #16715d;
  --support-soft: #e4f2ec;
  --oppose: #a54842;
  --oppose-soft: #f7e8e5;
  --neutral: #566b87;
  --neutral-soft: #e9edf3;
  --warning: #8b5b13;
  --warning-soft: #fff2d7;
  --danger: #a3342f;
  --shadow: 0 5px 18px rgba(44, 38, 29, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

button, input, textarea, select { font: inherit; }

button, input, textarea, select { min-height: 44px; }

button { cursor: pointer; }

button:disabled { cursor: not-allowed; opacity: 0.52; }

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}

a { color: var(--action); }

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

.app-shell { min-height: 100vh; }

.topbar {
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 253, 248, 0.96);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.brand span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.account-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  white-space: nowrap;
}

.main-region {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.flash-stack {
  min-height: 0;
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.flash, .notice {
  padding: 13px 15px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}

.flash { box-shadow: var(--shadow); }

.flash.error { border-color: #dba7a3; color: var(--danger); background: #fff8f6; }
.flash.success { border-color: #a9d1c1; color: var(--support); background: #f3fbf7; }

.public-brief, .empty-state {
  padding: clamp(22px, 4vw, 48px);
  border-top: 5px solid var(--action);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.empty-state { min-height: 320px; display: grid; align-content: center; gap: 12px; }

.empty-state h1, .brief-heading h1 {
  max-width: 860px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: break-word;
  text-wrap: balance;
  word-break: keep-all;
}

.empty-state p { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--action);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brief-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.lead { max-width: 780px; margin: 12px 0 0; color: var(--muted); font-size: 18px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.open, .status-pill.preparing { border-color: #a8c7df; color: var(--action); background: var(--action-soft); }
.status-pill.finalizing { border-color: #d9bd82; color: var(--warning); background: var(--warning-soft); }
.status-pill.support { border-color: #a7d1c0; color: var(--support); background: var(--support-soft); }
.status-pill.oppose { border-color: #dfb0aa; color: var(--oppose); background: var(--oppose-soft); }
.status-pill.neutral { border-color: #b7c2d0; color: var(--neutral); background: var(--neutral-soft); }

.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  margin-top: 30px;
}

.brief-copy, .brief-stat, .brief-sections > section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--rule);
  background: #fffefa;
}

.brief-copy h2, .brief-stat h2, .brief-sections h2 { margin: 0 0 8px; font-size: 16px; }
.brief-copy p { max-width: 680px; margin: 0 0 12px; overflow-wrap: anywhere; }

.muted { color: var(--muted); }
.updated { margin: 16px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.ratio-list { display: grid; gap: 12px; }
.distribution-comparison { display: grid; gap: 16px; }
.distribution-comparison > section + section { padding-top: 14px; border-top: 1px solid var(--rule); }
.distribution-label { margin: 0; color: var(--ink); font-size: 13px; font-weight: 800; }
.distribution-cohort, .distribution-window { margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.distribution-sample { margin: 0; color: var(--muted); font-size: 12px; }
.sample-warning { grid-column: 1 / -1; margin: 0; padding: 9px 10px; border-left: 4px solid var(--warning); background: var(--warning-soft); font-size: 12px; }

.ratio-row {
  display: grid;
  grid-template-columns: 44px minmax(60px, 1fr) 84px;
  gap: 9px;
  align-items: center;
  font-size: 12px;
}

.ratio-row strong { text-align: right; }
.ratio-track { height: 10px; overflow: hidden; background: var(--surface-muted); }
.ratio-track i { display: block; height: 100%; }
.ratio-row.support .ratio-track i { background: var(--support); }
.ratio-row.oppose .ratio-track i { background: var(--oppose); }
.ratio-row.neutral .ratio-track i { background: var(--neutral); }

.brief-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.map-list, .evidence-list, .history-list, .report-list { display: grid; gap: 8px; }

.map-node, .evidence-row {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--neutral);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.map-node:not(.read-only):hover, .evidence-row:hover { border-color: var(--action); background: var(--action-soft); }
.map-node-title, .evidence-row-main { font-weight: 700; overflow-wrap: anywhere; }
.map-node-meta, .evidence-row-meta { min-width: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.map-node.read-only { cursor: default; }
.evidence-row { border-left-color: var(--support); }
.evidence-badge { width: fit-content; max-width: 100%; padding: 2px 6px; color: var(--warning); background: var(--warning-soft); font-size: 11px; overflow-wrap: anywhere; }

.history { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 12px; color: var(--muted); }
.history summary { cursor: pointer; color: var(--action); }
.history-list p { margin: 8px 0 0; font-size: 12px; }

.panel { margin-top: 18px; padding: 22px; border: 1px solid var(--rule); background: var(--surface); box-shadow: var(--shadow); }
.section-title { display: grid; gap: 3px; margin-bottom: 16px; }
.section-title .eyebrow { margin-bottom: 0; }
.section-title h2 { margin: 0; font-size: 21px; line-height: 1.2; }
.section-title p { margin: 0; color: var(--muted); }

.auth-panel { max-width: 540px; }
.form-stack, .form-grid { display: grid; gap: 10px; }
.form-stack label, .form-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #beb7ab; border-radius: 4px; background: #fff; color: var(--ink); }
textarea { min-height: 88px; resize: vertical; }
.test-hint { margin: 0; color: var(--warning); font-size: 13px; }

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 5px; font-weight: 700; }
.button.primary { border-color: var(--action); background: var(--action); color: #fff; }
.button.primary:hover { background: #1b477e; }
.button.secondary { border-color: var(--support); background: var(--support); color: #fff; }
.button.quiet { border-color: var(--rule); background: transparent; color: var(--ink); }
.button.quiet:hover { background: var(--surface-muted); }
.button.danger { border-color: #dba7a3; background: #fff8f6; color: var(--danger); }
.button.small { min-height: 34px; padding: 4px 8px; font-size: 12px; }

.notice { margin-top: 18px; border-left: 4px solid var(--warning); background: var(--warning-soft); }
.notice strong { display: block; margin-bottom: 4px; }
.notice p { margin: 0 0 10px; }
.notice.compact { margin-top: 0; padding: 10px 12px; font-size: 13px; }
.failure-panel { display: grid; gap: 9px; grid-column: 1 / -1; border-left-color: var(--warning); }
.failure-panel.budget_paused { background: var(--warning-soft); }
.failure-panel.model_failure { border-left-color: var(--action); background: var(--action-soft); }
.failure-panel.generic_recovery { border-left-color: var(--muted); background: var(--surface-muted); }
.failure-panel.admission, .failure-panel.csrf_recovery { border-left-color: var(--action); background: var(--action-soft); }
.failure-panel.rate_limited, .failure-panel.closing_expired { border-left-color: var(--warning); background: var(--warning-soft); }
.failure-panel.agenda_closed, .failure-panel.lifecycle_refresh { border-left-color: var(--muted); background: var(--surface-muted); }
.failure-panel.auth_recovery { border-left-color: var(--danger); background: #fff8f6; }
.failure-panel strong { color: var(--ink); }
.failure-request-id { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.stance-panel { max-width: 900px; }
.stance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; min-width: 0; }
.stance-grid.compact { margin-bottom: 12px; }
.stance-fieldset { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
.stance-fieldset legend { margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.stance-card { min-width: 0; min-height: 92px; padding: 13px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--rule); border-top: 4px solid var(--neutral); background: #fff; cursor: pointer; }
.stance-card input { width: auto; min-height: 18px; justify-self: start; }
.stance-card span { color: var(--muted); font-size: 12px; }
.stance-card.support { border-top-color: var(--support); }
.stance-card.oppose { border-top-color: var(--oppose); }
.stance-card.neutral { border-top-color: var(--neutral); }
.stance-card.selected, .stance-card:has(input:checked) { box-shadow: inset 0 0 0 2px currentColor; }
.stance-card.support.selected, .stance-card.support:has(input:checked) { color: var(--support); background: var(--support-soft); }
.stance-card.oppose.selected, .stance-card.oppose:has(input:checked) { color: var(--oppose); background: var(--oppose-soft); }
.stance-card.neutral.selected, .stance-card.neutral:has(input:checked) { color: var(--neutral); background: var(--neutral-soft); }

.dialogue-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr); gap: 18px; margin-top: 18px; align-items: start; }
.dialogue-panel { min-width: 0; margin-top: 0; }
.dialogue-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialogue-heading h2 { margin: 0; font-size: 22px; }
.dialogue-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.dialogue-role-translation { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.dialogue-status { margin: 0 0 10px; color: var(--action); font-size: 13px; font-weight: 700; }
.conversation-log { min-height: 220px; max-height: 620px; margin: 0; padding: 2px; overflow: auto; display: grid; gap: 10px; list-style: none; }
.conversation-message { min-height: 108px; padding: 13px; border: 1px solid var(--rule); background: #fff; }
.conversation-message.ai { border-left: 4px solid var(--action); background: #f7fbff; }
.conversation-message.participant { border-left: 4px solid var(--support); }
.message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 11px; }
.message-meta span { color: var(--ink); font-weight: 800; }
.message-meta time { font-variant-numeric: tabular-nums; }
.conversation-message p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.message-content { line-height: 1.65; }
.message-content > span { white-space: pre-wrap; }
.evidence-inline-link { position: relative; display: inline; color: var(--action); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.evidence-hover-preview { position: absolute; z-index: 3; left: 0; bottom: calc(100% + 8px); width: min(280px, calc(100vw - 40px)); padding: 9px 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.4; text-align: left; visibility: hidden; opacity: 0; pointer-events: none; overflow-wrap: anywhere; transition: opacity 120ms ease, visibility 120ms ease; }
.evidence-inline-link:hover .evidence-hover-preview, .evidence-inline-link:focus-visible .evidence-hover-preview { visibility: visible; opacity: 1; }
.select-message { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.select-message input { width: auto; min-height: 18px; }
.message-range-action { min-height: 44px; padding: 5px 8px; border: 1px solid var(--rule); background: var(--surface-muted); color: var(--ink); font-size: 11px; }
.claim-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.claim-link { min-height: 32px; padding: 4px 8px; border: 1px solid #b7cbe5; border-radius: 4px; background: var(--action-soft); color: var(--action); font-size: 12px; }
.message-composer { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.attachment-note { color: var(--support); font-size: 12px; }
.image-attachment-area { display: grid; gap: 8px; }
.image-attachment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.image-attachment { min-width: 0; display: grid; gap: 5px; margin: 0; padding: 7px; border: 1px solid var(--rule); background: var(--surface-muted); }
.image-attachment img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.image-attachment figcaption { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.image-attachment .button { justify-self: start; min-height: 32px; }
.side-stack { display: grid; gap: 18px; min-width: 0; }
.side-stack > * { min-width: 0; }
.side-stack .panel { margin-top: 0; }

.evidence-composer { min-width: 0; }
.url-evidence-intake { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--rule); background: #fff; }
.url-evidence-intake p { margin: 0; }
.or-divider { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.or-divider::before, .or-divider::after { content: ""; height: 1px; flex: 1; background: var(--rule); }
.pdf-picker { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--rule); background: var(--surface-muted); }
.pdf-picker > span { color: var(--muted); font-size: 12px; }
.page-grid { display: grid; grid-template-columns: repeat(6, minmax(38px, 1fr)); gap: 6px; }
.page-option { min-height: 42px; display: grid; place-items: center; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.page-option input { position: absolute; opacity: 0; pointer-events: none; }
.page-option:focus-within { outline: 3px solid var(--action); outline-offset: 2px; }
.page-option.selected, .page-option:has(input:checked) { border-color: var(--action); background: var(--action-soft); color: var(--action); font-weight: 800; }
.file-note { margin: 0; color: var(--muted); font-size: 12px; }
.confirmation-panel { margin-top: 0; }
.completion-panel { margin-top: 0; }
.completion-receipt { max-width: 720px; border-top: 4px solid var(--support); }
.completion-receipt h2 { margin: 2px 0 8px; }
.completion-receipt p { margin: 6px 0; }
.completion-receipt .button { margin-top: 10px; }
.diagnostic-panel { margin-top: 0; }
.chat-bug-dialog { display: grid; gap: 12px; margin-top: 14px; padding: 16px; border: 2px solid var(--action); background: var(--surface); }
.chat-bug-dialog h3 { margin: 0; font-size: 19px; }
.chat-bug-dialog > p { margin: 0; overflow-wrap: anywhere; }
.chat-bug-preview { display: grid; gap: 8px; max-height: 300px; overflow: auto; padding: 10px; border: 1px solid var(--rule); background: var(--surface-muted); }
.chat-bug-preview-segment { padding: 9px; border: 1px solid var(--rule); background: #fff; }
.chat-bug-preview-segment p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bug-report-status { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border: 1px solid var(--rule); background: var(--surface-muted); }
.chat-bug-report-status > strong { font-size: 14px; }
.chat-bug-report-status > .muted { overflow-wrap: anywhere; }
.chat-bug-status-dates { display: grid; gap: 5px; margin: 0; }
.chat-bug-status-dates > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
.chat-bug-status-dates dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.chat-bug-status-dates dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; }
.chat-bug-withdraw-confirm { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.chat-bug-withdraw-confirm p { margin: 0; font-size: 13px; }

.organizer-panel, .operator-panel { border-top: 4px solid var(--action); }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label:nth-child(1), .form-grid label:nth-child(2), .form-grid label:nth-child(3) { grid-column: 1 / -1; }
.ops-card { display: grid; gap: 14px; padding: 13px; border: 1px solid var(--rule); background: #fff; }
.ops-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 120px; gap: 8px; padding: 9px; border-bottom: 1px solid var(--rule); font-size: 12px; }
.ended-panel { border-top: 4px solid var(--muted); }
.ended-panel h2 { margin: 0 0 6px; }
.ended-panel p { margin: 0; color: var(--muted); }

.app-shell.evidence-open { padding-right: min(600px, 46vw); }
.app-shell.evidence-open .dialogue-layout,
.app-shell.evidence-open .brief-grid,
.app-shell.evidence-open .brief-sections { grid-template-columns: 1fr; }
.app-shell.evidence-open .side-stack { grid-template-columns: 1fr; }
.evidence-page {
  position: fixed;
  z-index: 20;
  inset: 0 0 0 auto;
  width: min(600px, 46vw);
  height: 100vh;
  margin: 0;
  overflow: auto;
  border-width: 0 0 0 1px;
  border-top: 4px solid var(--support);
  box-shadow: -8px 0 22px rgba(44, 38, 29, 0.14);
}
.evidence-inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 16px; }
.detail-list { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--rule); }
.detail-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.detail-list dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.evidence-page h3 { margin: 18px 0 8px; font-size: 16px; }
.vote-counts { display: grid; gap: 7px; padding: 11px 12px; border: 1px solid var(--rule); background: var(--surface-muted); }
.vote-counts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; font-size: 12px; }
.vote-counts span { min-width: 0; overflow-wrap: anywhere; }
.evidence-vote-form { margin-top: 12px; }
.evidence-audit-history { padding: 10px 12px; border: 1px solid var(--rule); background: #fff; }
.evidence-audit-history p { overflow-wrap: anywhere; }
.paused-panel { border-top: 4px solid var(--warning); }
.paused-panel h2 { margin: 0 0 6px; }
.paused-panel p { margin: 0; color: var(--muted); }

.loading-screen { min-height: 100vh; display: grid; place-content: center; gap: 6px; padding: 24px; text-align: center; }
.loading-screen h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; }
.loading-screen p { margin: 0; color: var(--muted); }
.footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; min-width: 0; }
.footer span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 900px) {
  .app-shell.evidence-open { padding-right: 0; }
  .evidence-page { width: 100%; height: 100dvh; border-left: 0; }
  .topbar { align-items: flex-start; }
  .topbar-meta { display: grid; justify-items: end; gap: 6px; }
  .brief-grid, .brief-sections, .dialogue-layout { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-stack .evidence-composer { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  html, body { min-width: 0; }
  .topbar { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .topbar-meta { justify-items: start; text-align: left; }
  .account-bar { flex-wrap: wrap; white-space: normal; }
  .main-region { width: min(100% - 20px, 1220px); padding-top: 18px; }
  .public-brief, .empty-state, .panel { padding: 17px; }
  .brief-heading, .dialogue-heading, .ops-line, .footer { display: grid; justify-content: stretch; }
  .brief-heading .status-pill, .dialogue-heading .status-pill { justify-self: start; }
  .empty-state h1, .brief-heading h1 { font-size: 34px; }
  .lead { font-size: 16px; }
  .stance-grid, .stance-grid.compact, .side-stack, .form-grid { grid-template-columns: 1fr; }
  .ratio-row { grid-template-columns: 34px minmax(0, 1fr) 78px; gap: 5px; }
  .image-attachment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid label:nth-child(1), .form-grid label:nth-child(2), .form-grid label:nth-child(3) { grid-column: auto; }
  .page-grid { grid-template-columns: repeat(5, minmax(38px, 1fr)); }
  .detail-list > div { grid-template-columns: 1fr; gap: 3px; }
  .vote-counts > div { grid-template-columns: 1fr; gap: 2px; }
  .report-row { grid-template-columns: 1fr; }
  .footer { gap: 5px; }
}

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