:root {
  --paper: #f4f0e8;
  --paper-deep: #ebe4d8;
  --ink: #162a35;
  --muted: #6c7678;
  --line: rgba(22, 42, 53, 0.14);
  --card: #fffdf8;
  --coral: #e7664d;
  --coral-dark: #c94f38;
  --violet: #6558a6;
  --moss: #697b5b;
  --shadow: 0 22px 60px rgba(35, 42, 38, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #11191d;
  --paper-deep: #1a252a;
  --ink: #eef2ec;
  --muted: #9eaaa8;
  --line: rgba(238, 242, 236, 0.13);
  --card: #182329;
  --coral: #f17a62;
  --coral-dark: #ff927b;
  --violet: #9d91dd;
  --moss: #a3b790;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 20%, rgba(231, 102, 77, 0.08), transparent 24rem),
    radial-gradient(circle at 94% 84%, rgba(101, 88, 166, 0.08), transparent 25rem),
    var(--paper);
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
input[type="checkbox"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(231, 102, 77, 0.28);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  width: min(1520px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 500px) 1fr;
  align-items: center;
  min-height: 82px;
  padding: 14px clamp(22px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 232, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  width: max-content;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
  text-decoration: none;
}

.brand span {
  color: var(--coral);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.68);
  transition: border-color 160ms ease, background 160ms ease;
}

.header-search:focus-within {
  border-color: rgba(231, 102, 77, 0.35);
  background: var(--card);
}

.header-search > span {
  font-size: 1.5rem;
  line-height: 0;
  transform: rotate(-18deg);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.95rem;
}

.header-search kbd {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--paper);
  font-family: inherit;
  font-size: 0.7rem;
  white-space: nowrap;
}

.logout-form {
  margin: 0;
}

.top-actions {
  display: flex;
  justify-self: end;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 1.3rem;
  transition: transform 150ms ease, background 150ms ease;
}

.icon-button:hover {
  background: var(--card);
  transform: translateY(-1px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(460px, 1.16fr);
  min-height: calc(100vh - 82px);
}

.capture-column,
.notes-column {
  padding: clamp(34px, 5vw, 74px) clamp(22px, 5vw, 78px) 80px;
}

.capture-column {
  border-right: 1px solid var(--line);
}

.intro {
  max-width: 520px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.intro h1,
.login-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5.6vw, 5.7rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.91;
}

.intro > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.composer {
  max-width: 620px;
  overflow: hidden;
  border: 1px solid rgba(22, 42, 53, 0.1);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(235, 228, 216, 0.62);
}

.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 8px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 0.83rem;
  font-weight: 750;
}

.mode-tab.active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 4px 14px rgba(22, 42, 53, 0.08);
}

.mode-symbol {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 0.74rem;
}

#note-form {
  padding: 22px;
}

.field,
.mode-panel {
  margin-bottom: 14px;
}

label:not(.check-row) {
  display: block;
  margin: 0 0 7px;
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.03em;
}

label span {
  color: var(--muted);
  font-weight: 500;
}

input[type="text"],
input[type="password"],
.field input[type="datetime-local"],
.field select,
.edit-dialog input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: rgba(244, 240, 232, 0.42);
  transition: border-color 160ms ease, background 160ms ease;
}

input[type="text"],
input[type="password"],
.field input[type="datetime-local"],
.field select,
.edit-dialog input {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 116px;
  padding: 14px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(231, 102, 77, 0.5);
  background: #fff;
}

.organize-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(170px, 1.3fr);
  gap: 10px;
}

.organize-row .field {
  min-width: 0;
}

.field select {
  width: 100%;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.reminder-details {
  margin: 2px 0 16px;
  border-bottom: 1px solid var(--line);
}

.reminder-details summary {
  width: max-content;
  margin-bottom: 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  list-style: none;
}

.reminder-details summary::-webkit-details-marker {
  display: none;
}

.reminder-details[open] summary {
  color: var(--coral-dark);
}

.composer-hint {
  margin: -30px 12px 12px auto;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: right;
  pointer-events: none;
}

.composer-hint span {
  color: var(--ink);
  font-weight: 700;
}

.save-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 53px;
  margin-top: 18px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font-weight: 780;
  transition: transform 160ms ease, background 160ms ease;
}

.save-button:hover {
  background: #213d4b;
  transform: translateY(-1px);
}

.save-button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.save-button > span:last-child {
  color: #fff;
  font-size: 1.4rem;
}

.recorder {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.record-button {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: rgba(231, 102, 77, 0.14);
}

.record-button span {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(231, 102, 77, 0.12);
}

.recorder.recording .record-button span {
  border-radius: 5px;
  animation: pulse 1.25s infinite;
}

.record-status {
  display: grid;
  gap: 3px;
}

.record-status strong {
  font-size: 0.88rem;
}

.record-status span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 38px;
}

.wave i {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 4px;
  background: var(--coral);
  opacity: 0.38;
}

.recorder.recording .wave i {
  animation: wave 0.75s ease-in-out infinite alternate;
}

.wave i:nth-child(2n) { animation-delay: -0.22s !important; }
.wave i:nth-child(3n) { animation-delay: -0.46s !important; }

@keyframes wave {
  to { height: 34px; opacity: 1; }
}

@keyframes pulse {
  50% { transform: scale(0.78); }
}

#audio-preview {
  width: 100%;
  margin: 12px 0 2px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 0.82rem;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--coral);
}

.check-row span {
  display: grid;
  gap: 3px;
  color: var(--ink);
}

.check-row small,
.support-note {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.support-note {
  min-height: 1em;
  margin: 8px 2px 0;
}

.photo-drop {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 100%;
  min-height: 178px;
  padding: 24px;
  border: 1px dashed rgba(22, 42, 53, 0.3);
  border-radius: 17px;
  background: var(--paper);
}

.photo-drop:hover {
  border-color: var(--coral);
}

.photo-drop strong {
  font-size: 0.9rem;
}

.photo-drop small {
  color: var(--muted);
  font-size: 0.7rem;
}

.camera-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 1.4rem;
}

.photo-preview {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 17px;
  background: var(--paper-deep);
}

.photo-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.remove-photo {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-size: 0.72rem;
  font-weight: 700;
}

.notes-column {
  background: rgba(255, 253, 248, 0.34);
}

.notes-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.notes-heading h2,
.dialog-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 3.3vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}

.note-count {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.filter-row {
  display: flex;
  gap: 5px;
  margin: 30px 0 24px;
  padding-bottom: 12px;
  overflow-x: auto;
}

.view-row {
  display: flex;
  gap: 5px;
  margin: 30px 0 8px;
  padding-bottom: 8px;
  overflow-x: auto;
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.view-tab span {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(22, 42, 53, 0.08);
  font-size: 0.63rem;
}

.view-tab.active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 7px 20px rgba(22, 42, 53, 0.08);
}

.view-tab.active span {
  color: #fff;
  background: var(--coral);
}

.filter {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.filter.active {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 205px;
  padding: 19px;
  overflow: hidden;
  border: 1px solid rgba(22, 42, 53, 0.1);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(35, 42, 38, 0.06);
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.note-card:hover {
  z-index: 2;
  box-shadow: 0 18px 36px rgba(35, 42, 38, 0.1);
  transform: translateY(-3px) rotate(-0.25deg);
}

.note-card:nth-child(4n + 2) {
  background: #f1ede1;
}

.note-card.kind-audio {
  background: #e9e6f2;
}

.note-card.kind-photo {
  padding: 0;
  background: #dfe8da;
}

.note-card.pinned::before {
  position: absolute;
  z-index: 2;
  top: -9px;
  right: 24px;
  width: 7px;
  height: 26px;
  border-radius: 5px;
  background: var(--coral);
  content: "";
  transform: rotate(9deg);
}

.note-card.favorite {
  border-color: rgba(231, 102, 77, 0.35);
}

.note-card.reminder-due {
  box-shadow: inset 0 0 0 2px var(--coral), 0 10px 30px rgba(35, 42, 38, 0.06);
}

.photo-card-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.photo-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px 19px 19px;
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.type-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.kind-audio .type-dot { background: var(--violet); }
.kind-photo .type-dot { background: var(--moss); }

.note-time {
  color: var(--muted);
  font-size: 0.67rem;
}

.note-card h3 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.note-copy {
  display: -webkit-box;
  margin: 0 0 16px;
  overflow: hidden;
  color: #445256;
  font-size: 0.83rem;
  line-height: 1.55;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: -6px 0 13px;
}

.category-pill,
.tag-pill,
.reminder-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(22, 42, 53, 0.07);
  font-size: 0.62rem;
  font-weight: 750;
}

.category-pill {
  color: var(--ink);
  background: rgba(231, 102, 77, 0.12);
}

.reminder-pill {
  color: var(--coral-dark);
  background: rgba(231, 102, 77, 0.12);
}

.insight-box {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(101, 88, 166, 0.16);
  border-radius: 12px;
  background: rgba(101, 88, 166, 0.08);
}

.insight-box strong {
  color: var(--violet);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
}

.insight-box p,
.insight-box ul {
  margin: 0;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.45;
}

.insight-box ul {
  display: grid;
  gap: 4px;
  padding-left: 17px;
}

.note-card audio {
  width: 100%;
  height: 38px;
  margin: 2px 0 13px;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 42, 53, 0.08);
  flex-wrap: wrap;
}

.note-action {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 700;
}

.note-action:hover {
  color: var(--ink);
  background: rgba(22, 42, 53, 0.06);
}

.note-action.delete {
  margin-left: auto;
}

.note-action.favorite-active {
  color: var(--coral-dark);
}

.note-action.delete:hover {
  color: var(--coral-dark);
}

.loading-card {
  min-height: 215px;
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, #ece7dc 20%, #f8f4ec 35%, #ece7dc 50%);
  background-size: 240% 100%;
  animation: loading 1.2s ease-in-out infinite;
}

@keyframes loading {
  to { background-position-x: -240%; }
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
}

.empty-mark {
  margin-bottom: 10px;
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 3rem;
}

.empty-state h3 {
  margin: 0 0 7px;
  font-family: Georgia, serif;
  font-size: 1.6rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 17px;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--coral-dark);
}

.edit-dialog {
  width: min(620px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 28px 90px rgba(22, 42, 53, 0.28);
}

.edit-dialog::backdrop {
  background: rgba(22, 42, 53, 0.48);
  backdrop-filter: blur(5px);
}

.edit-dialog form {
  display: grid;
  gap: 8px;
  padding: 28px;
}

.edit-organize-row {
  margin-top: 8px;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 8% 20%, rgba(241, 122, 98, 0.09), transparent 24rem),
    radial-gradient(circle at 94% 84%, rgba(157, 145, 221, 0.09), transparent 25rem),
    var(--paper);
}

:root[data-theme="dark"] .topbar {
  background: rgba(17, 25, 29, 0.88);
}

:root[data-theme="dark"] .notes-column {
  background: rgba(255, 255, 255, 0.018);
}

:root[data-theme="dark"] .note-card:nth-child(4n + 2) {
  background: #1d292e;
}

:root[data-theme="dark"] .note-card.kind-audio {
  background: #24253a;
}

:root[data-theme="dark"] .note-card.kind-photo {
  background: #253229;
}

:root[data-theme="dark"] .note-copy {
  color: #bec8c5;
}

:root[data-theme="dark"] .header-search,
:root[data-theme="dark"] .mode-tabs,
:root[data-theme="dark"] .recorder,
:root[data-theme="dark"] .photo-drop,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background-color: rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] .view-tab span,
:root[data-theme="dark"] .category-pill,
:root[data-theme="dark"] .tag-pill {
  background-color: rgba(255, 255, 255, 0.08);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.dialog-head h2 {
  font-size: 2.4rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.button {
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 760;
}

.button.primary {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.button.ghost {
  background: transparent;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(330px, 0.95fr) minmax(380px, 1.05fr);
  width: min(1080px, 100%);
  min-height: 640px;
  overflow: hidden;
  border: 1px solid rgba(22, 42, 53, 0.12);
  border-radius: 34px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 6vw, 76px);
}

.brand-login {
  margin-bottom: auto;
}

.login-card h1 {
  font-size: clamp(3.5rem, 6vw, 5.7rem);
}

.login-copy {
  max-width: 340px;
  margin: 20px 0 35px;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  margin-bottom: auto;
}

.password-row {
  display: flex;
  gap: 8px;
}

.password-row input {
  flex: 1;
  min-width: 0;
}

.form-error {
  margin: 10px 0 0;
  color: var(--coral-dark);
  font-size: 0.8rem;
  font-weight: 650;
}

.login-foot {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.login-art {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.1), transparent 45%),
    var(--ink);
}

.login-art::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 25px 25px;
  content: "";
}

.floating-note {
  position: absolute;
  z-index: 2;
  width: 230px;
  padding: 20px;
  border-radius: 17px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  font-family: Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.2;
}

.floating-note span {
  display: block;
  margin-bottom: 12px;
  color: var(--coral-dark);
  font-family: Inter, sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.note-one {
  top: 25%;
  left: 14%;
  transform: rotate(-7deg);
}

.note-two {
  right: 9%;
  bottom: 21%;
  background: #e5e0ef;
  transform: rotate(6deg);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.orbit-one {
  top: -80px;
  right: -110px;
  width: 390px;
  height: 390px;
}

.orbit-two {
  bottom: -190px;
  left: -160px;
  width: 520px;
  height: 520px;
}

@media (max-width: 1060px) {
  .workspace {
    grid-template-columns: minmax(330px, 0.9fr) minmax(360px, 1.1fr);
  }

  .capture-column,
  .notes-column {
    padding-right: 34px;
    padding-left: 34px;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 68px;
    padding: 11px 18px;
  }

  .brand {
    font-size: 2rem;
  }

  .header-search {
    position: absolute;
    top: 79px;
    right: 18px;
    left: 18px;
    display: none;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
  }

  .header-search.mobile-open {
    display: flex;
  }

  .logout-button {
    width: 38px;
    height: 38px;
  }

  .top-actions {
    gap: 6px;
  }

  .workspace {
    display: block;
  }

  .capture-column,
  .notes-column {
    padding: 38px 18px 56px;
  }

  .capture-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .intro h1 {
    font-size: clamp(3.1rem, 15vw, 4.5rem);
  }

  .composer {
    border-radius: 22px;
  }

  #note-form {
    padding: 17px;
  }

  .organize-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .view-row {
    margin-top: 24px;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .note-card {
    min-height: 190px;
  }

  .toast {
    right: 18px;
    bottom: 18px;
    left: 18px;
    max-width: none;
  }

  .login-page {
    padding: 0;
  }

  .login-shell {
    display: block;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-card {
    min-height: 100vh;
    padding: 32px 24px;
  }

  .brand-login {
    margin-bottom: 90px;
  }

  .login-card h1 {
    font-size: clamp(3.5rem, 17vw, 5.3rem);
  }

  .login-form {
    margin-bottom: 0;
  }

  .login-art {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
