.capture-host {
  position: absolute;
  top: var(--s6);
  right: 0;
  z-index: 20;
  perspective: 900px;
}

/* Was a vertical paper tab, so it carried tall side rules and a 9rem minimum
   height. As a horizontal control it only needs to look like a button. */
.capture-tab {
  padding: 7px var(--s3);
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}

/* Press moves the box onto its own shadow. Cheap, physical, and it only happens
   in response to the pointer. */
.capture-tab:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.capture-tab:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--line);
}

.capture-panel {
  width: min(27rem, calc(100vw - 2rem));
  padding: 1rem 1.1rem 0.8rem;
  border-left: 1px solid var(--line);
  /* Opaque: a strip of paper laid on the desk. Translucent let the row text
     underneath bleed through the writing surface, which read as a broken modal. */
  background: var(--surface-2);
  transform-origin: top;
}

/* Wide viewports have a whole empty mounting margin to the right, so the strip
   unrolls INTO it rather than over the collection. The tab itself stays put —
   it is the affordance, and it belongs beside the content, not at the far edge. */
@media (min-width: 1200px) {
  .capture-panel {
    position: absolute;
    top: 0;
    left: 100%;
  }
}

.capture-panel.is-folding {
  animation: tanzaku-fold 320ms var(--ease) both;
}

@keyframes tanzaku-fold {
  to {
    opacity: 0;
    transform: rotateX(82deg);
  }
}

.capture-panel textarea {
  width: 100%;
  min-height: 13rem;
  resize: vertical;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background:
    repeating-linear-gradient(to bottom, transparent 0 2rem, color-mix(in oklab, var(--line) 42%, transparent) calc(2rem + 1px));
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 2rem;
}

.capture-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.8rem;
}

.primary-action {
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--accent);
  border-radius: 0;
  color: var(--surface);
  background: var(--accent);
  cursor: pointer;
}
