:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #ffffff;
  --muted: #888888;
  --bar: #111111;
  --line: #2a2a2a;
  --notice: #444444;
  --copied: skyblue;
  --visit: #4caf50;
  --font: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 24px;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crumb {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 1.25rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
}

.sep,
.here {
  color: var(--text);
}

.brand:hover,
.copy:hover {
  text-decoration: underline;
}

.name {
  display: block;
  margin-top: 16px;
}

.name input {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit;
  font-size: 1.35rem;
  padding: 4px 0;
}

.name input:focus {
  outline: 1px solid var(--copied);
  outline-offset: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button,
.visit {
  font-family: inherit;
  cursor: pointer;
}

.actions button {
  background: var(--text);
  color: #000000;
  border: 0;
  padding: 6px 14px;
  font-size: 1rem;
}

.actions kbd {
  margin-left: 0.45em;
  padding: 0 0.28em;
  border: 1px solid currentColor;
  border-radius: 3px;
  font: inherit;
  font-size: 0.82em;
}

.actions button:hover,
.actions button.armed,
.visit:hover {
  background: var(--visit);
  color: #ffffff;
}

.hint {
  margin: 14px 0;
  color: var(--muted);
}

textarea,
.sheet {
  font: inherit;
  font-size: 1.15rem;
  line-height: 1.45;
}

textarea {
  flex: 1;
  width: 100%;
  min-height: 50vh;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px;
}

textarea:focus {
  outline: 1px solid var(--copied);
}

.sheet {
  white-space: normal;
}

.heading {
  font-size: 1.35rem;
  margin: 0 0 16px;
}

.line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding-bottom: 1.45em;
}

.line:last-child {
  padding-bottom: 0;
}

.visits {
  display: flex;
  flex-flow: row wrap;
  gap: 6px;
  flex: 1 0 auto;
}

.num {
  color: var(--muted);
  min-width: 3.2ch;
  text-align: right;
  padding-top: 2px;
  flex: none;
}

.copy {
  flex: 1 1 14rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.copy.copied {
  color: var(--copied);
}

.visit {
  flex: none;
  margin-left: 8px;
  background: var(--text);
  color: #000000;
  border: 0;
  padding: 4px 10px;
  font-size: 0.95rem;
}

#notice {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  max-width: min(420px, calc(100vw - 32px));
  background: var(--notice);
  color: var(--text);
  padding: 10px;
  border-radius: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

body.dragover textarea {
  outline: 2px dashed var(--copied);
}
