/* Editor layout. On a computer the projects sit on the left and the chosen
   project on the right. On a phone it becomes one column. */

body.editor {
  min-height: 100vh;
  min-height: 100dvh;
}

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.loading {
  color: var(--mute);
  padding: 20px 0;
}

/* Project list */

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--side);
  border-right: 1px solid var(--line);
}

.side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 8px;
}

.side-head h2 {
  font-size: 16px;
  letter-spacing: 0;
}

.round.dark {
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: var(--card);
  box-shadow: none;
}

.round.dark .i {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-item {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
}

.project-item:hover {
  background: rgba(251, 250, 247, 0.6);
}

.project-item.on {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}

.project-item.on::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--acc);
}

.project-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.project-text small {
  display: block;
  font-size: 12px;
  color: var(--mute);
}

.chev {
  width: 16px;
  height: 16px;
  color: var(--faint);
}

.side .new-big {
  display: none;
}

.side .restore {
  margin-top: 12px;
}

.side-warning {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--mute);
}

/* Right-hand side */

.main {
  min-width: 0;
  padding: calc(28px + env(safe-area-inset-top, 0px)) clamp(20px, 3vw, 40px) calc(40px + env(safe-area-inset-bottom, 0px));
}

.welcome {
  max-width: 480px;
  margin: 14vh auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.welcome h1 {
  font-size: 30px;
}

.welcome p {
  color: var(--mute);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
  text-decoration: none;
}

.back:hover {
  color: var(--ink);
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.project-head h1 {
  font-size: 30px;
  overflow-wrap: anywhere;
}

.visibility {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--mute);
}

.tabs {
  display: flex;
  gap: 28px;
  margin: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--mute);
  text-decoration: none;
}

.tabs a .i {
  width: 18px;
  height: 18px;
}

.tabs a.on {
  color: var(--ink);
}

.tabs a.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--acc);
}

/* Points tab */

.points-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.map-box {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  background: var(--map);
  box-shadow: inset 0 0 0 1px var(--line);
}

.points-map {
  position: sticky;
  top: 20px;
  height: calc(100vh - 240px);
  height: calc(100dvh - 240px);
  min-height: 380px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.list-head h2 {
  font-size: 16px;
  letter-spacing: 0;
}

.point-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 16px;
  gap: 12px;
  align-items: center;
  padding: 12px 8px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.point-row:hover,
.point-row.selected {
  background: var(--card);
}

.point-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.point-text small {
  display: block;
  margin-top: 1px;
  font-size: 12.5px;
  color: var(--mute);
}

.num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--card);
  font-size: 12px;
  font-weight: 700;
}

.num.unfinished {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 2.5px var(--warn-dot);
}

.num.draft {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.empty {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--mute);
}

.point-list .help {
  margin-top: 14px;
}

/* Markers on the editor maps */

.num-marker span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--card);
  font: 700 12px/1 var(--font);
  box-shadow: 0 0 0 2px var(--card), 0 3px 8px -3px rgba(0, 0, 0, 0.5);
}

.num-marker.unfinished span {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 2.5px var(--warn-dot), 0 3px 8px -3px rgba(0, 0, 0, 0.5);
}

.num-marker.draft span {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink), 0 3px 8px -3px rgba(0, 0, 0, 0.5);
}

.num-marker.selected span {
  background: var(--acc);
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--card), 0 3px 8px -3px rgba(0, 0, 0, 0.5);
}

.num-marker.other span {
  width: 22px;
  height: 22px;
  font-size: 10.5px;
  background: var(--faint);
  color: var(--card);
}

.spot-marker span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--card), 0 4px 10px -3px rgba(0, 0, 0, 0.5);
}

/* Settings tab */

.settings {
  max-width: 860px;
}

.set-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.set-row:first-child {
  border-top: 0;
  padding-top: 4px;
}

.set-row h2 {
  font-size: 15px;
  letter-spacing: 0;
  padding-top: 10px;
}

.set-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 460px;
}

.inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 15px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
  font-size: 14.5px;
  font-weight: 600;
}

/* Point form: five steps with a progress bar */

.form-page {
  max-width: 980px;
}

.form-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.form-head h1 {
  font-size: 30px;
  overflow-wrap: anywhere;
}

.publish-state {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mute);
}

.publish-state .dot {
  margin-right: 8px;
  vertical-align: 1px;
}

.unsaved {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--acc-soft);
  color: var(--acc-ink);
  font-size: 12px;
  font-weight: 600;
}

.steps ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0 0 6px;
  color: var(--mute);
  text-align: left;
}

.step-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--line2);
}

.step-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}

.step-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.step-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-mark {
  display: inline-flex;
  flex: none;
}

.step-mark .i {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.step:hover .step-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.step.done .step-bar {
  background: var(--ink);
}

.step.done .step-num {
  background: var(--ink);
  color: var(--card);
  box-shadow: none;
}

.step.done .step-mark {
  color: var(--good);
}

.step.current {
  color: var(--ink);
}

.step.current .step-bar {
  background: var(--acc);
}

.step.current .step-num {
  box-shadow: 0 0 0 2px var(--acc);
}

.step.problem {
  color: var(--danger);
}

.step.problem .step-bar {
  background: var(--danger);
}

.step.problem .step-num {
  background: var(--danger);
  color: #FFFFFF;
  box-shadow: none;
}

.step.problem.current .step-num {
  box-shadow: 0 0 0 2px var(--acc);
}

.step-warning {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #FBEAE6;
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
}

.step-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  margin-top: 18px;
  padding: 24px 0 12px;
  border-top: 1px solid var(--line);
}

.page-head h2 {
  margin-bottom: 6px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.page-head h2:focus {
  outline: none;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.req {
  margin-left: 2px;
  color: var(--acc-ink);
  font-size: 1.25em;
  font-weight: 600;
  line-height: 0;
  vertical-align: -0.12em;
}

/* In the editor, messages appear at the top so they never cover the
   buttons at the bottom of the form. */
body.editor .toast {
  top: calc(18px + env(safe-area-inset-top, 0px));
  bottom: auto;
}

/* Parts still missing after Publish was pressed */

.invalid > input,
.invalid > textarea,
.invalid > select,
.invalid .answer-row input[type="text"],
.invalid .answer-inputs input,
.invalid .answer-inputs select,
.invalid .inline input,
.invalid.inline input,
.invalid.clue-controls input {
  box-shadow: inset 0 0 0 2px var(--danger);
  background: #FDF3F1;
}

.invalid > .label,
.coords-row.invalid .coords-value {
  color: var(--danger);
}

.field-problem {
  flex-basis: 100%;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
}

.warning-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--warn);
}

.warning-line .i {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

/* Where it is: the chosen way, then the coordinates, then the map */

.loc-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}

.loc-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink2);
}

.loc-hint .i {
  margin-top: 1px;
  color: var(--acc-ink);
}

.coords-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.coords-value {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.form-map {
  height: 320px;
}

.form-map.tap-mode.leaflet-container {
  cursor: crosshair;
}

.locate-result {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.locate-result.good {
  color: var(--good);
}

.locate-result.poor {
  color: var(--warn);
}

.locate-result.bad {
  color: var(--danger);
}

/* Clues */

/* The fragments run down a line from far away to the spot. The line turns
   from grey to orange as it nears the spot, and each fragment has the same
   number as its ring on the map. */
.clue-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clue-list::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(var(--line2), var(--acc));
}

.clue-row {
  display: grid;
  grid-template-columns: 24px 104px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.clue-row.custom {
  grid-template-columns: 24px minmax(0, 1fr);
}

.clue-body-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.step-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ladder-end {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--mute);
}

.end-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
}

.end-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 2px var(--line2);
}

.ladder-end.spot {
  font-weight: 600;
  color: var(--ink);
}

.ladder-end.spot .end-dot::before {
  width: 14px;
  height: 14px;
  background: var(--acc);
  box-shadow: 0 0 0 4px var(--acc-soft);
}

/* How close visitors must be to the spot. It sits under the end of the
   line, in line with the words beside the dots. */
.spot-range {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -4px;
  padding-left: 34px;
}

.spot-range .inline {
  gap: 8px 10px;
  font-size: 14px;
}

@media (max-width: 560px) {
  /* On a phone the distance sits above the words, so the box stays wide. */
  .clue-row {
    grid-template-columns: 24px minmax(0, 1fr);
    row-gap: 4px;
  }

  .clue-row > .clue-text {
    grid-column: 2;
  }

  .clue-row .clue-distance {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    padding-top: 4px;
  }

  .clue-row .step-dot {
    margin-top: 0;
  }
}

.clue-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.clue-text textarea {
  min-height: 60px;
}

.clue-distance {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 9px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.clue-distance small,
.clue-controls .walk {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--mute);
}

.clue-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 14px;
}

.clue-controls strong {
  font-size: 13px;
}

.pm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--mute);
}

.pm-row .round {
  width: 40px;
  height: 40px;
}

.pm-row .round:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Question */

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  gap: 10px;
  align-items: center;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--mute);
  white-space: nowrap;
  cursor: pointer;
}

.radio input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}

.radio input:checked + span {
  color: var(--ink);
  font-weight: 600;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--mute);
}

.icon-btn:hover {
  background: var(--card);
  color: var(--ink);
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
  background: none;
}

.icon-btn .i {
  width: 18px;
  height: 18px;
}

.answer-inputs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.answer-inputs select {
  width: auto;
  min-width: 150px;
}

.answer-inputs input.year {
  width: 110px;
}

/* Story */

.pictures {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.picture-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.picture-row img {
  width: 76px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--line);
}

.picture-actions {
  display: flex;
  gap: 2px;
}

.file-btn {
  position: relative;
  align-self: flex-start;
  cursor: pointer;
}

.file-btn:focus-within {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.file-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line2);
}

.file-row .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.file-row audio {
  width: 100%;
  height: 40px;
}

.muted {
  color: var(--mute);
}

.uploading {
  font-size: 13px;
  color: var(--mute);
}

/* Save, Publish and Next */

.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.bar-left {
  display: flex;
  gap: 10px;
}

.bar-right {
  margin-left: auto;
}

.bar-note {
  flex: 1;
  text-align: center;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
}

.text-btn .i {
  width: 16px;
  height: 16px;
}

/* Deleting is always shown in red, so it is never tapped by mistake. */
.text-btn.danger,
.text-btn.danger:hover {
  color: var(--danger);
}

.set-row h2.danger-title {
  color: var(--danger);
}

.publish-actions {
  flex-wrap: wrap;
}

/* Phone */

@media (max-width: 899px) {
  .app {
    display: block;
  }

  body[data-view="projects"] .main {
    display: none;
  }

  body:not([data-view="projects"]) .side {
    display: none;
  }

  .side {
    position: static;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
    border-right: 0;
    background: var(--bg);
  }

  .side-head {
    order: -2;
    padding-left: 0;
  }

  .side-head h2 {
    font-size: 28px;
    letter-spacing: -0.03em;
  }

  .side .round.dark {
    display: none;
  }

  .side .new-big {
    display: flex;
  }

  .project-item {
    padding: 14px 4px;
    border-radius: 0;
    border-top: 1px solid var(--line);
  }

  .project-item.on {
    background: none;
    box-shadow: none;
  }

  .project-item.on::before {
    display: none;
  }

  .project-text strong {
    font-size: 16.5px;
  }

  .side-warning {
    margin-top: 8px;
    padding: 10px 13px;
    border: 0;
    border-radius: 14px;
    background: var(--acc-soft);
    color: var(--ink2);
    order: -1;
  }

  .main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .points-grid {
    grid-template-columns: 1fr;
  }

  .points-map {
    position: static;
    height: 240px;
    min-height: 0;
  }

  .set-row,
  .fsec,
  .step-page {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .step-name {
    display: none;
  }

  .seg .i {
    display: none;
  }

  .steps ol {
    gap: 6px;
  }

  .step-label {
    justify-content: center;
  }

  .save-bar .btn {
    min-height: 44px;
    padding: 0 15px;
    font-size: 14px;
  }

  .bar-left {
    gap: 8px;
  }

  .set-row h2 {
    padding-top: 0;
  }

  .project-head h1,
  .form-head h1 {
    font-size: 26px;
  }

  .form-map {
    height: 260px;
  }


}

@media (min-width: 900px) {
  .phone-only {
    display: none !important;
  }
}

/* Search or paste, on the Where it is step */

.find-field {
  width: 100%;
}

.find-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.find-row input {
  flex: 1;
  min-width: 0;
}

.find-row .btn {
  flex: none;
  min-height: 42px;
}

.find-result:empty {
  display: none;
}

.find-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.find-result.good,
.find-result.busy,
.find-result.problem {
  flex-direction: row;
  align-items: flex-start;
}

.find-result.busy {
  color: var(--mute);
}

.find-result.problem {
  color: var(--danger);
}

.place-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.place-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line2);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

.place-choice:hover {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.place-choice .i {
  margin-top: 2px;
}

/* The map on the fragments step */

.clue-map {
  height: 300px;
}

.clue-map-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line2);
  font-size: 14px;
  color: var(--ink2);
}

.ring-label {
  pointer-events: none;
}

.ring-label span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px #6B6862;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.ring-label.on span {
  background: var(--ink);
  color: var(--card);
  box-shadow: none;
}

.ring-label.seen span {
  box-shadow: inset 0 0 0 1px var(--line2);
  font-weight: 600;
  color: var(--mute);
}

@media (max-width: 720px) {
  .clue-map {
    height: 240px;
  }
}

/* Fragment pictures */

.add-frag-picture {
  margin-top: 8px;
}

.frag-picture {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
}

.frag-thumb {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line2);
  color: var(--ink);
}

.frag-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frag-thumb .frag-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.frag-picture-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.frag-icon-name {
  padding-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.frag-picture-actions {
  display: flex;
  gap: 16px;
}

/* The picture picker */

dialog.frag-picker {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.picker-tabs {
  margin: 12px 0 14px;
}

.picker-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.icon-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 12px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line2);
  background: var(--card);
  color: var(--mute);
}

.icon-search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}

.icon-search input:focus {
  outline: none;
}

.icon-search:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* Every group stays in view, wrapping onto a second line when needed,
   because a row that scrolls sideways cannot be moved with a mouse. */
.icon-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.icon-group {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line2);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
}

.icon-group[aria-pressed="true"] {
  background: var(--ink);
  box-shadow: none;
  color: var(--card);
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  align-content: start;
  gap: 8px;
  width: 100%;
  min-height: 300px;
}

.icon-none {
  grid-column: 1 / -1;
  margin: 8px 0;
  font-size: 14px;
  color: var(--mute);
}

.icon-credit {
  margin: 0;
  font-size: 12px;
  color: var(--mute);
}

.icon-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px;
  color: var(--ink2);
}

.icon-choice:hover,
.icon-choice:focus-visible {
  box-shadow: inset 0 0 0 1.5px var(--ink);
  color: var(--ink);
}

.icon-choice .frag-icon {
  width: 40px;
  height: 40px;
}

.icon-choice.current {
  box-shadow: inset 0 0 0 2px var(--acc);
}

.icon-choice span {
  text-align: center;
  line-height: 1.2;
}

.crop-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crop-box {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--line);
  cursor: grab;
  touch-action: none;
}

.crop-box img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.crop-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.crop-zoom input {
  width: 180px;
}
