:root {
  --primary-color: #2f3541;
  --primary-hover: #0d1117;
  --secondary-color: #f56f6c;
  --dark-color: #252932;
  --light-color: #ffffff;
  --post-it-pink: pink;
  --post-it-yellow: #fbe991;
  --post-it-green: #a5caa0;
  --post-it-blue: #accfcb;
  --post-it-white: #e7e8e9;
  --card-w: 158px;
  --card-h: 88px;
  --text-color: var(--dark-color);
  --muted-color: #666666;
  --background-color: var(--light-color);
  --surface-color: #ffffff;
  --surface-translucent: rgba(255, 255, 255, 0.92);
  --header-gradient-color: 255, 255, 255;
  --column-line-color: rgba(47, 53, 65, 0.35);
  --map-link-color: rgba(47, 53, 65, 0.7);
  --map-link-halo: rgba(255, 255, 255, 0.65);
  --map-ink-white: #8b9099;
  --map-ink-yellow: #bd8f14;
  --map-ink-green: #4f8b49;
  --map-ink-blue: #3f8b86;
  --map-ink-pink: #d3557a;
  --badge-note: #b35c0f;
  --badge-map: #3c6f37;
  --badge-import: #6b4d9a;
  --badge-mine: #2c6f6b;
  --badge-shared: #3a5fa8;
  --badge-visited: #5f6b7a;
  --wallpaper: url('/images/backgrounds/yellow-bamboos.webp');
  --page-color: var(--background-color);
  --page-veil: transparent;
  --board-opacity: 0.8;
  --board-background-color: rgba(238, 238, 238, var(--board-opacity));
  --board-background-color-outline: rgba(221, 221, 221, var(--board-opacity));
  --board-background-color-shadow: rgba(153, 153, 153, var(--board-opacity));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --primary-color: #d0d6df;
    --primary-hover: #ffffff;
    --text-color: #e7e8e9;
    --muted-color: #9aa0ab;
    --background-color: #14161c;
    --surface-color: #1e2129;
    --surface-translucent: rgba(30, 33, 41, 0.92);
    --header-gradient-color: 0, 0, 0;
    --column-line-color: rgba(231, 232, 233, 0.3);
    --map-link-color: rgba(231, 232, 233, 0.65);
    --map-link-halo: rgba(0, 0, 0, 0.6);
    --map-ink-white: #e7e8e9;
    --map-ink-yellow: #f0d267;
    --map-ink-green: #8fc98a;
    --map-ink-blue: #7fc9c3;
    --map-ink-pink: #f3a0b4;
    --badge-note: #f0b46a;
    --badge-map: #8fc98a;
    --badge-import: #bfa9e8;
    --badge-mine: #7fc9c3;
    --badge-shared: #a8bdf0;
    --badge-visited: #aab4c2;
    --board-background-color: rgba(38, 42, 52, var(--board-opacity));
    --board-background-color-outline: rgba(60, 65, 78, var(--board-opacity));
    --board-background-color-shadow: rgba(0, 0, 0, var(--board-opacity));
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --primary-color: #d0d6df;
  --primary-hover: #ffffff;
  --text-color: #e7e8e9;
  --muted-color: #9aa0ab;
  --background-color: #14161c;
  --surface-color: #1e2129;
  --surface-translucent: rgba(30, 33, 41, 0.92);
  --header-gradient-color: 0, 0, 0;
  --column-line-color: rgba(231, 232, 233, 0.3);
  --map-link-color: rgba(231, 232, 233, 0.65);
  --map-link-halo: rgba(0, 0, 0, 0.6);
  --map-ink-white: #e7e8e9;
  --map-ink-yellow: #f0d267;
  --map-ink-green: #8fc98a;
  --map-ink-blue: #7fc9c3;
  --map-ink-pink: #f3a0b4;
  --badge-note: #f0b46a;
  --badge-map: #8fc98a;
  --badge-import: #bfa9e8;
  --badge-mine: #7fc9c3;
  --badge-shared: #a8bdf0;
  --badge-visited: #aab4c2;
  --board-background-color: rgba(38, 42, 52, var(--board-opacity));
  --board-background-color-outline: rgba(60, 65, 78, var(--board-opacity));
  --board-background-color-shadow: rgba(0, 0, 0, var(--board-opacity));
}
#board .card,
.mini-card {
  --primary-color: #14181f;
  --primary-hover: #000000;
  --text-color: #252932;
  --background-color: var(--light-color);
  --surface-color: #ffffff;
  --surface-translucent: rgba(255, 255, 255, 0.85);
  color: var(--text-color);
}

html {
  overscroll-behavior: none;
}
*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  color: var(--text-color);
  padding: 0;
  margin: 0;
  background-color: var(--page-color);
  background-image:
    linear-gradient(var(--page-veil), var(--page-veil)), var(--wallpaper);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100svh;
}
body.board {
  --wallpaper: none;
}

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

#main-menu {
  background: linear-gradient(
    180deg,
    rgb(var(--header-gradient-color)) 0%,
    rgba(var(--header-gradient-color), 0.75) 50px,
    rgba(var(--header-gradient-color), 0) 75px
  );
}
.main-header {
  min-height: 60px;
  padding: 4px 0;
  width: 100%;
  display: flex;
  align-content: space-around;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 100;
}
.title {
  display: flex;
  align-items: baseline;
}
.logo {
  width: 120px;
}
.title a:hover {
  text-decoration: none;
}
.logo-title {
  font-size: 1.7em;
  font-weight: bolder;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
}
.board-title {
  display: flex;
  align-items: baseline;
  margin: 0;
  min-width: 0;
  font-size: 1.1em;
  font-weight: 600;
}

.board-title::before {
  content: '·';
  margin: 0 0.5em;
  color: var(--muted-color);
}
.board-title-button {
  display: block;
  min-width: 0;
  max-width: 40vw;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-color);
  font: inherit;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.board-title-button:hover {
  color: var(--primary-color);
}
body.read-only .board-title-button {
  cursor: default;
}

body.read-only .board-title-button:hover {
  color: inherit;
}
.board-title-edit-form,
.board-title-edit-form textarea {
  display: block;
  width: 14em;
  max-width: 40vw;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  line-height: inherit;
  overflow: hidden;
  resize: none;
  outline: none;
}

.board-title-edit-form textarea {
  width: 100%;
  border-bottom: 1px dashed var(--primary-color);
}

.base-line {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
  color: var(--muted-color);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: 1em;
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 12px;
}
body.board .container {
  max-width: min(100%, var(--board-frame, 1236px));
  padding: 0 12px;
}

.board-container {
  margin: 1em auto;
  width: 100%;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.board-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.header-row {
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.actions {
  display: flex;
  white-space: nowrap;
}

.actions a {
  display: inline-flex;
  align-items: center;
  font-weight: bold;
  text-transform: uppercase;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
  margin-left: 1em;
  transition: color ease-out 0.2s;
  color: var(--primary-color);
}
.actions a:hover {
  text-decoration: none;
  color: var(--primary-hover);
}
.people-link {
  gap: 0.35em;
}

.connected-count {
  font-size: 13px;
  font-weight: bold;
}
.btn {
  display: block;
  width: 100%;
  padding: 0.55em 1em;
  background: var(--surface-color);
  border: 1px solid var(--primary-color);
  border-radius: 0.5em;
  color: var(--primary-color);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.btn:hover {
  background: var(--primary-color);
  color: var(--surface-color);
}
.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em;
}
.btn.chosen {
  background: var(--primary-color);
  color: var(--background-color);
}

.embed-modes {
  margin-bottom: 0.6em;
}

.btn-inline {
  width: auto;
  flex: none;
  padding: 0.45em 0.9em;
}

#board {
  position: relative;
  background-color: var(--board-background-color);
  height: 100%;
  box-shadow: inset 1px 1px 3px var(--board-background-color-shadow);
}

.board-outline {
  border: solid var(--board-background-color-outline) 6px;
  display: block;
  box-shadow: 1px 1px 1px var(--board-background-color-shadow);
  margin: 0 auto;
}
body:not(.board) .board-outline {
  height: 466px;
}

body.board .board-outline {
  border-color: var(--board-background-color-outline);
  box-shadow: 1px 1px 1px var(--board-background-color-shadow);
}

.card-icon {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  z-index: 100;
  cursor: pointer;
}

.card:hover .card-icon {
  display: block;
}
#board .card .rotate-card-icon {
  top: auto;
  right: auto;
  bottom: 2px;
  left: 2px;
  cursor: ns-resize;
  touch-action: none;
}

#board .card .edit-entry-icon,
#board .card .edit-card-icon {
  top: auto;
  bottom: 2px;
  right: 2px;
}
#board .card .delete-card-icon {
  top: 2px;
  right: 2px;
}
#board .card .card-icon {
  background: rgb(255 255 255 / 0.85);
  border-radius: 3px;
  padding: 1px;
}

#board .card .delete-card-icon {
  color: var(--light-color);
  background: var(--secondary-color);
}
.card-edit-form,
.card-edit-form input,
.card-edit-form textarea {
  border: none;
  font-size: inherit;
  font-weight: inherit;
  background-color: inherit;
  font-family: inherit;
  text-align: inherit;
  line-height: inherit;
  padding: 0;
  margin: 0;
  overflow: hidden;
  resize: none;
  width: 100%;
  color: inherit;
  outline: none;
}
.card-edit-form,
.card-edit-form textarea {
  display: block;
  height: 100%;
}
#board .card.editing,
.card.editing .content {
  overflow: visible;
}

#board .card.editing {
  z-index: 30;
}

.card-edit-form button {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  padding: 2px 12px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: var(--background-color);
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: all ease-out 0.1s;
}
.card-edit-form button:hover {
  background-color: var(--primary-hover);
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.2);
}
.card-lock {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 4px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.75);
}

.user-face {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.card-lock .user-face {
  width: 14px;
  height: 14px;
}

.card-lock-name {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.user-you {
  opacity: 0.55;
  font-size: 0.9em;
}

.user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card.locked .card-lock {
  display: flex;
}

.card.locked .content {
  cursor: not-allowed;
}

.card.locked:hover .card-icon {
  display: none;
}

.board-table {
  position: absolute;
  top: 0px;
  left: 0px;
  height: 100%;
  width: 100%;
  table-layout: fixed;
}

.board-table .col {
  position: relative;
  text-align: center;
  vertical-align: top;
  height: 100%;
  border-left: 2px dashed var(--column-line-color);
}

.board-table .first {
  border-left: none;
  text-align: center;
  vertical-align: top;
  height: 100%;
}

h1,
h1 a {
  color: #b6b6b6;
  padding: 0px;
  margin: 0px;
  margin-left: 1px;
  font-weight: normal;
  font-size: 15px;
  padding-top: 14px;
  letter-spacing: +1px;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
  text-decoration: none;
}

h2 {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
  color: var(--text-color);
  font-size: 20px;
}

h3 {
  font-size: 18px;
  margin: 1em 0 0.5em 0;
}
.board-table .col-empty {
  text-align: left;
  border-left: none;
}
.col-head {
  position: relative;
  display: block;
}

.col h2 {
  margin: 0;
  padding: 3px 4px;
  font-size: 18px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-empty .col-head {
  min-height: 26px;
}
.col-tools {
  position: absolute;
  top: 2px;
  right: 8px;
  display: none;
  gap: 2px;
  padding: 1px 3px;
  border-radius: 4px;
  background: var(--surface-translucent);
}

.col-head:hover .col-tools,
.col-tools:focus-within {
  display: flex;
}
.col-empty .col-tools {
  display: flex;
  right: auto;
  left: 4px;
}
#board-columns td:last-child:not(.col-empty) .col-tools {
  right: 46px;
}

.col-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--text-color);
  line-height: 0;
  cursor: pointer;
}

.col-icon:hover {
  color: var(--primary-hover);
}
.col-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -5px;
  width: 10px;
  z-index: 5;
  cursor: col-resize;
  touch-action: none;
}

.col-resize::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: var(--primary-color);
  opacity: 0;
}

.col-resize:hover::after {
  opacity: 0.6;
}
#people .field-label {
  margin-top: 0.4em;
}

.people-list {
  list-style: none;
  margin: 1.2em 0 0;
  padding: 0;
  font-size: 14px;
}

.people-list:empty {
  display: none;
}

.people-list li {
  padding: 0.4em 0;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}

.stickers {
  position: relative;
  display: inline-flex;
}

.stickers .sticker-toggle {
  height: 22px;
}

.sticker-toggle-face {
  font-size: 14px;
  line-height: 1;
}

.sticker-toggle[aria-expanded='true'] {
  color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.sticker-panel {
  position: absolute;
  top: calc(100% + 0.4em);
  right: 0;
  z-index: 20;
  width: 17em;
  max-width: calc(100vw - 1em);
  padding: 0.5em;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 0.5em;
  background: var(--surface-color);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.sticker-head {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.4em;
}

.sticker-search {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2em, 1fr));
  gap: 0.1em;
  max-height: 14em;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sticker-note:empty {
  display: none;
}

@media (pointer: coarse) {
  .sticker-panel {
    position: fixed;
    top: auto;
    right: auto;
    bottom: calc(4.25em + env(safe-area-inset-bottom, 0px));
    left: 50%;
    width: min(24em, calc(100vw - 1.5em));
    transform: translateX(-50%);
  }

  .sticker-grid {
    grid-template-columns: repeat(auto-fill, minmax(2.6em, 1fr));
    max-height: 12em;
  }

  .sticker {
    min-height: 2.6em;
    padding: 0.3em;
  }

  .card-sticker {
    font-size: 15px;
  }

  .node-sticker {
    font-size: 19px;
  }
}

.sticker-note {
  margin: 0.4em 0 0;
  font-size: 12px;
}

.sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15em;
  border: 1px solid transparent;
  border-radius: 0.4em;
  background: none;
  color: var(--text-color);
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
}

.sticker:hover {
  border-color: rgba(128, 128, 128, 0.4);
  background: color-mix(in srgb, var(--text-color) 6%, transparent);
}

.sticker[aria-pressed='true'] {
  border-color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.card-sticker,
.node-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.card-sticker {
  margin-left: 2px;
  font-size: 13px;
  line-height: 1;
  vertical-align: bottom;
}

.node-stickers {
  position: absolute;
  top: 100%;
  right: 14px;
  z-index: 2;
  display: flex;
  gap: 2px;
  margin-top: -11px;
}

.node-sticker {
  font-size: 17px;
  line-height: 1;
}

#board.stamping .card,
#board.stamping .content,
#map.stamping .node,
#map.stamping .content {
  cursor: inherit;
}

body:not(.read-only) #board .card-sticker,
body:not(.read-only) #map .node-sticker {
  cursor: var(--erase-cursor, pointer);
}

body:not(.read-only) .card-sticker:hover,
body:not(.read-only) .node-sticker:hover {
  opacity: 0.55;
}
.form-control {
  width: 100%;
  min-width: 0;
  padding: 0.5em 0.65em;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 0.45em;
  background-color: color-mix(
    in srgb,
    var(--text-color) 5%,
    var(--surface-color)
  );
  color: var(--text-color);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.form-control::placeholder {
  color: var(--muted-color);
  opacity: 0.75;
}

.form-control:hover {
  border-color: rgba(128, 128, 128, 0.55);
}
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--primary-color) 25%, transparent);
  outline: none;
}
.share-iframe {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  resize: vertical;
}

input.text {
  width: 230px;
  background: none;
  padding: 6px;
  margin-bottom: 10px;
  border: none;
  font-size: 30px;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
  color: var(--primary-color);
  text-align: center;
  border-bottom: dashed 3px var(--primary-color);
}

.config {
  position: fixed;
  right: 18px;
  top: 4px;
}

.filler {
  position: absolute;
  right: 22px;
  bottom: 2px;
  left: 22px;
  text-align: right;
}

.content h1 {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
  color: var(--primary-color);
  font-size: 22px;
}

.content * {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

#revisions-list li > * {
  cursor: pointer;
}

.revision-remove {
  margin-left: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted-color);
  line-height: 1;
  cursor: pointer;
}

.revision-remove:hover {
  color: var(--primary-hover);
}

.credits {
  text-align: center;
  font-size: 0.9em;
  margin: 2em 0;
}

.pull-right {
  float: right;
}
.post-it-actions {
  display: flex;
  align-items: center;
}
.add-post-it {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color ease-out 0.2s;
  color: var(--primary-color);
  margin: 0 2px;
}
.add-post-it:hover {
  color: var(--primary-hover);
}
#site-wrapper {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow-x: hidden;
}
#site-canvas {
  min-height: 100svh;
  position: relative;
}
#site-menu {
  width: 300px;
  max-width: 100vw;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 300ms ease;
  background: var(--menu-background-color, var(--surface-color));
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.25);
  padding: 15px;
  z-index: 201;
}
.show-nav #site-menu {
  transform: translateX(0);
}
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  z-index: 200;
}
.show-nav .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  #site-menu,
  .nav-scrim {
    transition: none;
  }
}
#site-menu .close-link {
  color: var(--text-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
  display: flex;
  align-items: center;
}
#site-menu .close-link i {
  font-size: 16px;
}
#site-menu .close-link:hover {
  text-decoration: none;
}

#site-menu h2 {
  margin: 0.4em 0 0.8em;
}
.section {
  border-top: 1px solid rgba(128, 128, 128, 0.28);
}

.section > summary {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.7em 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  list-style: none;
}

.section > summary::-webkit-details-marker {
  display: none;
}

.section > summary::after {
  content: '';
  margin-left: auto;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform 0.2s ease;
}

.section[open] > summary::after {
  transform: translateY(0.1em) rotate(225deg);
}

.section > summary:hover {
  color: var(--primary-hover);
}

.section > summary svg {
  flex: none;
  opacity: 0.75;
}

.section-body {
  padding: 0 0 1em;
}
.copy-row {
  display: flex;
  align-items: stretch;
  gap: 0.4em;
}

.copy-row + .field-label {
  margin-top: 1em;
}

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3em;
  padding: 0;
  border: 1px solid var(--primary-color);
  border-radius: 0.4em;
  background: var(--surface-color);
  color: var(--primary-color);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.icon-btn:hover {
  background: var(--primary-color);
  color: var(--surface-color);
}
.copy-row textarea ~ .icon-btn {
  align-self: flex-start;
  height: 2.3em;
}
.field-label {
  display: block;
  margin: 0.8em 0 0.35em;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-color);
}

.hint {
  font-size: 0.85em;
  line-height: 1.4;
  margin: 0.4em 0 0.8em;
  color: var(--muted-color);
}
.switch {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

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

.switch-track {
  flex: none;
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: rgba(128, 128, 128, 0.45);
  transition: background-color 0.2s ease;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

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

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

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .section > summary::after,
  .switch-track,
  .switch-track::after {
    transition: none;
  }
}
.backgrounds {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.backgrounds .bg {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0.3em;
  border: 2px solid transparent;
  cursor: pointer;
}

.bg-source-row {
  display: flex;
  gap: 0.5em;
  align-items: center;
  margin-bottom: 0.6em;
}

.bg-source-row select {
  flex: 1;
  min-width: 0;
}

.bg-none {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 34px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.3em;
  background: color-mix(in srgb, var(--text-color) 7%, var(--surface-color));
  color: var(--muted-color);
  cursor: pointer;
}

.bg-none:hover {
  border-color: rgba(128, 128, 128, 0.5);
}

.bg-none.selected {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

#bg-own-tools {
  margin-top: 0.8em;
}

.backgrounds .bg:hover {
  border-color: rgba(128, 128, 128, 0.5);
}
.backgrounds .bg.selected {
  border-color: var(--primary-color);
}

.bg-own {
  position: relative;
}

.bg-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.bg-own:hover .bg-remove,
.bg-remove:focus-visible {
  opacity: 1;
}

@media (pointer: coarse) {
  .bg-remove {
    opacity: 1;
  }
}

/*** THE HOME PAGE ***/

body.home {
  padding-bottom: 3em;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  margin-top: 1.6em;
  padding-bottom: 2em;
}

.home-row {
  padding: 1.2em 1.4em;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 0.6em;
  background: var(--surface-translucent);
}

.home-row h2 {
  margin: 0 0 0.8em;
  font-size: 17px;
}

.home-open > label {
  display: block;
  margin-bottom: 0.4em;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-color);
}

.home-open-row {
  display: flex;
  align-items: stretch;
  margin-top: 1.3em;
}

.home-url {
  margin: 0.5em 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--muted-color);
  overflow-wrap: anywhere;
}

.home-open {
  margin-bottom: 1.4em;
}

.home-open .form-control {
  max-width: 30em;
  font-size: 15px;
}

.home-open-row .form-control {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  padding: 0.7em 0.9em;
  border: 1px solid var(--primary-color);
  border-right: 0;
  border-radius: 0.5em 0 0 0.5em;
  background-color: var(--surface-color);
  font-size: 16px;
}

.home-open-row .form-control:hover {
  border-color: var(--primary-color);
}

.home-open-row .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: none;
}

.make-choice {
  margin: 0 0 1.1em;
  padding: 0;
  border: 0;
  min-width: 0;
}

.make-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7em;
}

.make {
  --badge-ink: var(--primary-color);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 0.15em 0.7em;
  padding: 0.8em 1em;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 0.5em;
  background: var(--surface-color);
  color: var(--text-color);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.make:has(input[value='board']) {
  --badge-ink: var(--badge-note);
}

.make:has(input[value='mind']) {
  --badge-ink: var(--badge-map);
}

.make:has(input[value='import']) {
  --badge-ink: var(--badge-import);
}

.make:hover {
  border-color: var(--badge-ink);
  transform: translateY(-1px);
}

.make:has(input:focus-visible) {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.make:has(input:checked) {
  border-color: var(--badge-ink);
  background: color-mix(in srgb, var(--badge-ink) 10%, var(--surface-color));
}

.make:has(input:checked) .make-name {
  color: var(--badge-ink);
}

.make svg {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
  color: var(--badge-ink);
}

.make-name {
  grid-column: 2;
  grid-row: 1;
  font-weight: 700;
  font-size: 15px;
}

.make-what {
  grid-column: 2;
  grid-row: 2;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted-color);
}

.template-choice {
  margin: 1.1em 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.template-choice > legend {
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-color);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.template-grid {
  margin-top: 0.35em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.template {
  position: relative;
  padding: 0.3em 0.75em;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 2em;
  background: var(--surface-color);
  color: var(--muted-color);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.template:hover {
  border-color: var(--primary-color);
  color: var(--text-color);
}

.template:has(input:focus-visible) {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.template:has(input:checked) {
  border-color: var(--primary-color);
  color: var(--text-color);
  font-weight: 600;
}

.template input,
.make input,
.deck input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.import-url {
  margin-top: 0.9em;
}

.import-url > label {
  display: block;
  margin-bottom: 0.4em;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-color);
}

.import-url .form-control {
  max-width: 34em;
  font-size: 15px;
}

.import-url-line {
  display: flex;
  gap: 0.5em;
  align-items: stretch;
  max-width: 34em;
}

.import-url-line .form-control {
  flex: 1;
  min-width: 0;
}

.import-url-line .btn {
  white-space: nowrap;
}

.deck-list {
  margin: 0.9em 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 0.4em;
  max-width: 34em;
}

.deck-list legend {
  padding: 0;
  margin-bottom: 0.4em;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-color);
}

.deck {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 0.1em 0.6em;
  align-items: center;
  padding: 0.5em 0.7em;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 0.4em;
  background: var(--surface-color);
  cursor: pointer;
}

.deck:has(input:checked) {
  border-color: var(--primary-color);
  box-shadow: inset 0 0 0 1px var(--primary-color);
}

.deck-name {
  grid-column: 1;
  grid-row: 1;
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.deck-what {
  grid-column: 1;
  grid-row: 2;
  font-size: 12px;
  color: var(--muted-color);
}

.deck-button {
  width: 100%;
  font: inherit;
  color: var(--text-color);
  text-align: left;
}

.deck-button:hover {
  border-color: var(--primary-color);
}

.home-create {
  white-space: nowrap;
  padding: 0.7em 1.5em;
  border-radius: 0 0.5em 0.5em 0;
  background: var(--primary-color);
  color: var(--surface-color);
  font-weight: 600;
  font-size: 16px;
}

.home-create:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

@media (max-width: 645px) {
  .home-open-row {
    flex-wrap: wrap;
    gap: 0.5em;
  }

  .home-open-row .form-control {
    flex-basis: 100%;
    border-right: 1px solid var(--primary-color);
    border-radius: 0.5em;
  }

  .home-create {
    width: 100%;
    border-radius: 0.5em;
  }
}

.home-error {
  margin: 0 0 1em;
  font-size: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7em;
}

.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.7em;
  row-gap: 0.1em;
  padding: 0.9em 1em;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 0.5em;
  background: var(--surface-color);
}

.stat-icon {
  grid-row: 1 / 3;
  color: var(--muted-color);
  opacity: 0.75;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary-color);
}

.stat-label {
  font-size: 13px;
  color: var(--muted-color);
}

.board-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-list:empty {
  display: none;
}

.board-list li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  gap: 1em;
  padding: 0.5em 0;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}

.board-list li > a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-list li.board-head {
  border-top: 0;
  padding-bottom: 0.2em;
}

.board-sort-button {
  justify-self: start;
  padding: 0.1em 0;
  border: 0;
  background: none;
  color: var(--muted-color);
  font: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
}

.board-sort-button:hover {
  color: var(--text-color);
}

.board-sort-button[aria-pressed='true'] {
  color: var(--text-color);
  font-weight: 600;
}

.board-sort-arrow {
  margin-left: 0.25em;
}

.board-filter {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 0.6em;
}

.board-filter .form-control {
  width: auto;
  flex: 1 1 14em;
  max-width: 22em;
  font-size: 13px;
}

.board-matches {
  font-size: 12px;
  color: var(--muted-color);
  white-space: nowrap;
}

.board-sort,
.board-kind {
  --badge-ink: var(--muted-color);
  font-size: 12px;
  white-space: nowrap;
  color: var(--badge-ink);
}

.board-sort,
.board-kind:not(:empty) {
  padding: 0.1em 0.5em;
  border: 1px solid color-mix(in srgb, var(--badge-ink) 45%, transparent);
  border-radius: 1em;
  background: color-mix(in srgb, var(--badge-ink) 10%, transparent);
}

.board-kind {
  justify-self: start;
}

.board-kind[data-kind='owned'] {
  --badge-ink: var(--badge-mine);
}

.board-kind[data-kind='shared'] {
  --badge-ink: var(--badge-shared);
}

.board-kind[data-kind='visited'] {
  --badge-ink: var(--badge-visited);
}

.board-sort {
  display: inline-block;
  justify-self: stretch;
  min-width: 7em;
  text-align: center;
}

.board-sort[data-sort='board'] {
  --badge-ink: var(--badge-note);
}

.board-sort[data-sort='mindmap'] {
  --badge-ink: var(--badge-map);
}

.board-when {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted-color);
  white-space: nowrap;
}

.board-star,
.board-forget {
  padding: 0 0.2em;
  border: 0;
  background: none;
  color: var(--muted-color);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.board-star:hover,
.board-forget:hover {
  color: var(--primary-hover);
}

.board-list li.favourite .board-star {
  color: var(--primary-color);
}

@media (max-width: 645px) {
  .board-list {
    display: block;
  }

  .board-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 0.6em;
  }

  .board-list li > a,
  .board-list li > .board-star,
  .board-list li > .board-forget {
    order: -1;
  }

  .board-list li > a {
    flex: 1 1 8em;
  }

  .board-list li::after {
    content: '';
    order: 0;
    flex-basis: 100%;
    height: 0;
  }

  .board-list li > .board-sort,
  .board-list li > .board-kind,
  .board-list li > .board-when {
    order: 1;
  }

  .board-list li.board-head {
    gap: 0.9em;
    padding-bottom: 0.4em;
  }

  .board-list li.board-head::after {
    content: none;
  }
}

.keys-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
}

.keys-row .form-control {
  flex: 1 1 14em;
  max-width: 22em;
}

.keys-made {
  margin: 0.8em 0;
}

.keys-secret {
  display: block;
  padding: 0.6em 0.8em;
  border: 1px solid var(--primary-color);
  border-radius: 0.45em;
  background: color-mix(in srgb, var(--text-color) 5%, var(--surface-color));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}

.needs-account[hidden] {
  display: none;
}

.needs-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8em;
}

.needs-account .btn {
  width: auto;
  text-decoration: none;
}

.home-about p {
  line-height: 1.5;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 1.4em;
  font-weight: 600;
}

.home-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}

.home-links .admin-link[hidden] {
  display: none;
}

.home-about .credits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 2em;
  text-align: left;
  margin: 1.5em 0 0;
  padding-top: 1em;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}

.docs-main {
  padding-bottom: 3em;
}

.docs-body {
  max-width: 80ch;
  padding: 1.6em 1.8em;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 0.6em;
  background: var(--surface-translucent);
  line-height: 1.6;
}

.docs-body h1 {
  margin: 0 0 0.6em;
  color: var(--text-color);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.docs-body h2 {
  margin-top: 1.6em;
  padding-top: 0.8em;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.docs-body h2:first-of-type {
  margin-top: 1.2em;
}

.docs-body pre {
  overflow-x: auto;
  padding: 0.8em 1em;
  border-radius: 0.5em;
  background: color-mix(in srgb, var(--text-color) 6%, var(--surface-color));
}

.docs-body table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.docs-body td,
.docs-body th {
  padding: 0.3em 0.8em;
  border: 1px solid rgba(128, 128, 128, 0.25);
  text-align: left;
}

/*** CARDS ***/

.card,
.mini-card,
.node[data-shape='note'] .node-face {
  background-size: 10px 10px;
  background-image: repeating-linear-gradient(
    0deg,
    #0001,
    #0001 1px,
    transparent 1px,
    transparent
  );
  box-shadow: 1px 1px 3px #0006;
}
.card {
  position: absolute;
}

.white {
  background-color: var(--post-it-white);
}
.pink {
  background-color: var(--post-it-pink);
}
.yellow {
  background-color: var(--post-it-yellow);
}
.blue {
  background-color: var(--post-it-blue);
}
.green {
  background-color: var(--post-it-green);
}
#board {
  user-select: none;
  -webkit-user-select: none;
}

#board input,
#board textarea {
  user-select: text;
  -webkit-user-select: text;
}

#board .card {
  width: var(--card-w);
  height: var(--card-h);
  font-size: 18px;
  overflow: hidden;
  position: absolute;
  z-index: 10;
  top: 460px;
  left: 0px;
}
.mini-card {
  width: 40px;
  height: 22px;
  background-size: 5px 5px;
}

.content {
  overflow: hidden;
  display: block;
  width: 100%;
  height: 100%;
  font-family: 'Inter', Verdana, Geneva, Tahoma, sans-serif;

  letter-spacing: 0px;
  opacity: 1;

  color: var(--dark-color);
  text-align: center;
  padding-top: 1em;
  overflow-wrap: break-word;
}

.stickertarget {
  position: absolute;
}

#opacity-range,
#bg-opacity-range {
  width: 100%;
  accent-color: var(--primary-color);
}
.color-control {
  height: 2.4em;
  padding: 0.25em;
  cursor: pointer;
}
.card-sets .import-status {
  font-size: 0.85em;
  line-height: 1.4;
  margin: 0.5em 0 0;
}

.card-sets .import-status:empty {
  display: none;
}

.card-sets .hint {
  font-size: 0.85em;
  line-height: 1.4;
  margin: 0.4em 0;
  opacity: 0.85;
}

.set-list {
  list-style: none;
  padding: 0;
  margin: 0.5em 0 0;
}

.set-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0 0.5em;
  padding: 0.4em 0;
  border-top: 1px solid #0002;
}

.set-name {
  font-weight: bold;
}
.set-url {
  grid-column: 1 / -1;
  font-size: 0.75em;
  opacity: 0.7;
  overflow-wrap: anywhere;
}

/*** THE CARD TRAY ***/

.card-tray {
  position: relative;
  z-index: 50;
  margin: 0 auto 1em;
  max-width: 1236px;
  padding: 0.75em 12px 1em;
  background: var(--board-background-color, #fff);
  border-radius: 6px;
  box-shadow: 0 2px 10px #0004;
}

.card-tray-head {
  display: flex;
  align-items: center;
  gap: 0.75em;
}
.card-tray-head h3 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-tray-head .btn {
  flex: 0 0 auto;
  width: auto;
}

.card-tray-head .tray-close {
  flex: 0 0 auto;
}
.card-tray-filter {
  flex: 0 1 220px;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 0.35em 0.6em;
  border: 1px solid var(--board-background-color-outline);
  border-radius: 0.4em;
  background: var(--surface-color);
  color: var(--text-color);
}

.card-tray-filter:focus {
  outline: none;
  border-color: var(--primary-color);
}

.card-tray-empty {
  margin: 0.75em 0 0;
  opacity: 0.7;
}

.card-tray-head small {
  font-weight: normal;
  opacity: 0.7;
  margin-left: 0.5em;
}

.tray-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0.25em;
}
.card-tray-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 92px;
  gap: 0.5em;
  overflow-x: auto;
  padding: 0.75em 0 0.25em;
}

.tray-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
  padding: 0.4em 0.25em;
  background: var(--surface-color);
  border: 2px solid #0003;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}

.tray-card:hover:not(:disabled) {
  box-shadow: 0 1px 5px #0005;
}

.tray-card img {
  width: 100%;
  height: 52px;
  object-fit: contain;
}

.tray-card-title {
  font-size: 0.7em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.tray-card.placed {
  opacity: 0.4;
  cursor: default;
}

.tray-card.placed::after {
  content: '✓';
  font-size: 0.8em;
}
.add-card-set {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.05em;
  color: var(--dark-color);
  background-color: var(--post-it-white);
  vertical-align: middle;
}
#board .card.qr.entry-gone,
.node.qr.entry-gone {
  filter: grayscale(0.85);
  opacity: 0.75;
}

#board .card.qr.entry-gone .qrcard-face,
.node.qr.entry-gone .qrcard-face {
  outline: 2px dashed #0006;
  outline-offset: -4px;
}

/*** QR CARDS ***/

#board .card.qr,
.node.qr {
  --card-spacing: 5mm;

  --recto-zones: 5mm 20mm 50mm 20mm 20mm;
  --verso-zones: 5mm 20mm 70mm 20mm;

  --qr-ink: #222;
  --qr-paper: #fff;

  width: 75mm;
  height: 125mm;
  font-size: initial;
  line-height: 1.1em;
  background: none;
  box-shadow: none;
  perspective: 900px;
  overflow: visible;
}

#board .card.qr .content,
.node.qr .content {
  position: relative;
  overflow: visible;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  padding: 0;
  text-align: left;
  cursor: grab;
}

#board .card.qr.showing-back .content,
.node.qr.showing-back .content {
  transform: rotateY(180deg);
}

.qrcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 0.3),
    1px 1px 3px #0006;
  padding: var(--card-spacing);
  display: grid;
  grid-gap: 0;
  align-content: start;
  grid-template-columns: 1fr;
  background-color: #d8604c;
  overflow: hidden;
}

.qrcard-front {
  grid-template-rows: var(--recto-zones);
}

.qrcard-back {
  grid-template-rows: var(--verso-zones);
  transform: rotateY(180deg);
}
.qrcard-header,
.qrcard-title,
.qrcard-image,
.qrcard-text,
.qrcard-main-content,
.qrcard-footer {
  background: var(--qr-paper);
}

.qrcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qrcard-complexity {
  display: flex;
  gap: 1mm;
  align-items: center;
  padding-left: 1mm;
}

.qrcard-complexity .dot {
  width: 2mm;
  height: 2mm;
  border-radius: 50%;
  background: var(--qr-ink);
}

.qrcard-type {
  font-family: tahoma, sans-serif;
  font-size: 10px;
  color: var(--qr-ink);
  text-transform: uppercase;
  margin-right: 1mm;
}

.qrcard-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  overflow: hidden;
  text-align: center;
  font-family: garamond, 'Times New Roman', serif;
  font-size: 20px;
  color: var(--qr-ink);
  text-transform: uppercase;
}

.qrcard-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.qrcard-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.qrcard-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1mm;
  overflow: hidden;
  text-align: center;
  font-family: tahoma, sans-serif;
  font-size: 16px;
  font-style: italic;
  color: var(--qr-ink);
}

.qrcard-main-content {
  display: block;
  padding: 2mm;
  overflow: hidden;
  text-align: left;
  font-family: tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.143em;
  color: var(--qr-ink);
  mask-image: linear-gradient(#000 85%, transparent);
}
.qrcard-main-content > :first-child {
  margin-top: 0;
}

.qrcard-main-content > :last-child {
  margin-bottom: 0;
}

.qrcard-main-content p,
.qrcard-main-content ul,
.qrcard-main-content ol,
.qrcard-main-content blockquote,
.qrcard-main-content pre {
  margin: 0 0 1mm 0;
}

.qrcard-main-content h1,
.qrcard-main-content h2,
.qrcard-main-content h3,
.qrcard-main-content h4,
.qrcard-main-content h5,
.qrcard-main-content h6 {
  margin: 1mm 0 0.5mm 0;
  font-family: inherit;
  font-size: 1.1em;
  font-weight: bold;
  color: inherit;
  text-transform: none;
}

.qrcard-main-content ul,
.qrcard-main-content ol {
  padding-left: 4mm;
}

.qrcard-main-content blockquote {
  padding-left: 2mm;
  border-left: 2px solid currentColor;
  font-style: italic;
}

.qrcard-main-content code,
.qrcard-main-content pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.qrcard-main-content pre {
  white-space: pre-wrap;
}

.qrcard-main-content a {
  color: inherit;
  text-decoration: underline;
}
.qrcard-main-content img {
  max-width: 100%;
  max-height: 20mm;
  height: auto;
}

.qrcard-main-content table {
  width: 100%;
  border-collapse: collapse;
}

.qrcard-main-content th,
.qrcard-main-content td {
  padding: 0.3mm 1mm;
  border: 1px solid currentColor;
  text-align: left;
}

.qrcard-footer {
  margin-top: var(--card-spacing);
  padding: 1mm;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.qrcard-logo {
  width: 10mm;
  max-height: 13mm;
  height: auto;
}

.qrcard-box {
  width: 12mm;
  text-align: center;
  font-family: tahoma, sans-serif;
  font-size: 8px;
  color: var(--qr-ink);
}

.qrcard-box .mini-picto img {
  max-width: 9mm;
  margin-bottom: 2px;
}

.qrcard-box .mini-text {
  text-transform: uppercase;
  line-height: 1em;
  word-break: break-word;
}

.qrcard-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  width: 39mm;
  height: 100%;
  text-align: center;
  line-height: 1em;
}

.qrcard-link .card-link {
  margin: 0;
  padding: 0;
  font-family: tahoma, sans-serif;
  font-size: 10px;
  line-height: 0.9em;
  color: var(--qr-ink);
  word-break: break-word;
}

.qrcard-licence {
  font-family: tahoma, sans-serif;
  font-size: 8px;
  text-transform: uppercase;
  color: var(--qr-ink);
}

.qrcard-licence-badge {
  width: 12mm;
}
.qrcard-licence-badge + .qrcard-licence {
  display: none;
}

.qrcode {
  width: 13mm;
  margin: 0;
}

.qrcode-svg {
  display: block;
  width: 100%;
  height: auto;
  shape-rendering: crispEdges;
}
#board .card.qr img,
#board .card.qr a,
.node.qr img,
.node.qr a {
  -webkit-user-drag: none;
  user-select: none;
}
#board .card.qr .flip-mine-icon {
  right: auto;
  left: 2px;
}

#board .card.qr .flip-all-icon {
  right: auto;
  left: 20px;
}
@media (hover: none) {
  body:not(.read-only) #board .card:not(.locked) .card-icon {
    display: block;
    opacity: 0.55;
  }

  body:not(.read-only) #board .card:not(.locked) .card-icon:active {
    opacity: 1;
  }

  body.read-only #board .card.qr:not(.locked) .flip-mine-icon {
    display: block;
    opacity: 0.55;
  }

  body:not(.read-only) #board .col-tools {
    display: flex;
    opacity: 0.55;
  }

  body:not(.read-only) #board .col-tools:active {
    opacity: 1;
  }
}

/*** Responsive ***/

@media (max-width: 645px) {
  .base-line {
    display: none;
  }

  .logo-title {
    font-size: 1.3em;
  }

  .board-title {
    font-size: 0.95em;
  }

  .board-title::before {
    margin: 0 0.3em;
  }
}

/*** ACCESS AND ADMINISTRATION ***/

body.read-only #create-card {
  display: none;
}
body.read-only #board .card-icon,
body.read-only #board .col-tools,
body.read-only #board .col-resize {
  display: none;
}

body.read-only .content {
  cursor: default;
}
body.columns-held #board .col-tools,
body.columns-held #board .col-resize {
  display: none;
}
body.read-only #board .card.qr:hover .card-icon.flip-mine-icon {
  display: block;
}

/*** THE TWO SWITCHERS ***/

.scheme-switcher,
.lang-switcher {
  position: relative;
  display: inline-flex;
}
.switcher-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15em 0.2em;
  border: 0;
  border-radius: 0.3em;
  background: transparent;
  color: var(--primary-color);
  font: inherit;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.4;
  cursor: pointer;
}

.switcher-current:hover,
.switcher-current[aria-expanded='true'] {
  color: var(--primary-hover);
}
.switcher-current:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.switcher-current .switcher-option-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
}
.switcher-menu[hidden] {
  display: none;
}

.switcher-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  min-width: max-content;
  padding: 3px;
  border: 1px solid var(--board-background-color-outline);
  border-radius: 0.4em;
  background: var(--surface-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.switcher-option {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 0.6em;
  border: 0;
  border-radius: 0.3em;
  background: none;
  color: var(--text-color);
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.switcher-option:hover,
.switcher-option:focus-visible {
  background: var(--board-background-color);
}

.switcher-option[aria-checked='true'] {
  color: var(--surface-color);
  background: var(--primary-color);
}

.link-button {
  background: none;
  border: none;
  padding: 0 0 0 0.5em;
  font: inherit;
  color: var(--secondary-color);
  cursor: pointer;
  text-decoration: underline;
}

.privacy-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.6em;
  font-size: 14px;
}

.privacy-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5em;
  padding: 0.35em 0;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}

.privacy-list:empty {
  display: none;
}

.owner-tag {
  color: var(--primary-color);
  font-style: italic;
}

.privacy-note {
  font-size: 0.85em;
  line-height: 1.4;
  color: var(--muted-color);
  margin: 0.6em 0;
}

.form-error {
  color: var(--secondary-color);
  font-weight: bold;
}
body.admin {
  padding: 0 0 3em;
}

.admin-main {
  padding-top: 1em;
}

.admin-panel {
  margin-bottom: 1.5em;
  padding: 1.2em 1.4em;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 0.6em;
  background: var(--surface-translucent);
}

.admin-panel h2 {
  margin: 0 0 0.8em;
  font-size: 17px;
}

.admin-tabs {
  display: inline-flex;
  gap: 0.5em;
  margin-bottom: 1em;
  padding: 0 0.6em;
  border-radius: 0.5em;
  background: var(--surface-translucent);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.4em 0.2em;
  font: inherit;
  font-weight: bold;
  color: var(--text-color);
  cursor: pointer;
}

.admin-tab[aria-current] {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.admin-toolbar {
  display: flex;
  gap: 1em;
  align-items: center;
}

.admin-count {
  opacity: 0.7;
  font-size: 0.9em;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.4em 0.6em;
  border-bottom: 1px solid var(--board-background-color-outline);
  vertical-align: middle;
}

.admin-table th button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: bold;
  color: var(--primary-color);
  cursor: pointer;
}

.admin-table td button {
  background: none;
  border: 1px solid var(--primary-color);
  border-radius: 0.3em;
  padding: 0.15em 0.6em;
  margin-right: 0.4em;
  font: inherit;
  font-size: 0.9em;
  color: var(--primary-color);
  cursor: pointer;
}

.admin-table td button.danger {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.logout-form {
  margin: 0;
}
.login-main {
  display: flex;
  justify-content: center;
  padding: 2em 0 3em;
}

.account-form {
  width: 100%;
  max-width: 22em;
  padding: 1.6em;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 0.6em;
  background: var(--surface-translucent);
}

.account-form .form-title {
  margin: 0 0 1em;
  font-size: 19px;
}

.account-form .field-label {
  margin-top: 1em;
}

.account-form .btn {
  margin-top: 1.6em;
}

.account-form .form-error {
  margin: 0 0 1em;
  font-size: 14px;
}

.admin-table th.pick,
.admin-table td.pick {
  width: 1.6em;
  padding-right: 0;
}

.admin-table .pick input {
  margin: 0;
  accent-color: var(--primary-color);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  justify-content: flex-end;
}

.backup-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-toolbar .text {
  width: auto;
  min-width: 16em;
  padding: 0.45em 0.65em;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 0.45em;
  background: color-mix(in srgb, var(--text-color) 5%, var(--surface-color));
  color: var(--text-color);
  font: inherit;
  font-size: 14px;
  text-align: left;
}

.admin-toolbar .text::placeholder {
  color: var(--muted-color);
  opacity: 0.75;
}

.admin-toolbar .text:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--primary-color) 25%, transparent);
  outline: none;
}

.account-switcher {
  position: relative;
  display: inline-flex;
}

.account-switcher[hidden] {
  display: none;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--surface-color);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
}

.account-avatar img,
.avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 1em;
  flex-wrap: wrap;
  margin: 0.8em 0;
}

.avatar-large {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-color);
  color: var(--surface-color);
  font-size: 26px;
  font-weight: 700;
}

.avatar-actions {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

.account-avatar:hover,
.account-avatar[aria-expanded='true'] {
  background: var(--primary-hover);
}

.account-menu .switcher-option {
  text-decoration: none;
}

.account-menu .account-logout {
  margin: 0;
}

.account-menu .account-logout .switcher-option {
  width: 100%;
}

.account-menu {
  display: flex;
  align-items: center;
  gap: 0.75em;
  font-size: 13px;
  white-space: nowrap;
}

.account-menu[hidden] {
  display: none;
}

.account-menu a {
  color: var(--primary-color);
}

.account-menu .account-name {
  font-weight: bold;
}

.account-menu form {
  margin: 0;
}

.account-links {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin: 0;
  font-size: 13px;
}
.column-edit-form,
.column-edit-form textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: center;
  overflow: hidden;
  resize: none;
  outline: none;
}
.column-edit-form textarea {
  border-bottom: 1px dashed var(--primary-color);
}
.overlay[hidden] {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.overlay-message {
  max-width: 30em;
  padding: 0.75em 1.25em;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--light-color);
  font-size: 20px;
  text-align: center;
}

.spinner {
  width: 2em;
  height: 2em;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--light-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.card,
.col h2 {
  touch-action: none;
}
button,
a,
.add-post-it {
  touch-action: manipulation;
}

/*** THE CANVAS ***/

.board-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.board-viewport.moving {
  cursor: grabbing;
}

.board-scale {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}
.board-outline {
  position: relative;
}
.board-nav {
  position: absolute;
  right: calc(var(--board-inset-right, 0px) + 10px);
  bottom: calc(var(--board-inset-bottom, 0px) + 10px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.board-map {
  position: absolute;
  left: calc(var(--board-inset-left, 0px) + 10px);
  bottom: calc(var(--board-inset-bottom, 0px) + 10px);
  z-index: 60;
  border: 1px solid var(--board-background-color-outline, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
  background: var(--surface-translucent);
  touch-action: none;
  cursor: pointer;
}

.board-map[hidden] {
  display: none;
}

.board-map-cards {
  display: block;
  border-radius: 3px;
}
.board-map-window {
  position: absolute;
  border: 1px solid var(--primary-color);
  border-radius: 2px;
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
  pointer-events: none;
}
.board-nav-top {
  top: calc(var(--board-inset-top, 0px) + 10px);
  bottom: auto;
}

.history-button {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0;
  border: 1px solid var(--board-background-color-outline, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
  background: var(--surface-translucent);
  color: var(--primary-color);
  box-shadow: 1px 1px 3px #0006;
  cursor: pointer;
}

.history-button:first-of-type {
  margin-left: 14px;
}

.history-button:hover:not(:disabled) {
  background: var(--surface-color);
}

.history-button:disabled {
  opacity: 0.3;
  cursor: default;
}

body.read-only .history-button {
  display: none;
}

body:not(.mind) #tidy,
body.read-only #tidy {
  display: none;
}

.board-nav-button {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--board-background-color-outline, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
  background: var(--surface-translucent);
  color: var(--primary-color);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.board-nav-button:hover {
  background: var(--surface-color);
}
.board-scale #board {
  position: relative;
  width: 100%;
  height: 100%;
}

/*** ON A PHONE ***/

@media (pointer: coarse) and (max-width: 900px) {
  body.board .container {
    max-width: none;
    padding: 0;
  }

  .board-outline {
    border-width: 0;
  }

  .main-header {
    min-height: 0;
    padding: 2px 8px;
    gap: 8px;
  }

  #create-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    justify-content: center;
    gap: 10px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface-translucent);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  }

  #create-card .mini-card {
    width: 56px;
    height: 34px;
  }

  #create-card .sticker-toggle {
    height: 34px;
  }

  #site-menu {
    width: 100%;
  }
}
@media (pointer: coarse) {
  .card.editing .card-icon {
    display: block;
    width: calc(24px / var(--board-scale, 1));
    height: calc(24px / var(--board-scale, 1));
  }
}
#open-nav {
  display: none;
  align-items: center;
  padding: 6px;
  color: var(--primary-color);
}
@media (pointer: coarse) and (max-width: 900px) {
  #open-nav {
    display: flex;
  }
}
#drawer-chrome .header-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  margin: 16px 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

#drawer-chrome .actions {
  justify-content: space-between;
}

#drawer-chrome .actions a {
  padding: 10px 12px;
}

#drawer-chrome .header-row {
  flex-wrap: wrap;
  justify-content: space-between;
}

/*** THE ENTRY EDITOR ***/

.entry-editor[hidden] {
  display: none;
}

.entry-editor {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  background: #0008;
}

.entry-editor-window {
  display: flex;
  flex-direction: column;
  width: min(1100px, 96vw);
  height: min(900px, 92vh);
  background: var(--surface-color);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 24px #0006;
}

.entry-editor-head {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.5em 0.75em;
  border-bottom: 1px solid #0002;
}

.entry-editor-head h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entry-editor-head .btn {
  flex: 0 0 auto;
  width: auto;
  line-height: 1.4em;
  text-decoration: none;
}

.entry-editor-head .tray-close {
  flex: 0 0 auto;
}
.entry-editor-frame {
  flex: 1 1 auto;
  width: 100%;
  border: none;
}

/*** MIND MAPS ***/

.map-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.map-viewport.moving {
  cursor: grabbing;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-select: none;
}

#map input,
#map textarea {
  user-select: text;
  -webkit-user-select: text;
}

.map-links {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: visible;
}

.map-link {
  fill: none;
  stroke: var(--map-link-color);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 1.5px var(--map-link-halo));
}

.map-link[data-style='dashed'] {
  stroke-dasharray: 7 5;
}

.map-link[data-style='dotted'] {
  stroke-dasharray: 2 6;
  stroke-width: 3;
}

.map-link[data-weight='thin'] {
  stroke-width: 1.2;
}
.map-link[data-weight='thick'] {
  stroke-width: 4.5;
}
.map-link[data-weight='heavy'] {
  stroke-width: 8;
}
.map-link[data-weight='huge'] {
  stroke-width: 14;
}

.map-link[data-colour='white'] {
  stroke: var(--map-ink-white);
}
.map-link[data-colour='yellow'] {
  stroke: var(--map-ink-yellow);
}
.map-link[data-colour='green'] {
  stroke: var(--map-ink-green);
}
.map-link[data-colour='blue'] {
  stroke: var(--map-ink-blue);
}
.map-link[data-colour='pink'] {
  stroke: var(--map-ink-pink);
}

.map-nodes {
  position: absolute;
  top: 0;
  left: 0;
}

.node {
  position: absolute;
  z-index: 10;
  min-width: 90px;
  max-width: 320px;
  width: max-content;
  padding: 0.5em 0.75em;
  font-size: 19px;
}

.node.qr {
  min-width: 0;
  max-width: none;
  padding: 0;
  border-radius: 0;
  cursor: grab;
}

.node.qr .content {
  height: 100%;
}

.node.qr .node-flip-mine {
  top: -11px;
  left: 15px;
}

.node.qr .node-flip-all {
  top: -11px;
  left: 41px;
}

.node.qr .node-entry {
  right: -11px;
  bottom: -11px;
}

.node-halo {
  display: none;
  position: absolute;
  inset: -5px;
  z-index: 0;
  background: var(--map-link-color);
  opacity: 0.3;
  pointer-events: none;
}

.node.head .node-halo {
  display: block;
}

.node[data-shape='rounded'] .node-halo {
  border-radius: 19px;
}

.node[data-shape='oval'] .node-halo {
  border-radius: 50%;
}

.node[data-shape='cloud'] .node-halo {
  clip-path: url(#cloud-shape);
}

.node-face {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 4px;
  box-shadow: 1px 1px 3px #0006;
}

.node .content {
  position: relative;
  z-index: 1;
  height: auto;
  padding-top: 0;
  text-align: center;
  color: var(--dark-color);
  cursor: grab;
}

.node .content a,
.node .content a:visited,
.node .content a:hover,
.node .content a:focus,
.node .content a:active {
  color: inherit;
  text-decoration: underline;
}

.node.selected {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.node.target {
  outline: 2px dashed var(--secondary-color);
  outline-offset: 4px;
}

.map-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.node[data-shape='note'] .node-face {
  border-radius: 0;
}

.node[data-shape='note'] {
  width: var(--card-w);
  height: var(--card-h);
  min-width: 0;
  max-width: none;
  padding: 0;
  font-size: 18px;
}

.node[data-shape='note'] .content {
  height: 100%;
  padding: 0.5em 0.75em;
  overflow: hidden;
}

.node[data-shape='rounded'] .node-face {
  border-radius: 14px;
}

.node[data-shape='oval'] {
  padding: 1.1em 1.6em;
}
.node[data-shape='oval'] .node-face {
  border-radius: 50%;
}

.node[data-shape='rectangle'] .node-face {
  border-radius: 0;
}

.node[data-shape='cloud'] {
  max-width: 540px;
  padding: 1.1em 1.5em;
}
.node[data-shape='cloud'] .node-face {
  clip-path: url(#cloud-shape);
  border-radius: 0;
  box-shadow: none;
}

.node-handle {
  position: absolute;
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--background-color);
  background: var(--primary-color);
  box-shadow: 0 1px 2px #0006;
  cursor: crosshair;
  z-index: 20;
}

body:not(.read-only) .node:not(.editing):not(.locked):hover .node-handle,
body:not(.read-only) .node:not(.editing):not(.locked).near .node-handle,
body:not(.read-only) .node:not(.editing):not(.locked).selected .node-handle {
  display: flex;
}

.node-n {
  top: -22px;
  left: calc(50% - 10px);
}
.node-s {
  bottom: -22px;
  left: calc(50% - 10px);
}
.node-e {
  right: -22px;
  top: calc(50% - 10px);
}
.node-w {
  left: -22px;
  top: calc(50% - 10px);
}

.map-linking {
  stroke-dasharray: 6 5;
  opacity: 0.9;
}

.map-links.aside .map-linking {
  stroke: var(--secondary-color);
}

.link-grab {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  pointer-events: stroke;
  cursor: pointer;
}

.map-line .map-link {
  pointer-events: none;
}

.map-line.selected .link-grab {
  stroke: var(--secondary-color);
  stroke-width: 20;
  opacity: 0.35;
}

.node-lock {
  display: none;
  position: absolute;
  left: 0;
  top: -1.6em;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-color);
  white-space: nowrap;
}

.node.locked .node-lock {
  display: flex;
}

.node.locked {
  opacity: 0.75;
}

.node.locked .content {
  cursor: not-allowed;
}

.node-lock .user-face {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.node-icon svg {
  width: 15px;
  height: 15px;
}

.node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--background-color);
  background: var(--primary-color);
  box-shadow: 0 1px 2px #0006;
  cursor: pointer;
}

.node.editing .content {
  overflow: visible;
}

.node .card-edit-form button {
  margin-top: 14px;
}

.node-corner {
  display: none;
  position: absolute;
  z-index: 30;
}

.node-remove {
  top: -11px;
  right: -11px;
  background: var(--secondary-color);
  color: var(--light-color);
}

.node-rotate {
  bottom: -11px;
  left: -11px;
  cursor: grab;
}

.node-edit {
  bottom: -11px;
  right: -11px;
}

.node-rotate,
.node-edit,
.node-entry,
.node-flip-mine,
.node-flip-all,
.line-edit {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background: var(--background-color);
}

body:not(.read-only) .node:not(.editing):not(.locked):hover .node-corner,
body:not(.read-only) .node:not(.editing):not(.locked).near .node-corner,
body:not(.read-only)
  .node:not(.editing):not(.locked)
  .node-corner:focus-visible {
  display: flex;
}

@media (hover: none) {
  body:not(.read-only) .node:not(.editing):not(.locked).selected .node-corner {
    display: flex;
  }
}

.node-fold {
  display: none;
  position: absolute;
  top: -11px;
  left: -11px;
  z-index: 25;
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  color: var(--primary-color);
  background: var(--background-color);
  cursor: pointer;
}

.node.has-children.folded .node-fold,
.node.has-children:hover .node-fold,
.node.has-children.near .node-fold,
.node.has-children.selected .node-fold,
.node.has-children .node-fold:hover,
.node.has-children .node-fold:focus-visible {
  display: flex;
}

.node.has-children.editing .node-fold,
.node.has-children.locked .node-fold {
  display: none;
}

body.read-only .node-remove,
body.read-only .node-rotate,
body.read-only .node-edit {
  display: none;
}

.node.gone {
  visibility: hidden;
}

.node-menu {
  position: absolute;
  top: -46px;
  right: 0;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 6px;
  background: var(--surface-color);
  box-shadow: 0 2px 6px #0007;
  z-index: 40;
}

.map-root {
  r: 3.5;
  fill: var(--map-link-color);
  pointer-events: none;
}

.map-line.selected .map-root {
  fill: var(--secondary-color);
}

.line-tools {
  position: absolute;
  display: flex;
  gap: 4px;
  transform: translate(-50%, -50%);
  z-index: 43;
}

.line-tools .line-cut {
  background: var(--secondary-color);
  color: var(--light-color);
}

.line-grip {
  position: absolute;
  width: 15px;
  height: 15px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid var(--background-color);
  border-radius: 50%;
  background: var(--secondary-color);
  cursor: grab;
  z-index: 44;
}

.map-words {
  font-family: inherit;
  font-size: 16px;
  fill: var(--text-color);
  stroke: var(--map-link-halo);
  stroke-width: 4;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.node-looks {
  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(100% + 28px);
  flex-direction: column;
  gap: 4px;
  transform: translateX(-50%);
}

.line-menu {
  top: auto;
  right: auto;
  transform: translate(-50%, -50%);
  flex-direction: column;
  gap: 4px;
  z-index: 45;
}

.line-words {
  width: 100%;
  min-width: 9em;
  padding: 2px 6px;
  font-size: 13px;
}

.line-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.line-kind,
.line-style,
.line-colour,
.line-weight {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 22px;
  padding: 0;
  border: 2px solid var(--background-color);
  border-radius: 3px;
  background: var(--background-color);
  cursor: pointer;
}

.line-kind.chosen,
.line-style.chosen,
.line-weight.chosen,
.shape-choice.chosen {
  border-color: var(--secondary-color);
}

.colour-choice.chosen,
.line-colour.chosen {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--secondary-color);
}

.line-weight {
  width: 26px;
}

.line-weight-mark {
  width: 18px;
  border-top: 2px solid var(--text-color);
}

.line-thin .line-weight-mark {
  border-top-width: 1px;
}
.line-thick .line-weight-mark {
  border-top-width: 4px;
}
.line-heavy .line-weight-mark {
  border-top-width: 7px;
}
.line-huge .line-weight-mark {
  border-top-width: 11px;
}

.line-colour {
  width: 22px;
  height: 22px;
  border: 1px solid rgb(0 0 0 / 0.18);
  background: var(--map-link-color);
}

.line-ink-white {
  background: var(--map-ink-white);
}
.line-ink-yellow {
  background: var(--map-ink-yellow);
}
.line-ink-green {
  background: var(--map-ink-green);
}
.line-ink-blue {
  background: var(--map-ink-blue);
}
.line-ink-pink {
  background: var(--map-ink-pink);
}

.line-style-mark {
  width: 22px;
  border-top: 2px solid var(--text-color);
}

.line-dashed .line-style-mark {
  border-top-style: dashed;
}

.line-dotted .line-style-mark {
  border-top-style: dotted;
  border-top-width: 3px;
}

.line-kind-mark {
  position: relative;
  width: 22px;
  border-top: 2px solid var(--text-color);
}

.line-parent .line-kind-mark::before {
  content: '';
  position: absolute;
  left: -2px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-color);
}

.line-see .line-kind-mark {
  border-top-style: dotted;
  border-top-width: 3px;
}

.shape-choice,
.colour-choice {
  width: 26px;
  height: 22px;
  padding: 0;
  border: 2px solid var(--primary-color);
  background: var(--post-it-yellow);
  cursor: pointer;
}

.colour-choice {
  width: 22px;
  border: 1px solid rgb(0 0 0 / 0.18);
  border-radius: 3px;
}

.colour-white {
  background: var(--post-it-white);
}
.colour-yellow {
  background: var(--post-it-yellow);
}
.colour-green {
  background: var(--post-it-green);
}
.colour-blue {
  background: var(--post-it-blue);
}
.colour-pink {
  background: var(--post-it-pink);
}

.shape-note {
  border-radius: 0;
  background-size: 5px 5px;
  background-image: repeating-linear-gradient(
    0deg,
    #0002,
    #0002 1px,
    transparent 1px,
    transparent
  );
}
.shape-rounded {
  border-radius: 8px;
}
.shape-rectangle {
  border-radius: 0;
}
.shape-oval {
  border-radius: 50%;
}
.shape-cloud {
  clip-path: url(#cloud-shape);
  border: 0;
  background: var(--primary-color);
}
