/* app.manjulika.com: a person's own pages. The look of manjulika.com (its style.css): Bricolage
   Grotesque for headings, labels and buttons; the system font for note text and inputs, because
   the Bricolage subset has no ₹ and no Indian scripts. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/bricolage.woff2') format('woff2');
  font-weight: 400 800;
  font-stretch: 92% 100%;
  font-display: swap;
}
/* Until it arrives, Arial (Apple, Windows) or Roboto (Android), scaled to take the same room. */
@font-face {
  font-family: 'Bricolage Fallback';
  src: local('Arial'), local('ArialMT');
  font-weight: 300 550;
  size-adjust: 100.83%;
  ascent-override: 92.24%;
  descent-override: 26.78%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Bricolage Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT');
  font-weight: 551 690;
  size-adjust: 96.62%;
  ascent-override: 96.25%;
  descent-override: 27.94%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Bricolage Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT');
  font-weight: 691 900;
  size-adjust: 87.96%;
  ascent-override: 105.73%;
  descent-override: 30.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Bricolage Fallback Android';
  src: local('Roboto'), local('Roboto-Regular');
  font-weight: 300 550;
  size-adjust: 103.82%;
  ascent-override: 89.58%;
  descent-override: 26.01%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Bricolage Fallback Android';
  src: local('Roboto Bold'), local('Roboto-Bold');
  font-weight: 551 690;
  size-adjust: 103.64%;
  ascent-override: 89.73%;
  descent-override: 26.05%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Bricolage Fallback Android';
  src: local('Roboto Bold'), local('Roboto-Bold');
  font-weight: 691 900;
  size-adjust: 93.65%;
  ascent-override: 99.3%;
  descent-override: 28.83%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --ink: #1b1d33;
  --muted: #5a5d7a;
  --label: #4a43b4;
  --indigo: #2a2660;
  --lavender: #c7c2f3;
  --lav-soft: #efedfb;
  --tint: #f5f3fd;
  --card: #f5f3fd;
  --line: #82849e;
  --hair: #e6e6ef;
  --err: #b4232c;
  --btn-bg: #2a2660;
  --btn-ink: #ffffff;
  --focus: #2a2660;
  --hover: #efedfb;
  --selected: #c7c2f3;
  --code-bg: #efedfb;
  --chip: #ffffff;
  --shadow: 0 1px 2px rgba(27, 29, 51, 0.06), 0 14px 36px -12px rgba(27, 29, 51, 0.3);
  --scrim: rgba(27, 29, 51, 0.4);
  --brand:
    'Bricolage Grotesque', 'Bricolage Fallback', 'Bricolage Fallback Android', system-ui, sans-serif;
  --text:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r: 28px;
  --top-h: 60px;
  --col: 760px;
  --wide: 1040px;
  --gutter: 16px;
}
/* Deep indigo, never black. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13112c;
    --ink: #f1effc;
    --muted: #b4b1d8;
    --label: #c7c2f3;
    --lav-soft: #1e1a4a;
    --tint: #19163d;
    --card: #1e1a4a;
    --line: #77739f;
    --hair: #2c2858;
    --err: #ff8a8a;
    --btn-bg: #c7c2f3;
    --btn-ink: #1b1d33;
    --focus: #c7c2f3;
    --hover: #2c2858;
    --selected: #3a3672;
    --code-bg: #2c2858;
    --chip: #13112c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 44px -12px rgba(0, 0, 0, 0.75);
    --scrim: rgba(8, 7, 24, 0.62);
  }
}
@media (min-width: 640px) {
  :root {
    --gutter: 24px;
    --top-h: 64px;
  }
}

* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html:has(dialog[open]) {
  overflow: hidden;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--brand);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a:focus-visible {
  border-radius: 4px;
}
[tabindex='-1']:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-variation-settings:
    'wdth' 92,
    'opsz' 72;
  text-wrap: balance;
}
p {
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.label {
  margin: 0 0 10px;
  font: 650 13px/1.3 var(--brand);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i-more {
  stroke-width: 3.4;
}

/* Buttons: pills, as on manjulika.com */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: var(--btn-bg);
  color: var(--btn-ink);
  text-decoration: none;
  font: 600 17px/1.2 var(--brand);
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.button .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}
@media (hover: hover) {
  .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -14px rgba(42, 38, 96, 0.65);
  }
  .button.secondary:hover {
    box-shadow: inset 0 0 0 1px var(--ink);
    transform: none;
  }
}
.button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}
.button.secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.button.small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 15px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
@media (hover: hover) {
  .icon-button:hover {
    background: var(--tint);
  }
}
.icon-button[aria-expanded='true'] {
  background: var(--lav-soft);
}
.text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  margin-right: -10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: 600 15px/1 var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.text-button.danger {
  color: var(--err);
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 64px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  cursor: pointer;
  font: 600 15px/1 var(--brand);
}
@media (hover: hover) {
  .chip:hover {
    border-color: var(--line);
  }
}

/* Inputs: the system font, so ₹ and every script show */
.field,
.sheet input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.3 var(--text);
}
.field::placeholder,
.sheet input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.field:focus-visible,
.sheet input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.field[aria-invalid='true'],
.sheet input[aria-invalid='true'] {
  border-color: var(--err);
}
.error {
  color: var(--err);
  font-size: 15px;
}
.error:empty {
  display: none;
}

/* Top bar: menu on the left, her name in the middle */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.top.is-scrolled {
  border-bottom-color: var(--hair);
}
.top-inner {
  max-width: calc(var(--wide) + 2 * var(--gutter));
  height: var(--top-h);
  margin: 0 auto;
  padding: 0 calc(var(--gutter) - 6px);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}
.top [data-off] {
  visibility: hidden;
}
.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  font: 700 21px/1 var(--brand);
  letter-spacing: -0.02em;
  font-variation-settings:
    'wdth' 96,
    'opsz' 36;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.top-start {
  display: flex;
}
.top-back {
  display: none;
}
/* Inside a note (owner, 3 Nov: notes need space on a phone, the name is a distraction): a slim
   bar over the note's own column, with a way back to the notes instead of the menu. */
body[data-page='note'] {
  --top-h: 48px;
}
body[data-page='note'] .top-inner {
  max-width: calc(var(--col) + 2 * var(--gutter));
}
body[data-page='note'] .top .brand,
body[data-page='note'] #menu-button {
  display: none;
}
body[data-page='note'] .top-back {
  display: inline-grid;
}
body[data-page='note'] .top-end {
  grid-column: 3;
}
body.bare .top {
  display: none;
}
.top-end {
  position: relative;
  justify-self: end;
}

/* Page columns */
.page {
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 20px var(--gutter) 72px;
}
.page.wide {
  max-width: calc(var(--wide) + 2 * var(--gutter));
}
@media (min-width: 640px) {
  .page {
    padding-top: 36px;
  }
}
.head h1 {
  font-size: clamp(38px, 9vw, 54px);
}
.head .sub {
  margin-top: 10px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}
.rule {
  height: 1px;
  margin: 22px 0;
  border: 0;
  background: var(--hair);
}
.msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--tint);
  font-size: 16px;
}
.msg p {
  flex: 1 1 220px;
}
.quiet {
  color: var(--muted);
  font-size: 16px;
  padding: 8px 0;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px 16px 24px;
  text-align: center;
  color: var(--muted);
}
.empty img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}
.empty p {
  max-width: 34ch;
  font-size: 17px;
}

/* Notes: a calm masonry of cards, in date order for keyboards and screen readers */
.tools {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search {
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 0;
}
.search .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search .field {
  padding-left: 44px;
}
.search .field::-webkit-search-cancel-button {
  cursor: pointer;
}
.tools .button {
  flex: none;
  min-height: 52px;
  padding: 12px 20px;
}
@media (max-width: 400px) {
  .tools {
    gap: 8px;
  }
  .tools .button {
    padding: 12px 16px;
    gap: 6px;
  }
  .search .field {
    padding-right: 10px;
  }
}
.grid {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 2px;
  column-gap: 12px;
  align-items: start;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    column-gap: 16px;
    margin-top: 24px;
  }
}
.grid > li {
  min-width: 0;
}
.card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
@media (hover: hover) {
  .card:hover {
    box-shadow: 0 0 0 1px var(--lavender);
    transform: translateY(-1px);
  }
}
.card:focus-visible {
  outline-offset: 2px;
  border-radius: 22px;
}
.card .pic {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--lav-soft);
}
.card-body {
  padding: 14px 16px 14px;
}
.card h2 {
  font: 650 18px/1.22 var(--brand);
  letter-spacing: -0.015em;
  font-variation-settings:
    'wdth' 96,
    'opsz' 24;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.card .snip {
  margin-top: 6px;
  font: 400 15px/1.45 var(--text);
  white-space: pre-line;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
}
.card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}
.card .meta span {
  white-space: nowrap;
}
.card .meta img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
@media (max-width: 639px) {
  .card .meta .sep {
    display: none;
  }
  .card .meta .date {
    flex-basis: 100%;
  }
}
.grid-status {
  margin-top: 12px;
}
.more-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* Sign in, and the plain pages that the server draws (login page, sign-in link, ended, not here):
   she peeks over the top edge of the card. */
body.plain {
  padding: 16px;
}
.sheet {
  position: relative;
  max-width: 460px;
  margin: 152px auto 40px;
  padding: 30px 28px 32px;
  border-radius: var(--r);
  background: var(--card);
}
.peek {
  width: 200px;
  height: auto;
  margin: -160px auto 26px;
  transform: translateX(-4px);
}
.sheet h1 {
  font-size: clamp(32px, 8vw, 42px);
  overflow-wrap: anywhere;
}
.sheet h1:focus {
  outline: none;
}
.sheet p {
  margin-top: 10px;
  color: var(--muted);
}
.sheet .label {
  margin: 0 0 10px;
  color: var(--label);
}
.sheet .error {
  margin-top: 14px;
  color: var(--err);
}
.sheet .small {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.45;
}
.sheet form {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}
.sheet form label {
  margin-top: 6px;
  font-weight: 650;
  font-size: 16px;
}
.sheet form label:first-child {
  margin-top: 0;
}
.sheet .button {
  width: 100%;
  margin-top: 14px;
}
.sheet form .error {
  margin-top: 2px;
}
.sheet a {
  font-weight: 600;
}
.phone-row {
  display: flex;
  gap: 8px;
}
.cc {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font: 400 17px/1 var(--text);
}
.sheet .link-row {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.sheet .text-button {
  margin: 0;
}
@media (max-width: 420px) {
  .sheet {
    padding: 26px 20px 28px;
    border-radius: 22px;
  }
  .peek {
    margin-top: -156px;
  }
}
@media (prefers-color-scheme: dark) {
  .peek {
    filter: drop-shadow(0 0 22px rgba(199, 194, 243, 0.28));
  }
}

/* The menu: a panel that slides in from the left */
dialog {
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
}
dialog::backdrop {
  background: var(--scrim);
}
.drawer {
  margin: 0;
  inset: 0 auto 0 0;
  width: min(320px, 86vw);
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0 24px 24px 0;
  box-shadow: var(--shadow);
}
.drawer[open] {
  animation: from-left 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes from-left {
  from {
    transform: translateX(-100%);
  }
}
.drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: env(safe-area-inset-top) 12px calc(16px + env(safe-area-inset-bottom));
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--top-h);
  padding-left: 2px;
}
.drawer-head .brand {
  justify-self: start;
  padding-left: 4px;
}
.drawer ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font: 600 18px/1 var(--brand);
  letter-spacing: -0.01em;
}
.drawer-item .icon {
  width: 22px;
  height: 22px;
  color: var(--muted);
}
@media (hover: hover) {
  .drawer-item:hover {
    background: var(--tint);
  }
}
.drawer-item[aria-current='page'] {
  background: var(--lav-soft);
}
.drawer-item[aria-current='page'] .icon {
  color: var(--label);
}
.drawer .rule {
  margin: 12px 14px;
}
.drawer-foot {
  margin-top: auto;
  padding: 16px 14px 4px;
  border-top: 1px solid var(--hair);
  font-family: var(--text);
}
.drawer-foot strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.drawer-foot span {
  color: var(--muted);
  font-size: 15px;
}

/* Dialogs: a sheet from the bottom on phones, a card in the middle on a laptop */
.dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.dialog form {
  display: grid;
  gap: 8px;
  padding: 26px 24px 24px;
}
.dialog h2 {
  font-size: 30px;
}
.dialog .sub {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 16px;
}
.dialog label {
  margin-top: 8px;
  font-weight: 650;
  font-size: 16px;
}
.dialog .error {
  margin-top: 6px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 599px) {
  .dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .dialog[open] {
    animation: from-below 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .dialog-actions .button {
    flex: 1;
  }
}
@keyframes from-below {
  from {
    transform: translateY(100%);
  }
}

/* The note */
.note-page {
  padding-top: 8px;
  padding-bottom: 140px;
}
@media (min-width: 640px) {
  .note-page {
    padding-top: 16px;
  }
}
.title-wrap {
  margin: 0;
}
.title-input,
.note-title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 clamp(30px, 7.4vw, 46px)/1.1 var(--brand);
  letter-spacing: -0.03em;
  font-variation-settings:
    'wdth' 92,
    'opsz' 72;
  overflow-wrap: anywhere;
}
.title-input {
  resize: none;
  overflow: hidden;
  field-sizing: content;
  min-height: 1.1em;
  border-radius: 6px;
}
.title-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}
.title-input:focus {
  outline: none;
}
.title-input:focus-visible {
  outline: none;
  box-shadow: 0 3px 0 0 var(--lavender);
}
/* By whom and when, and the save status: one compact line. Only a "Not saved" reason may wrap. */
.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 2px 12px;
  min-height: 18px;
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  white-space: nowrap;
}
.status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status.err {
  color: var(--err);
  white-space: normal;
  text-align: right;
}
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 20px;
  padding: 10px 12px 10px 14px;
  border-radius: 18px;
  background: var(--tint);
  font-size: 15px;
}
.notice img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.notice p {
  flex: 1 1 180px;
}
/* A bar above the note: a conflict, unsaved text kept in this browser, or a lost sign-in */
.callout {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--lav-soft);
  box-shadow: inset 0 0 0 1px var(--lavender);
  font-size: 16px;
}
.callout .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.editor {
  min-height: 50vh;
  margin-top: 14px;
}
.editor-wait {
  color: var(--muted);
  font-size: 16px;
}

/* The "⋯" menu of a note */
.pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  min-width: 210px;
  padding: 6px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow:
    var(--shadow),
    0 0 0 1px var(--hair);
}
.pop button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font: 500 16px/1 var(--brand);
}
.pop button:hover,
.pop button:focus-visible {
  background: var(--tint);
  outline: none;
}
.pop .danger {
  color: var(--err);
}

/* Phones: the editor's block handle needs a hover, so a bar of four buttons sits above the keyboard */
.format-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--kb, 0px);
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--hair);
}
.format-bar button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 4px 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: 600 12px/1 var(--brand);
}
.format-bar button:active {
  background: var(--lav-soft);
}
.format-bar .icon {
  width: 22px;
  height: 22px;
}
@media (hover: hover) and (pointer: fine) {
  .format-bar {
    display: none !important;
  }
}

/* The editor (Milkdown Crepe) in our colours and fonts, light and dark */
.editor .milkdown {
  --crepe-color-background: var(--bg);
  --crepe-color-on-background: var(--ink);
  --crepe-color-surface: var(--card);
  --crepe-color-surface-low: var(--tint);
  --crepe-color-on-surface: var(--ink);
  --crepe-color-on-surface-variant: var(--muted);
  --crepe-color-outline: var(--line);
  --crepe-color-primary: var(--label);
  --crepe-color-secondary: var(--lavender);
  --crepe-color-on-secondary: #1b1d33;
  --crepe-color-inverse: var(--ink);
  --crepe-color-on-inverse: var(--bg);
  --crepe-color-inline-code: var(--label);
  --crepe-color-error: var(--err);
  --crepe-color-hover: var(--hover);
  --crepe-color-selected: var(--selected);
  --crepe-color-inline-area: var(--code-bg);
  --crepe-base-font-size: 17px;
  --crepe-font-title: var(--brand);
  --crepe-font-default: var(--text);
  --crepe-font-code: var(--mono);
  --crepe-shadow-1: var(--shadow);
  --crepe-shadow-2: var(--shadow);
  background: transparent;
}
.editor .milkdown .ProseMirror {
  padding: 0 0 24px;
  line-height: 1.6;
}
.editor .milkdown .ProseMirror p {
  line-height: 1.6;
}
.editor .milkdown .ProseMirror h1,
.editor .milkdown .ProseMirror h2,
.editor .milkdown .ProseMirror h3,
.editor .milkdown .ProseMirror h4,
.editor .milkdown .ProseMirror h5,
.editor .milkdown .ProseMirror h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variation-settings:
    'wdth' 96,
    'opsz' 36;
}
.editor .milkdown .ProseMirror h1 {
  font-size: 1.75em;
  line-height: 1.15;
  margin-top: 28px;
}
.editor .milkdown .ProseMirror h2 {
  font-size: 1.42em;
  line-height: 1.2;
  margin-top: 24px;
}
.editor .milkdown .ProseMirror h3 {
  font-size: 1.2em;
  line-height: 1.25;
  margin-top: 20px;
}
.editor .milkdown .ProseMirror h4,
.editor .milkdown .ProseMirror h5,
.editor .milkdown .ProseMirror h6 {
  font-size: 1.05em;
  line-height: 1.3;
  margin-top: 16px;
}
.editor .milkdown .ProseMirror > :first-child {
  margin-top: 0;
}
.editor .milkdown .ProseMirror a {
  color: var(--label);
}
.editor .milkdown .ProseMirror blockquote {
  padding-left: 20px;
  color: var(--muted);
}
.editor .milkdown .ProseMirror blockquote::before {
  background: var(--lavender);
}
.editor .milkdown .milkdown-table-block th {
  font-weight: 650;
  background: var(--tint);
}
.editor .milkdown .milkdown-list-item-block li .label-wrapper .checked svg {
  fill: var(--label);
}
.editor .milkdown .milkdown-image-block .image-edit {
  border-radius: 14px;
}
.editor .milkdown .milkdown-image-block .image-wrapper img {
  border-radius: 14px;
}
.editor .milkdown .milkdown-slash-menu,
.editor .milkdown .milkdown-toolbar {
  background: var(--bg);
  box-shadow:
    var(--shadow),
    0 0 0 1px var(--hair);
}
@media (hover: none) {
  .editor .milkdown .milkdown-block-handle {
    display: none;
  }
}

/* Vault */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-row h2 {
  font-size: 26px;
}
.logins {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.login {
  padding: 18px 20px 8px;
  border-radius: var(--r);
  background: var(--card);
}
.login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.login h3 {
  font: 650 20px/1.25 var(--brand);
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  padding-top: 8px;
}
.login .saved {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}
.login dl {
  margin: 12px 0 0;
}
.login .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hair);
}
.login dt {
  grid-column: 1 / -1;
  font: 650 12px/1.3 var(--brand);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}
.login dd {
  margin: 0;
  min-width: 0;
}
.login .value {
  font: 400 17px/1.4 var(--text);
  overflow-wrap: anywhere;
}
.login .value .dots {
  letter-spacing: 0.12em;
}
.login .acts {
  display: flex;
  gap: 6px;
}
@media (max-width: 360px) {
  .login {
    padding-left: 16px;
    padding-right: 16px;
  }
  .chip {
    min-width: 56px;
    padding: 0 10px;
  }
}

/* Account */
.facts {
  margin: 0;
}
.facts div {
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}
.facts div:first-child {
  padding-top: 0;
}
.facts dt {
  font: 650 12px/1.3 var(--brand);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}
.facts dd {
  margin: 6px 0 0;
  font: 400 19px/1.35 var(--text);
  overflow-wrap: anywhere;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.account-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  max-width: 52ch;
}

/* A short word at the bottom: "Copied", "Note deleted" */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 40;
  width: max-content; /* not squeezed into the half of the screen right of left: 50% */
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--bg);
  font: 600 15px/1.3 var(--brand);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
body[data-page='note'] .toast {
  bottom: calc(84px + env(safe-area-inset-bottom));
}

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

/* The @ suggestion of the note editor (editor/entry.js). */
.mention-menu {
  position: fixed;
  z-index: 40;
  padding: 4px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 12px 28px -12px rgba(27, 29, 51, 0.35);
}
.mention-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 14px 6px 8px;
  border: 0;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mention-pick img {
  border-radius: 50%;
}
.mention-pick span {
  display: grid;
  line-height: 1.2;
}
.mention-pick small {
  color: var(--muted);
  font-size: 13px;
}
