/* Voice memos use the microphone, then require preview and confirmation. */
html body .app-shell .memory-sound-capture-actions,
html body main.app-shell .memory-sound-capture-actions {
  grid-template-columns: repeat(2, minmax(0, auto)) minmax(0, 1fr);
}

html body .app-shell #memoryForm .memory-sound-capture,
html body main.app-shell #memoryForm#memoryForm .memory-sound-capture {
  margin-top: 4px;
}

html body .app-shell #memoryVoiceRecordButton,
html body main.app-shell #memoryVoiceRecordButton,
html body .app-shell #memoryVoicePickButton,
html body main.app-shell #memoryVoicePickButton {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: rgba(178, 242, 225, 0.4);
  color: #f7fffc;
  background: rgba(255, 255, 255, 0.12);
}

html body .app-shell .memory-voice-recording,
html body main.app-shell .memory-voice-recording,
html body .app-shell .memory-voice-preview,
html body main.app-shell .memory-voice-preview {
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(196, 248, 235, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

html body .app-shell .memory-voice-recording:not([hidden]),
html body main.app-shell .memory-voice-recording:not([hidden]) {
  display: grid;
  grid-template-columns: 10px auto minmax(0, 1fr) auto;
}

html body .app-shell .memory-voice-recording-dot,
html body main.app-shell .memory-voice-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6671;
  box-shadow: 0 0 0 5px rgba(255, 102, 113, 0.15);
}

html body .app-shell .memory-voice-preview:not([hidden]),
html body main.app-shell .memory-voice-preview:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

html body .app-shell .memory-voice-preview audio,
html body main.app-shell .memory-voice-preview audio {
  width: 100%;
  min-width: 0;
}

html body .app-shell .memory-voice-preview > div,
html body main.app-shell .memory-voice-preview > div {
  display: flex;
  gap: 8px;
}

html body .app-shell .memory-voice-attached,
html body main.app-shell .memory-voice-attached {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(196, 248, 235, 0.3);
  border-radius: 14px;
  background: rgba(216, 255, 241, 0.12);
}

html body .app-shell .memory-voice-attached:not([hidden]),
html body main.app-shell .memory-voice-attached:not([hidden]) {
  display: grid;
}

html body .app-shell .memory-voice-attached > span,
html body main.app-shell .memory-voice-attached > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f7fffc;
  font-size: 0.72rem;
}

html body .app-shell .memory-voice-attached audio,
html body main.app-shell .memory-voice-attached audio {
  width: 100%;
  min-width: 0;
  height: 38px;
  color-scheme: light;
}

html body .app-shell #memoryVoiceRemoveButton,
html body main.app-shell #memoryVoiceRemoveButton {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255, 213, 216, 0.34);
  border-radius: 999px;
  color: #fff7f7;
  background: rgba(99, 17, 31, 0.42);
}

html body .app-shell .memory-voice-recording button,
html body main.app-shell .memory-voice-recording button,
html body .app-shell .memory-voice-preview button,
html body main.app-shell .memory-voice-preview button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(218, 255, 244, 0.34);
  border-radius: 999px;
  color: #f7fffc;
  background: rgba(1, 31, 48, 0.46);
}

html body .app-shell #memoryVoiceUseButton,
html body main.app-shell #memoryVoiceUseButton {
  color: #032c3f;
  background: linear-gradient(135deg, #d8fff1, #6cddbf);
}

html body .app-shell #memoryForm .memory-sound-file-hint,
html body main.app-shell #memoryForm#memoryForm .memory-sound-file-hint {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: start;
  max-width: 460px;
  margin: -1px auto 1px;
  gap: 7px;
  color: #647f82;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.42;
  text-align: left;
}

html body .app-shell #memoryForm .memory-sound-file-hint svg,
html body main.app-shell #memoryForm#memoryForm .memory-sound-file-hint svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #168b82;
}

html body .app-shell .memory-capsule-song a,
html body main.app-shell .memory-capsule-song a {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  margin-top: 6px;
  color: #075f6c;
  font-weight: 750;
  text-underline-offset: 3px;
}

html body .app-shell .memory-capsule-audio-start,
html body main.app-shell .memory-capsule-audio-start {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(9, 102, 112, 0.24);
  border-radius: 999px;
  color: #f7fffc;
  font-weight: 760;
  background: linear-gradient(112deg, #00243f 0%, #075965 54%, #0b806e 100%);
}

html body .app-shell .memory-capsule-audio-start[hidden],
html body main.app-shell .memory-capsule-audio-start[hidden] {
  display: none !important;
}

@media (max-width: 680px), (hover: none) and (pointer: coarse) {
  html body .app-shell .memory-sound-capture-actions,
  html body main.app-shell .memory-sound-capture-actions,
  html body .app-shell .memory-voice-preview:not([hidden]),
  html body main.app-shell .memory-voice-preview:not([hidden]),
  html body .app-shell .memory-voice-attached:not([hidden]),
  html body main.app-shell .memory-voice-attached:not([hidden]) {
    grid-template-columns: 1fr;
  }

  html body .app-shell #memoryVoiceRecordButton,
  html body main.app-shell #memoryVoiceRecordButton,
  html body .app-shell #memoryVoicePickButton,
  html body main.app-shell #memoryVoicePickButton {
    width: 100%;
  }
}
