/* Audio belongs to the notebook. Decoration never substitutes for a control. */
.capture-tools {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 0;
  margin: 4px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.capture-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  min-height: 64px;
  border: 0;
  background: transparent;
  border-radius: 0;
  color: var(--berry);
  padding: 10px 4px;
  font: 500 13px/1.3 var(--sans);
  gap: 5px;
}
.capture-tool:hover {
  background: var(--pink);
  border-color: var(--line);
}
.capture-tool svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  width: 20px;
  height: 20px;
}
.capture-tool.ambient {
  background: transparent;
  color: var(--green);
}
.capture-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.capture-import button {
  min-height: 44px;
  font-size: 12px;
}
.capture-photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.audio-scrap,.recorder-paper {
  display: block;
  position: relative;
  isolation: isolate;
  margin: 22px 2px 18px;
  padding: 20px 18px 15px;
  background: #faeee9;
  color: #593c48;
  border: 1px solid #e3c9c8;
  border-radius: 3px 15px 12px 5px;
  box-shadow: 0 5px 0 -3px #e7dad2,0 9px 18px -16px #7b5355;
  animation: audio-appear .2s ease-out both;
}
.audio-scrap.ambient,.recorder-paper.ambient {
  background: #f3f0df;
  border-color: #dfd8bd;
  color: #596448;
}
.paper-tape {
  position: absolute;
  top: -8px;
  left: calc(50% - 32px);
  width: 64px;
  height: 20px;
  background: repeating-linear-gradient(0deg,#f0d2d08c 0 2px,#f1ddd19e 2px 4px);
  border: 1px solid #dec8bc7a;
  transform: rotate(-5deg);
  pointer-events: none;
  z-index: 1;
}
.ambient .paper-tape {
  background: repeating-linear-gradient(0deg,#d4d8b699 0 2px,#e8e7cbb3 2px 4px);
}
.audio-scrap h3.audio-label {
  font-weight: 400;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
  flex: 1;
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.audio-play {
  flex: 0 0 44px;
  min-height: 44px;
  color: #fffaf6;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--berry);
}
.ambient .audio-play {
  background: #566545;
}
.audio-play svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.audio-timeline {
  position: relative;
  flex: 1;
  min-width: 50px;
  height: 48px;
}
.audio-wave {
  position: absolute;
  inset: 0;
  --audio-progress: 0%;
  color: #bd8c9b;
  overflow: hidden;
}
.ambient .audio-wave {
  color: #a7ab85;
}
.audio-wave svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  fill: none;
}
.audio-cursor {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--audio-progress);
  background: linear-gradient(90deg,#97596e20,#97596e30);
  border-right: 1px solid currentColor;
  pointer-events: none;
}
.audio-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 48px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.audio-timeline:focus-within {
  outline: 2px solid #97596e;
  outline-offset: 4px;
  border-radius: 4px;
}
.audio-duration {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.4;
  max-width: 75px;
}
.audio-message {
  font-size: 12px;
  line-height: 1.5;
  margin: 7px 0 0;
}
.audio-message:empty {
  display: none;
}
.audio-text {
  border-top: 1px dashed #d5b9bd;
  margin-top: 14px;
  padding-top: 2px;
  font-size: 13px;
}
.ambient .audio-text {
  border-color: #cecdb5;
}
.audio-text summary,.audio-options summary {
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}
.audio-text summary::before {
  content: '+';
  margin-right: 0;
  font-size: 19px;
}
.audio-text[open] summary::before {
  content: '−';
}
.transcript-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.transcript-help,.audio-options p {
  font-size: 12px;
  line-height: 1.6;
  margin: 6px 0 10px;
  color: var(--muted);
}
.transcript-prose {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.75;
}
.transcript-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.transcript-actions button {
  min-height: 44px;
}
.transcript-editor {
  min-height: 130px;
  line-height: 1.65;
  background: #fffcf7;
  font-size: 16px !important;
}
.audio-options {
  margin-top: 3px;
  border-top: 1px dashed #dbc9bd;
  font-size: 12px;
}
.audio-options label {
  display: block;
  margin: 8px 0;
}
.audio-opt {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px !important;
  line-height: 1.6;
  min-height: 44px;
  padding-top: 9px;
}
.audio-opt input {
  width: 18px;
  height: 18px;
  accent-color: #97596e;
  flex-shrink: 0;
  margin: 0;
}
.audio-options .input {
  font-size: 16px !important;
}
.recorder-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}
.recorder-heading>svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.recorder-heading h3 {
  font: 400 24px/1.2 var(--serif);
  margin: 0;
}
.recorder-state {
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  margin: 22px 0 12px;
  min-height: 18px;
}
.recorder-level {
  height: 5px;
  background: #e6d3d2;
  border-radius: 5px;
  overflow: hidden;
  margin: 0 25px;
}
.recorder-level span {
  display: block;
  background: #a46379;
  transform-origin: left;
  transform: scaleX(0);
  height: 100%;
  width: 100%;
  transition: transform 90ms linear;
}
.ambient .recorder-level span {
  background: #74805d;
}
.recorder-time {
  text-align: center;
  font: 400 39px Georgia,serif;
  font-variant-numeric: tabular-nums;
  margin: 18px 0 12px;
}
.recorder-caption {
  text-align: center;
  line-height: 1.6;
  font-size: 12px;
  max-width: 250px;
  margin: 0 auto 12px;
  color: var(--muted);
}
.recorder-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}
.recorder-actions button {
  min-height: 44px;
}
.recorder-privacy {
  line-height: 1.5;
  margin: -6px 0 10px 27px;
  font-size: 12px;
  color: var(--muted);
}
.recording-help {
  font-size: 12px;
  line-height: 1.6;
}
.metadata-suggestions {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 0 0;
  margin: 16px 0 8px;
}
.metadata-suggestions h3 {
  font: 600 13px/1.5 var(--sans);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.metadata-suggestions p {
  line-height: 1.55;
  font-size: 13px;
  margin: 6px 0;
}
.metadata-suggestions select {
  font-size: 16px;
  min-height: 48px;
}
.metadata-suggestions .metadata-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.metadata-actions button {
  min-height: 44px;
  font-size: 13px;
}
.metadata-origin {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.recovery-note {
  padding: 12px;
  border: 1px dashed #c39dac;
  margin: 16px 0;
  background: #fff6ef;
  border-radius: 12px;
}
.recovery-note button {
  min-height: 44px;
  font-size: 12px;
}
.audio-list {
  display: block !important;
}
.media-original-placeholder {
  display: grid;
  place-items: center;
  min-height: 90px;
  font-size: 12px;
  color: #826775;
  background: #f4ece5;
}
.audio-count {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.audio-count svg {
  width: 14px;
  height: 14px;
}
.photo-button .icon {
  pointer-events: none;
}
.capture-tool + .capture-tool {
  border-left: 1px solid var(--line);
}
#attachment-count {
  font-size: 12px;
  color: var(--muted);
}
#attachment-count:empty {
  display: none;
}
.audio-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
}
.audio-heading > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.audio-remove {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  background: transparent;
  display: grid;
  place-items: center;
  color: inherit;
  border-radius: 50%;
  flex: 0 0 44px;
}
.audio-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.metadata-heading > svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.metadata-details {
  font-size: 12px;
  color: var(--muted);
}
.metadata-details summary {
  min-height: 44px;
  cursor: pointer;
  padding: 12px 0;
  line-height: 1.6;
}
.metadata-details p {
  font-size: 12px;
}
.metadata-applied {
  font-size: 12px;
  color: var(--positive);
}
.metadata-applied:empty {
  display: none;
}
@keyframes audio-appear {
  from {
    opacity: 0;
    transform: translateY(6px) rotate(-.4deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width:360px) {
  .capture-tools {
    gap: 0;
  }
  .capture-tool {
    font-size: 12px;
    min-height: 64px;
  }
  .audio-scrap,.recorder-paper {
    padding-left: 12px;
    padding-right: 12px;
  }
  .audio-scrap h3.audio-label {
    font-size: 21px;
  }
  .audio-duration {
    font-size: 10px;
  }
  .recorder-actions {
    gap: 5px;
  }
  .recorder-actions button {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .audio-scrap,.recorder-paper {
    animation: none;
  }
  .recorder-level span {
    transition: none;
  }
}
.reduce-motion .audio-scrap,.reduce-motion .recorder-paper {
  animation: none;
}
.reduce-motion .recorder-level span {
  transition: none;
}
/* Notices never cover the two-row composer footer or intercept touch controls. */
.metadata-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.metadata-heading h3 {
  margin: 0;
}
.metadata-description {
  font-size: 13px;
  line-height: 1.6;
}
