
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f6f3ed;
  --surface-3: #efebe2;
  --surface-hover: #f7f5f0;

  --border: #e8e3d9;
  --border-strong: #d9d3c6;

  --text: #232019;
  --text-2: #6d6659;
  --text-3: #9c9484;

  --accent: #3d7ea6;
  --accent-soft: rgba(61, 126, 166, 0.1);
  --danger: #c0574f;

  --avatar-ring: rgba(35, 32, 25, 0.24);

  --hue-0: #C05A63;
  --hue-1: #C1794A;
  --hue-2: #B08B36;
  --hue-3: #5F8F60;
  --hue-4: #3E8D88;
  --hue-5: #4C7EA6;
  --hue-6: #6F6BA6;
  --hue-7: #A05E92;

  --state-done: #008572;
  --state-ready: #7A64C4;
  --state-blocked: #C97A34;
  --state-done-track: rgba(0, 133, 114, 0.16);
  --meter-track: rgba(35, 32, 25, 0.09);

  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 L6.5 11.5 L12.5 4.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --madeby-filter: none;

  --chrome-bg: #2b2721;
  --chrome-text: #f7f4ee;
  --topbar-bg: rgba(250, 248, 244, 0.85);
  --scrim: rgba(35, 32, 25, 0.34);
  --ink-hover: #000000;
  --cut-hover: #fff5f4;

  --danger-line: rgba(192, 87, 79, 0.4);
  --danger-soft: rgba(192, 87, 79, 0.12);
  --danger-wash: rgba(192, 87, 79, 0.06);
  --danger-solid-hover: #a94840;
  --on-danger: #ffffff;

  --shadow-xs: 0 1px 2px rgba(35, 32, 25, 0.05);
  --shadow-sm: 0 1px 3px rgba(35, 32, 25, 0.07), 0 1px 2px rgba(35, 32, 25, 0.04);
  --shadow-md: 0 4px 14px rgba(35, 32, 25, 0.09), 0 1px 3px rgba(35, 32, 25, 0.05);
  --shadow-lg: 0 12px 32px rgba(35, 32, 25, 0.14);

  --r-sm: 5px;
  --r-md: 7px;

  --gutter: 39px;
  --rail-w: 250px;
  --rail-mini: 54px;
  --row-h: 38px;

  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}



.account-open {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  transition: background 110ms ease, color 110ms ease;
}
.account-open[hidden] {
  display: none;
}
.account-open:hover {
  background: var(--surface-3);
  color: var(--text);
}
.account-label {
  padding: 0 4px;
}

.account {
  position: relative;
  display: flex;
  align-items: center;
}
.account-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 190px;
  max-width: 260px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.account-menu[hidden] {
  display: none;
}

.account-identity {
  padding: 7px 9px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
}
.account-identity[hidden] {
  display: none;
}
.account-name {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.account-who {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-tier {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--text-3);
}

.account-item {
  display: block;
  width: 100%;
  padding: 8px 9px;
  text-align: left;
  border-radius: calc(var(--r-sm) - 2px);
  font-size: 12.5px;
  color: var(--text);
  background: none;
  border: 0;
}
.account-item[hidden] {
  display: none;
}
.account-item:hover {
  background: var(--surface-3);
}
.account-item:focus-visible {
  outline: none;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.account-passphrase-group {
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.account-passphrase-group[hidden] {
  display: none;
}
.account-passphrase {
  display: flex;
  align-items: center;
  gap: 2px;
}
.account-passphrase .account-item {
  flex: 1 1 auto;
  min-width: 0;
}
.account-help {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-3);
}
.account-help:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-strong);
}
.account-help:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.account-passphrase-note {
  margin: 4px 9px 6px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-3);
}
.account-passphrase-note:empty {
  display: none;
}

.help-pop {
  position: fixed;
  z-index: 55;
  max-width: 230px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.avatar {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: hsl(var(--avatar-hue, 40) 60% 50% / 0.22);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
  box-shadow: 0 0 0 1px var(--avatar-ring);
}
.avatar[hidden] {
  display: none;
}
.avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.presence {
  display: flex;
  align-items: center;
  flex: none;
}
.presence-face {
  width: 22px;
  height: 22px;
  margin-left: -7px;
  font-size: 9px;
  box-shadow: 0 0 0 1px var(--avatar-ring), 0 0 0 3px var(--topbar-bg);
}
.presence-face:first-child {
  margin-left: 0;
}

.account-error:empty {
  display: none;
}

.account-error {
  color: var(--danger);
}


@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17150f;
    --surface: #211e17;
    --surface-2: #1c1a14;
    --surface-3: #2e2a21;
    --surface-hover: #2a261e;

    --border: #322d24;
    --border-strong: #4a4335;

    --text: #f0ebe1;
    --text-2: #aca493;
    --text-3: #7d7566;

    --accent: #6fa8cd;
    --accent-soft: rgba(111, 168, 205, 0.16);
    --danger: #e08b81;

    --avatar-ring: rgba(240, 235, 225, 0.3);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.38), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);

    --hue-0: #e37a81;
    --hue-1: #c77f4f;
    --hue-2: #af8b35;
    --hue-3: #6b9c6c;
    --hue-4: #4f9e98;
    --hue-5: #6c9fc8;
    --hue-6: #a09cdb;
    --hue-7: #ce89bf;

    --state-done: #38a38f;
    --state-ready: #927ddf;
    --state-blocked: #c87933;
    --state-done-track: rgba(56, 163, 143, 0.2);
    --meter-track: rgba(240, 235, 225, 0.12);

    --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 L6.5 11.5 L12.5 4.5' fill='none' stroke='%23191610' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    --madeby-filter: invert(1) hue-rotate(180deg);

    --chrome-bg: #39332a;
    --chrome-text: #f5f0e6;
    --topbar-bg: rgba(23, 21, 15, 0.85);
    --scrim: rgba(0, 0, 0, 0.58);
    --ink-hover: #ffffff;
    --cut-hover: #3a2320;

    --danger-line: rgba(224, 139, 129, 0.4);
    --danger-soft: rgba(224, 139, 129, 0.18);
    --danger-wash: rgba(224, 139, 129, 0.1);
    --danger-solid-hover: #e9a096;
    --on-danger: #241713;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #17150f;
  --surface: #211e17;
  --surface-2: #1c1a14;
  --surface-3: #2e2a21;
  --surface-hover: #2a261e;

  --border: #322d24;
  --border-strong: #4a4335;

  --text: #f0ebe1;
  --text-2: #aca493;
  --text-3: #7d7566;

  --accent: #6fa8cd;
  --accent-soft: rgba(111, 168, 205, 0.16);
  --danger: #e08b81;

  --avatar-ring: rgba(240, 235, 225, 0.3);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.38), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);

  --hue-0: #e37a81;
  --hue-1: #c77f4f;
  --hue-2: #af8b35;
  --hue-3: #6b9c6c;
  --hue-4: #4f9e98;
  --hue-5: #6c9fc8;
  --hue-6: #a09cdb;
  --hue-7: #ce89bf;

  --state-done: #38a38f;
  --state-ready: #927ddf;
  --state-blocked: #c87933;
  --state-done-track: rgba(56, 163, 143, 0.2);
  --meter-track: rgba(240, 235, 225, 0.12);

  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 L6.5 11.5 L12.5 4.5' fill='none' stroke='%23191610' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --madeby-filter: invert(1) hue-rotate(180deg);

  --chrome-bg: #39332a;
  --chrome-text: #f5f0e6;
  --topbar-bg: rgba(23, 21, 15, 0.85);
  --scrim: rgba(0, 0, 0, 0.58);
  --ink-hover: #ffffff;
  --cut-hover: #3a2320;

  --danger-line: rgba(224, 139, 129, 0.4);
  --danger-soft: rgba(224, 139, 129, 0.18);
  --danger-wash: rgba(224, 139, 129, 0.1);
  --danger-solid-hover: #e9a096;
  --on-danger: #241713;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: var(--rail-mini) 1fr;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: grid-template-columns 180ms cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

body.sidebar-open {
  grid-template-columns: var(--rail-w) 1fr;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 9px 14px;
  font-size: 13px;
  text-decoration: none;
  color: var(--text);
}
.skip:focus {
  left: 12px;
  top: 12px;
}


#sidebar {
  grid-column: 1;
  overflow: hidden auto;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 14px 12px 18px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 0;
}

.tagline {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.rail-tagline {
  margin: 0 0 7px;
  padding: 0 6px;
}

.mark {
  --mark-size: 22px;
  position: relative;
  width: var(--mark-size);
  height: var(--mark-size);
  flex: none;
  overflow: hidden;
  border-radius: calc(var(--mark-size) * 0.25);
  box-shadow: var(--shadow-xs);
  background: #7969a2;
}
.mark::before {
  content: "";
  position: absolute;
  inset: -70%;
  background: conic-gradient(
    from 315deg,
    #a85d88 0deg,
    #bd7d46 90deg,
    #9d8c40 135deg,
    #578e69 180deg,
    #547aa6 270deg,
    #7969a2 315deg,
    #a85d88 360deg
  );
  animation: mark-turn 18s linear infinite;
}
.mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='%23fff'%3E%3Crect x='30' y='34' width='60' height='12' rx='6'/%3E%3Crect x='42' y='57' width='48' height='12' rx='6'/%3E%3Crect x='30' y='78' width='13' height='13' rx='6.5'/%3E%3Crect x='53' y='78' width='37' height='13' rx='6.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%;
}

@keyframes mark-turn {
  to {
    transform: rotate(360deg);
  }
}

.wordmark {
  --wordmark-h: 22px;
  display: block;
  height: var(--wordmark-h);
  width: calc(var(--wordmark-h) * 2.299);
  overflow: hidden;
  text-indent: -200px;
  white-space: nowrap;
  background-color: var(--text);
  -webkit-mask-image: url("/illgati-wordmark.svg");
  mask-image: url("/illgati-wordmark.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

.brand-mark {
  --mark-size: 24px;
}

.brand-name {
  --wordmark-h: 19px;
}

.rail-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  flex: none;
}

.rail-grow {
  flex: 1 1 auto;
  min-height: 96px;
}

.rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-3);
}

.mini {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1;
}
.mini:hover {
  background: var(--surface-3);
  color: var(--text);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--surface-3);
  border-radius: var(--r-md);
  padding: 2px;
}

.segmented button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-sm);
  padding: 5px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.segmented svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.segmented button:hover {
  color: var(--text);
}
.themeswitch,
.finishedswitch {
  grid-template-columns: repeat(3, 1fr);
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.chart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: auto;
}

.chart {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-md);
  padding: 6px 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 110ms ease, color 110ms ease;
}
.chart:hover {
  background: var(--surface-3);
  color: var(--text);
}
.chart.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.chart-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
  border-radius: 3px;
}
.chart-name:focus {
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.chart-badge {
  flex: none;
  display: none;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}

.chart-count {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}

.chart-del {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1;
  color: var(--text-3);
  opacity: 0;
}
.chart:hover .chart-del,
.chart-del:focus-visible {
  opacity: 1;
}
.chart-del:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.chart-sync {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--text-3);
  opacity: 1;
  transition: opacity 110ms ease, color 110ms ease;
}
.chart-sync svg {
  width: 12px;
  height: 12px;
}
.chart-sync.is-off {
  opacity: 0;
}
.chart:hover .chart-sync.is-off,
.chart-sync.is-off:focus-visible {
  opacity: 1;
}
.chart-sync.is-waiting {
  color: var(--accent);
}
.chart-sync.is-conflict {
  color: var(--danger);
}
.chart-sync.is-locked {
  opacity: 1;
  color: var(--text-2);
}

.chart.is-elsewhere {
  color: var(--text-3);
}
.chart.is-elsewhere .chart-badge {
  background: none;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.chart.is-elsewhere:hover {
  color: var(--text);
}
.chart-sync.is-elsewhere {
  opacity: 1;
  color: var(--text-3);
}
.chart.is-elsewhere:hover .chart-sync.is-elsewhere {
  color: var(--accent);
}
.chart-sync:hover {
  background: var(--surface-3);
  color: var(--text);
}

body[data-drag-task] .chart:not(.is-active) {
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
body[data-drag-task] .chart.is-drop {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
body[data-drag-task] .mini {
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
body[data-drag-task] .mini.is-drop {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.rail-actions {
  display: flex;
  gap: 5px;
  padding: 0 2px;
}
.rail-actions button {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 5px 4px;
  font-size: 12.5px;
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
  transition: background 110ms ease, color 110ms ease, border-color 110ms ease;
}
.rail-actions button:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.rail-actions .danger:hover {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-wash);
}

.keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 10px;
  margin: 0;
  padding: 0 6px;
  font-size: 11.5px;
  color: var(--text-3);
}
.keys dt {
  font-weight: 500;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.keys dd {
  margin: 0;
}


body:not(.sidebar-open) #sidebar {
  padding: 14px 6px 16px;
  gap: 16px;
  align-items: center;
}

body:not(.sidebar-open)
  #sidebar
  :is(.brand-name, .brand-tag, .rail-title > span, .segmented .label, .tool .label, .chart-name, .chart-count, .chart-sync, .chart-del, #add-chart, .rail-wide) {
  display: none;
}

body:not(.sidebar-open) #sidebar .rail-section {
  width: 100%;
  align-items: center;
}

body:not(.sidebar-open) #sidebar .rail-title {
  justify-content: center;
  padding: 0;
  border: 0;
}
body:not(.sidebar-open) #sidebar .rail-section + .rail-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

body:not(.sidebar-open) #sidebar .segmented {
  grid-template-columns: 1fr;
  width: 100%;
  gap: 3px;
}
body:not(.sidebar-open) #sidebar .tools {
  flex-direction: column;
  width: 100%;
  gap: 3px;
}
body:not(.sidebar-open) #sidebar .segmented button {
  padding: 8px 0;
}
body:not(.sidebar-open) #sidebar .tool {
  padding: 8px 0;
}

body:not(.sidebar-open) #sidebar .chart-list {
  width: 100%;
  align-items: center;
  gap: 3px;
}
body:not(.sidebar-open) #sidebar .chart {
  padding: 0;
  background: none;
  box-shadow: none;
}
body:not(.sidebar-open) #sidebar .chart-badge {
  display: grid;
}
body:not(.sidebar-open) #sidebar .chart:hover .chart-badge {
  background: var(--border);
  color: var(--text);
}
body:not(.sidebar-open) #sidebar .chart.is-active .chart-badge {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--border-strong);
}


main {
  grid-column: 2;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  height: 100dvh;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  min-width: 0;
}

.hamburger {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-2);
  flex: none;
  transition: background 110ms ease, color 110ms ease;
}
.hamburger:hover {
  background: var(--surface-3);
  color: var(--text);
}
.hamburger span[aria-hidden] {
  width: 14px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 -4.5px 0 currentColor, 0 4.5px 0 currentColor;
}

.topbar h1 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.stats {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border-left: 1px solid var(--border);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
  transition: background 110ms ease, color 110ms ease;
}
.stats:hover {
  background: var(--surface-3);
  color: var(--text-2);
}
.stats-dial {
  flex: none;
  width: 16px;
  height: 16px;
}
.stats-figure {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.stats-detail {
  font-variant-numeric: tabular-nums;
}

.corner {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.greeting {
  font-size: 12.5px;
  color: var(--text-2);
}
.clock {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  padding-left: 9px;
  border-left: 1px solid var(--border);
  line-height: 16px;
}

.about-open {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-3);
  transition: background 110ms ease, color 110ms ease;
}
.about-open svg {
  width: 15px;
  height: 15px;
}
.about-open:hover {
  background: var(--surface-3);
  color: var(--text);
}


.about-version {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

.about-release {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.about-release-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.about-release-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.about-date {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.about-release ul {
  margin: 7px 0 0;
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.about-release li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}


.canvas {
  position: relative;
  overflow: auto;
  padding: 20px 24px 45vh;
}

.outline {
  padding-right: 132px;
  max-width: 1320px;
  min-height: 100%;
}

body[data-view="sequence"] .canvas {
  display: none;
}
body[data-view="outline"] .sequence {
  display: none;
}


.task {
  position: relative;
}

.row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.grip {
  flex: none;
  width: 14px;
  height: 22px;
  margin-right: 1px;
  cursor: grab;
  opacity: 0;
  border-radius: 3px;
  background-image: radial-gradient(circle, var(--text-3) 1.1px, transparent 1.2px);
  background-size: 4px 4px;
  background-position: center;
  background-repeat: space;
  transition: opacity 110ms ease;
}
.row:hover .grip {
  opacity: 0.85;
}
.grip:active {
  cursor: grabbing;
}

.twisty {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: background 110ms ease, color 110ms ease;
}
.twisty svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.75;
}
.twisty:hover {
  background: var(--surface-3);
  color: var(--text);
}
.twisty.is-hidden {
  visibility: hidden;
}


.card {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--row-h);
  padding: 6px 80px 6px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 130ms ease, border-color 130ms ease;
}
.card:hover {
  border-color: var(--border-strong);
}
.card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.card.is-presence-focus {
  box-shadow: 0 0 0 3px hsl(var(--presence-hue, 40) 55% 50% / 0.45);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: var(--r-md) 0 0 var(--r-md);
  background: var(--hue, var(--border-strong));
}

.check {
  flex: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  transition: border-color 110ms ease, background 110ms ease;
}
.check:hover {
  border-color: var(--hue, var(--text-2));
}
.is-done > .row > .card .check {
  background-color: var(--hue, var(--text-2));
  border-color: var(--hue, var(--text-2));
  background-image: var(--tick);
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}

.title,
.note {
  outline: none;
  overflow-wrap: anywhere;
}

.main {
  flex: 0 0 max(150px, calc(46% - var(--indent, 0px) * 0.54));
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  align-self: stretch;
}

.title {
  flex: 0 1 auto;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
}
.task .task .title {
  font-size: 13.5px;
}

.note {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  color: var(--hue, var(--text-2));
  transition: background 110ms ease, box-shadow 110ms ease;
}
.note:hover {
  background: var(--surface-2);
}
.note:focus {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.title:empty::before,
.note:empty::before {
  content: attr(data-placeholder);
  color: var(--text-3);
  font-weight: 400;
}
.note:empty::before {
  opacity: 0;
  transition: opacity 110ms ease;
}
.note:hover:empty::before,
.note:focus:empty::before {
  opacity: 1;
}

.chip {
  flex: none;
  margin-left: 2px;
  padding: 0 6px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.is-done > .row > .card .title {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: var(--text-3);
}
.is-done > .row > .card .note {
  opacity: 0.5;
}

.card.is-blocked::before {
  background: repeating-linear-gradient(
    to bottom,
    var(--hue, var(--border-strong)) 0 4px,
    transparent 4px 8px
  );
}
.card.is-blocked .title::after {
  content: "blocked";
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

.actions {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
  transition: opacity 110ms ease;
}
.card:hover .actions,
.card:focus-within .actions {
  opacity: 1;
}

.add-child {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
}
.add-child svg {
  width: 13px;
  height: 13px;
}
.add-child:hover {
  background: var(--surface-3);
  color: var(--text);
}

.swatch {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
}
.swatch::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hue, var(--text-3));
}
.swatch:hover {
  background: var(--surface-3);
}

.trash {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
}
.trash svg {
  width: 13px;
  height: 13px;
}
.trash:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.nub {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  opacity: 0;
  cursor: crosshair;
  touch-action: none;
  transition: opacity 110ms ease, border-color 110ms ease, transform 110ms ease;
}
.card:hover .nub,
.canvas.is-linking .nub {
  opacity: 1;
}
.nub:hover {
  border-color: var(--hue, var(--accent));
  background: var(--hue, var(--accent));
}

.card.is-link-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.card.is-linked {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.card.is-drop {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}


.children {
  position: relative;
  margin-left: 27px;
  padding-left: 18px;
}

.children::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}


.gap {
  position: relative;
  height: 12px;
  cursor: copy;
}
.gap:hover,
.gap.is-drop {
  z-index: 5;
}

.gap::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: 0;
  top: 50%;
  margin-top: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 110ms ease;
}
.gap:hover::after,
.gap.is-drop::after {
  opacity: 1;
}

.ghost {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--text-2);
  opacity: 0;
  transition: opacity 110ms ease;
}
.ghost svg {
  width: 12px;
  height: 12px;
}
.gap:hover .ghost {
  opacity: 1;
}

.gap-tail {
  height: 28px;
}
.gap-tail .ghost {
  left: var(--gutter);
  width: auto;
  height: 22px;
  padding: 0 9px 0 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-sm);
  border-color: transparent;
  background: none;
  box-shadow: none;
  color: var(--text-3);
  font-size: 12.5px;
  opacity: 0.8;
}
.gap-tail:hover .ghost {
  opacity: 1;
  background: var(--surface-3);
  color: var(--text-2);
}
.gap-tail:hover::after {
  opacity: 0;
}
.gap-tail.is-drop::after {
  opacity: 1;
}

.is-dragging .gap::before {
  content: "";
  position: absolute;
  inset: -6px 0;
}
.is-dragging .gap[data-drop="ok"]::after {
  opacity: 0.28;
}
.is-dragging .gap[data-drop="no"]::after {
  opacity: 0;
}
.is-dragging .gap[data-drop="no"] {
  cursor: no-drop;
}
.is-dragging .gap.is-drop::after {
  opacity: 1;
  height: 3px;
}
.is-dragging .ghost {
  opacity: 0;
}

.is-dragging .card[data-drop="no"] {
  opacity: 0.45;
  cursor: no-drop;
}
.is-dragging .card[data-drop="ok"].is-drop {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.is-dragging .card[data-drop="ok"].is-drop::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 12px;
  bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.empty-note {
  margin: 2px 0 6px var(--gutter);
  font-size: 13px;
  color: var(--text-3);
}


.wires {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}

.wire-line {
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
  transition: opacity 120ms ease, stroke-width 120ms ease;
}

.wire-head {
  stroke: none;
}

.wire-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  pointer-events: stroke;
  cursor: pointer;
}

.wires.has-hot .wire:not(.is-hot) {
  opacity: 0.18;
}
.wire.is-hot .wire-line,
.wire:hover .wire-line {
  stroke-width: 2.5;
  opacity: 1;
}

.wire-ghost {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-dasharray: 4 4;
}


.sequence {
  overflow: auto;
  padding: 24px 24px 60px;
}

.seq-head {
  max-width: 620px;
  margin-bottom: 24px;
}
.seq-head h2 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.seq-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.seq-lanes {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.seq-lane {
  flex: none;
  width: 244px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.seq-lane-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3);
  padding: 0 2px 7px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3px;
}

.seq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  padding: 9px 11px;
  border-left: 3px solid var(--hue, var(--border-strong));
  transition: opacity 130ms ease, border-color 130ms ease;
}
.seq-card.is-done {
  opacity: 0.6;
}
.seq-card.is-done .seq-title {
  text-decoration: line-through;
  color: var(--text-3);
}

.seq-trail {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}
.seq-title {
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.005em;
}
.seq-note {
  font-size: 12.5px;
  color: var(--hue, var(--text-2));
  opacity: 0.9;
  margin-top: 2px;
}
.seq-blockers {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-3);
}

.sequence.has-hot .seq-card {
  opacity: 0.42;
}
.sequence.has-hot .seq-card.is-hot {
  opacity: 1;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.sequence.has-hot .seq-card.is-before,
.sequence.has-hot .seq-card.is-after {
  opacity: 1;
  border-color: var(--border-strong);
}

.seq-loose {
  margin-top: 32px;
}
.seq-loose .seq-lane-head {
  max-width: 1120px;
}
.seq-loose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 7px;
  margin-top: 10px;
  max-width: 1120px;
}


.rail-foot {
  margin-top: auto;
  padding-top: 4px;
}

.madeby {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-3);
  font-size: 11.5px;
  transition: background 110ms ease, color 110ms ease;
}
.madeby:hover {
  background: var(--surface-3);
  color: var(--text-2);
}

.madeby-mark {
  height: 17px;
  width: auto;
  opacity: 0.72;
  filter: var(--madeby-filter);
  transition: opacity 110ms ease;
}
.madeby:hover .madeby-mark {
  opacity: 1;
}

.madeby-text {
  font-weight: 600;
  color: var(--text-2);
}


.drag-hint {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: var(--chrome-bg);
  color: var(--chrome-text);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 90ms ease;
}
.drag-hint.is-up {
  opacity: 1;
}


.more {
  display: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-2);
}
.more svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.more:hover {
  background: var(--surface-3);
  color: var(--text);
}


.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet[hidden] {
  display: none;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.sheet-panel {
  position: relative;
  width: min(460px, 100%);
  max-height: 84dvh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--r-md) var(--r-md) 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet-in 160ms cubic-bezier(0.32, 0.72, 0, 1);
}

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

.sheet-title {
  padding: 8px 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sheet-action {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sheet-action svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--text-3);
}
.sheet-action.is-danger svg {
  color: var(--danger);
}

.sheet-action,
.sheet-cancel {
  text-align: left;
  padding: 13px 12px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  color: var(--text);
}
.sheet-action:active,
.sheet-cancel:active {
  background: var(--surface-3);
}
.sheet-action.is-danger {
  color: var(--danger);
}
.sheet-aside {
  margin-left: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.sheet-cancel {
  margin-top: 6px;
  text-align: center;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
}


.link-banner {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, 92vw);
  padding: 9px 10px 9px 15px;
  border-radius: var(--r-md);
  background: var(--chrome-bg);
  color: var(--chrome-text);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
}
.link-banner[hidden] {
  display: none;
}
.link-banner button {
  padding: 5px 10px;
  border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  color: inherit;
  font-size: 12.5px;
}

body.is-picking .card {
  cursor: pointer;
}
body.is-picking .title,
body.is-picking .note {
  pointer-events: none;
}
body.is-picking .card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
body.is-picking .gap,
body.is-picking .actions,
body.is-picking .twisty {
  pointer-events: none;
}

.rail-scrim {
  display: none;
}


.hues {
  display: flex;
  gap: 4px;
  padding: 6px 4px 10px;
}

.hue {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid transparent;
}
.hue::after {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--hue);
}
.hue:hover {
  background: var(--surface-3);
}
.hue.is-current {
  border-color: var(--hue);
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--surface);
}

.hue-pop {
  position: fixed;
  z-index: 55;
  padding: 3px 5px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.hue-pop .hues {
  padding: 2px;
}


.move-bar {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, 94vw);
  padding: 8px 8px 8px 14px;
  border-radius: var(--r-md);
  background: var(--chrome-bg);
  color: var(--chrome-text);
  box-shadow: var(--shadow-lg);
}
.move-bar[hidden] {
  display: none;
}

.move-label {
  font-size: 12.5px;
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}

.move-buttons {
  display: flex;
  gap: 3px;
}
.move-buttons button {
  width: 38px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  color: inherit;
  font-size: 15px;
  line-height: 1;
}
.move-buttons button:hover:not(:disabled) {
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.move-buttons button:disabled {
  opacity: 0.32;
  cursor: default;
}

.move-done {
  padding: 7px 12px;
  border-radius: var(--r-sm);
  background: var(--chrome-text);
  color: var(--chrome-bg);
  font-size: 12.5px;
  font-weight: 600;
}

.card.is-moving {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
body.is-moving .gap,
body.is-moving .actions {
  pointer-events: none;
}


.wires.has-picked .wire:not(.is-picked) {
  opacity: 0.2;
}
.wire.is-picked .wire-line {
  stroke-width: 3;
  opacity: 1;
}
.wire-cut {
  cursor: pointer;
  pointer-events: all;
}
.wire-cut circle {
  filter: drop-shadow(0 1px 2px rgba(35, 32, 25, 0.2));
}
.wire-cut:hover circle {
  fill: var(--cut-hover);
}


.modal {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--scrim);
}
.modal[hidden] {
  display: none;
}

.modal-panel {
  width: min(520px, 100%);
  max-height: 86dvh;
  overflow: auto;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.modal-panel h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.modal-note {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
}

.modal-label {
  display: block;
  margin: 12px 0 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
}
.modal-row {
  display: flex;
  gap: 6px;
}
.modal-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.modal-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.modal-row button {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-2);
}
.modal-row button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.modal-close {
  margin-top: 18px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.modal-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.modal.is-top {
  z-index: 62;
}
.modal-panel.is-narrow {
  width: min(400px, 100%);
}
.modal-panel.is-narrow .modal-danger {
  margin-top: 4px;
}
.modal-panel.is-narrow .modal-close {
  margin-top: 8px;
}


.stat-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 4px 0 18px;
}

.stat-dial {
  position: relative;
  flex: none;
  width: 112px;
  height: 112px;
}
.stat-dial-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.stat-dial-figure {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat-dial-caption {
  font-size: 11px;
  color: var(--text-3);
}

.stat-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.stat-legend li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.stat-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}
.stat-legend-count {
  min-width: 2.4ch;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-legend-label {
  font-size: 12.5px;
  color: var(--text-2);
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.stat-label {
  font-size: 11px;
  color: var(--text-3);
}
.stat-value {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.stat-list {
  margin-top: 18px;
}
.stat-list h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.stat-list-note {
  margin: 2px 0 8px;
  font-size: 11.5px;
  color: var(--text-3);
}
.stat-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.stat-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}
.stat-list-stripe {
  flex: none;
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--ink);
}
.stat-list-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-list-aside {
  flex: none;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}



.welcome {
  position: fixed;
  inset: 0;
  z-index: 59;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg);
  overflow: auto;
}
.welcome[hidden] {
  display: none;
}

.welcome-panel {
  width: min(620px, 100%);
  padding: 28px 26px 24px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.welcome-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}
.welcome-head h1 {
  margin: 0;
  --wordmark-h: 30px;
}
.welcome-head .tagline {
  margin-top: 3px;
}
.welcome-kicker {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
}

.welcome-lede {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.welcome-warn {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  font-size: 12.5px;
  color: var(--text-2);
}

.welcome-board {
  position: relative;
  padding-right: 74px;
  margin-bottom: 24px;
}

.welcome-row {
  margin-bottom: 7px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}
.welcome-row.is-in {
  opacity: 1;
  transform: none;
}
.welcome-row[data-depth="1"] {
  margin-left: 26px;
}

.welcome-board .card {
  padding: 7px 14px;
  cursor: default;
}
.welcome-board .card:hover {
  border-color: var(--border);
}
.welcome-board .check {
  pointer-events: none;
}
.welcome-board .title {
  min-height: 1.4em;
}
.welcome-board .note {
  opacity: 0;
  transition: opacity 260ms ease;
}
.welcome-board .note.is-in {
  opacity: 0.92;
}

.welcome-wires {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  overflow: visible;
}

.welcome-preview {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.welcome-preview li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13.5px;
}
.welcome-preview span {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.welcome-more {
  border: 0 !important;
  color: var(--text-3);
  font-size: 12.5px;
}

.welcome-preview.merge-list li {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 7px;
}
.welcome-preview.merge-list strong {
  flex: 1 1 45%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.merge-target {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.merge-target:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.welcome-preview.merge-list .merge-note {
  flex: 1 0 100%;
  white-space: normal;
}

.merge-prune {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 20px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.merge-prune input {
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.merge-heading {
  margin: 16px 0 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.merge-heading:first-child {
  margin-top: 0;
}
.welcome-preview.merge-diff {
  margin-bottom: 0;
}
.merge-diff-wrap {
  max-height: 34vh;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 2px;
}

.merge-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.merge-choice {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 13px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
}
.merge-choice strong {
  font-size: 13.5px;
  font-weight: 600;
}
.merge-choice span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-3);
}
.merge-choice:hover {
  background: var(--surface-hover);
}
.merge-choice.is-chosen {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.merge-choice.is-chosen span {
  color: var(--text-2);
}
.merge-choice:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.merge-outcome {
  margin: 0 0 18px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.welcome-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.welcome-primary,
.welcome-secondary {
  flex: 1 1 auto;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.welcome-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}
.welcome-primary:hover {
  background: var(--ink-hover);
}
.welcome-secondary {
  background: var(--surface);
  color: var(--text-2);
}
.welcome-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
}


.tools {
  display: flex;
  gap: 6px;
}

.tool {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  color: var(--text-2);
  transition: background 110ms ease, color 110ms ease, border-color 110ms ease;
}
.tool[hidden] {
  display: none;
}
.tool svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.tool:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}


.setting {
  margin-bottom: 18px;
}
.setting-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.setting-fine {
  margin: 3px 0 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
}

.depth-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.depth-step {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 15px;
  line-height: 1;
  color: var(--text-2);
}
.depth-step:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
#depth-levels {
  width: 58px;
  flex: none;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font: inherit;
  font-size: 13px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
#depth-levels:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#depth-levels::-webkit-outer-spin-button,
#depth-levels::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#depth-levels {
  -moz-appearance: textfield;
  appearance: textfield;
}
.depth-unit {
  font-size: 12px;
  color: var(--text-3);
}

.depth-note {
  margin: 8px 0 0;
}
.depth-note:empty {
  display: none;
}
.depth-note.is-warning,
.modal-note.is-warning {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--danger-line);
  background: var(--danger-wash);
  color: var(--text-2);
}

.modal-choice {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.modal-primary {
  flex: 1 1 auto;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
}
.modal-primary:hover {
  background: var(--ink-hover);
}
.modal-primary.is-quiet {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
  font-weight: 500;
}
.modal-primary.is-quiet:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.modal-row ~ .modal-primary.modal-block,
.modal-row ~ .modal-danger.is-solid {
  margin-top: 12px;
}

.modal-fine {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--text-3);
}

.modal-block {
  width: 100%;
}
.acct-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(46vh, 340px);
  overflow: auto;
}
.acct-chart {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.acct-chart-text {
  flex: 1 1 auto;
  min-width: 0;
}
.acct-chart-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text);
}
.acct-chart-meta {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
}
.acct-chart-get {
  flex: none;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-2);
}
.acct-chart-get:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.acct-chart-get:disabled {
  opacity: 0.5;
}
.acct-chart-here {
  flex: none;
  font-size: 11.5px;
  color: var(--text-3);
}

.collab-members {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(40vh, 280px);
  overflow: auto;
}
.collab-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.collab-member.is-pending {
  opacity: 0.7;
}
.collab-member-email {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text);
}
.collab-member-role {
  flex: none;
  font-size: 11.5px;
  color: var(--text-3);
}
.collab-empty {
  padding: 10px;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
}
.collab-member .chart-del {
  opacity: 1;
}

.sharetabs {
  margin: 12px 0 16px;
}
.sharetabs button {
  gap: 5px;
}
.sharetabs button[hidden] {
  display: none;
}

.pro-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pro-chip[hidden] {
  display: none;
}

.modal-rule {
  margin: 18px 0 4px;
  border: 0;
  border-top: 1px solid var(--border);
}
.modal-row .modal-wide {
  flex: 1 1 0;
}

.modal-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--danger-line);
  background: var(--danger-wash);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}
.modal-danger svg {
  width: 15px;
  height: 15px;
}
.modal-danger:hover {
  background: var(--danger-soft);
}
.modal-danger.is-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-danger);
}
.modal-danger.is-solid:hover {
  background: var(--danger-solid-hover);
  border-color: var(--danger-solid-hover);
}
.modal-danger:disabled {
  opacity: 0.45;
  cursor: default;
  background: var(--danger-wash);
  border-color: var(--border);
  color: var(--text-3);
}

@media (prefers-reduced-motion: reduce) {
  .mark::before {
    animation: none;
  }
  .welcome-row {
    opacity: 1;
    transform: none;
  }
}


@media (max-width: 900px) {
  body,
  body.sidebar-open {
    grid-template-columns: 1fr;
  }
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--rail-w);
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 180ms cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: var(--shadow-lg);
  }
  body.sidebar-open #sidebar {
    transform: none;
  }
  .rail-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: var(--scrim);
  }
  .rail-scrim[hidden] {
    display: none;
  }
  main {
    grid-column: 1;
  }
  .greeting {
    display: none;
  }
  .outline {
    padding-right: 84px;
  }
}


@media (max-width: 700px) {
  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    padding: 7px 40px 7px 12px;
  }
  .main {
    flex: none;
    width: auto;
    padding-right: 0;
    border-right: 0;
  }
  .note {
    margin-left: 25px;
    padding: 1px 6px;
    text-align: left;
  }
  .note:empty:not(:focus) {
    display: none;
  }

  .canvas {
    padding: 12px 12px 40vh;
  }
  .outline {
    padding-right: 58px;
  }
  .children {
    margin-left: 18px;
    padding-left: 12px;
  }
  .topbar {
    padding: 0 12px;
    gap: 10px;
  }
  .stats {
    gap: 6px;
    padding-left: 8px;
  }
  .stats-detail {
    display: none;
  }
  .stat-hero {
    gap: 16px;
  }
  .stat-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .sequence {
    padding: 16px 12px 40vh;
  }
  .seq-lane {
    width: min(78vw, 244px);
  }
}


@media (pointer: coarse) {
  .actions {
    opacity: 1;
    right: 8px;
  }
  .grip,
  .nub,
  .add-child,
  .swatch,
  .trash {
    display: none;
  }
  .more {
    display: grid;
  }

  .card {
    min-height: 46px;
    padding-right: 44px;
  }
  .twisty {
    width: 32px;
    height: 32px;
  }
  .twisty svg {
    width: 15px;
    height: 15px;
  }
  .check {
    width: 20px;
    height: 20px;
    opacity: 1;
  }
  .note {
    margin-left: 30px;
  }

  .gap:not(.gap-tail) {
    pointer-events: none;
  }
  .gap-tail {
    height: 42px;
  }
  .gap-tail .ghost {
    opacity: 1;
  }

  .chart {
    padding: 10px 8px;
  }
  .chart-sync,
  .chart-sync.is-off {
    width: 28px;
    height: 28px;
    opacity: 1;
  }
  .rail-actions button {
    padding: 10px 4px;
  }
  .segmented button {
    padding: 10px 4px;
  }
  .tool {
    padding: 10px 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 1ms !important;
  }
}

.tucked {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0 39px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-3);
}

.link {
  align-self: flex-start;
  padding: 4px 6px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border-strong);
}
.link:hover {
  color: var(--text);
  background: var(--surface-3);
  text-decoration-color: var(--text-3);
}

.empty-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.empty-note p {
  margin: 0 0 2px;
}


body.admin-body {
  display: block;
  height: auto;
  min-height: 100vh;
  overflow: auto;
}

.admin-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.admin-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 22px;
  align-items: start;
}
.admin-columns .admin-section {
  margin-bottom: 0;
}

.admin-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 24px;
}

.admin-mark {
  --mark-size: 28px;
}

.admin-head-words {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.admin-head-words .wordmark {
  --wordmark-h: 20px;
  margin: 0;
}
.admin-head-words .tagline {
  margin: 0;
}

.admin-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-2);
}
.admin-identity[hidden] {
  display: none;
}

.admin-identity-email {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-state {
  padding: 24px 0;
}

.admin-section {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.admin-section-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.admin-stat {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.admin-stat-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
}

.admin-stat-value {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-invite-form .modal-row {
  margin-bottom: 10px;
}

.admin-invite-result {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.admin-list-toggle {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.admin-invite-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.admin-invite-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 12.5px;
}
.admin-invite-row.is-revoked {
  opacity: 0.55;
}

.admin-invite-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-invite-meta {
  flex: none;
  color: var(--text-2);
}

.admin-invite-revoke {
  flex: none;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--text-2);
}
.admin-invite-revoke:hover:not(:disabled) {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-line);
}
.admin-invite-revoke:disabled {
  color: var(--text-3);
  cursor: default;
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: min(440px, calc(100vw - 40px));
  margin: 0;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  color: var(--text-2);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}
.admin-toast.is-up {
  opacity: 1;
  transform: translate(-50%, 0);
}
