* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 14px/1.65 var(--font-body)
}

button,
input,
select,
textarea {
  font: inherit
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent
}

button,
a {
  touch-action: manipulation
}

a {
  color: var(--color-primary);
  text-decoration: none
}

button {
  cursor: pointer
}

h1,
h2,
h3,
p {
  margin: 0
}

h1 {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: 0
}

h2 {
  font-size: 19px;
  line-height: 1.5
}

h3 {
  font-size: 16px
}

p {
  color: var(--color-muted)
}

small {
  font-size: 12px
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px
}

button:disabled {
  cursor: not-allowed;
  opacity: .5
}

svg {
  flex-shrink: 0
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap
}

th,
td {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid var(--color-border)
}

th {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500
}

img {
  max-width: 100%
}

label {
  display: block
}

input:not([type=checkbox]),
select,
textarea {
  width: 100%;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  min-height: 44px
}

textarea {
  min-height: 120px;
  resize: vertical
}

label>input,
label>select,
label>textarea {
  margin-top: 7px
}

form {
  display: grid;
  gap: 18px
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 24px 0
}

::selection {
  background: var(--color-primary);
  color: var(--color-on-primary)
}

@media(prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important
  }
}

.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
}

/* 用户输入的长标题、连续字符和窄窗口不应撑破卡片。 */
h1, h2, h3, p, .message, .list-row, .field-error, .toast { overflow-wrap: anywhere; }
.page-head > div, .list-row > div, .card-header > h2, form, label, .auth > *, .modal { min-width: 0; }
.page-head > .btn, .card-header > .btn { flex-shrink: 0; }
input:not([type=checkbox]), select, textarea { min-width: 0; max-width: 100%; }
.modal { max-width: 100%; }
.modal .card-header > .btn { align-self: flex-start; }
