:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #121a2b;
  --ink-soft: #526077;
  --ink-faint: #7d899c;
  --line: #dfe5ee;
  --line-strong: #ccd5e2;
  --primary: #2563eb;
  --primary-dark: #1749bb;
  --primary-soft: #eaf1ff;
  --navy: #101a2e;
  --green: #16825d;
  --green-soft: #e9f8f1;
  --amber: #9b6200;
  --amber-soft: #fff5d8;
  --red: #c23b3b;
  --red-soft: #fff0f0;
  --shadow-sm: 0 1px 2px rgba(16, 29, 50, 0.04);
  --shadow-md: 0 12px 32px rgba(23, 42, 75, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font: "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 0%, rgba(37, 99, 235, 0.08), transparent 30rem),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 28rem);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  width: min(100%, 1680px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid rgba(204, 213, 226, 0.78);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.08em;
  box-shadow: 0 8px 20px rgba(16, 26, 46, 0.18);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-copy span {
  color: var(--ink-faint);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.data-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.data-status.is-demo {
  background: var(--amber-soft);
  color: var(--amber);
}

.data-status.is-live {
  background: var(--green-soft);
  color: var(--green);
}

.data-status.is-snapshot {
  background: var(--primary-soft);
  color: var(--primary);
}

.data-status.is-error {
  background: var(--red-soft);
  color: var(--red);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 600;
  line-height: 1;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button svg {
  width: 17px;
  height: 17px;
}

.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.button-quiet {
  background: transparent;
  color: var(--ink-soft);
}

.button-quiet:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

main {
  padding: 30px clamp(16px, 3vw, 42px) 60px;
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.intro h1 {
  max-width: 760px;
  margin: 8px 0 8px;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.intro-copy {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.intro-note {
  display: grid;
  flex: 0 0 265px;
  gap: 5px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-sm);
}

.intro-note-label {
  color: var(--ink-faint);
  font-size: 11px;
}

.intro-note strong {
  font-size: 13px;
  font-weight: 650;
}

.intro-note span:last-child {
  color: var(--ink-soft);
  font-size: 12px;
}

.filter-card,
.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.filter-card {
  padding: 24px clamp(18px, 2.4vw, 30px) 20px;
}

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

.section-heading h2,
.table-heading h2,
.dialog-header h2 {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.channel-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 0 13px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
}

.channel-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.date-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field-date {
  flex: 0 0 188px;
}

.field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.field-hint {
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.5;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  box-shadow: var(--shadow-sm);
}

.field input::placeholder {
  color: #9aa6b8;
}

.field input:hover,
.field select:hover {
  border-color: #adb9ca;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
}

.quick-ranges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding-left: 2px;
}

.quick-ranges button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #cbd8f7;
  border-radius: 8px;
  background: #fff;
  color: #2f61c8;
  font-size: 12px;
  font-weight: 600;
}

.quick-ranges button:hover {
  border-color: #9eb4e8;
  background: var(--primary-soft);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(260px, 1.25fr) minmax(260px, 1.4fr);
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.search-select {
  display: grid;
  grid-template-columns: minmax(110px, 0.92fr) minmax(120px, 1.08fr);
  gap: 8px;
}

.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 17px;
}

.dimension-fieldset {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.dimension-fieldset legend {
  margin-right: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.check-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.check-chip:has(input:checked) {
  border-color: #a9bff2;
  background: var(--primary-soft);
  color: #254fb0;
}

.check-chip input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary);
}

.filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.filter-actions .button-primary {
  min-width: 100px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.kpi-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.kpi-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 76px;
  height: 76px;
  border-radius: 0 0 0 76px;
  background: linear-gradient(135deg, transparent 32%, rgba(37, 99, 235, 0.055));
  content: "";
  pointer-events: none;
}

.kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.kpi-label span {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-value {
  display: block;
  margin-top: 12px;
  overflow: hidden;
  font-size: clamp(20px, 2vw, 29px);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-context {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-card {
  overflow: hidden;
}

.table-heading {
  align-items: center;
  justify-content: flex-end;
  padding: 22px clamp(18px, 2.4vw, 28px) 17px;
}

.table-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-faint);
  font-size: 11px;
}

.quality-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 clamp(18px, 2.4vw, 28px) 17px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: #6e4b09;
}

.quality-notice-mark {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f3cb65;
  color: #533700;
  font-size: 12px;
  font-weight: 700;
}

.quality-notice strong {
  display: block;
  font-size: 12px;
}

.quality-notice p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.55;
}

.meta-divider {
  width: 1px;
  height: 12px;
  background: var(--line);
}

.table-wrap {
  position: relative;
  min-height: 220px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.data-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.data-table th,
.data-table td {
  height: 48px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f8fafc;
  color: #4d5b70;
  font-size: 11px;
  font-weight: 650;
}

.data-table th:first-child,
.data-table td:first-child {
  position: sticky;
  z-index: 1;
  left: 0;
  min-width: 150px;
  text-align: left;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}

.data-table th:first-child {
  z-index: 3;
  background: #f8fafc;
}

.data-table tbody tr:hover td {
  background: #fbfcff;
}

.data-table tbody tr:hover td:first-child {
  background: #f9fbff;
}

.data-table td {
  color: #253147;
  font-variant-numeric: tabular-nums;
}

.data-table .cell-muted {
  color: #98a3b5;
}

.data-table .cell-money {
  font-weight: 600;
}

.data-table .cell-emphasis {
  color: #1c55bf;
  font-weight: 650;
}

.data-table .cell-positive {
  color: var(--green);
  font-weight: 600;
}

.total-row td {
  height: 51px;
  border-bottom: 1px solid var(--line-strong);
  background: #f5f8fd;
  color: var(--ink);
  font-weight: 650;
}

.data-table tbody .total-row:hover td {
  background: #f5f8fd;
}

.data-table tbody .total-row td:first-child {
  background: #f5f8fd;
}

.dimension-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dimension-date {
  display: inline-grid;
  min-width: 38px;
  height: 27px;
  place-items: center;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: #2756b4;
  font-size: 11px;
  font-weight: 650;
}

.dimension-text {
  max-width: 270px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dimension-stack {
  display: grid;
  gap: 3px;
}

.dimension-stack small {
  color: var(--ink-faint);
  font-size: 10px;
}

.empty-state {
  min-height: 300px;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink-faint);
  font-size: 23px;
}

.empty-state h3 {
  margin: 0;
  font-size: 16px;
}

.empty-state p {
  max-width: 500px;
  margin: 8px auto 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.table-loading {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-soft);
  font-size: 12px;
  backdrop-filter: blur(3px);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #dce4f1;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px clamp(18px, 2.4vw, 28px);
}

.table-footer p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.6;
}

.text-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 650;
}

.text-button:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

dialog {
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 26px 80px rgba(13, 25, 46, 0.25);
}

dialog::backdrop {
  background: rgba(14, 24, 42, 0.5);
  backdrop-filter: blur(4px);
}

.settings-dialog {
  width: min(760px, calc(100vw - 28px));
}

.definitions-dialog {
  width: min(780px, calc(100vw - 28px));
}

.settings-dialog form {
  padding: 25px;
}

.definitions-dialog {
  padding: 25px;
}

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

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
}

.icon-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.connection-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 15px;
  border-radius: 11px;
  background: var(--amber-soft);
  color: var(--amber);
}

.connection-banner div {
  display: grid;
  gap: 3px;
}

.connection-banner strong {
  font-size: 12px;
}

.connection-banner span:last-child {
  color: #7c5a1d;
  font-size: 11px;
}

.connection-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

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

.dialog-span-2 {
  grid-column: 1 / -1;
}

.switch-row {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c6cfdd;
  transition: background-color 150ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 26, 46, 0.2);
  content: "";
  transition: transform 150ms ease;
}

.switch-row input:checked + .switch {
  background: var(--primary);
}

.switch-row input:checked + .switch::after {
  transform: translateX(16px);
}

.switch-row input:focus-visible + .switch {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

.dialog-api-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: var(--surface-soft);
}

.dialog-api-actions span {
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.5;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin-top: 20px;
}

.definition-list > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.definition-list strong {
  font-size: 12px;
}

.definition-list code {
  overflow: hidden;
  color: #2458be;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
}

.definition-list span {
  grid-column: 2;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.5;
}

.rate-note {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: #345da8;
  font-size: 11px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 14px 36px rgba(13, 25, 46, 0.24);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .intro-note {
    flex-basis: 230px;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid .field:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 70px;
  }

  .brand-copy span {
    display: none;
  }

  .intro {
    display: grid;
    align-items: start;
  }

  .intro-note {
    width: 100%;
  }

  .date-row {
    flex-wrap: wrap;
  }

  .field-date {
    flex: 1 1 180px;
  }

  .quick-ranges {
    flex-basis: 100%;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid .field:last-child {
    grid-column: auto;
  }

  .filter-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .definition-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main {
    padding-top: 22px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .data-status {
    min-height: 31px;
    padding: 0 9px;
  }

  .topbar-actions .button {
    width: 40px;
    padding: 0;
    font-size: 0;
  }

  .topbar-actions .button svg {
    width: 18px;
    height: 18px;
  }

  .intro h1 {
    font-size: 29px;
  }

  .filter-card {
    border-radius: 17px;
  }

  .section-heading {
    align-items: center;
  }

  .channel-chip {
    padding-right: 9px;
    font-size: 11px;
  }

  .search-select {
    grid-template-columns: 1fr;
  }

  .dimension-fieldset legend {
    flex-basis: 100%;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    padding: 16px;
  }

  .kpi-value {
    font-size: 25px;
  }

  .table-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .dialog-span-2 {
    grid-column: auto;
  }

  .dialog-api-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-footer .button {
    flex: 1;
  }

  .definitions-dialog,
  .settings-dialog form {
    padding: 20px;
  }

  .definition-list > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
