:root {
  color-scheme: light dark;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}
body {
  margin: 0;
}
.app-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}
.app-bar h1 {
  margin: 0;
  font-size: 1.25rem;
}
#signed-in:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
main {
  max-width: 44rem;
  margin: 2rem auto;
  padding: 0 1rem;
}
.placeholder {
  padding: 3rem 1rem;
  text-align: center;
  border: 1px dashed color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 0.5rem;
}

/* Panes open over the app as modal dialogs. */
dialog {
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1rem 1.25rem 1.25rem;
  color: CanvasText;
  background: Canvas;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 0.75rem;
}
#settings {
  width: min(44rem, calc(100vw - 2rem));
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.45);
}
dialog h2 {
  margin: 0;
}
.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.close {
  border-color: transparent;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.2rem 0.5rem;
}
#settings table {
  /* Five columns of dates and names; scroll them on a narrow screen rather than squeeze them. */
  display: block;
  overflow-x: auto;
}
/* Buttons draw no native look, so they read the same in every browser.
   A view's main action is .primary; every other button is secondary. */
:root {
  --accent: #1f5fcc;
  --accent-hover: #184ea8;
  --on-accent: #fff;
  --disabled: color-mix(in srgb, currentColor 35%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #5b9bff;
    --accent-hover: #7fb1ff;
    --on-accent: #0b1a33;
  }
}
button {
  font: inherit;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 0.375rem;
}
button:hover:enabled {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.primary {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
button.primary:hover:enabled {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
button:disabled,
button.primary:disabled {
  color: var(--disabled);
  background: transparent;
  border-color: var(--disabled);
  cursor: not-allowed;
}
#continue {
  font-size: 1.2rem;
  padding: 0.7rem 1.4rem;
}
form {
  margin: 1.5rem 0;
  display: grid;
  gap: 0.5rem;
  max-width: 24rem;
}
label {
  display: grid;
  gap: 0.2rem;
}
input {
  font: inherit;
  padding: 0.3rem;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 0.75rem;
}
th,
td {
  text-align: left;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}
#code-list {
  font-family: ui-monospace, monospace;
  /* A code as a UR is one 54-character token; let it wrap on a narrow screen. */
  overflow-wrap: anywhere;
}
#code-list li + li {
  margin-top: 0.25rem;
}
#codes-header {
  /* One line each for the site, the member name and the issue time. */
  white-space: pre-line;
}
#name-rules-toggle {
  justify-self: start;
  padding: 0 0.5rem;
}
#operator-form {
  grid-template-columns: 1fr;
}
.notice {
  padding: 0.5rem 0.75rem;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
}
#codes label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0;
}
