/* A marker is a strip of masking tape stuck across the cork with a beat written on it in pen.
   It takes a row of the board to itself, so the cards under it start a new row. */
.marker {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  min-width: 0;
  margin: 0.25rem 0 -0.75rem;
  cursor: grab;
}

.marker__tape {
  --tape: #efe4c4;
  max-width: min(36rem, 100%);
  padding: 0.45rem 1.4rem 0.5rem;
  background: var(--tape);
  color: #2b2418;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.3);
  clip-path: polygon(0 4%, 2% 0, 98% 6%, 100% 0, 99% 50%, 100% 96%, 97% 100%, 3% 94%, 0 100%, 1% 50%);
  transform: rotate(-0.6deg);
}

.marker:nth-child(odd) .marker__tape { transform: rotate(0.5deg); }

.marker__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.7rem; margin: 0; }
.marker__name { font-family: var(--font-hand); font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.marker__pages { display: inline-flex; flex-wrap: wrap; gap: 0 0.6rem; font-size: 0.8rem; }
.marker__target { font-weight: 700; }
.marker__lands { color: #5a4f3c; }
.marker__title--off .marker__lands { padding: 0 0.35em; border-radius: 3px; background: #f2b33d; color: #2b1a00; font-weight: 700; }

.marker__guidance {
  display: -webkit-box;
  margin: 0.15rem 0 0;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marker__actions { display: flex; gap: 0.35rem; }
.marker__button {
  padding: 0.25em 0.6em;
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: 999px;
  background: rgb(43 31 24 / 0.55);
  color: #fff8e8;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.marker__button:hover { background: rgb(43 31 24 / 0.8); }

/* No card between this marker and the next, or the end of the board. */
.marker__empty { display: none; flex-basis: 100%; margin: 0.4rem 0 0 1.4rem; color: #3b2814; font-family: var(--font-hand); font-size: 1.05rem; }
.marker:not(:has(+ .card, + .card-slot)) .marker__empty { display: block; }

.marker__editor {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 0;
  border-radius: 6px;
  background: var(--chrome);
  color: var(--desk);
  box-shadow: 0 12px 36px rgb(0 0 0 / 0.5);
  cursor: auto;
}
.marker__editor::backdrop { background: rgb(0 0 0 / 0.35); }
.marker__form { display: grid; gap: 0.3rem; }
.marker__form input, .marker__form textarea { width: 100%; font: inherit; }
.marker__label { margin-top: 0.4rem; font-size: 0.8rem; font-weight: 700; }
.marker__form-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.marker__form-actions .button--quiet { color: var(--desk); border-color: var(--desk); }
.marker__remove { margin-top: 0.75rem; padding: 0; border: 0; background: none; color: #a3261c; font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }

.marker.card--ghost .marker__tape { opacity: 0.4; }

/* The Structure menu: the structures to lay out, then markers by hand. */
.structure-menu__items { min-width: 16rem; }
.structure-menu__items form:not(.structure-menu__save) { display: contents; }
.structure-menu__choice {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.45em 0.7em;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--desk);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.structure-menu__choice:hover { background: var(--chrome-muted); }
.structure-menu__count { color: #6b5b45; font-size: 0.8em; }
.structure-menu__author { color: #6b5b45; font-size: 0.85em; }
.structure-menu__credit { max-width: 16rem; margin: 0.4rem 0.7rem 0.2rem; color: #6b5b45; font-size: 0.72rem; line-height: 1.35; }
.structure-menu__heading { display: block; margin: 0.4rem 0.7rem 0.2rem; color: #6b5b45; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.structure-menu__rule { width: 100%; margin: 0.3rem 0; border: 0; border-top: 1px solid var(--chrome-muted); }
.structure-menu__save { padding: 0 0 0.3rem; }
.structure-menu__row { display: flex; gap: 0.4rem; margin: 0 0.7rem; }
.structure-menu__row input[type=text] { flex: 1; min-width: 0; font: inherit; }

/* On a phone the menu opens inside the ☰ menu, light on dark. */
@media (max-width: 40rem) {
  .bar-menu .structure-menu__choice { color: var(--chrome); }
  .bar-menu :is(.structure-menu__heading, .structure-menu__count, .structure-menu__author, .structure-menu__credit) { color: var(--chrome-muted); }
  .bar-menu .structure-menu__items { max-width: calc(100vw - 4.5rem); }
  .bar-menu .structure-menu__choice { white-space: normal; }
  .bar-menu .structure-menu__row { margin-inline: 0.75em; }
  .bar-menu .structure-menu__row input[type=text] { flex: 1 1 9rem; }
  .bar-menu .structure-menu__row .button { flex: none; width: auto; border: 1px solid var(--chrome-muted); }
}

@media (min-width: 40.01rem) {
  .structure-menu .menu__items { left: 0; right: auto; }
}

/* Saved structures. */
.structures__list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.structures__item { padding: 0.75rem 0 1rem; border-bottom: 1px solid var(--chrome-muted); }
.structures__points { margin: 0.4rem 0 0.6rem; color: var(--chrome-muted); font-size: 0.85rem; }
.structures__row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.structures__row input[type=text] { flex: 1; min-width: 12rem; font: inherit; }

/* Reports */
.report__off { color: #f2b33d; font-weight: 700; }
