/* Socials. One stylesheet: tokens, chrome, the board, the month, the editor, the floaters. */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: light;
  --bg: #f4f4f5;
  --bg-2: #ededee;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #efeff0;
  --elevated: #ffffff;
  --ink: #141415;
  --ink-2: #545457;
  --ink-3: #8b8b90;
  --ink-4: #bcbcc1;
  --line: rgb(20 20 24 / 0.075);
  --line-2: rgb(20 20 24 / 0.13);
  --hover: rgb(20 20 24 / 0.05);
  --press: rgb(20 20 24 / 0.08);
  --seg: rgb(20 20 24 / 0.06);
  --stage: #ececee;
  --scrim: rgb(16 16 20 / 0.32);

  --accent: #ff5b1f;
  --accent-ink: #ffffff;
  --ready: #2f7bff;
  --scheduled: #8b5cf6;
  --posted: #19a35a;
  --danger: #e5484d;
  --warn: #d98a00;

  --shadow-1: 0 1px 2px rgb(20 20 24 / 0.06), 0 0 0 1px var(--line);
  --shadow-2: 0 6px 18px -6px rgb(20 20 24 / 0.16), 0 1px 3px rgb(20 20 24 / 0.06), 0 0 0 1px var(--line);
  --shadow-lift: 0 28px 50px -14px rgb(20 20 24 / 0.34), 0 10px 18px -8px rgb(20 20 24 / 0.18), 0 0 0 1px var(--line);
  --shadow-pop: 0 18px 40px -12px rgb(20 20 24 / 0.28), 0 4px 10px -4px rgb(20 20 24 / 0.1), 0 0 0 1px var(--line-2);
  --shadow-modal: 0 40px 90px -20px rgb(20 20 24 / 0.4), 0 0 0 1px var(--line);

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-gentle: cubic-bezier(0.45, 0, 0.25, 1);
  --spring: cubic-bezier(0.2, 1.1, 0.3, 1);
  --bounce: cubic-bezier(0.2, 1.3, 0.3, 1);

  --top-h: 60px;
  --heads-h: 52px;
  --gutter: 96px;
  --add-w: 148px;
  --colw: clamp(264px, calc((100vw - var(--gutter) - var(--add-w) - 56px) / max(var(--cols, 3), 1)), 360px);
  --r-card: 14px;
  --editor-r: 24px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0b0c;
  --bg-2: #111113;
  --surface: #161618;
  --surface-2: #1c1c1f;
  --surface-3: #242427;
  --elevated: #1e1e21;
  --ink: #f2f2f3;
  --ink-2: #aaaab0;
  --ink-3: #78787e;
  --ink-4: #4a4a4f;
  --line: rgb(255 255 255 / 0.07);
  --line-2: rgb(255 255 255 / 0.12);
  --hover: rgb(255 255 255 / 0.055);
  --press: rgb(255 255 255 / 0.09);
  --seg: rgb(255 255 255 / 0.07);
  --stage: #0f0f11;
  --scrim: rgb(0 0 0 / 0.55);
  --accent: #ff6a2e;
  --ready: #4c8dff;
  --scheduled: #a07cff;
  --posted: #2fbf71;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 0 0 1px var(--line);
  --shadow-2: 0 8px 22px -8px rgb(0 0 0 / 0.6), 0 0 0 1px var(--line-2);
  --shadow-lift: 0 30px 60px -12px rgb(0 0 0 / 0.75), 0 0 0 1px var(--line-2);
  --shadow-pop: 0 20px 44px -10px rgb(0 0 0 / 0.7), 0 0 0 1px var(--line-2);
  --shadow-modal: 0 40px 100px -20px rgb(0 0 0 / 0.8), 0 0 0 1px var(--line-2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0b0b0c;
    --bg-2: #111113;
    --surface: #161618;
    --surface-2: #1c1c1f;
    --surface-3: #242427;
    --elevated: #1e1e21;
    --ink: #f2f2f3;
    --ink-2: #aaaab0;
    --ink-3: #78787e;
    --ink-4: #4a4a4f;
    --line: rgb(255 255 255 / 0.07);
    --line-2: rgb(255 255 255 / 0.12);
    --hover: rgb(255 255 255 / 0.055);
    --press: rgb(255 255 255 / 0.09);
    --seg: rgb(255 255 255 / 0.07);
    --stage: #0f0f11;
    --scrim: rgb(0 0 0 / 0.55);
    --accent: #ff6a2e;
    --ready: #4c8dff;
    --scheduled: #a07cff;
    --posted: #2fbf71;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 0 0 1px var(--line);
    --shadow-2: 0 8px 22px -8px rgb(0 0 0 / 0.6), 0 0 0 1px var(--line-2);
    --shadow-lift: 0 30px 60px -12px rgb(0 0 0 / 0.75), 0 0 0 1px var(--line-2);
    --shadow-pop: 0 20px 44px -10px rgb(0 0 0 / 0.7), 0 0 0 1px var(--line-2);
    --shadow-modal: 0 40px 100px -20px rgb(0 0 0 / 0.8), 0 0 0 1px var(--line-2);
  }
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
  overscroll-behavior: none;
}

body {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
  opacity: 0.4;
}

:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

::selection {
  background: rgb(120 120 130 / 0.28);
}

.i,
.mark {
  flex: none;
  display: block;
}

.grow {
  flex: 1;
}

kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--seg);
  color: var(--ink-2);
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

#layers {
  position: relative;
  z-index: 800;
}

/* The boot mark: three columns that rise, while the first request is out. */
.booting {
  align-items: center;
  justify-content: center;
}

.boot-mark {
  display: flex;
  gap: 5px;
  align-items: flex-start;
}

.boot-mark span {
  width: 9px;
  height: 30px;
  border-radius: 5px;
  background: var(--ink);
  animation: boot 900ms var(--ease-out) infinite alternate;
}

.boot-mark span:nth-child(2) {
  height: 20px;
  opacity: 0.7;
  animation-delay: 120ms;
}

.boot-mark span:nth-child(3) {
  height: 25px;
  opacity: 0.45;
  animation-delay: 240ms;
}

@keyframes boot {
  from {
    transform: scaleY(0.4);
    transform-origin: top;
  }
  to {
    transform: none;
    transform-origin: top;
  }
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  font-weight: 550;
  font-size: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  white-space: nowrap;
  transition:
    transform 160ms var(--spring),
    background 140ms,
    box-shadow 160ms;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: scale(0.97);
}

.btn-solid {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}

.btn-solid:hover {
  background: color-mix(in oklab, var(--ink) 88%, var(--bg));
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: none;
}

.btn-danger:hover {
  background: color-mix(in oklab, var(--danger) 88%, black);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--hover);
  color: var(--ink);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--ink-2);
  transition:
    background 140ms,
    color 140ms,
    transform 160ms var(--spring);
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 550;
  background: var(--seg);
  color: var(--ink);
  white-space: nowrap;
  transition:
    background 140ms,
    transform 160ms var(--spring);
}

.chip:hover {
  background: var(--press);
}

.chip:active {
  transform: scale(0.96);
}

.chip .i {
  color: var(--ink-2);
}

.count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  display: inline-block;
  min-width: 1ch;
  font-variant-numeric: tabular-nums;
}

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--p, var(--ink-3));
  flex: none;
}

.input {
  height: 38px;
  width: 100%;
  border-radius: 10px;
  border: 0;
  padding: 0 12px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
  transition: box-shadow 140ms;
}

.input:focus {
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 0 0 3px rgb(120 120 130 / 0.2);
}

/* A segmented control; the pill is measured to the pressed option and springs between them. */
.seg {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  border-radius: 11px;
  background: var(--seg);
  isolation: isolate;
}

.seg > button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-3);
  transition: color 160ms;
}

.seg > button:hover {
  color: var(--ink-2);
}

.seg > button[aria-pressed='true'] {
  color: var(--ink);
}

.seg-pill {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition:
    transform 420ms var(--spring),
    width 420ms var(--spring),
    opacity 160ms;
}

:root[data-theme='dark'] .seg-pill {
  background: var(--surface-3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .seg-pill {
    background: var(--surface-3);
  }
}

/* ------------------------------------------------------------------ chrome */

.top {
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 14.5px;
  letter-spacing: -0.02em;
  padding-right: 18px;
  margin-right: 4px;
  border-right: 1px solid var(--line);
  height: 28px;
}

.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: inline-block;
  flex: none;
  background:
    linear-gradient(white, white) 5px 5px / 3.5px 12px no-repeat,
    linear-gradient(rgb(255 255 255 / 0.78), rgb(255 255 255 / 0.78)) 9.25px 5px / 3.5px 7.5px no-repeat,
    linear-gradient(rgb(255 255 255 / 0.55), rgb(255 255 255 / 0.55)) 13.5px 5px / 3.5px 9.5px no-repeat,
    var(--accent);
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.12);
}

.title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.035em;
  padding-left: 6px;
  min-width: 190px;
}

.title-roll,
.title-year {
  position: relative;
  display: inline-grid;
  overflow: hidden;
  height: 1.25em;
  line-height: 1.25em;
}

.title-roll > span,
.title-year > span {
  grid-area: 1 / 1;
  white-space: nowrap;
}

.title-year {
  color: var(--ink-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.month-nav {
  display: none;
  gap: 2px;
}

:root[data-view='month'] .month-nav {
  display: flex;
}

.view-switch .i {
  opacity: 0.8;
}

.shelf-btn .count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: var(--seg);
  color: var(--ink-2);
}

.shelf-btn.has .count {
  background: var(--ink);
  color: var(--bg);
}

.shelf-btn[aria-pressed='true'] {
  background: var(--press);
  color: var(--ink);
}

.new-btn {
  margin-left: 4px;
}

.tabs {
  display: none;
}

.body {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}

.stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
}

.stage > section {
  flex: 1;
  min-width: 0;
}

.fab {
  display: none;
}

/* ------------------------------------------------------------------ board */

.board {
  display: flex;
  min-height: 0;
  height: 100%;
}

.board-scroll {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-top: var(--heads-h);
  contain: strict;
}

.board-grid {
  width: max-content;
  margin: 0 auto;
  padding-bottom: 40vh;
}

.heads,
.day {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--cols), var(--colw)) var(--add-w);
}

.heads {
  position: sticky;
  top: 0;
  z-index: 6;
  height: var(--heads-h);
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}

.corner {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg);
  display: flex;
  align-items: center;
  padding-left: 18px;
}

.corner-label {
  font-size: 11.5px;
  color: var(--ink-4);
  font-weight: 500;
}

.head {
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.head-name {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 10px;
  margin-left: -2px;
  border-radius: 10px;
  font-weight: 620;
  font-size: 14px;
  letter-spacing: -0.015em;
  max-width: 100%;
  transition: background 140ms;
}

.head-name:hover {
  background: var(--hover);
}

.head-name .swatch {
  width: 10px;
  height: 10px;
  border-radius: 4px;
}

.head-name .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.head-add {
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.add-project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--ink-3);
  font-weight: 550;
  font-size: 13px;
  transition:
    background 140ms,
    color 140ms;
}

.add-project:hover {
  background: var(--hover);
  color: var(--ink);
}

.project-input {
  height: 32px;
  width: 100%;
  border-radius: 9px;
  border: 0;
  outline: none;
  padding: 0 10px;
  font-weight: 600;
  background: var(--surface);
  box-shadow:
    var(--shadow-1),
    0 0 0 3px rgb(120 120 130 / 0.2);
}

.days {
  position: relative;
}

.sentinel {
  height: 1px;
}

.month-banner {
  position: sticky;
  left: 0;
  width: min(100vw, 100%);
  padding: 42px 0 14px 18px;
}

.month-banner h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1;
  font-weight: 640;
  letter-spacing: -0.055em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.month-banner h2 span {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.days > .month-banner:first-of-type {
  padding-top: 22px;
}

.day {
  border-top: 1px solid var(--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 84px;
}

.day[data-monday] {
  border-top-color: var(--line-2);
}

.day-label {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg);
}

.day-label-in {
  position: sticky;
  top: calc(var(--heads-h) + 6px);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'num dow'
    'num mon'
    'rel rel';
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
  margin: 8px 6px 8px 10px;
  padding: 6px 8px;
  border-radius: 12px;
  text-align: left;
  transition: background 140ms;
}

.day-label-in:hover {
  background: var(--hover);
}

.dl-num {
  grid-area: num;
  font-size: 28px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.dl-dow {
  grid-area: dow;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  align-self: end;
}

.dl-mon {
  grid-area: mon;
  font-size: 11.5px;
  color: var(--ink-3);
  align-self: start;
}

.dl-rel {
  grid-area: rel;
  justify-self: start;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 650;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--seg);
  color: var(--ink-2);
}

.day[data-today] .dl-rel {
  background: var(--accent);
  color: var(--accent-ink);
}

.day[data-today] .dl-num {
  color: var(--accent);
}

.day[data-past] .dl-num,
.day[data-past] .dl-dow {
  color: var(--ink-3);
}

.day[data-weekend] .dl-dow {
  color: var(--ink-3);
}

.cell {
  min-width: 0;
  padding: 8px 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  transition: background 200ms;
  min-height: 62px;
}

.cell-pad {
  min-height: 1px;
}

.cell.drop-over {
  background: var(--hover);
}

.cell.file-over {
  background: var(--hover);
  box-shadow: inset 0 0 0 1.5px var(--ink-4);
}

.cell-label {
  display: none;
}

.add {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 550;
  opacity: 0;
  transition:
    opacity 160ms,
    background 140ms,
    color 140ms,
    transform 160ms var(--spring);
}

.day:hover .add,
.day[data-today] .add,
.add:focus-visible,
.cell:only-child .add {
  opacity: 1;
}

.cell:not(:has(.card)) .add {
  border: 1px dashed transparent;
}

.add:hover {
  background: var(--hover);
  color: var(--ink);
}

.add:active {
  transform: scale(0.97);
}

.day[data-today] .cell:not(:has(.card)) .add {
  border-color: var(--line-2);
}

@media (hover: none) {
  .add {
    opacity: 0.6;
  }
}

.drop-line {
  height: 3px;
  margin: -1px 6px;
  border-radius: 3px;
  background: var(--p);
  animation: line-in 200ms var(--spring);
}

@keyframes line-in {
  from {
    transform: scaleX(0.4);
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ cards */

.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  outline: none;
  transition:
    box-shadow 200ms var(--ease-out),
    transform 260ms var(--spring),
    opacity 200ms;
  touch-action: manipulation;
}

.card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.card:active:not(.composing) {
  transform: scale(0.985);
}

.card:focus-visible {
  box-shadow:
    var(--shadow-2),
    0 0 0 2px color-mix(in oklab, var(--accent) 65%, transparent);
}

.day[data-past] .card:not(:hover, :focus-visible, .composing) {
  opacity: 0.72;
}

.card[data-status='posted']:not(:hover, .composing) {
  opacity: 0.68;
}

.card-head,
.card-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 18px;
  color: var(--ink-3);
}

.card-head {
  padding: 11px 13px 0;
}

.card-text {
  margin: 0;
  padding: 7px 13px 12px;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines, 6);
  overflow: hidden;
}

.card-text.empty {
  color: var(--ink-4);
}

.card-head + .card-text {
  padding-top: 6px;
}

.card[data-format='text'] .card-head:not(:has(.marks, .time, .status)) {
  display: none;
}

.card[data-format='text'] .card-head:not(:has(.marks, .time, .status)) + .card-text {
  padding-top: 12px;
}

.marks {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
}

.marks .more {
  font-size: 10.5px;
  font-family: var(--mono);
}

.time {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status[data-status='ready'] {
  color: var(--ready);
}

.status[data-status='scheduled'] {
  color: var(--scheduled);
}

.status[data-status='posted'] {
  color: var(--posted);
}

.status-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1.5px var(--ink-3);
}

.status-swatch[data-status='ready'] {
  box-shadow: none;
  background: var(--ready);
}

.status-swatch[data-status='scheduled'] {
  box-shadow: none;
  background: var(--scheduled);
}

.status-swatch[data-status='posted'] {
  box-shadow: none;
  background: var(--posted);
}

/* Media frames: a quiet ground, then the picture fades in once it can paint whole. */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
  isolation: isolate;
}

.frame img,
.frame .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame img {
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}

.frame img.in {
  opacity: 1;
}

.ph {
  display: grid;
  place-items: center;
  color: var(--ink-4);
  background: var(--surface-3);
}

.frame:has(.ring) img {
  filter: saturate(0.7) brightness(0.88);
}

.dur {
  position: absolute;
  left: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 19px;
  padding: 0 6px 0 5px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.58);
  color: white;
  font-family: var(--mono);
  font-size: 10.5px;
  z-index: 2;
}

.dur .i {
  fill: white;
}

/* Upload progress: a ring that fills, then pops and fades when the bytes have landed. */
.ring {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.4);
  transition:
    transform 320ms var(--bounce),
    opacity 300ms;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.ring-track {
  stroke: rgb(255 255 255 / 0.25);
}

.ring-fill {
  stroke: white;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 0));
  transition: stroke-dashoffset 240ms var(--ease-out);
}

.ring.done {
  transform: scale(1.35);
  opacity: 0;
}

/* Text first: words, then a strip of pictures. */
.strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 0 8px 8px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.strip[data-n='1'] {
  grid-template-columns: 1fr;
}

.strip .frame {
  aspect-ratio: 16 / 10;
}

.strip[data-n='1'] .frame {
  aspect-ratio: 16 / 9;
}

.strip-more {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.58);
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* Visual first: a portrait frame leads, the caption sits beside it. */
.card[data-format='visual'] {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  gap: 12px;
  padding: 6px 12px 6px 6px;
  align-items: stretch;
}

.hero {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
}

.hero[data-kind='video'] {
  aspect-ratio: 9 / 16;
}

.hero .frame {
  position: absolute;
  inset: 0;
}

.hero .stack {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
}

.stack {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.5);
  color: white;
  font-size: 10.5px;
  font-weight: 650;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 7px 0 6px;
}

.hero-top {
  display: flex;
  align-items: center;
  min-height: 14px;
}

.hero-top:not(:has(.marks)) {
  display: none;
}

.caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  flex: 1;
}

.hero[data-kind='video'] + .hero-side .caption {
  -webkit-line-clamp: 10;
}

.caption.empty {
  color: var(--ink-4);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
}

.hero-meta:empty {
  display: none;
}

.hero .dur {
  left: 6px;
  bottom: 6px;
}

/* Plain: the picture on top, the words beneath. */
.cover {
  position: relative;
  margin: 6px 6px 0;
  border-radius: 10px;
  overflow: hidden;
}

.cover .frame {
  aspect-ratio: 16 / 10;
}

.cover .stack {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
}

.card-pad .card-text {
  padding: 9px 7px 6px;
}

.card-pad {
  padding: 0 6px 9px;
}

.card-pad .card-foot {
  padding: 0 7px;
}

.card-foot:not(:has(.marks, .time, .status)) {
  display: none;
}

/* Compact: a thumbnail and two lines. */
.card[data-format='compact'] {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  align-items: start;
}

.mini {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  overflow: hidden;
}

.mini .frame {
  width: 100%;
  height: 100%;
}

.mini .dur {
  display: none;
}

.mini.none {
  display: grid;
  place-items: center;
  background: var(--surface-3);
}

.mini.none .bar {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--p);
  box-shadow:
    0 6px 0 var(--ink-4),
    0 -6px 0 var(--ink-4);
}

.compact-main .card-text {
  padding: 1px 0 3px;
  font-size: 13px;
}

.compact-main .card-foot {
  min-height: 14px;
}

.rt-tag,
.rt-at {
  color: color-mix(in oklab, var(--ready) 85%, var(--ink));
  font-weight: 500;
}

.rt-url {
  color: color-mix(in oklab, var(--ready) 85%, var(--ink));
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--ready) 35%, transparent);
  text-underline-offset: 2px;
}

/* The quick-add composer, right in the cell. */
.card.composing {
  cursor: text;
  padding: 10px 10px 7px;
  box-shadow:
    0 0 0 1.5px var(--p),
    0 0 0 5px rgb(120 120 130 / 0.14),
    var(--shadow-2);
  transform: none;
  animation: compose-in 360ms var(--spring);
}

@keyframes compose-in {
  from {
    transform: scale(0.96);
    opacity: 0.4;
  }
}

.compose-text {
  display: block;
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.45;
  padding: 2px 3px;
  min-height: 44px;
}

.compose-text::placeholder {
  color: var(--ink-4);
}

.compose-media {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.compose-media[hidden] {
  display: none;
}

.compose-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-3);
  animation: pop 380ms var(--bounce);
}

.compose-thumb img,
.compose-thumb .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compose-thumb img {
  opacity: 1;
}

.compose-thumb .ring {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
}

@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}

.compose-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--ink-3);
}

.compose-hint {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-left: 2px;
}

/* ------------------------------------------------------------------ dragging */

.is-dragging,
.is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.drag-ghost {
  animation: lift 220ms var(--ease-out) both;
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  z-index: 1001;
  pointer-events: none;
  will-change: transform;
  box-shadow: var(--shadow-lift);
  transition: none !important;
  opacity: 1 !important;
}

@keyframes lift {
  from {
    box-shadow: var(--shadow-1);
  }
  to {
    box-shadow: var(--shadow-lift);
  }
}

.drag-ghost.landing {
  animation: land 320ms var(--ease-out) both;
}

@keyframes land {
  from {
    box-shadow: var(--shadow-lift);
  }
  to {
    box-shadow: var(--shadow-1);
  }
}

.drag-source {
  box-shadow: none !important;
  background: var(--hover) !important;
  outline: 1.5px dashed var(--ink-4);
  outline-offset: -1.5px;
  transform: none !important;
  opacity: 1 !important;
}

.drag-source > * {
  visibility: hidden;
}

.exit-ghost {
  z-index: 999;
}

.pulse {
  animation: pulse 1.1s var(--ease-out);
}

@keyframes pulse {
  0% {
    box-shadow:
      0 0 0 0 color-mix(in oklab, var(--accent) 55%, transparent),
      var(--shadow-2);
  }
  100% {
    box-shadow:
      0 0 0 12px transparent,
      var(--shadow-1);
  }
}

/* ------------------------------------------------------------------ month */

.month {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 0 18px 18px;
}

.month-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
  flex-wrap: wrap;
}

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

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 550;
  background: var(--seg);
  transition:
    opacity 160ms,
    background 160ms,
    transform 160ms var(--spring);
}

.legend-item:active {
  transform: scale(0.95);
}

.legend-item[aria-pressed='false'] {
  background: var(--seg);
  opacity: 0.5;
}

.legend-item[aria-pressed='false'] .swatch {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--p);
}

.month-dow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 0 6px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--ink-3);
}

.month-dow span {
  padding-left: 10px;
}

.month-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(var(--weeks, 5), minmax(118px, 1fr));
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  min-height: 560px;
}

.mday {
  min-width: 0;
  padding: 6px 6px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 200ms;
  overflow: hidden;
}

.mday:nth-child(7n) {
  border-right: 0;
}

.mday[data-weekend] {
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
}

.mday[data-out] {
  background: var(--bg-2);
}

.mday[data-out] .mday-num {
  color: var(--ink-4);
}

.mday.file-over,
.mday:has(.drop-over) {
  background: var(--surface-3);
}

.mday-top {
  display: flex;
  align-items: center;
}

.mday-num {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition:
    background 140ms,
    transform 160ms var(--spring);
}

.mday-num:hover {
  background: var(--hover);
}

.mday[data-today] .mday-num {
  background: var(--accent);
  color: var(--accent-ink);
}

.mday[data-past]:not([data-today]) .mday-num {
  color: var(--ink-3);
}

.mday-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  flex: 1;
}

.chip-post {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 7px 0 3px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-2);
  box-shadow: inset 2.5px 0 0 var(--p);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  flex: none;
  transition:
    background 140ms,
    transform 200ms var(--spring),
    box-shadow 160ms;
}

.chip-post:hover {
  background: var(--surface-3);
}

.chip-post:active {
  transform: scale(0.97);
}

.chip-post[data-status='posted'] {
  opacity: 0.6;
}

.chip-thumb {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  overflow: hidden;
  flex: none;
  background: var(--surface-3);
}

.chip-thumb img,
.chip-thumb .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chip-thumb .ph .i {
  width: 10px;
  height: 10px;
}

.chip-dot {
  width: 7px;
  height: 7px;
  margin: 0 3px 0 5px;
  border-radius: 50%;
  background: var(--p);
  flex: none;
}

.chip-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

.mday-more {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 2px 6px;
  border-radius: 6px;
}

.mday-more:hover {
  background: var(--hover);
  color: var(--ink);
}

.chip-post.drag-ghost {
  background: var(--surface) !important;
}

/* ------------------------------------------------------------------ shelf */

.shelf {
  width: 320px;
  flex: none;
  border-left: 1px solid var(--line);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shelf[hidden] {
  display: none;
}

.shelf-head {
  display: flex;
  align-items: center;
  padding: 12px 10px 0 18px;
}

.shelf-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 640;
  letter-spacing: -0.02em;
}

.shelf-hint {
  margin: 2px 18px 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.shelf-list {
  overflow: auto;
  padding: 4px 10px 40px;
  flex: 1;
}

.shelf-group {
  margin-bottom: 10px;
}

.shelf-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 620;
  padding: 8px 8px 2px;
}

.shelf-cell {
  min-height: 40px;
}

.shelf-cell .add {
  opacity: 1;
}

/* ------------------------------------------------------------------ floaters */

.popover {
  position: fixed;
  z-index: 900;
  background: var(--elevated);
  border-radius: 13px;
  box-shadow: var(--shadow-pop);
  padding: 5px;
  min-width: 210px;
  max-width: min(340px, calc(100vw - 16px));
}

.menu {
  display: flex;
  flex-direction: column;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 10px 0 9px;
  border-radius: 8px;
  font-size: 13px;
  text-align: left;
  color: var(--ink);
  transition: background 90ms;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--hover);
  outline: none;
}

.menu-item .i {
  color: var(--ink-2);
}

.menu-item.danger,
.menu-item.danger .i {
  color: var(--danger);
}

.menu-label {
  flex: 1;
  white-space: nowrap;
}

.menu-blank {
  width: 15px;
}

.menu-item kbd {
  background: none;
  color: var(--ink-4);
  padding: 0;
}

.menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.menu-heading {
  font-size: 11.5px;
  font-weight: 550;
  color: var(--ink-3);
  padding: 7px 10px 3px;
}

.menu-block {
  padding: 4px 5px;
}

.menu-input {
  width: 100%;
  height: 34px;
  border: 0;
  outline: none;
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 600;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.menu-input:focus {
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 0 0 3px rgb(120 120 130 / 0.2);
}

.swatches {
  display: flex;
  gap: 6px;
  padding: 2px 0;
}

.swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c);
  display: grid;
  place-items: center;
  color: white;
  transition: transform 200ms var(--bounce);
}

.swatch-btn:hover {
  transform: scale(1.12);
}

.swatch-btn.on {
  box-shadow:
    0 0 0 2px var(--elevated),
    0 0 0 3.5px var(--c);
}

.mini-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-platform {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: var(--seg);
  transition:
    background 140ms,
    color 140ms,
    transform 200ms var(--bounce);
}

.mini-platform[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}

.mini-platform:active {
  transform: scale(0.9);
}

.datepicker {
  width: 260px;
  padding: 4px;
}

.dp-quicks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
}

.dp-quick {
  height: 30px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 550;
  background: var(--seg);
}

.dp-quick:hover {
  background: var(--press);
}

.dp-quick[data-on] {
  background: var(--ink);
  color: var(--bg);
}

.dp-head {
  display: flex;
  align-items: center;
  padding: 2px 0 4px 6px;
}

.dp-title {
  font-weight: 620;
  font-size: 13px;
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dp-dow {
  font-size: 10.5px;
  color: var(--ink-3);
  text-align: center;
  padding: 3px 0;
}

.dp-day {
  height: 32px;
  border-radius: 8px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  transition: background 100ms;
}

.dp-day:hover {
  background: var(--hover);
}

.dp-day[data-out] {
  color: var(--ink-4);
}

.dp-day[data-today] {
  color: var(--accent);
  font-weight: 700;
}

.dp-day[data-on] {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 820;
  display: grid;
  place-items: center;
  padding: 24px;
}

.backdrop.dim {
  background: var(--scrim);
}

.dialog {
  width: min(400px, 100%);
  background: var(--elevated);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-modal);
}

.dialog h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dialog p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5;
}

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

.toasts {
  position: fixed;
  z-index: 950;
  left: 50%;
  bottom: calc(20px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding: 8px 8px 8px 15px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 14px 30px -10px rgb(0 0 0 / 0.4);
  animation: toast-in 380ms var(--spring);
  max-width: calc(100vw - 32px);
}

.toast:not(:has(.toast-action)) {
  padding-right: 15px;
}

.toast-error {
  background: var(--danger);
  color: white;
}

.toast-action {
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 650;
  color: var(--accent);
  background: color-mix(in oklab, var(--bg) 12%, transparent);
}

.toast.leaving {
  animation: toast-out 200ms var(--ease-in) forwards;
}

@keyframes toast-in {
  from {
    transform: translateY(14px) scale(0.94);
    opacity: 0;
  }
}

@keyframes toast-out {
  to {
    transform: translateY(8px) scale(0.97);
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ editor */

.editor-backdrop {
  background: var(--scrim);
}

.editor {
  position: relative;
  width: min(1100px, 100%);
  height: min(780px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  background: var(--surface);
  border-radius: var(--editor-r);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  transition: box-shadow 200ms;
}

.editor.file-over {
  box-shadow:
    var(--shadow-modal),
    0 0 0 2px var(--accent),
    0 0 0 8px color-mix(in oklab, var(--accent) 18%, transparent);
}

.ed-mode {
  display: none;
}

.ed-compose {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.ed-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 12px 8px 18px;
}

.ed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ed-chips .swatch {
  width: 9px;
  height: 9px;
}

.time-chip {
  position: relative;
  cursor: pointer;
}

.time-chip[data-empty] {
  color: var(--ink-3);
}

.time-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.time-input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.chip-x {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  margin-right: -5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.chip-x:hover {
  background: var(--press);
  color: var(--ink);
}


.ed-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 22px 22px;
}

.ed-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.ed-tile {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 13px;
  overflow: hidden;
  background: var(--surface-3);
  cursor: grab;
  touch-action: manipulation;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ed-tile img,
.ed-tile .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.ed-tile:has(.ring) img {
  filter: saturate(0.7) brightness(0.85);
}

.tile-x {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.6);
  color: white;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 140ms,
    transform 200ms var(--bounce);
}

.ed-tile:hover .tile-x,
.ed-tile:focus-within .tile-x {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .tile-x {
    opacity: 1;
    transform: none;
  }
}

.ed-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 96px;
  height: 96px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 550;
  color: var(--ink-3);
  border: 1.5px dashed var(--line-2);
  transition:
    background 140ms,
    color 140ms,
    border-color 140ms,
    transform 200ms var(--spring);
}

.ed-add:hover {
  background: var(--hover);
  color: var(--ink);
  border-color: var(--ink-4);
}

.ed-add:active {
  transform: scale(0.97);
}

.ed-media[data-empty='true'] .ed-add {
  width: 100%;
  height: 132px;
  font-size: 13px;
  border-radius: 16px;
}

.ed-media[data-empty='true'] .ed-add .i {
  width: 22px;
  height: 22px;
}

.ed-write {
  position: relative;
  margin-top: 8px;
}

.ed-text {
  display: block;
  width: 100%;
  min-height: 132px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  padding: 8px 0 4px;
}

.ed-text::placeholder {
  color: var(--ink-4);
}

.ed-count {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  transition: color 160ms;
}

.ed-count[data-over='near'] {
  color: var(--warn);
}

.ed-count[data-over='true'] {
  color: var(--danger);
  font-weight: 600;
}

.ed-section {
  margin-top: 22px;
}

.ed-section[hidden] {
  display: none;
}

.ed-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 9px;
}

.ed-hint {
  color: var(--ink-4);
  font-weight: 450;
  margin-left: 6px;
}

.ed-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platform {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition:
    background 160ms,
    color 160ms,
    box-shadow 160ms,
    transform 260ms var(--bounce);
}

.platform:hover {
  background: var(--hover);
  color: var(--ink);
}

.platform[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
  box-shadow: none;
}

.platform:active {
  transform: scale(0.94);
}

.ed-notes {
  display: block;
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 60px;
}

.ed-notes:focus {
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 0 0 3px rgb(120 120 130 / 0.2);
}

.ed-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px calc(11px + var(--safe-b));
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

/* Said only when the connection has dropped with edits still to send. */
.unsent {
  position: fixed;
  z-index: 960;
  left: 16px;
  bottom: calc(16px + var(--safe-b));
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px 0 12px;
  border-radius: 10px;
  background: var(--elevated);
  box-shadow: var(--shadow-pop);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-2);
}

.unsent[hidden] {
  display: none;
}

.unsent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  animation: breathe 900ms ease-in-out infinite alternate;
}

@keyframes breathe {
  to {
    opacity: 0.3;
  }
}

.ed-keys kbd {
  margin: 0 2px;
}

/* The stage, where the post is shown as it will look. */
.ed-preview {
  background: var(--stage);
  background-image: radial-gradient(color-mix(in oklab, var(--ink) 9%, transparent) 1px, transparent 1px);
  background-size: 18px 18px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding: 16px 18px 14px;
}

.pv-top {
  display: flex;
  justify-content: center;
}

.pv-tabs > button:disabled {
  opacity: 0.35;
}

.pv-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 14px 0;
}

.pv-where {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

.pv-feed {
  width: min(400px, 100%);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 14px 10px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  align-self: start;
  margin-top: 6vh;
}

.pv-avatar,
.pv-me {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 650;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--scheduled));
}

.pv-who {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  min-width: 0;
}

.pv-who b {
  font-weight: 650;
  white-space: nowrap;
}

.pv-who > span:not(.grow, .pv-marks) {
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-marks {
  display: inline-flex;
  gap: 5px;
  color: var(--ink-3);
}

.pv-text {
  margin: 3px 0 10px;
  font-size: 14.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pv-text.empty {
  color: var(--ink-4);
}

.pv-grid {
  display: grid;
  gap: 3px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
  margin-bottom: 4px;
}

.pv-grid[data-n='2'] {
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 16 / 10;
}

.pv-grid[data-n='3'] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 16 / 10;
}

.pv-grid[data-n='3'] .pv-cell:first-child {
  grid-row: span 2;
}

.pv-grid[data-n='4'] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 16 / 10;
}

.pv-cell {
  position: relative;
  min-height: 0;
  background: var(--surface-3);
}

.pv-cell img,
.pv-cell video,
.pv-cell .pv-ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-ph {
  display: grid;
  place-items: center;
  color: var(--ink-4);
}

.pv-actions {
  display: flex;
  justify-content: space-between;
  max-width: 300px;
  padding: 8px 2px 2px;
  color: var(--ink-3);
  font-size: 12px;
}

.pv-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pv-phone {
  padding: 7px;
  border-radius: 42px;
  background: #050505;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.06),
    0 30px 60px -20px rgb(0 0 0 / 0.5);
}

.pv-screen {
  position: relative;
  height: min(600px, calc(100vh - 230px));
  aspect-ratio: 9 / 16;
  border-radius: 35px;
  overflow: hidden;
  background: #151515;
  color: white;
  isolation: isolate;
}

.pv-slide {
  position: absolute;
  inset: 0;
}

.pv-slide img,
.pv-slide video,
.pv-slide .pv-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pv-slide.none {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #222, #0d0d0d);
}

.pv-slide.none span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgb(255 255 255 / 0.5);
}

.pv-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(0 0 0 / 0.66), transparent 42%),
    linear-gradient(to bottom, rgb(0 0 0 / 0.25), transparent 18%);
  pointer-events: none;
}

.pv-dots {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.pv-dots span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.45);
  transition:
    width 300ms var(--spring),
    background 200ms;
}

.pv-dots span.on {
  width: 16px;
  background: white;
}

.pv-rail {
  position: absolute;
  right: 10px;
  bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.pv-rail > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.4));
}

.pv-rail small {
  font-size: 10.5px;
  font-weight: 600;
}

.pv-me {
  width: 36px;
  height: 36px;
  font-size: 12px;
  box-shadow: 0 0 0 2px white;
  margin-bottom: 4px;
}

.pv-caption {
  position: absolute;
  left: 14px;
  right: 62px;
  bottom: 18px;
  font-size: 13px;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

.pv-caption b {
  font-size: 14px;
  font-weight: 650;
}

.pv-caption p {
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pv-caption p.empty {
  color: rgb(255 255 255 / 0.55);
}

.pv-caption .rt-tag,
.pv-caption .rt-at,
.pv-caption .rt-url {
  color: white;
  font-weight: 650;
  text-decoration: none;
}

.pv-sound {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  opacity: 0.85;
}

/* ------------------------------------------------------------------ info sheet */

.sheet {
  width: min(740px, 100%);
  height: min(780px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--elevated);
  border-radius: 22px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px 12px 22px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  flex: 1;
}

.sheet-content {
  overflow: auto;
  flex: 1;
}

.info-body {
  padding: 22px 26px 40px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.info-body h3 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  margin: 26px 0 6px;
}

.info-body .lede {
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-weight: 560;
  margin-top: 0;
}

.muted {
  color: var(--ink-3);
}

.code-sample {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.api-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.api-table td:first-child {
  padding-right: 16px;
  white-space: nowrap;
}

.api-table code,
.info-body code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}

.keys {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 10px 0;
}

.keys dt,
.keys dd {
  margin: 0;
}

.info-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 8px;
}

.token-list {
  display: flex;
  flex-direction: column;
}

.token-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.token-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.token-name {
  color: var(--ink);
  font-weight: 600;
}

.token-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ empty, gate */

.empty-state {
  position: fixed;
  inset: var(--top-h) 0 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 24px;
}

.empty-state[hidden] {
  display: none;
}

.empty-card {
  width: min(460px, 100%);
  text-align: center;
}

.empty-card h1 {
  margin: 22px 0 8px;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.05em;
}

.empty-card p {
  margin: 0 auto 22px;
  color: var(--ink-2);
  max-width: 340px;
  line-height: 1.5;
}

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

.empty-input {
  height: 42px;
  font-size: 15px;
}

.empty-row .btn {
  height: 42px;
}

.empty-suggest {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.empty-art {
  display: inline-flex;
  gap: 8px;
  align-items: flex-start;
  height: 76px;
}

.empty-art span {
  width: 46px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  animation: art 2.4s var(--ease-out) infinite alternate;
}

.empty-art span:nth-child(1) {
  height: 76px;
  background: linear-gradient(var(--accent), color-mix(in oklab, var(--accent) 70%, white));
}

.empty-art span:nth-child(2) {
  height: 52px;
  animation-delay: 0.3s;
}

.empty-art span:nth-child(3) {
  height: 64px;
  animation-delay: 0.6s;
}

@keyframes art {
  to {
    transform: translateY(6px);
  }
}

.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
}

.gate h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.gate p {
  margin: 0 0 8px;
  color: var(--ink-2);
}

.gate .logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

/* ------------------------------------------------------------------ view transitions */

::view-transition-group(*) {
  animation-duration: 340ms;
  animation-timing-function: var(--spring);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
}

:root[data-vt='zoom-out']::view-transition-old(root) {
  animation: vt-leave-small 220ms var(--ease-in) both;
}

:root[data-vt='zoom-out']::view-transition-new(root) {
  animation: vt-enter-large 380ms var(--spring) both;
}

:root[data-vt='zoom-in']::view-transition-old(root) {
  animation: vt-leave-large 220ms var(--ease-in) both;
}

:root[data-vt='zoom-in']::view-transition-new(root) {
  animation: vt-enter-small 380ms var(--spring) both;
}

@keyframes vt-leave-small {
  to {
    opacity: 0;
    transform: scale(0.975);
  }
}

@keyframes vt-enter-large {
  from {
    opacity: 0;
    transform: scale(1.025);
  }
}

@keyframes vt-leave-large {
  to {
    opacity: 0;
    transform: scale(1.025);
  }
}

@keyframes vt-enter-small {
  from {
    opacity: 0;
    transform: scale(0.975);
  }
}

/* The card opening into the editor: the box grows, the editor is revealed inside it. */
::view-transition-group(post) {
  animation-duration: 420ms;
}

/*
 * The contents are clipped to the growing box, but the box's own shadow is not: it is drawn
 * here and fades from a card's to a window's as the box grows, so the real window's shadow
 * is already there when the transition hands over to it.
 */
::view-transition-image-pair(post) {
  overflow: clip;
  background: var(--surface);
  border-radius: var(--editor-r);
  box-shadow: var(--shadow-modal);
  animation: vt-window-in 440ms var(--ease-gentle) both;
}

:root[data-vt='close']::view-transition-image-pair(post) {
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
  animation: vt-window-out 360ms var(--ease-gentle) both;
}

@keyframes vt-window-in {
  from {
    border-radius: var(--r-card);
    box-shadow: var(--shadow-1);
  }
  to {
    border-radius: var(--editor-r);
    box-shadow: var(--shadow-modal);
  }
}

@keyframes vt-window-out {
  from {
    border-radius: var(--editor-r);
    box-shadow: var(--shadow-modal);
  }
  to {
    border-radius: var(--r-card);
    box-shadow: var(--shadow-1);
  }
}

::view-transition-old(post) {
  animation: vt-fade-out 140ms var(--ease-in) both;
  height: 100%;
  object-fit: cover;
}

::view-transition-new(post) {
  animation: vt-fade-in 240ms 40ms var(--ease-out) both;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

:root[data-vt='close']::view-transition-old(post) {
  animation: vt-fade-out 200ms var(--ease-in) both;
}

:root[data-vt='close']::view-transition-new(post) {
  animation: vt-fade-in 200ms 60ms var(--ease-out) both;
}

:root[data-vt='close']::view-transition-group(post) {
  animation-duration: 360ms;
}

::view-transition-group(day) {
  animation-duration: 420ms;
}

@keyframes vt-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ phone */

@media (max-width: 760px) {
  :root {
    --top-h: 54px;
    --heads-h: 0px;
    --editor-r: 0px;
  }

  .top {
    padding: 0 8px 0 14px;
    gap: 4px;
  }

  .brand {
    display: none;
  }

  .title {
    font-size: 21px;
    min-width: 0;
    padding-left: 0;
  }

  .new-btn,
  .theme-btn,
  .shelf-btn .label,
  .view-switch span:not(.seg-pill) {
    display: none;
  }

  .view-switch > button {
    padding: 0 9px;
  }

  .today-btn {
    padding: 0 9px;
  }

  .month-nav {
    display: none !important;
  }

  .tabs {
    position: relative;
    display: flex;
    gap: 2px;
    padding: 6px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    z-index: 15;
  }

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

  .tab {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--ink-3);
    white-space: nowrap;
    transition: color 200ms;
  }

  .tab[aria-pressed='true'] {
    color: var(--ink);
  }

  .tab-add {
    padding: 0 10px;
  }

  .tab-pill {
    position: absolute;
    z-index: 0;
    top: 6px;
    left: 0;
    height: 32px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-1);
    transition:
      transform 420ms var(--spring),
      width 420ms var(--spring);
  }

  .board-grid {
    width: 100%;
  }

  .heads {
    display: none;
  }

  .day {
    display: block;
    padding: 0 12px 6px;
    contain-intrinsic-size: auto 120px;
  }

  .day-label {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: 0 -12px;
    padding: 0 12px;
  }

  .day-label-in {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 0;
    padding: 12px 2px 8px;
    border-radius: 0;
    width: 100%;
  }

  .day-label-in:hover {
    background: none;
  }

  .dl-num {
    font-size: 22px;
  }

  .dl-dow {
    font-size: 14px;
    color: var(--ink);
  }

  .dl-mon {
    font-size: 14px;
    color: var(--ink-3);
  }

  .dl-rel {
    margin: 0 0 0 4px;
    align-self: center;
  }

  .cell {
    padding: 0 0 8px;
    min-height: 0;
  }

  .board[data-tab='all'] .cell {
    padding-top: 4px;
  }

  .board[data-tab='all'] .cell-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    padding: 0 2px;
  }

  .board[data-tab='all'] .cell:not(:has(.card)) {
    display: none;
  }

  .board[data-tab='all'] .day:not(:has(.card)) .cell:first-of-type {
    display: flex;
  }

  .board[data-tab='all'] .day:not(:has(.card)) .cell:first-of-type .cell-label {
    display: none;
  }

  .add {
    opacity: 0.55;
    height: 36px;
  }

  .month-banner {
    padding: 28px 14px 6px;
  }

  .month-banner h2 {
    font-size: 30px;
  }

  .card[data-format='visual'] .hero {
    aspect-ratio: 4 / 5;
  }

  .fab {
    display: grid;
    place-items: center;
    position: fixed;
    right: 18px;
    bottom: calc(20px + var(--safe-b));
    z-index: 40;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: var(--accent);
    color: white;
    box-shadow:
      0 14px 30px -8px color-mix(in oklab, var(--accent) 60%, transparent),
      inset 0 -2px 0 rgb(0 0 0 / 0.12);
    transition: transform 240ms var(--bounce);
  }

  .fab:active {
    transform: scale(0.9);
  }

  .month {
    padding: 0 6px 90px;
  }

  .month-top {
    padding: 10px 4px 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .legend {
    flex-wrap: nowrap;
  }

  .month-dow span {
    padding-left: 0;
    text-align: center;
  }

  .month-grid {
    grid-template-rows: repeat(var(--weeks, 5), minmax(74px, 1fr));
    min-height: 0;
    border-radius: 14px;
  }

  .mday {
    padding: 4px 2px;
    align-items: center;
    cursor: pointer;
  }

  .mday-top {
    justify-content: center;
  }

  .mday-top .grow {
    display: none;
  }

  .mday-num {
    pointer-events: none;
  }

  .mday-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    pointer-events: none;
  }

  .chip-post {
    width: 7px;
    height: 7px;
    padding: 0;
    border-radius: 50%;
    background: var(--p);
  }

  .chip-post > *,
  .mday-more {
    display: none;
  }

  .shelf {
    position: fixed;
    inset: auto 0 0;
    width: auto;
    height: 70vh;
    z-index: 60;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-modal);
  }

  .backdrop {
    padding: 0;
    align-items: end;
  }

  .editor {
    width: 100%;
    height: 100%;
    border-radius: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .ed-mode {
    display: inline-flex;
    justify-self: center;
    margin: calc(10px + env(safe-area-inset-top, 0px)) 0 0;
  }

  .editor[data-mode='write'] .ed-preview,
  .editor[data-mode='preview'] .ed-compose {
    display: none;
  }

  .ed-head {
    padding: 10px 8px 6px 14px;
  }

  .ed-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .ed-scroll {
    padding: 4px 16px 20px;
  }

  .ed-text {
    font-size: 17px;
  }

  .ed-preview {
    border-left: 0;
  }

  .ed-keys {
    display: none;
  }

  .pv-screen {
    height: min(620px, calc(100dvh - 190px));
  }

  .sheet {
    height: 92dvh;
    border-radius: 22px 22px 0 0;
  }

  .info-body {
    padding: 18px 18px 40px;
  }

  .sheet-head {
    flex-wrap: wrap;
  }

  .empty-row {
    flex-direction: column;
  }

  .toasts {
    bottom: calc(92px + var(--safe-b));
  }
}

/* A phone's fields must be 16px or Safari zooms the page on focus. */
@supports (-webkit-touch-callout: none) {
  input,
  textarea {
    font-size: max(16px, 1em);
  }
}

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