:root {
  color-scheme: light;
  --moss: #1f4d3a;
  --moss-deep: #123327;
  --fern: #4f7b52;
  --leaf: #7ba866;
  --lichen: #d7e5c3;
  --mist: #edf3e7;
  --paper: rgba(255, 255, 250, 0.86);
  --ink: #17251f;
  --muted: #66746a;
  --line: rgba(31, 77, 58, 0.18);
  --shadow: 0 22px 70px rgba(18, 51, 39, 0.18);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(215, 229, 195, 0.78), transparent 34rem),
    linear-gradient(145deg, #f5f7ef 0%, #dfead6 42%, #a7b99a 100%);
  color: var(--ink);
}

button,
textarea,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 4vw, 34px) 42px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--fern);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--moss-deep);
  font-size: clamp(2rem, 7vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 250, 0.55);
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
}

.capture-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 8px 0 14px;
  padding: clamp(18px, 4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 250, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.record-button {
  position: relative;
  display: grid;
  width: clamp(86px, 23vw, 128px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(247, 255, 236, 0.95) 0 34%, transparent 35%),
    conic-gradient(from 120deg, #cbe2a5, #5f8c58, #1f4d3a, #cbe2a5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 16px 38px rgba(18, 51, 39, 0.26);
}

.record-button.recording {
  animation: breathe 1.15s ease-in-out infinite;
}

.record-core {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 24px rgba(123, 168, 102, 0.9);
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

.capture-title {
  color: var(--moss-deep);
  font-size: clamp(1.35rem, 4vw, 2.4rem);
  font-weight: 820;
  line-height: 1;
}

.capture-meta,
.search-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.composer,
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.composer textarea,
.search-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  outline: none;
}

.composer textarea {
  min-height: 86px;
  resize: vertical;
  padding: 14px;
}

.search-row input {
  min-height: 48px;
  padding: 0 14px;
}

.composer button,
.save-edit {
  min-width: 116px;
  border-radius: 8px;
  background: var(--moss);
  color: #fbfff4;
  font-weight: 760;
}

#voiceSearchButton {
  display: grid;
  width: 52px;
  min-height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--moss-deep);
}

#voiceSearchButton.recording {
  background: #8f3d33;
}

.mic-dot {
  width: 14px;
  height: 22px;
  border-radius: 999px;
  background: #fbfff4;
  box-shadow: inset 0 -5px 0 rgba(31, 77, 58, 0.22);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin-top: 20px;
}

.note-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 250, 0.72);
  box-shadow: 0 16px 42px rgba(18, 51, 39, 0.12);
  backdrop-filter: blur(16px);
}

.note-card.quip {
  min-height: 140px;
  background: rgba(238, 246, 225, 0.78);
}

.note-card.long {
  grid-column: span 2;
  min-height: 290px;
}

.note-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.note-title-input,
.note-body-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  outline: none;
}

.note-title-input {
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 820;
}

.note-body-input {
  min-height: 112px;
  resize: vertical;
  line-height: 1.45;
}

.note-title-input:focus,
.note-body-input:focus {
  border-color: var(--line);
  background: rgba(255, 255, 250, 0.58);
}

.note-status {
  color: var(--fern);
  font-size: 0.76rem;
  font-weight: 760;
}

.note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.note-link {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(31, 77, 58, 0.1);
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 720;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.note-audio {
  width: min(100%, 210px);
  height: 34px;
}

.delete-audio {
  border-radius: 8px;
  background: rgba(31, 77, 58, 0.09);
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 760;
  padding: 8px 10px;
}

@media (max-width: 680px) {
  .topbar,
  .capture-panel,
  .composer {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .record-button {
    justify-self: center;
  }

  .composer button {
    min-height: 46px;
  }

  .note-card.long {
    grid-column: span 1;
  }

  .note-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .note-audio {
    width: 100%;
  }
}
