/* src/theme.css */
:root {
  color-scheme: light dark;
}
:root[data-theme=light] {
  color-scheme: light;
}
:root[data-theme=dark] {
  color-scheme: dark;
}
@media print {
  :root,
  :root * {
    color-scheme: light !important;
  }
}
:root {
  --bg: #f5f6f1;
  --ink: #20372c;
  --label: #44584b;
  --muted: #637166;
  --faint: #646f61;
  --green: #285742;
  --green-hover: #1d4735;
  --link: #315d80;
  --paper: #fff;
  --raised: #f9fbf5;
  --workspace: #f0f3eb;
  --tint: #eef2ea;
  --tint-strong: #e2eadb;
  --hover: #f0f4ec;
  --knob: #fff;
  --line: #dfe5db;
  --line-strong: #cdd6c8;
  --line-hover: #bccab6;
  --focus: #4f9466;
  --focus-glow: #61a37833;
  --primary: #285742;
  --primary-hover: #1d4735;
  --on-primary: #fff;
  --header: #192d25;
  --header-ink: #eef4eb;
  --header-muted: #adc09f;
  --header-line: #284033;
  --header-control: #46614e;
  --header-hover: #294333;
  --header-hover-line: #5a7862;
  --accent: #c4db98;
  --accent-hover: #d6e8b0;
  --on-accent: #192d25;
  --gold: #f2c879;
  --danger: #9b3636;
  --danger-tint: #fbf0ee;
  --danger-line: #e7c9c4;
  --danger-solid: #9b2f2f;
  --warning: #614c20;
  --warning-tint: #fff5d8;
  --warning-line: #e7d49a;
  --notice: #834823;
  --notice-tint: #fff5e9;
  --caution: #6b5326;
  --caution-tint: #fbf6ea;
  --caution-line: #d9c9a8;
  --success: #2f6b45;
  --success-tint: #e1efe2;
  --success-solid: #2f6d4f;
  --info: #2d5f8a;
  --info-solid: #2d5f8a;
  --amber-solid: #8a5a14;
  --neutral-solid: #57655a;
  --highlight: #f6e7a7;
  --on-solid: #fff;
  --code: #ebefe7;
  --code-block: #1f2b25;
  --code-block-ink: #e9efe6;
  --tooltip: #1f2b25;
  --tooltip-ink: #f2f6ef;
  --toast: #20382b;
  --toast-ink: #eef6e5;
  --toast-line: #4d6a44;
  --backdrop: #17271d73;
  --spotlight: #121c1773;
  --shadow-color: #1d382314;
  --shadow-strong: #152b3540;
  --shimmer: #ffffff99;
  --placeholder-from: #e7eedf;
  --placeholder-to: #f6f1e3;
  --poster: #285742;
  --stage-text: #4c654c;
  --stage-text-strong: #1d3528;
  --stage-text-soft: #6b7863;
  --stage-measure: #687562;
  --stage-measure-soft: #aebda7;
  --stage-measure-faint: #e7ece2;
  --stage-stem: #d4dfcc;
  --stage-marker: #547d5b;
  --stage-marker-group: #3b654a;
  --stage-marker-strong: #214f38;
  --stage-marker-selected: #173c28;
  --stage-marker-edge: #cedcc7;
  --stage-marker-ring: #e3eccb;
  --stage-ground: #fff;
  --stage-halo: #fff;
  --stage-heading-backing: #fbfcf9e6;
  --stage-duration: #73958b;
  --stage-duration-text: #102a20;
  --stage-arc: #6f8c80;
  --stage-cursor: #b0891d;
  --stage-tick-minor: #cbd5c5;
  --stage-tick-major: #b5c2ad;
  --stage-tick-boundary: #71886b;
  --stage-fan: #b9c7ad;
}
@supports (color: light-dark(#000, #fff)) {
  :root {
    --bg: light-dark(#f5f6f1, #121c17);
    --ink: light-dark(#20372c, #e3ebe0);
    --label: light-dark(#44584b, #c3d0c5);
    --muted: light-dark(#637166, #a5b3a8);
    --faint: light-dark(#646f61, #8a9a8e);
    --green: light-dark(#285742, #9fd0a8);
    --green-hover: light-dark(#1d4735, #bfe3c4);
    --link: light-dark(#315d80, #9cc3e6);
    --paper: light-dark(#fff, #1a2720);
    --raised: light-dark(#f9fbf5, #1d2c24);
    --workspace: light-dark(#f0f3eb, #16221c);
    --tint: light-dark(#eef2ea, #223329);
    --tint-strong: light-dark(#e2eadb, #2b4034);
    --hover: light-dark(#f0f4ec, #223329);
    --knob: light-dark(#fff, #a5b3a8);
    --line: light-dark(#dfe5db, #2c3d33);
    --line-strong: light-dark(#cdd6c8, #3d5145);
    --line-hover: light-dark(#bccab6, #557062);
    --focus: light-dark(#4f9466, #8fd19e);
    --focus-glow: light-dark(#61a37833, #8fd19e40);
    --primary: light-dark(#285742, #c4db98);
    --primary-hover: light-dark(#1d4735, #d6e8b0);
    --on-primary: light-dark(#fff, #192d25);
    --danger: light-dark(#9b3636, #f2a39b);
    --danger-tint: light-dark(#fbf0ee, #3a2321);
    --danger-line: light-dark(#e7c9c4, #6e3b36);
    --warning: light-dark(#614c20, #ecd49a);
    --warning-tint: light-dark(#fff5d8, #302b17);
    --warning-line: light-dark(#e7d49a, #5e5228);
    --notice: light-dark(#834823, #f0bf94);
    --notice-tint: light-dark(#fff5e9, #33251a);
    --caution: light-dark(#6b5326, #e6cf9c);
    --caution-tint: light-dark(#fbf6ea, #2c271b);
    --caution-line: light-dark(#d9c9a8, #5a4c30);
    --success: light-dark(#2f6b45, #9fd0a8);
    --success-tint: light-dark(#e1efe2, #1f3a29);
    --info: light-dark(#2d5f8a, #9cc3e6);
    --highlight: light-dark(#f6e7a7, #5c5122);
    --code: light-dark(#ebefe7, #24352b);
    --code-block: light-dark(#1f2b25, #0d1611);
    --code-block-ink: light-dark(#e9efe6, #e3ebe0);
    --tooltip: light-dark(#1f2b25, #34493d);
    --toast: light-dark(#20382b, #2a4535);
    --toast-line: light-dark(#4d6a44, #5a7862);
    --backdrop: light-dark(#17271d73, #050a07b3);
    --spotlight: light-dark(#121c1773, #000000a6);
    --shadow-color: light-dark(#1d382314, #00000066);
    --shadow-strong: light-dark(#152b3540, #000000a6);
    --shimmer: light-dark(#ffffff99, #ffffff14);
    --placeholder-from: light-dark(#e7eedf, #22352a);
    --placeholder-to: light-dark(#f6f1e3, #2e3326);
    --stage-text: light-dark(#4c654c, #c3d3c4);
    --stage-text-strong: light-dark(#1d3528, #e3ebe0);
    --stage-text-soft: light-dark(#6b7863, #8d9d90);
    --stage-measure: light-dark(#687562, #93a497);
    --stage-measure-soft: light-dark(#aebda7, #4d6356);
    --stage-measure-faint: light-dark(#e7ece2, #223128);
    --stage-stem: light-dark(#d4dfcc, #34483c);
    --stage-marker: light-dark(#547d5b, #7fae88);
    --stage-marker-group: light-dark(#3b654a, #6c9c77);
    --stage-marker-strong: light-dark(#214f38, #a9d3b0);
    --stage-marker-selected: light-dark(#173c28, #c4e4c9);
    --stage-marker-edge: light-dark(#cedcc7, #3d5145);
    --stage-marker-ring: light-dark(#e3eccb, #3d5a45);
    --stage-ground: light-dark(#fff, #1a2720);
    --stage-halo: light-dark(#fff, #1a2720);
    --stage-heading-backing: light-dark(#fbfcf9e6, #1a2720e6);
    --stage-duration: light-dark(#73958b, #587b70);
    --stage-duration-text: light-dark(#102a20, #fff);
    --stage-arc: light-dark(#6f8c80, #7c978b);
    --stage-cursor: light-dark(#b0891d, #e0b84a);
    --stage-tick-minor: light-dark(#cbd5c5, #34463b);
    --stage-tick-major: light-dark(#b5c2ad, #4a5f52);
    --stage-tick-boundary: light-dark(#71886b, #8aa58f);
    --stage-fan: light-dark(#b9c7ad, #4d6356);
  }
}

/* src/dialog-motion.css */
dialog[open] {
  animation: dialog-enter 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
dialog[open]::backdrop {
  animation: dialog-backdrop-enter 180ms ease-out both;
}
dialog[open][data-dialog-closing] {
  animation: dialog-exit 140ms ease-in both;
  pointer-events: none;
}
dialog[open][data-dialog-closing]::backdrop {
  animation: dialog-backdrop-exit 140ms ease-in both;
}
@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes dialog-exit {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}
@keyframes dialog-backdrop-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes dialog-backdrop-exit {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog[open],
  dialog[open]::backdrop,
  dialog[open][data-dialog-closing],
  dialog[open][data-dialog-closing]::backdrop {
    animation: none;
  }
}

/* src/styles.css */
.legal-notices {
  padding: 16px 28px;
  font-size: 12px;
  color: var(--muted);
}
.legal-notices summary {
  cursor: pointer;
  padding: 8px 0;
}
.legal-notices details details {
  margin-left: 12px;
}
.legal-notices pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 380px;
  overflow: auto;
  line-height: 1.6;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --radius: 8px;
  --control-height: 32px;
  --sidebar: 208px;
}
a {
  color: var(--green);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--green-hover);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-height);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 1px var(--shadow-color);
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
button:hover {
  background: var(--hover);
  border-color: var(--line-hover);
}
button:active {
  transform: translateY(1px);
}
:where(.timeline-stage) button {
  display: revert;
  min-height: 0;
  gap: normal;
  background: transparent;
  border-color: var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 550;
  line-height: normal;
  box-shadow: none;
}
:where(.timeline-stage) button:hover {
  background: var(--tint);
  border-color: var(--line);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
button:disabled:hover {
  background: var(--paper);
  border-color: var(--line-strong);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
input,
textarea,
select {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
select {
  min-height: 36px;
}
input:hover,
textarea:hover,
select:hover {
  border-color: var(--line-hover);
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-glow);
}
::placeholder {
  color: var(--faint);
}
textarea {
  resize: vertical;
}
#presentation-dialog {
  min-width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
#presentation-form > div:not(.dialog-heading):not(.dialog-actions),
#presentation-form > label {
  margin-top: 16px;
}
#presentation-form label + label {
  margin-top: 12px;
}
#presentation-source {
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.presentation-preview {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 12px;
  font-size: 12px;
}
.time-context {
  padding: 8px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 12px ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.time-context[hidden] {
  display: none;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
}
.button-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.button-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.button-primary:disabled:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.button-danger {
  color: var(--danger);
  border-color: var(--danger-line);
}
.button-danger:hover {
  background: var(--danger-tint);
  border-color: var(--danger-line);
}
.muted,
.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.app-header {
  height: 72px;
  background: var(--header);
  color: var(--header-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--header-line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.045em;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  font-size: 30px;
  color: var(--accent);
  line-height: 1;
}
.brand-mark svg {
  display: block;
  width: 1em;
  height: 1em;
}
.brand-version {
  margin-left: 10px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  border: 1px solid var(--header-control);
  color: var(--header-muted);
  padding: 3px 5px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}
.edition-chip {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--header-hover-line);
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--accent);
  background: var(--header-hover);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-right button {
  color: var(--header-ink);
  background: transparent;
  border-color: var(--header-control);
  box-shadow: none;
}
.header-right button:hover {
  background: var(--header-hover);
  border-color: var(--header-hover-line);
}
.theme-select {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--header-muted);
  font-weight: 500;
}
.header-right .theme-select select {
  width: auto;
  min-height: var(--control-height);
  padding: 0 8px;
  border-color: var(--header-control);
  background: var(--header);
  color: var(--header-ink);
  font-size: 12px;
}
.header-right .theme-select select:hover {
  border-color: var(--header-hover-line);
}
.header-right .button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.header-right .button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.badge {
  font-size: 11px;
  border: 1px solid var(--header-control);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--header-muted);
  white-space: nowrap;
}
.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}
.workspace {
  border-right: 1px solid var(--line);
  padding: 29px 20px;
  display: flex;
  flex-direction: column;
  background: var(--workspace);
}
.workspace-new {
  justify-content: flex-start;
  margin-top: 18px;
  text-align: left;
  background: var(--tint-strong);
  border-color: var(--line-strong);
  color: var(--green);
  padding: 11px;
}
.timeline-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-list button {
  display: block;
  padding: 10px 12px;
  white-space: normal;
  text-align: left;
  background: var(--paper);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.timeline-list button small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
}
.server-chip {
  display: inline-block;
  max-width: 18em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 10.5px;
  line-height: 1.6;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid hsl(var(--server-hue, 110) 30% 78%);
  background: hsl(var(--server-hue, 110) 45% 93%);
  color: hsl(var(--server-hue, 110) 35% 26%);
}
.timeline-list button .server-chip,
.library-plugin .server-chip {
  margin: 0 0 5px;
}
.server-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.server-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.server-row .server-status {
  flex: 1;
  min-width: 8em;
  color: var(--muted);
  font-size: 12px;
}
.workspace-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  padding: 10px 2px;
}
.workspace-bottom {
  margin-top: auto;
  padding-top: 100px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.9;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--focus);
  border-radius: 50%;
  margin-right: 5px;
}
.workspace-bottom p {
  font-size: 10px;
  color: var(--faint);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
main {
  padding: 0 30px;
  min-width: 0;
}
.document-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumbs a {
  text-decoration: none;
}
.breadcrumbs a[href]:hover {
  text-decoration: underline;
}
.breadcrumbs a:not([href]) {
  color: var(--ink);
}
.breadcrumbs > span:first-child {
  color: var(--faint);
}
.file-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.document-heading {
  padding: 35px 0 28px;
}
.timeline-image {
  display: block;
  width: min(100%, 420px);
  aspect-ratio: 16 / 9;
  margin-bottom: 8px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--tint);
}
.timeline-image[hidden] {
  display: none;
}
.title-input {
  display: block;
  resize: none;
  overflow: hidden;
  overflow-wrap: break-word;
  font-family:
    Georgia,
    "Times New Roman",
    serif;
  font-size: 34px;
  letter-spacing: -0.04em;
  border: none;
  padding: 10px 0 7px;
  background: transparent;
  width: 100%;
  font-weight: 400;
  line-height: 1.2;
}
.title-input:disabled {
  opacity: 1;
}
.description-input {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  resize: none;
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 26px;
  overflow: hidden;
}
.description-view {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  min-height: 26px;
}
.description-view > :last-child {
  margin-bottom: 0;
}
.linked-from {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.linked-from[hidden] {
  display: none;
}
.linked-from summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.linked-from[open] summary {
  margin-bottom: 8px;
}
.description-view:not(.expanded) {
  max-height: 8.5em;
  overflow: hidden;
}
.description-view.overflowing:not(.expanded) {
  mask-image:
    linear-gradient(
      to bottom,
      #000 60%,
      transparent);
}
.description-more {
  margin-top: 2px;
  font-size: 13px;
}
.description-more[hidden] {
  display: none;
}
.description-view strong {
  color: var(--ink);
}
.description-view[tabindex] {
  cursor: text;
  border-radius: 4px;
}
.description-view[tabindex]:hover {
  background: var(--tint);
}
.description-input[hidden],
.description-view[hidden] {
  display: none;
}
.document-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
}
.meta-separator {
  color: var(--faint);
}
.timeline-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px var(--shadow-color), 0 8px 30px var(--shadow-color);
  overflow: hidden;
}
.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.view-toolbar > div:first-child {
  display: flex;
  gap: 12px;
  align-items: center;
}
.view-name {
  font-size: 14px;
  font-weight: 650;
}
.view-toolbar .muted {
  font-size: 12px;
}
.view-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.calendar-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 400;
  gap: 6px;
  margin-right: 8px;
  color: var(--muted);
}
.calendar-label input {
  width: 14px;
  height: 14px;
  padding: 0;
  accent-color: var(--green);
}
.timeline-stage {
  position: relative;
  height: 365px;
  background: var(--timeline-background, transparent);
  touch-action: none;
  user-select: none;
  overflow: hidden;
  outline-offset: -4px;
  cursor: grab;
}
.timeline-stage.stage-tracks {
  height: var(--stage-tracks-height, 365px);
}
.timeline-stage.own-scheme {
  background: var(--timeline-background, var(--stage-ground));
}
.timeline-stage.dragging {
  cursor: grabbing;
}
html.timeline-fullscreen,
html.timeline-fullscreen body {
  overflow: hidden;
}
html.timeline-fullscreen .timeline-card {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 0;
  border-radius: 0;
}
html.timeline-fullscreen .timeline-stage {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.checkbox-row input {
  width: auto;
}
.duration-backgrounds {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.duration-background {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
}
.timeline-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.timeline-backdrop img {
  width: 100%;
}
:is(.duration-background, .timeline-backdrop) img {
  position: absolute;
  top: 0;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.3s;
}
:is(.duration-background, .timeline-backdrop) img.loaded {
  opacity: 1;
}
.timeline-chart {
  position: absolute;
  inset: 0;
  z-index: 100000;
  width: 100%;
  height: 100%;
  color: var(--timeline-marker, var(--stage-marker));
}
.timeline-chart-area {
  fill: currentColor;
  fill-opacity: 0.16;
}
.timeline-chart-line {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.55;
  stroke-width: 1.5;
}
.timeline-chart-measure-area {
  fill: currentColor;
  fill-opacity: 0.12;
}
.timeline-chart-measure-line {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.7;
  stroke-width: 1.5;
}
.timeline-chart.crowded .timeline-chart-measure-area {
  display: none;
}
.timeline-chart-measure-line.balance {
  stroke-linejoin: miter;
  shape-rendering: crispEdges;
}
.chart-axes {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 100001;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
  pointer-events: none;
  font-size: 11px;
  color: var(--timeline-marker, var(--stage-marker));
}
.chart-axes-band {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
}
.chart-axis-picker {
  position: absolute;
  right: 0;
  max-width: min(260px, 60vw);
  padding: 2px 6px;
  border: 1px solid var(--axis-color, currentColor);
  border-left-width: 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--timeline-background, var(--stage-ground)) 90%, transparent);
  color: var(--timeline-text, var(--stage-text));
  font: inherit;
  font-weight: 600;
  pointer-events: auto;
  cursor: pointer;
}
.timeline-chart-measure-line.muted {
  stroke-opacity: 0.35;
}
.timeline-chart-measure-area.muted {
  fill-opacity: 0.05;
}
.chart-axis {
  position: relative;
  width: calc(var(--axis-chars, 4) * 1ch + 30px);
}
.chart-axis-title,
.chart-axis-value {
  border-radius: 3px;
  background: color-mix(in srgb, var(--timeline-background, var(--stage-ground)) 80%, transparent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chart-axis-value {
  padding: 0 4px;
}
.chart-axis-title {
  position: absolute;
  left: 0;
  padding: 4px 1px;
  box-sizing: border-box;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.chart-axis-value {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  border-right: 2px solid currentColor;
  border-radius: 3px 0 0 3px;
}
.balance-readout {
  position: absolute;
  bottom: 6px;
  z-index: 100001;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--timeline-text, var(--stage-text));
}
.balance-readout span {
  padding: 1px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--timeline-background, var(--stage-ground)) 85%, transparent);
  pointer-events: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-tooltip {
  position: absolute;
  inset: 0;
  z-index: 100002;
  pointer-events: none;
}
.chart-tooltip::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tooltip-x);
  border-left: 1px dashed color-mix(in srgb, var(--timeline-text, var(--stage-text)) 45%, transparent);
}
.chart-tooltip-box {
  position: absolute;
  left: calc(var(--tooltip-x) + 12px);
  top: var(--tooltip-y);
  display: flex;
  flex-direction: column;
  padding: 3px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--timeline-background, var(--stage-ground)) 92%, transparent);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.18);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--timeline-text, var(--stage-text));
  transform: translateY(-50%);
}
.chart-tooltip-value {
  font-weight: 600;
}
.chart-tooltip.flipped .chart-tooltip-box {
  left: auto;
  right: calc(100% - var(--tooltip-x) + 12px);
}
.chart-tooltip-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px var(--timeline-background, var(--stage-ground));
}
.timeline-chart-series-area {
  fill: currentColor;
  fill-opacity: 0.12;
}
.timeline-chart-series-line {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.8;
  stroke-width: 1.5;
}
.timeline-stage.over-backgrounds .event-label {
  width: max-content;
  max-width: 150px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--timeline-halo, var(--stage-halo));
  box-shadow: 0 1px 3px rgb(0 0 0 / 28%), 0 0 0 1px rgb(0 0 0 / 6%);
}
.timeline-stage.over-backgrounds .tick-label {
  -webkit-text-stroke: 3px var(--timeline-halo, var(--stage-halo));
  paint-order: stroke fill;
}
.timeline-stage.over-backgrounds .axis-baseline {
  margin-top: -1px;
  border-top: 3px solid var(--timeline-measure, var(--stage-text-strong));
  border-radius: 2px;
  box-shadow: 0 0 0 2px var(--timeline-halo, var(--stage-halo)), 0 1px 6px rgb(0 0 0 / 40%);
}
.timeline-stage.over-backgrounds .tick-notch {
  border-left: 2px solid var(--timeline-measure, var(--stage-text-strong));
  box-shadow: 0 0 0 1px var(--timeline-halo, var(--stage-halo));
}
.timeline-stage.over-backgrounds .event-stem {
  width: 2px;
  background: var(--timeline-marker, var(--stage-marker));
  box-shadow: 0 0 0 1px var(--timeline-halo, var(--stage-halo));
}
.timeline-stage.over-backgrounds .event-marker {
  box-shadow: 0 0 0 1px rgb(0 0 0 / 45%), 0 2px 6px rgb(0 0 0 / 45%);
}
.timeline-stage.over-backgrounds .duration-band {
  opacity: 1;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 35%), 0 1px 4px rgb(0 0 0 / 40%);
}
.timeline-stage.over-backgrounds .duration-band[data-outline=dashed] {
  outline-offset: 0;
}
.timeline-stage.over-backgrounds .edge-arc {
  stroke: var(--timeline-measure, var(--stage-text-strong));
  stroke-width: 2;
  opacity: 1;
}
.edge-arc-halo {
  display: none;
  fill: none;
  stroke: var(--timeline-halo, var(--stage-halo));
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 1;
  pointer-events: none;
}
.timeline-stage.over-backgrounds .edge-arc-halo {
  display: inline;
}
.timeline-stage.over-backgrounds .event-marker.heading-marker {
  backdrop-filter: blur(4px);
}
.axis,
.markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.axis-baseline {
  position: absolute;
  left: 48px;
  right: 48px;
  top: 192px;
  border-top: 1px solid var(--timeline-measure-soft, var(--stage-measure-soft));
}
.axis-tick {
  position: absolute;
  top: 36px;
  bottom: 62px;
  width: 1px;
}
.tick-guide {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--timeline-measure-faint, var(--stage-measure-faint)) 0,
      var(--timeline-measure-faint, var(--stage-measure-faint)) 3px,
      transparent 3px,
      transparent 7px);
}
.tick-notch {
  position: absolute;
  top: 152px;
  height: 9px;
  border-left: 1px solid var(--timeline-measure-soft, var(--stage-measure-soft));
}
.tick-label {
  position: absolute;
  top: 177px;
  transform: translateX(-50%);
  font-size: calc(10px * var(--timeline-measure-scale, 1));
  font-family: var(--timeline-measure-font, ui-monospace, SFMono-Regular, Consolas, monospace);
  color: var(--timeline-measure, var(--stage-measure));
  max-width: calc(105px * var(--timeline-measure-scale, 1));
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.event-marker {
  position: absolute;
  top: 181px;
  width: 22px;
  height: 22px;
  border: 4px solid var(--stage-ground);
  background: var(--timeline-marker, var(--stage-marker));
  border-radius: 50%;
  padding: 0;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px var(--stage-marker-edge);
  pointer-events: auto;
  cursor: pointer;
}
.event-marker:hover,
.event-marker:focus-visible {
  background: var(--timeline-marker-strong, var(--stage-marker-strong));
  box-shadow: 0 0 0 5px var(--stage-marker-ring);
  z-index: 5;
  transform: translateX(-50%);
}
.event-marker.selected {
  background: var(--timeline-marker-selected, var(--stage-marker-selected));
  box-shadow: 0 0 0 5px var(--stage-marker-ring);
}
.event-marker.group {
  top: 176px;
  width: 32px;
  height: 32px;
  border: 3px solid var(--stage-ground);
  color: var(--stage-ground);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  background: var(--timeline-marker-group, var(--stage-marker-group));
  box-shadow: 0 0 0 1px var(--stage-marker-edge);
}
.event-marker.group.large {
  width: 42px;
  height: 42px;
  top: 171px;
  font-size: 10px;
}
.event-label {
  position: absolute;
  width: calc(150px * var(--timeline-text-scale, 1));
  transform: translateX(-50%);
  text-align: center;
  font-size: calc(11px * var(--timeline-text-scale, 1));
  font-weight: 500;
  font-family: var(--timeline-text-font, inherit);
  color: var(--timeline-text, var(--stage-text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.event-label small {
  display: block;
  color: var(--timeline-text-soft, var(--stage-text-soft));
  font-size: calc(9px * var(--timeline-text-scale, 1));
  font-family: ui-monospace, monospace;
  margin-top: calc(5px * var(--timeline-text-scale, 1));
}
.event-stem {
  position: absolute;
  width: 1px;
  background: var(--timeline-measure-faint, var(--stage-stem));
  pointer-events: none;
}
.stack-label {
  border-radius: 3px;
}
.stack-label .event-caption-title {
  background: var(--stage-ground);
  padding: 0 3px;
}
.stack-stem {
  background: var(--stage-measure-soft);
}
.stack-marker {
  transition: top 220ms ease-out;
}
.empty-window {
  position: absolute;
  inset: 85px 0 auto;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.8;
}
.empty-window button {
  margin-top: 9px;
}
.loading-window {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 5;
  pointer-events: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hover);
}
.loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}
@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation-duration: 2.4s;
  }
}
.timeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.gesture-help {
  color: var(--muted);
  font-size: 12px;
}
.gesture-help span {
  margin: 0 8px;
  color: var(--faint);
}
.density-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  gap: 8px;
}
.density-control input {
  width: 80px;
  accent-color: var(--green);
  padding: 0;
  height: 14px;
  border: 0;
  box-shadow: none;
}
.density-control output {
  min-width: 34px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.window-bounds {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.window-bounds label {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex: 1;
  gap: 4px;
  min-width: 0;
}
.window-bounds input {
  font-size: 13px;
  font-family: ui-monospace, monospace;
  width: 100%;
}
.window-bounds > span {
  color: var(--faint);
  font-size: 14px;
  line-height: 36px;
}
.window-bounds button {
  min-height: 36px;
}
.related-timelines {
  margin: 36px 0 48px;
}
.related-timelines[hidden] {
  display: none;
}
.related-timelines h2 {
  margin: 0 0 14px;
  font-size: 20px;
}
.related-timelines-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.related-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.related-timeline:hover,
.related-timeline:focus-visible {
  border-color: var(--green);
}
.related-timeline img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
}
.related-timeline strong {
  color: var(--green);
  font-size: 16px;
  font-weight: 650;
}
.related-timeline-facts {
  color: var(--muted);
  font-size: 12px;
}
.related-timeline-description {
  font-size: 12px;
  line-height: 1.5;
}
.text-button {
  border: 0;
  padding: 0;
  min-height: 0;
  background: none;
  box-shadow: none;
  font-size: 12px;
  color: var(--green);
}
.text-button:hover {
  background: none;
  text-decoration: underline;
}
.precision-note {
  max-width: 215px;
  padding-top: 2px;
}
.precision-note .eyebrow {
  font-size: 10px;
  margin-bottom: 10px;
  line-height: 1.7;
}
dialog.moment-dialog {
  background: var(--raised);
  width: min(680px, calc(100vw - 30px));
  min-width: 0;
}
dialog.moment-dialog.reading {
  width: min(1100px, calc(100vw - 30px));
}
.reader-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.reader-panel[hidden] {
  display: none;
}
.moment-dialog .reader-panel h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.reader-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.reader-panel figure {
  margin: 0;
}
.reader-panel figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.reader-image img {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 10px;
  background: var(--tint);
}
.moment-dialog p.reader-when {
  margin: 0;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  font-size: 14px;
  color: var(--ink);
}
.reader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.reader-tags li {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--hover);
  font-size: 12px;
}
.reader-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.reader-flags li {
  padding: 1px 10px;
  border: 1px dashed var(--ink);
  border-radius: 999px;
  font-size: 12px;
}
.reader-notes {
  max-width: 75ch;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}
.moment-dialog .reader-notes p {
  color: var(--ink);
  font-size: 16px;
}
.reader-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 14px;
}
.reader-details dt {
  color: var(--muted);
}
.reader-details dd {
  margin: 0;
  white-space: pre-wrap;
}
.reader-section h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.reader-links {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
:is(.reader-stack, .reader-gallery) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.reader-stack {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.reader-stack article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.reader-stack h4 {
  margin: 6px 0 0;
}
:is(.reader-stack, .reader-gallery) img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 7px;
}
@media (max-width: 650px) {
  .reader-panel .inspector-heading {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 8px;
  }
  .moment-dialog .reader-panel h2 {
    order: 1;
    flex-basis: 100%;
    font-size: 26px;
  }
  dialog.moment-dialog.reading {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 18px 16px;
  }
  .reader-details {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .reader-details dd {
    margin-bottom: 8px;
  }
}
.view-mode-switch {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.view-mode-switch input {
  appearance: none;
  position: relative;
  width: 36px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--hover);
  cursor: pointer;
  transition: background 0.15s;
}
.view-mode-switch input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 1px 2px var(--shadow-strong);
  transition: transform 0.15s;
}
.view-mode-switch input:checked {
  border-color: var(--primary);
  background: var(--primary);
}
.view-mode-switch input:checked::before {
  transform: translateX(16px);
  background: var(--on-primary);
}
@media (prefers-reduced-motion: reduce) {
  .view-mode-switch input,
  .view-mode-switch input::before {
    transition: none;
  }
}
.view-mode-switch[hidden] {
  display: none;
}
:root:not([data-settled]) .file-actions {
  visibility: hidden;
}
.inspector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.event-kind {
  display: flex;
  margin: 14px 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 3px;
  gap: 3px;
  background: var(--hover);
}
.event-kind[hidden] {
  display: none;
}
.event-kind button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: calc(var(--control-height) - 4px);
}
.event-kind button[aria-selected=true] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px var(--shadow-color);
}
.event-kind button:disabled {
  cursor: default;
  opacity: 0.55;
}
.inspector-heading button,
.dialog-heading button {
  flex-shrink: 0;
  width: var(--control-height);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
}
.inspector-heading button:hover,
.dialog-heading button:hover {
  background: var(--hover);
  color: var(--ink);
}
.inspector-heading .share-entity {
  width: auto;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  white-space: nowrap;
  font-size: 14px;
}
.inspector-heading .share-entity + .share-entity {
  margin-left: 8px;
}
.moment-dialog h2 {
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0 0 15px;
}
.moment-dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.moment-dialog form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}
.moment-dialog form[hidden] {
  display: none;
}
.moment-dialog input,
.moment-dialog textarea {
  background: var(--paper);
  width: 100%;
}
.moment-dialog .field-hint {
  font-size: 12px;
  margin: -10px 0 0;
}
.moment-dialog details {
  font-size: 13px;
  color: var(--muted);
}
.moment-dialog summary {
  cursor: pointer;
  margin-bottom: 10px;
}
.event-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.group-events {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}
.group-events button {
  flex: none;
  display: block;
  text-align: left;
  white-space: normal;
  background: var(--paper);
  padding: 11px;
  overflow-wrap: anywhere;
}
.group-events small {
  display: block;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  margin-top: 6px;
}
#group-details {
  padding-top: 35px;
}
#group-details h2 {
  font-size: 24px;
}
#group-more {
  margin-top: 15px;
}
.form-error {
  font-size: 12px;
  line-height: 1.6;
  color: var(--danger);
  min-height: 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  background: var(--raised);
  color: var(--ink);
  width: fit-content;
  min-width: min(440px, calc(100vw - 30px));
  max-width: min(900px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  overflow-y: auto;
  overflow-wrap: anywhere;
  box-shadow: 0 20px 100px var(--shadow-strong);
}
dialog::backdrop {
  background: var(--backdrop);
}
dialog form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dialog-heading h2 {
  font-size: 24px;
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 6px;
}
dialog label {
  margin-top: 7px;
}
dialog input,
dialog select {
  width: 100%;
  background: var(--paper);
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dialog-actions select {
  flex: 1;
}
.sharing-link {
  word-break: break-all;
  margin: 12px 0;
  font-family: ui-monospace, monospace;
  font-size: 12px !important;
}
#sharing-dialog > label {
  margin: 24px 0 15px;
}
#members-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 12px;
}
dialog h3 {
  font-size: 14px;
  margin: 24px 0 15px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--toast);
  color: var(--toast-ink);
  border: 1px solid var(--toast-line);
  border-radius: 10px;
  padding: 12px 18px;
  box-shadow: 0 8px 28px var(--shadow-strong);
  font-size: 13px;
  max-width: calc(100vw - 32px);
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  :root {
    --sidebar: 230px;
  }
  main {
    padding: 0 48px;
  }
  .timeline-stage {
    height: 410px;
  }
}
@media (max-width: 1180px) {
  :root {
    --sidebar: 160px;
  }
  .workspace {
    padding: 29px 14px;
  }
  main {
    padding: 0 20px;
  }
  .breadcrumbs {
    display: none;
  }
  .document-toolbar {
    justify-content: flex-end;
  }
  .calendar-label {
    max-width: 77px;
    line-height: 1.4;
  }
  .view-toolbar {
    padding: 13px;
  }
  .view-toolbar .muted {
    display: none;
  }
  .timeline-footer {
    padding: 12px;
  }
  .title-input {
    font-size: 30px;
  }
  .below-timeline {
    gap: 20px;
  }
  .precision-note {
    display: none;
  }
}
@media (max-width: 960px) {
  :root {
    --sidebar: 0px;
  }
  .workspace {
    display: none;
  }
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .title-input {
    font-size: 33px;
  }
  .document-heading {
    padding: 30px 0 24px;
  }
  .timeline-footer {
    flex-wrap: wrap;
  }
  .calendar-label {
    display: none;
  }
  .app-header {
    height: 64px;
    padding: 0 20px;
  }
  .brand {
    font-size: 17px;
  }
  .moment-dialog {
    padding: 28px 18px;
  }
}
@media (max-width: 650px) {
  .app-layout {
    display: block;
  }
  .app-header {
    height: auto;
    min-height: 64px;
    padding: 12px 15px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand-version {
    display: none;
  }
  .header-right {
    gap: 7px;
    flex-wrap: wrap;
    min-width: 0;
  }
  .header-right button {
    padding: 0 10px;
  }
  main {
    padding: 0 15px;
  }
  .document-toolbar {
    min-height: 56px;
  }
  .file-actions {
    gap: 6px;
  }
  .document-heading {
    padding: 25px 0 22px;
  }
  .title-input {
    font-size: 30px;
  }
  .description-input,
  .description-view {
    font-size: 13px;
  }
  .view-toolbar {
    padding: 12px;
  }
  .view-controls {
    gap: 4px;
  }
  .view-controls button {
    padding: 0 10px;
  }
  .view-toolbar > div:first-child {
    gap: 0;
  }
  .timeline-stage {
    height: 330px;
  }
  .timeline-footer {
    justify-content: center;
    gap: 12px;
    padding: 13px 9px;
  }
  .window-bounds {
    gap: 8px;
  }
  #undo-button,
  #redo-button {
    display: none;
  }
  .below-timeline {
    padding: 27px 0 22px;
  }
  .reading-note p {
    font-size: 12px;
  }
  .moment-dialog {
    padding: 24px;
  }
  .moment-dialog form {
    margin-top: 24px;
  }
  .moment-dialog textarea {
    resize: vertical;
  }
  .brand-mark {
    font-size: 27px;
  }
  .timeline-card {
    margin: 0 -15px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .view-toolbar {
    padding: 8px 10px;
  }
  .view-toolbar .view-controls {
    max-width: 100%;
  }
  .timeline-stage {
    height: max(330px, 52svh);
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  main {
    padding: 0 12px;
  }
  .timeline-card {
    margin: 0 -12px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .timeline-card .view-toolbar {
    padding: 6px 10px;
    flex-wrap: nowrap;
  }
  .view-toolbar .view-controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
  }
  .view-toolbar .view-controls > * {
    flex: none;
  }
  .timeline-stage {
    height: max(240px, calc(100svh - 56px));
  }
}
#provider-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
#desktop-login {
  margin-top: 14px;
}
#desktop-login-status {
  overflow-wrap: anywhere;
  white-space: pre-line;
}
#session-list {
  max-height: 160px;
  overflow: auto;
  font-size: 12px;
}
.file-actions {
  flex-wrap: wrap;
}
.time-cursor {
  z-index: 10;
  position: absolute;
  top: 22px;
  bottom: 28px;
  border-left: calc(2px * var(--timeline-scale, 1)) solid var(--stage-cursor);
  pointer-events: none;
}
.time-cursor::before {
  content: "";
  position: absolute;
  left: calc(-5px * var(--timeline-scale, 1));
  top: 0;
  width: calc(8px * var(--timeline-scale, 1));
  height: calc(8px * var(--timeline-scale, 1));
  background: var(--stage-cursor);
  transform: rotate(45deg);
}
.timeline-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 100;
  min-width: 150px;
  padding: 5px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 24px var(--shadow-strong);
}
.timeline-menu button {
  display: block;
  text-align: left;
  width: 100%;
  min-height: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}
.timeline-menu button:hover,
.timeline-menu button:focus-visible {
  background: var(--hover);
}
.event-label {
  transition: top 220ms ease-out;
}
.event-stem {
  transition: top 220ms ease-out, height 220ms ease-out;
}
.event-label small {
  position: relative;
}
.event-time-outgoing {
  position: absolute;
  inset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .event-label,
  .stack-marker,
  .event-stem {
    transition: none;
  }
}
.event-marker.icon {
  overflow: hidden;
  border: 2px solid var(--stage-ground);
  z-index: 2;
  transition: transform 160ms ease-out;
}
.event-marker.icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.event-marker.icon:hover,
.event-marker.icon:focus-visible {
  transform: translateX(-50%) scale(3);
  z-index: 5;
}
.plugin-image-link {
  display: block;
  margin: 14px 0;
}
.plugin-image-link img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
}
.plugin-field,
.installed-plugin,
.library-plugin {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.moment-dialog .plugin-field label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}
.relationship-arrows {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.relationship-arrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.relationship-arrow > p {
  grid-column: 1 / -1;
}
.relationship-arrow.dangling,
.relationship-arrow.unreadable {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}
.relationship-arrow.dangling > p {
  color: var(--danger);
}
.moment-dialog .plugin-field .field-hint {
  margin: 8px 0 0;
  line-height: 1.5;
}
.stack-list {
  display: grid;
  gap: 14px;
  margin: 12px 0;
}
.stack-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 12px;
}
.stack-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.stack-actions strong {
  margin-right: auto;
}
.stack-actions button {
  padding: 5px 8px;
}
.stack-actions [draggable=true] {
  cursor: grab;
  touch-action: none;
}
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.color-swatches button::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--swatch);
  border: 1px solid var(--muted);
}
.color-swatches [aria-pressed=true] {
  outline: 2px solid var(--focus);
}
.moment-dialog .plugin-field input[type=color] {
  width: 100%;
  height: 36px;
  padding: 3px;
}
.event-actions #event-edit-status {
  margin: 0;
}
.dialog-commit {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.plugin-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.plugin-setting {
  display: block;
  margin: 8px 0;
}
.plugin-setting-color {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plugin-setting-color input[type=color] {
  width: 44px;
  height: 30px;
  padding: 2px;
}
.plugin-enable {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plugin-enable input {
  width: auto;
}
@media (prefers-reduced-motion: reduce) {
  .event-marker.icon {
    transition: none;
  }
}
.plugin-image-source {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--green);
}
.view-toolbar,
.view-controls,
.plugin-actions {
  flex-wrap: wrap;
}
.view-toolbar {
  gap: 10px;
}
.event-marker.icon.focus-preview:hover,
.event-marker.icon.focus-preview:focus-visible {
  transform: translateX(-50%);
}
.focus-card {
  position: absolute;
  z-index: 20;
  width: 240px;
  padding: 12px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 28px var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.08);
  transform-origin: center;
  transition:
    transform 180ms ease-out,
    opacity 140ms ease-out,
    border-radius 180ms ease-out;
}
.focus-card.open {
  opacity: 1;
  border-radius: 12px;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(var(--card-scale, 1));
}
.focus-card > strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}
.focus-card .focus-notes {
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 0;
  max-height: 6em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.focus-card img {
  width: 100%;
  max-height: 130px;
  object-fit: cover;
  border-radius: 7px;
  margin-bottom: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .focus-card {
    transition: none;
  }
}
.event-marker.shaped {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none;
  overflow: visible;
}
.marker-shape {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  pointer-events: none;
}
.event-marker.shaped img {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  clip-path: var(--marker-clip);
}
.event-marker.shaped.selected .marker-shape {
  filter: drop-shadow(0 0 2px var(--stage-cursor));
}
.timeline-stage.over-backgrounds .event-marker.shaped {
  box-shadow: none;
}
.timeline-stage.over-backgrounds .event-marker.shaped .marker-shape:not(.marker-outline) {
  filter: drop-shadow(0 0 0.5px rgb(0 0 0 / 70%)) drop-shadow(0 2px 3px rgb(0 0 0 / 45%));
}
.timeline-stage.over-backgrounds .event-marker.shaped.selected .marker-shape:not(.marker-outline) {
  filter: drop-shadow(0 0 0.5px rgb(0 0 0 / 70%)) drop-shadow(0 0 2px var(--stage-cursor));
}
#plugin-definition,
#plugin-source {
  min-height: 180px;
  width: 100%;
  font: 12px/1.5 monospace;
}
body[data-dashboard=true] .app-layout {
  display: none;
}
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 28px;
}
.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.dashboard h1 {
  font-size: 36px;
  margin: 8px 0;
}
.dashboard > section {
  margin: 32px 0 48px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.dashboard-timeline {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  padding: 18px;
  overflow-wrap: anywhere;
}
.dashboard-timeline a {
  color: var(--green);
  font-size: 17px;
  font-weight: 650;
}
.dashboard-timeline p {
  font-size: 12px;
  line-height: 1.6;
}
.dashboard-search {
  display: flex;
  gap: 18px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.dashboard-search label {
  flex: 1;
  min-width: 200px;
}
.timeline-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.timeline-tags button {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tint);
  border-color: var(--line);
  box-shadow: none;
  font-size: 12px;
}
.document-tags {
  display: block;
  margin: 0 0 20px;
  max-width: 650px;
  font-size: 12px;
}
.document-tags input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.pull-comment {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.pull-comment p,
.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#pull-diff {
  max-height: 260px;
  overflow: auto;
  background: var(--tint);
  padding: 12px;
  margin: 18px 0;
  font-size: 12px;
}
body[data-platform-editor] .app-header {
  display: none;
}
.event-marker:not(.group)[data-size=small] {
  width: 16px;
  height: 16px;
  top: 184px;
}
.event-marker:not(.group)[data-size=large] {
  width: 32px;
  height: 32px;
  top: 176px;
}
.event-marker.icon {
  border-width: 4px;
}
.marker-outline {
  z-index: 1;
}
.event-marker[data-outline=dashed]:not(.shaped),
.event-marker[data-outline=dashed]:not(.shaped):focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: -3px;
}
.marker-dashes {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.25;
  stroke-dasharray: 3.5 2.5;
}
.comparison-settings {
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
}
.comparison-settings > .field-hint {
  margin: 6px 0 0;
}
.comparison-heading,
.comparison-track {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.comparison-heading .comparison-combined {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.comparison-heading .comparison-combined input {
  width: auto;
  margin: 0;
}
.comparison-alignment {
  margin-top: 6px;
}
.comparison-alignment > summary {
  cursor: pointer;
  font-weight: 600;
  width: max-content;
}
.comparison-alignment > .field-hint {
  margin: 6px 0;
}
#comparison-tracks {
  max-height: min(40vh, 320px);
  overflow-y: auto;
}
.comparison-track {
  padding: 4px 0;
}
.comparison-track + .comparison-track {
  border-top: 1px solid var(--line);
}
.comparison-track strong {
  flex: 1 1 200px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comparison-track label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.comparison-track input {
  min-height: 30px;
  padding: 4px 8px;
}
.comparison-track label:first-of-type input {
  width: 6em;
}
.comparison-track .comparison-offset {
  width: 12em;
}
.comparison-track button {
  min-height: 30px;
}
.compare-results {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.compare-results label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.compare-results input[type=checkbox] {
  width: auto;
}
.comparison-axis-title {
  position: absolute;
  left: 48px;
  color: var(--muted);
  font-weight: 650;
  font-size: 12px;
}
[data-comparison-disabled] {
  display: none !important;
}
.plugin-source-links {
  padding-left: 1.2rem;
}
.plugin-source-links li {
  margin: 0.4rem 0;
  overflow-wrap: anywhere;
}
.plugin-source-links a {
  color: var(--ink);
}
.memory-notice {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  background: var(--warning-tint);
  color: var(--warning);
  border-bottom: 1px solid var(--warning-line);
}
.memory-notice span {
  line-height: 1.5;
}
.memory-notice button {
  flex-shrink: 0;
}
.capacity-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  flex-shrink: 0;
}
.capacity-actions a {
  color: inherit;
}
.update-notice .link-button {
  color: inherit;
  text-decoration: underline;
}
#update-dismiss,
#capacity-dismiss {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}
.guest-fork-status {
  padding: 0.75rem 1.2rem;
  color: var(--notice);
  background: var(--notice-tint);
  margin: 0;
}
@media (max-width: 600px) {
  .memory-notice {
    align-items: flex-start;
    flex-direction: column;
  }
  .capacity-notice,
  .update-notice {
    position: relative;
    padding-right: 2.6rem;
  }
  #update-dismiss,
  #capacity-dismiss {
    position: absolute;
    top: 0.55rem;
    right: 0.5rem;
  }
}
.guest-fork-original {
  display: block;
  padding: 0.5rem 1.2rem;
}
.focus-card {
  max-height: 90%;
  overflow-y: auto;
}
.focus-sources {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.focus-sources h4 {
  margin: 10px 0 4px;
}
.focus-sources ul {
  margin: 0;
  padding-left: 16px;
}
.focus-sources a,
.markdown-view a {
  color: var(--link);
  text-decoration: underline;
}
.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0;
}
.rich-text-toolbar button {
  min-height: 28px;
  font-size: 12px;
  padding: 0 8px;
}
.rich-text-content {
  min-height: 120px;
  max-height: 400px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0;
}
.rich-text-content:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-glow);
}
.markdown-view {
  overflow-wrap: anywhere;
  white-space: normal;
}
.markdown-view p {
  margin: 0 0 8px;
}
.markdown-view h1,
.markdown-view h2,
.markdown-view h3,
.markdown-view h4,
.markdown-view h5,
.markdown-view h6 {
  font-size: 1.1em;
  margin: 8px 0;
}
.markdown-view h4,
.markdown-view h5,
.markdown-view h6 {
  font-size: 1em;
}
.markdown-view hr {
  border: 0;
  border-top: 1px solid var(--line-strong);
  margin: 12px 0;
}
.markdown-view .markdown-table {
  overflow-x: auto;
  margin: 8px 0;
}
.markdown-view table {
  border-collapse: collapse;
  font-size: 0.95em;
  overflow-wrap: normal;
}
.markdown-view th,
.markdown-view td {
  border: 1px solid var(--line-strong);
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
  min-width: 6em;
}
.markdown-view th {
  background: var(--code);
  font-weight: 600;
}
.markdown-view ul,
.markdown-view ol {
  padding-left: 22px;
  margin: 8px 0;
}
.markdown-view blockquote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 3px solid var(--line-strong);
}
.markdown-view pre {
  white-space: pre-wrap;
  background: var(--code);
  padding: 6px;
}
.focus-card .markdown-view strong {
  display: inline;
  font-size: inherit;
}
.summary-fan {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}
.summary-fan-hit {
  position: absolute;
  pointer-events: auto;
  border-radius: 30px;
}
.summary-fan-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  stroke: var(--stage-fan);
  stroke-width: 1;
}
.summary-fan .summary-member,
.summary-fan .summary-member:hover,
.summary-fan .summary-member:focus-visible {
  transform: translate(-50%, -50%) scale(var(--fan-scale, 1));
  transition:
    left 180ms ease-out,
    top 180ms ease-out,
    opacity 160ms ease-out,
    transform 160ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .summary-fan .summary-member {
    transition: none;
  }
}
.summary-fan .summary-member.icon:not(.focus-preview):hover,
.summary-fan .summary-member.icon:not(.focus-preview):focus-visible {
  transform: translate(-50%, -50%) scale(calc(var(--fan-scale, 1) * 3));
}
.timeline-actions,
.timeline-actions nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.timeline-actions {
  margin: 14px 0;
}
.timeline-actions a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: var(--paper);
}
.timeline-actions a:hover {
  background: var(--hover);
}
body[data-embed] .app-header,
body[data-embed] .memory-notice,
body[data-embed] .guest-fork-status,
body[data-embed] .guest-fork-original,
body[data-embed] .document-toolbar,
body[data-embed] .document-tags,
body[data-embed] .timeline-actions,
body[data-embed] .document-meta,
body[data-embed] .window-bounds,
body[data-embed] #separate-button,
body[data-embed] #presentation-button,
body[data-embed] #plugins-button,
body[data-embed] #compare-button,
body[data-embed] #center-vertical,
body[data-embed] #add-button,
body[data-embed] .density-control {
  display: none !important;
}
body[data-embed] main {
  padding: 0 8px;
}
body[data-embed] .app-layout {
  min-height: 0;
}
body[data-embed] .document-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 8px 0;
}
body[data-embed] .title-input {
  flex: 1 1 12em;
  font-size: 22px;
}
body[data-embed] .description-input,
body[data-embed] .description-view,
body[data-embed] .description-more {
  display: none;
}
body[data-embed] .legal-notices {
  margin: 0;
  padding: 4px 8px;
  font-size: 11px;
}
body[data-inline] .app-header,
body[data-inline] .memory-notice,
body[data-inline] .breadcrumbs,
body[data-inline] .document-tags,
body[data-inline] .timeline-actions,
body[data-inline] .document-meta,
body[data-inline] .description-input,
body[data-inline] .description-view,
body[data-inline] .description-more,
body[data-inline] #new-button,
body[data-inline] #import-button,
body[data-inline] #och-import,
body[data-inline] #och-export,
body[data-inline] #sqlite-open,
body[data-inline] #sqlite-save,
body[data-inline] #sqlite-save-as,
body[data-inline] #populate-button,
body[data-inline] #publish-button {
  display: none !important;
}
body[data-inline] main {
  padding: 0 8px;
}
body[data-inline] .app-layout {
  min-height: 0;
}
body[data-inline] main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
body[data-inline] main > * {
  grid-column: 1 / -1;
}
body[data-inline] .document-toolbar {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0;
  padding: 6px 0;
  border: 0;
}
body[data-inline] .document-heading {
  grid-column: 1;
  grid-row: 1;
  padding: 6px 0;
  margin: 0;
}
body[data-inline] .title-input {
  font-size: 22px;
}
body[data-inline] .legal-notices {
  margin: 0;
  padding: 4px 8px;
  font-size: 11px;
}
.embed-open {
  font-size: 13px;
  white-space: nowrap;
}
body[data-platform-editor] #share-button,
body[data-platform-editor] #pull-button,
body[data-platform-editor] #guest-fork-button {
  display: none;
}
.dashboard-introduction {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
#timeline-help-dialog {
  max-width: min(520px, calc(100vw - 32px));
}
#timeline-help-dialog li {
  margin: 12px 0;
  line-height: 1.6;
}
dialog > *,
dialog form > * {
  min-width: 0;
  max-width: 100%;
}
dialog textarea {
  width: 100%;
  box-sizing: border-box;
}
dialog button {
  white-space: normal;
  overflow-wrap: anywhere;
}
.follow-latest-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.follow-latest-control input {
  width: auto;
  margin: 0;
  accent-color: var(--green);
}
.build-identity {
  overflow-wrap: anywhere;
}
.download-menu {
  position: relative;
  font-size: 13px;
}
.download-menu summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  border: 1px solid var(--header-control);
  border-radius: var(--radius);
  padding: 0 12px;
  font-weight: 500;
  transition: background 0.15s;
}
.download-menu summary::-webkit-details-marker {
  display: none;
}
.download-menu summary::after {
  content: "\25be";
  margin-left: 6px;
  font-size: 10px;
  opacity: 0.7;
}
.download-menu summary:hover {
  background: var(--header-hover);
}
.download-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 100;
  background: var(--paper);
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 24px var(--shadow-strong);
}
.download-menu > div a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--green);
  text-decoration: none;
}
.download-menu > div a:hover {
  background: var(--hover);
}
@media (max-width: 650px) {
  .app-header {
    position: relative;
  }
  .download-menu {
    position: static;
  }
  .download-menu > div {
    left: 15px;
    right: 15px;
    top: calc(100% - 4px);
    min-width: 0;
    max-width: none;
  }
}
.calendar-picker-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
#datetime-picker label {
  flex: 1 1 5rem;
  min-width: 5rem;
}
#datetime-picker input,
#datetime-picker select {
  width: 100%;
}
#datetime-picker details {
  margin: 0.75rem 0;
}
#datetime-picker details[open] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
#datetime-picker summary {
  width: 100%;
}
.duration-band {
  position: absolute;
  pointer-events: auto;
  height: 18px;
  padding: 0 2px;
  border: 1px solid var(--stage-ground);
  border-radius: 3px;
  background: var(--timeline-duration, var(--stage-duration));
  color: var(--timeline-duration-text, var(--stage-duration-text));
  font-size: 9px;
  line-height: 16px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0.7;
}
.duration-band:hover,
.duration-band:focus-visible {
  opacity: 1;
  z-index: 3;
}
.duration-limit {
  position: absolute;
  bottom: 0;
  left: 48px;
  font-size: 11px;
}
.duration-more {
  position: absolute;
  pointer-events: auto;
  min-height: 0;
  height: 16px;
  padding: 0 8px;
  justify-content: flex-start;
  border: 1px dashed var(--timeline-duration, var(--stage-duration));
  border-radius: 3px;
  background: color-mix(in srgb, var(--timeline-duration, var(--stage-duration)) 18%, transparent);
  color: var(--timeline-duration-text, var(--stage-duration-text));
  box-shadow: none;
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
}
.duration-more:hover,
.duration-more:focus-visible {
  background: color-mix(in srgb, var(--timeline-duration, var(--stage-duration)) 32%, transparent);
  z-index: 3;
}
.duration-band[data-outline=dashed],
.duration-band[data-outline=dashed]:focus-visible {
  border: 2px solid var(--stage-ground);
  outline: 2px dashed var(--ink);
  outline-offset: -2px;
  line-height: 14px;
}
.duration-band.ongoing {
  -webkit-mask-image:
    linear-gradient(
      to right,
      #000 calc(100% - 18px),
      transparent);
  mask-image:
    linear-gradient(
      to right,
      #000 calc(100% - 18px),
      transparent);
}
.duration-band[data-grouped]:not([data-grouped="1"]) {
  box-shadow: 0 0 0 1px var(--timeline-duration, var(--stage-duration));
}
#duration-list .search-row select {
  flex: 0 0 auto;
  width: auto;
}
.duration-list-item {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.duration-list-item .search-result {
  flex: 1;
  min-width: 0;
}
.duration-endpoints {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.duration-endpoint {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  min-width: 0;
}
.duration-endpoint legend {
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
}
.duration-endpoint > button {
  align-self: flex-start;
}
.duration-time {
  font-family: ui-monospace, monospace;
}
.duration-anchor {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
#event-durations {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
#event-durations h3 {
  margin: 0;
}
.duration-link {
  display: block;
  max-width: 100%;
  text-align: left;
  white-space: normal;
  padding: 8px 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.calendar-day-picker {
  flex: 1 1 100%;
  max-width: 22rem;
  margin: 0.5rem 0;
}
.calendar-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
  text-align: center;
}
.calendar-days button {
  min-height: 30px;
  padding: 0 0.1rem;
  box-shadow: none;
}
.calendar-days button[aria-pressed=true] {
  background: var(--primary);
  color: var(--on-primary);
}
#datetime-dialog {
  width: min(460px, calc(100vw - 30px));
  min-width: 0;
}
#datetime-dialog .calendar-day-picker {
  max-width: none;
}
#datetime-text {
  font-family: ui-monospace, monospace;
}
#datetime-picker summary {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
#datetime-picker .calendar-days > span {
  font-size: 12px;
  color: var(--muted);
}
#datetime-picker .calendar-month-nav {
  font-weight: 600;
}
#search-dialog,
#moment-picker {
  width: min(620px, calc(100vw - 30px));
  min-width: 0;
}
.search-row {
  display: flex;
  gap: 8px;
}
.search-bar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.search-bar[hidden] {
  display: none;
}
.search-row input {
  flex: 1;
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(60vh, 520px);
  overflow: auto;
}
.search-results:empty {
  display: none;
}
.search-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  white-space: normal;
}
.search-result strong {
  font-size: 14px;
  font-weight: 600;
}
.search-meta {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}
.search-snippet {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.picker-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.picker-kind {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--hover);
  font-size: 11px;
  font-weight: 600;
}
.link-picker mark {
  background: var(--highlight);
  color: inherit;
}
.link-picker .event-kind {
  margin: 0 0 12px;
}
.link-picker-filters {
  margin: 8px 0;
}
.link-picker-filters summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.link-picker-filters fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
}
.link-picker-filters legend {
  width: 100%;
  padding: 0;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}
.link-picker-filters label[hidden],
.link-picker-filters fieldset[hidden] {
  display: none;
}
.link-picker-filters > label {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
}
.link-picker-filters > label input {
  display: block;
  width: 100%;
  margin-top: 4px;
}
.event-marker.search-hit,
.duration-band.search-hit {
  animation: search-hit 0.8s ease-in-out 3;
  z-index: 6;
}
@keyframes search-hit {
  50% {
    box-shadow: 0 0 0 4px var(--stage-ground), 0 0 0 8px var(--stage-cursor);
  }
}
@media (prefers-reduced-motion: reduce) {
  .event-marker.search-hit,
  .duration-band.search-hit {
    animation: none;
    box-shadow: 0 0 0 4px var(--stage-ground), 0 0 0 8px var(--stage-cursor);
  }
}
.event-marker.heading-marker,
.event-marker.heading-marker:hover,
.event-marker.heading-marker:focus-visible {
  top: 192px;
  width: auto;
  height: auto;
  max-width: 420px;
  padding: 0.12em 0.45em;
  border: 0;
  border-radius: 4px;
  background: var(--timeline-heading-backing, var(--stage-heading-backing));
  box-shadow: none;
  color: var(--timeline-text, var(--stage-text-strong));
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.event-marker.heading-marker:hover,
.event-marker.heading-marker:focus-visible {
  color: var(--timeline-text, var(--stage-text-strong));
  box-shadow: 0 0 0 2px var(--stage-marker-ring);
  z-index: 5;
}
.event-marker.heading-marker.selected {
  background: var(--timeline-heading-backing, var(--stage-heading-backing));
  box-shadow: 0 0 0 2px var(--stage-marker-selected);
}
.event-marker.heading-marker[data-heading=h1] {
  font-size: 30px;
}
.event-marker.heading-marker[data-heading=h2] {
  font-size: 25px;
}
.event-marker.heading-marker[data-heading=h3] {
  font-size: 21px;
}
.event-marker.heading-marker[data-heading=h4] {
  font-size: 18px;
}
.event-marker.heading-marker[data-heading=h5] {
  font-size: 15px;
}
.event-marker.heading-marker[data-heading=h6] {
  font-size: 13px;
  font-weight: 600;
}
.event-marker.duration-point {
  border-radius: 7px;
  width: 30px;
  background: var(--timeline-duration, var(--stage-duration));
}
#group-durations h3 {
  font-size: 14px;
  margin: 18px 0 8px;
}
.button-count {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
#separate-dialog {
  width: min(600px, calc(100vw - 32px));
}
.separate-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}
.separation-item {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
}
.separation-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
}
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}
.tag-chips:empty::before {
  content: "No tags yet: add some below.";
  color: var(--muted);
  font-size: 13px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 2px 4px 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--tint);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.tag-chip button {
  min-height: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  line-height: 1;
}
.tag-chip button:hover,
.tag-chip button:focus-visible {
  background: var(--tint-strong);
}
.tag-picker-toggle {
  min-height: 32px;
}
.tag-picker-panel {
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px #0000002a;
}
.tag-picker-panel input[type=search] {
  width: 100%;
}
.tag-picker-options {
  max-height: 240px;
  margin: 6px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.tag-picker-options li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.tag-picker-options li[aria-selected=true]::before {
  content: "\2713";
  width: 1em;
}
.tag-picker-options li[aria-selected=false]::before {
  content: "";
  width: 1em;
}
.tag-picker-options li:hover,
.tag-picker-options li.active {
  background: var(--hover);
}
.tag-picker-options .tag-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.separation-joins {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.separation-join-list {
  display: grid;
  gap: 6px;
  width: 100%;
  max-height: 168px;
  overflow-y: auto;
  margin: 0;
  padding: 2px;
  list-style: none;
}
.separation-join {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 13px;
}
.separation-join-label {
  flex-shrink: 0;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--hover);
}
.separation-join-union .separation-join-label {
  border: 1px solid var(--line-strong);
}
.separation-join-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.separation-join-edit {
  min-height: 0;
  height: 26px;
  padding: 0 10px;
}
.separation-join-none {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.separation-join-remove {
  flex-shrink: 0;
  min-height: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
}
.join-kind {
  margin: 0 0 4px;
}
.join-kind .checkbox-label {
  font-size: 13px;
}
.join-track {
  display: grid;
  gap: 4px;
}
#join-dialog [role=tabpanel] {
  margin-top: 10px;
}
.separation-fork-line {
  stroke: var(--timeline-measure-soft, var(--stage-measure-soft));
  stroke-width: 1.5;
  fill: none;
}
.tag-picker-empty {
  padding: 6px 8px;
  color: var(--muted);
}
#map-dialog {
  width: min(560px, calc(100vw - 32px));
}
.map-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px;
}
.map-scope {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  padding: 8px 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.map-scope legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
  padding: 0 4px;
}
.map-scope .checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.map-scope .checkbox-label input {
  width: auto;
  min-height: 0;
}
.populate-roots {
  margin: 0;
  padding-left: 18px;
  max-height: 120px;
  overflow: auto;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.populate-roots:empty {
  display: none;
}
#populate-dialog [hidden] {
  display: none;
}
.local-file-reveal {
  min-height: 0;
  padding: 1px 8px;
  font-size: 12px;
}
#map-tags {
  margin-left: 24px;
  width: calc(100% - 24px);
}
.map-summary {
  margin: 10px 0 0;
}
.map-working {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.map-working progress {
  flex: 1;
  min-width: 0;
}
.separation-tags {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--green);
  flex: 1 1 8em;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.separation-bar[data-many] .separation-tags {
  display: none;
}
.separation-bar {
  padding-top: 6px;
  padding-bottom: 6px;
}
.separation-bar .comparison-heading {
  gap: 6px 10px;
}
.separation-badge {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1px 8px;
}
.separation-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.separation-actions button {
  padding: 4px 10px;
  font-size: 13px;
}
.edge-arcs {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  overflow: visible;
}
.edge-arc {
  fill: none;
  stroke: var(--timeline-measure, var(--stage-arc));
  stroke-width: 1.5;
  opacity: 0.65;
  pointer-events: stroke;
}
.edge-arc:hover {
  stroke: var(--green);
  stroke-width: 3;
  opacity: 1;
}
.edge-arrows {
  fill: var(--timeline-measure, var(--stage-arc));
  opacity: 0.65;
  pointer-events: none;
}
.edge-arc:hover + .edge-arrows {
  fill: var(--green);
  opacity: 1;
}
.timeline-stage.over-backgrounds .edge-arrows {
  stroke: var(--timeline-halo, var(--stage-halo));
  stroke-width: 1.5;
  stroke-linejoin: round;
  paint-order: stroke;
}
.edge-limit {
  font-size: 11px;
  fill: var(--muted);
}
.related-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-section h3 {
  margin: 0;
}
.related-list,
.related-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.related-row {
  display: flex;
  gap: 4px;
}
.related-entity,
.related-results button {
  flex: 1;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  padding: 8px 10px;
}
.timeline-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.timeline-links h4 {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
a.related-entity {
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.related-entity:hover {
  background: var(--hover);
  border-color: var(--line-hover);
}
.related-unlink {
  flex-shrink: 0;
  width: var(--control-height);
  padding: 0;
}
.related-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.related-actions:empty {
  display: none;
}
.related-add summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--green);
}
.related-add input {
  width: 100%;
  margin: 8px 0;
}
.challenge-dialog {
  width: min(420px, calc(100vw - 32px));
}
.challenge-dialog progress {
  display: block;
  width: 100%;
}
.challenge-widget {
  margin: 12px 0;
}
.challenge-status:empty {
  display: none;
}
.challenge-actions {
  display: flex;
  justify-content: flex-end;
}
body[data-warnings][data-sensitive]:not([data-images-shown]) :is(.event-marker img, .focus-card img, .plugin-image-link img, .reader-panel img, .duration-background img, .timeline-backdrop img, .timeline-image),
body[data-warnings]:not([data-images-shown]) :is(.event-marker[data-sensitive] img, .focus-card[data-sensitive] img, dialog[data-sensitive] .plugin-image-link img, dialog[data-sensitive] .reader-panel img, .duration-background[data-sensitive] img) {
  filter: blur(14px) saturate(0.6);
}
.sensitive-gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--tint);
}
.sensitive-gate-card {
  max-width: 520px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--raised);
  box-shadow: 0 20px 100px var(--shadow-strong);
}
.sensitive-gate-card h2 {
  margin: 0 0 12px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}
.sensitive-gate-card .dialog-actions {
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
}
.sensitive-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.sensitive-status .link-button,
.remote-images-status .link-button,
.sensitive-note .link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  font-size: inherit;
  cursor: pointer;
}
.content-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  border: 0;
}
.content-labels legend {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}
.content-labels label {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  margin: 0;
  font-weight: 400;
}
.content-labels input {
  width: auto;
}
.sensitive-badge {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  border: 1px solid var(--caution-line);
  border-radius: 999px;
  background: var(--caution-tint);
  color: var(--caution);
  font-size: 12px;
}
.focus-credit {
  display: block;
  margin: -2px 0 6px;
  color: var(--muted);
  font-size: 11px;
}
.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0 0 0 6px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green);
  font: 700 11px/1 system-ui, sans-serif;
  vertical-align: middle;
  cursor: help;
}
.inspector-heading .help-tip,
.dialog-heading .help-tip {
  width: 18px;
  font: 700 11px/1 system-ui, sans-serif;
  margin-right: auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green);
}
.inspector-heading .help-tip + .share-entity {
  margin-left: 0;
}
.help-tip:hover,
.help-tip:focus-visible,
.inspector-heading .help-tip:hover,
.dialog-heading .help-tip:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.help-tooltip {
  position: fixed;
  z-index: 300;
  max-width: min(18rem, calc(100vw - 16px));
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--tooltip);
  color: var(--tooltip-ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  box-shadow: 0 6px 20px var(--shadow-strong);
  pointer-events: none;
}
.timeline-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.timeline-help-actions form {
  margin: 0;
}
.tour-spotlight {
  position: fixed;
  z-index: 280;
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--focus), 0 0 0 9999px var(--spotlight);
  pointer-events: none;
  transition:
    left 0.2s,
    top 0.2s,
    width 0.2s,
    height 0.2s;
}
.tour-card {
  position: fixed;
  z-index: 290;
  width: min(22rem, calc(100vw - 16px));
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 32px var(--shadow-strong);
}
.tour-card h2 {
  margin: 0 0 6px;
  font-size: 17px;
}
.tour-card p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
}
.tour-count {
  color: var(--muted);
  font-size: 12px !important;
}
.tour-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.tour-actions span {
  display: flex;
  gap: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .tour-spotlight {
    transition: none;
  }
}
.toolbar-icon {
  display: none;
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toolbar-menu-button .toolbar-icon {
  display: block;
  fill: currentColor;
  stroke: none;
}
.menu-caret {
  font-size: 10px;
  opacity: 0.7;
}
.toolbar-menu-button[aria-expanded=true] {
  background: var(--tint-strong);
  border-color: var(--line-hover);
}
.toolbar-menu {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--shadow-strong);
}
.file-menu {
  top: calc(100% - 4px);
  right: 0;
  min-width: 210px;
  gap: 4px;
  padding: 6px;
}
.file-menu button {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
}
.file-menu button:hover,
.file-menu button:focus-visible {
  background: var(--hover);
}
.toolbar-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.toolbar-menu-grid button {
  min-height: 44px;
  white-space: normal;
}
.toolbar-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--label);
}
.toolbar-menu-pair {
  display: flex;
  gap: 6px;
}
.toolbar-menu-pair button {
  min-width: 52px;
  min-height: 44px;
}
.toolbar-menu-settings {
  display: grid;
  border-top: 1px solid var(--line);
}
.toolbar-menu-settings > label {
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  color: var(--label);
}
.toolbar-menu-settings .density-control input {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
}
.toolbar-menu-settings .follow-latest-control input {
  width: 20px;
  height: 20px;
}
@media (min-width: 651px) {
  #view-tools-button {
    display: none;
  }
}
@media (max-width: 650px) {
  [data-phone-menu]:not(.toolbar-menu [data-phone-menu]) {
    display: none;
  }
  .document-toolbar {
    position: relative;
    min-height: 56px;
  }
  .file-actions {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
  }
  .file-actions .view-mode-switch {
    min-height: 40px;
    margin-right: 0;
  }
  .file-actions > button {
    min-height: 40px;
  }
  #file-menu-button {
    margin-left: auto;
  }
  .view-toolbar {
    position: relative;
    flex-wrap: nowrap;
    padding: 6px;
  }
  .view-heading {
    display: none !important;
  }
  .view-toolbar .view-controls {
    flex: 1 1 auto;
    gap: 5px;
    min-width: 0;
  }
  .view-controls > button {
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
  }
  #view-tools-button {
    margin-left: auto;
  }
  #fullscreen-button .button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  #fullscreen-button[aria-pressed=false] .enter-icon,
  #fullscreen-button[aria-pressed=true] .exit-icon {
    display: block;
  }
  #fullscreen-button[aria-pressed=true] {
    background: var(--tint-strong);
  }
  .view-tools {
    top: calc(100% + 4px);
    left: 6px;
    right: 6px;
    max-height: calc(max(330px, 52svh) + 20px);
  }
  .time-context {
    padding: 4px 12px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
  }
  .timeline-footer {
    display: none;
  }
  .timeline-actions,
  .timeline-actions nav {
    gap: 6px;
  }
  .timeline-actions :is(a, button) {
    min-height: 40px;
  }
  html.timeline-fullscreen .timeline-card {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  html.timeline-fullscreen .view-tools {
    max-height: calc(100dvh - 72px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}
.views-dialog {
  width: min(640px, calc(100vw - 32px));
}
.views-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.views-list {
  display: grid;
  gap: 8px;
  max-height: min(50vh, 420px);
  overflow-y: auto;
  margin: 10px 0 0;
  padding: 2px;
  list-style: none;
}
.views-none {
  color: var(--muted);
  font-size: 13px;
}
.view-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.view-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.view-badge {
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.view-badge-default {
  background: var(--hover);
  color: var(--ink);
}
.view-card-about,
.view-card-description {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.view-card-description {
  color: var(--ink);
}
.view-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.view-card-actions button {
  min-height: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}
.views-templates {
  margin-top: 14px;
}
.views-templates summary {
  cursor: pointer;
  font-weight: 600;
}
.view-link {
  display: flex;
  gap: 6px;
}
.view-link input {
  flex: 1;
  min-width: 0;
}
.view-link button {
  flex-shrink: 0;
  width: auto;
}
.view-members-heading {
  margin: 14px 0 4px;
  font-size: 14px;
}
.view-members {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.view-members li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.view-members li span {
  flex: 1;
}
.view-members select,
.view-member-add select {
  width: auto;
}
.view-member-add {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.view-member-add input {
  flex: 1;
  min-width: 0;
}
.view-member-add button {
  width: auto;
  flex-shrink: 0;
}
#measures-dialog {
  min-width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.measures-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}
.measure-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.measure-row legend {
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
}
.measure-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.measure-row .calendar-label {
  flex-direction: row;
  align-items: center;
}
.measure-row .measure-example,
.measure-row .calendar-label {
  grid-column: 1 / -1;
  margin: 0;
}
.measure-row .measure-remove {
  justify-self: start;
}
#measures-working {
  display: flex;
  align-items: center;
  gap: 8px;
}
.measure-fields {
  border-top: 1px solid var(--line);
  padding: 14px 0 4px;
}
.measure-fields h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.measure-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.measure-list {
  display: grid;
  grid-template-columns: fit-content(40%) minmax(0, 1fr);
  gap: 4px 16px;
  margin: 0 0 12px;
  font-size: 14px;
}
.measure-list dt {
  color: var(--muted);
}
.measure-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
.event-marker.group[data-size=small] {
  width: 24px;
  height: 24px;
  top: 180px;
}
.event-marker.group[data-size=large] {
  width: 42px;
  height: 42px;
  top: 171px;
}
.focus-measures .measure-list {
  margin: 4px 0 8px;
}
.timeline-stage.hide-moments #stack-markers,
.timeline-stage.hide-moments #markers .event-marker:not(.duration-point),
.timeline-stage.hide-moments #markers .event-label:not([data-key^="duration:"]),
.timeline-stage.hide-moments #markers .event-stem:not([data-key^="duration:"]),
.timeline-stage.hide-durations #duration-bands,
.timeline-stage.hide-durations #markers .event-marker.duration-point,
.timeline-stage.hide-durations #markers [data-key^="duration:"],
.timeline-stage.hide-backgrounds #duration-backgrounds,
.timeline-stage.hide-relationships #edge-arcs {
  display: none;
}
.layers-group {
  margin: 12px 0;
  padding: 8px 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.layers-group h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.layers-list {
  display: grid;
  gap: 6px;
}
#layers-dialog .layer-switch {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
#layers-dialog .layer-switch input {
  appearance: none;
  flex: none;
  position: relative;
  width: 36px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 28%, var(--paper));
  cursor: pointer;
  transition: background 0.15s;
}
#layers-dialog .layer-switch input::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  transition: transform 0.15s;
}
#layers-dialog .layer-switch input:checked {
  border-color: var(--primary);
  background: var(--primary);
}
#layers-dialog .layer-switch input:checked::after {
  transform: translateX(16px);
}
#layers-dialog .layer-switch input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  #layers-dialog .layer-switch input,
  #layers-dialog .layer-switch input::after {
    transition: none;
  }
}
.layer-swatch {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: currentColor;
  color: var(--timeline-marker, var(--stage-marker, var(--primary)));
}
.layer-source {
  margin-left: auto;
  font-size: 12px;
}
/*# sourceMappingURL=app.css.map */
