:root {
  color-scheme: light dark;
  /* The documents app's palette, unchanged, which is the journal's and the
     books app's: one family of apps on one domain. */
  --bg: #f7f7fa;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #8a8a93;
  --faint: #b6b6c0;
  /* Indigo. The one saturated colour, spent on focus, the view you are on
     and folders -- the things worth the eye. */
  --accent: #4c3fd6;
  --on-accent: #ffffff;
  --miss: #b8412f;
  --hairline: rgba(0, 0, 0, 0.1);
  --chip-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  --card-shadow: 0 1px 2px rgba(20, 20, 40, 0.06), 0 10px 30px -18px rgba(20, 20, 40, 0.4);
  --tag-bg: rgba(0, 0, 0, 0.05);
  --press: rgba(0, 0, 0, 0.04);
  --good: #248a3d;
  --placeholder: #ebebf0;

  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --muted: #93939c;
    --faint: #55555e;
    --accent: #7c6ffb;
    --on-accent: #ffffff;
    --miss: #ff7c66;
    --hairline: rgba(255, 255, 255, 0.12);
    --chip-shadow: none;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -18px rgba(0, 0, 0, 0.8);
    --tag-bg: rgba(255, 255, 255, 0.08);
    --press: rgba(255, 255, 255, 0.06);
    --good: #30d158;
    --placeholder: #2c2c2e;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* A thing's page covers the list; the list stays where it was underneath,
   scrolled to the row it was opened from, and does not scroll behind it. */
body.is-covered {
  overflow: hidden;
}

/* One readable column, whatever the window. */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top, 0px), 12px) 16px
           max(env(safe-area-inset-bottom, 0px), 24px);
}

.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 4px 14px;
}

.head-text {
  min-width: 0;
}

.title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sub {
  min-height: 20px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.head-buttons {
  flex: none;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* A file input the size of nothing, inside the label that is its button.
   Not display:none -- a label for an input that is not rendered is one iOS
   has been known not to open. */
.picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.round-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 13%, var(--card));
  color: var(--accent);
  cursor: pointer;
}

.round-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.round-btn:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.add {
  flex: none;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.add:hover {
  filter: brightness(1.08);
}

.add:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   The views: a segmented control, as in the documents app
   -------------------------------------------------------------------------- */

.views {
  display: flex;
  margin: 0 0 6px;
  padding: 3px;
  border-radius: 12px;
  background: var(--tag-bg);
}

.view-link {
  flex: 1;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}

.view-link[aria-current="page"] {
  background: var(--card);
  box-shadow: var(--chip-shadow);
  color: var(--text);
}

.view-link:focus-visible {
  outline: 2px solid var(--accent);
}

/* --------------------------------------------------------------------------
   The search
   -------------------------------------------------------------------------- */

.search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 8px 0 2px;
}

.search-icon {
  position: absolute;
  left: 11px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.search-field {
  flex: 1;
  min-width: 0;
  padding: 10px 38px;
  border: 0;
  border-radius: 12px;
  background: var(--tag-bg);
  color: var(--text);
  font: inherit;
  /* 16px or iOS zooms the page in when the field takes focus. */
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.search-field::placeholder {
  color: var(--muted);
}

.search-field:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-field::-webkit-search-cancel-button,
.search-field::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  position: absolute;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.search-clear:hover {
  color: var(--text);
}

.search-cross {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

/* A toast at the foot of the screen, over whichever page is showing. */
.status {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 11px 10px 11px 14px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 10px 30px -8px rgba(20, 20, 40, 0.35), 0 0 0 1px var(--hairline);
  color: var(--text);
  font-size: 14px;
}

.status.is-done {
  background: color-mix(in srgb, var(--good) 14%, var(--card));
  color: var(--good);
}

.status.is-error {
  background: color-mix(in srgb, var(--miss) 12%, var(--card));
  color: var(--miss);
}

#status-text {
  flex: 1;
  min-width: 0;
}

.status-close {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  font-size: 19px;
  line-height: 1;
  opacity: 0.75;
  cursor: pointer;
}

.status-close:hover {
  opacity: 1;
  background: color-mix(in srgb, currentColor 14%, transparent);
}


/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */

.list-head {
  display: flex;
  justify-content: space-between;
  margin: 22px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.list-count {
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}

/* A month is drawn only when it is near the screen. */
.month {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

/* One card per section with the rows inside it. */
.card {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.card > li {
  position: relative;
}

/* Between rows, a hairline that starts where the text does. */
.card > li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 78px;
  right: 0;
  height: 1px;
  background: var(--hairline);
  pointer-events: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

.row.folder {
  min-height: 60px;
}

a.row:active {
  background: var(--press);
}

@media (hover: hover) {
  a.row:hover {
    background: var(--press);
  }
}

a.row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* The cover, cropped square, or a box where there is none yet. */
.thumb {
  flex: none;
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--placeholder);
  color: var(--faint);
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

/* A photo another device took and has not sent yet: the grey it sits on. */
img.is-missing {
  visibility: hidden;
}

.row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-title {
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.row-title.is-untitled {
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
}

.row-meta {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* The newest note, in the text's own colour and on one line. */
.row-note {
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chev {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Folders
   -------------------------------------------------------------------------- */

.crumb-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 4px 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  min-width: 0;
  font-size: 15px;
}

.crumb {
  padding: 2px 0;
  color: var(--accent);
  text-decoration: none;
}

.crumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.crumb[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.crumb-sep {
  color: var(--faint);
}

.crumb-edit {
  flex: none;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.crumb-edit:hover {
  color: var(--accent);
}

/* In the row's thumbnail column, so folders and things line up. */
.folder-icon {
  flex: none;
  width: 48px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 13%, var(--card));
  color: var(--accent);
}

.folder-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Nothing to show, and the footer
   -------------------------------------------------------------------------- */

.empty {
  margin: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.foot {
  padding: 28px 4px 8px;
  text-align: center;
}

.sync-line {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.account-line {
  font-size: 13px;
  color: var(--faint);
}

.account-line form {
  display: inline;
}

.text-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   A thing
   -------------------------------------------------------------------------- */

.cover {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

.bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -16px;
  padding: 6px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* The page's own padding already clears the notch; the bar sits in it. */
.item-page {
  padding-top: 0;
}

.item-page .bar {
  padding-top: max(env(safe-area-inset-top, 0px), 6px);
}

.back {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin-left: -8px;
  padding: 8px 8px 8px 2px;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

.back span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.back svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bar-state {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* The name is the page's title, and is typed into where it stands. */
.item-name {
  display: block;
  width: 100%;
  margin: 4px 0 12px;
  padding: 4px 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.item-name::placeholder {
  color: var(--faint);
}

.item-name:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

/* Gone from this device, or not on it yet: only the bar and a word. */
.item-page.is-gone > :not(.bar) {
  display: none;
}

.item-page.is-gone::after {
  content: "This thing is not on this device. It may have been deleted, or not synced here yet.";
  display: block;
  margin: 60px 16px;
  text-align: center;
  color: var(--muted);
  line-height: 1.45;
}

/* The pictures, side by side, one swipe apart: the first nearly the width
   of the page and the next peeking in, so there being more is obvious. */
.gallery {
  display: flex;
  gap: 10px;
  margin: 0 -16px;
  padding: 0 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.tile {
  flex: none;
  position: relative;
  width: 86%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--placeholder);
  overflow: hidden;
  scroll-snap-align: start;
}

.gallery.is-single .tile {
  width: 100%;
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tile.is-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 16 / 7;
  color: var(--muted);
  font-size: 15px;
}

.tile.is-empty svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.tile-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.photo-buttons {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.photo-buttons .pill {
  flex: 1;
}

.pill svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.pill:active {
  background: var(--press);
}

.pill:focus-visible,
.pill:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pill.primary {
  background: var(--accent);
  color: var(--on-accent);
}

.pill:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Where it is: one folder a line, each a way there and a way out of it. */
.paths {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.path {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 4px 4px 14px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  font-size: 15px;
}

.path-name {
  flex: 1;
  min-width: 0;
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.path-remove {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.path-remove svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.path-remove:hover {
  background: var(--press);
  color: var(--miss);
}

.paths-none {
  padding: 4px 4px;
  color: var(--muted);
  font-size: 15px;
}

.path-add,
.composer {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
}

.path-add input,
.composer textarea,
.composer input,
.field input,
.field textarea {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  /* 16px or iOS zooms the page in when the field takes focus. */
  font-size: 16px;
}

.path-add input {
  flex: 1;
}

.path-add input:focus-visible,
.composer textarea:focus-visible,
.composer input:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* A new note: what happened, and the day it happened, which is today unless
   it is being written up afterwards. */
.composer {
  flex-direction: column;
  margin: 0;
}

.composer textarea {
  width: 100%;
  line-height: 1.4;
  resize: vertical;
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.composer input[type="date"] {
  padding: 7px 10px;
  font-size: 15px;
  background: var(--tag-bg);
  border-color: transparent;
}

.notes {
  margin-top: 12px;
}

.note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.note:active {
  background: var(--press);
}

.notes > li + li::before {
  left: 16px;
}

.note-when {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.note-by {
  font-weight: 400;
}

.note-text {
  font-size: 16px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.item-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 32px 0 12px;
}

.item-made {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.danger {
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--miss);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.danger.is-armed {
  background: var(--miss);
  color: #fff;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   A photo, full screen
   -------------------------------------------------------------------------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  color: #fff;
}

.viewer-strip {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.viewer-strip::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.viewer-bar,
.viewer-foot {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: max(env(safe-area-inset-left, 0px), 12px);
  padding-right: max(env(safe-area-inset-right, 0px), 12px);
}

.viewer-bar {
  top: 0;
  padding-top: max(env(safe-area-inset-top, 0px), 10px);
  padding-bottom: 20px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
}

.viewer-foot {
  bottom: 0;
  padding-top: 24px;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 14px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.viewer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.viewer-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.viewer-count {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.viewer-spacer {
  width: 40px;
}

.viewer-when {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  opacity: 0.85;
}

.viewer-text {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.viewer-text.is-armed {
  background: #d9412c;
}

/* --------------------------------------------------------------------------
   Sheets
   -------------------------------------------------------------------------- */

.sheet {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 60px -12px rgba(20, 20, 40, 0.45);
}

.sheet::backdrop {
  background: rgba(20, 20, 40, 0.4);
}

.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.sheet-title {
  margin: 0;
  font-size: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field textarea {
  background: var(--bg);
}

.field textarea {
  line-height: 1.4;
  resize: vertical;
}

.sheet-note {
  margin: -6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.sheet-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sheet-gap {
  flex: 1;
}

.sheet-buttons button {
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sheet-buttons .primary {
  background: var(--accent);
  color: var(--on-accent);
}

.sheet-buttons .ghost {
  background: var(--tag-bg);
  color: var(--text);
}

.sheet-buttons .sheet-delete {
  color: var(--miss);
}

.sheet-buttons .sheet-delete.is-armed {
  background: var(--miss);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .view-link {
    transition: none;
  }
}
