:root {
  --background: #111;
  --color: #dfa;
  --link: #00b;
  --gap: 20px;
  --font-size: 13px;
  --input-bg: #8a8;
}

body.dark {
  --background: #111;
  --color: #dfa;
  --link: #00b;
  --input-bg: #8a8;
}

@media (prefers-color-scheme: light) {
  :root {
    --color: #111;
    --background: #eee;
    --link: #00b;
    --input-bg: #cdc;
  }
}

body.light {
  --color: #111;
  --background: #eee;
  --link: #00b;
  --input-bg: #cdc;
}

body {
  max-width: 1000px;
  background-color: var(--background);
  margin: auto;
  padding: var(--gap);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--gap);

  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-size);
  word-wrap: break-word;
  color: var(--color);
  min-height: 95vh;
}

input, textarea, select, option, button {
  background-color: var(--input-bg);
  border: 0;
  border: 1px dotted var(--color);
  margin: 0;
  padding: 0;
  padding-left: 4px;
}

input {
  padding-right: 0;
}

fieldset label:not(:last-child) {
  margin-right: 10px;
}

a, a:visited {
  text-decoration: none;
  color: var(--color);
}
a:hover { text-decoration: underline; }

#header {
  background-color: var(--color);
  color: var(--background);
  border-radius: 0.25em;
  padding: 5px 10px;
}

form, h1, h2, h3, h4, p, ul, li {
  font-size: var(--font-size);
  margin: 0;
  padding: 0;
}

.hidden {
  display: none;
}

#search {
  background-color: var(--background);
  color: var(--color);
}

ul { list-style-type: none; }
li:not(:last-child) { margin-bottom: 8px; }
h1 { font-size: 20px; }
h2, h3 {
  border-bottom: 1px dotted var(--color);
  padding-bottom: 2px;
  margin-bottom: 10px;
  font-weight: bold;
}
h2 { font-size: 20px; }
h3 { font-size: 15px; }

fieldset {
  border: 1px dotted var(--color);
}
fieldset:not(:last-child) {
  margin-bottom: 10px;
}

#layout > * > *:not(:last-child) {
  border-bottom: 4px double var(--color);
}

form > div:not(:last-child) {
  border-bottom: 4px double var(--color);
}

#layout > * > * {
  padding: 12px;
}

#layout {
  flex-grow: 1;
  display: grid;
  grid-template-columns: auto 1fr;
}

aside, main {
  border: 4px double var(--color);
}

#sound-names {
}

#sound-definitions {
  flex-grow: 1;
}

footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: lighter;
}

#light-switch {
  background-color: var(--background);
  color: var(--color);
  font-size: 3px;
  margin-top: -10px;
}

.selected {
  display: block;
  padding: 0 8px;
  font-weight: bold;
  border-left: 1px dotted var(--color);
}

button#play {
  padding: 2px 6px;
  border: 1px dotted var(--color);
  cursor: pointer;
}

button#play:hover {
  cursor: pointer;
}

form > div {
  margin-bottom: 20px;
}
