body.app {
  --bg: #0f1013;
  --raised: #16171b;
  --panel: #16171b;
  --inner: #1c1d22;
  --line: #26272e;
  --line-strong: #33343c;
  --text: #ececef;
  --soft: #c2c4cc;
  --muted: #8b8e99;
  --accent: #4aaeff;
  --accent-hover: #74c0ff;
  --accent-soft: rgba(0, 149, 255, 0.14);
  --blue: #0095ff;
  --ok: #4cc38a;
  --warn: #f0b93f;
  --bad: #f2716a;
  --dev: #a58bff;
  --radius: 12px;
  --small: 9px;
  --display: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  scrollbar-color: #34353d transparent;
}

body.app * {
  scrollbar-width: thin;
  scrollbar-color: #34353d transparent;
}

body.app ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.app ::-webkit-scrollbar-track {
  background: transparent;
}

body.app ::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background: #34353d padding-box;
}

body.app ::-webkit-scrollbar-thumb:hover {
  background: #4a4b55 padding-box;
}

body.app ::selection {
  background: rgba(0, 149, 255, 0.35);
}

body.app h1,
body.app h2,
body.app h3 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 650;
  letter-spacing: -0.01em;
}

body.app .top {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 16, 19, 0.92);
  backdrop-filter: blur(10px);
}

body.app .top .links a,
body.app .top .account a,
body.app .top .account .link {
  color: var(--muted);
}

body.app .top .links a:hover,
body.app .top .links a.on,
body.app .top .account a:hover,
body.app .top .account .link:hover {
  color: var(--text);
}

body.app .side {
  border-right: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}

body.app .side .back {
  color: var(--muted);
}

body.app .side .back:hover {
  color: var(--text);
  text-decoration: none;
}

body.app .side .guild {
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

body.app .side .guild .icon {
  border: 0;
  border-radius: 9px;
  background: var(--inner);
  color: var(--text);
}

body.app .side .guild .icon img {
  border-radius: 9px;
}

body.app .side .who strong {
  color: var(--text);
}

body.app .side .who small {
  color: var(--muted);
}

body.app .side h5 {
  margin-top: 18px;
  color: #6d707b;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

body.app .side nav a {
  border-radius: var(--small);
  color: var(--soft);
  font-weight: 500;
}

body.app .side nav a .i {
  color: var(--accent);
  opacity: 0.85;
}

body.app .side nav a:hover {
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
}

body.app .side nav a.on,
body.app .side nav a.on:hover {
  background: #1e2027;
  color: #fff;
  box-shadow: none;
}

body.app .side nav a.on::before {
  display: none;
}

body.app .side nav a.on .i {
  color: var(--accent);
  opacity: 1;
}

body.app .side nav a .count {
  border-radius: 99px;
  background: var(--blue);
  color: #fff;
}

.plus-state {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

.plus-state.on {
  background: rgba(76, 195, 138, 0.14);
  color: var(--ok);
}

body.app .content {
  padding: 32px 40px 80px;
}

body.app .page-head {
  margin-bottom: 24px;
}

body.app .page-head h1,
body.app .profile-head h1 {
  font-size: 28px;
}

body.app .page-head p {
  max-width: 70ch;
  margin-top: 6px;
  color: var(--muted);
}

body.app .page-head.row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.head-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.app .button {
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--small);
  background: #1c7fe0;
  color: #fff;
  font-weight: 600;
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body.app .button:hover {
  background: #2b8ef0;
  color: #fff;
  text-decoration: none;
}

body.app .button.plain {
  border-color: var(--line-strong);
  background: var(--inner);
  color: var(--text);
}

body.app .button.plain:hover {
  border-color: #474955;
  background: #22242a;
}

body.app .button.danger {
  border-color: rgba(242, 113, 106, 0.3);
  background: rgba(242, 113, 106, 0.12);
  color: var(--bad);
}

body.app .button.danger:hover {
  background: rgba(242, 113, 106, 0.2);
  color: #ff8d86;
}

body.app .button.small {
  height: 32px;
  padding: 0 12px;
  font-size: 13.5px;
}

body.app .button:disabled {
  opacity: 0.55;
}

body.app input[type="text"],
body.app input[type="search"],
body.app input[type="number"],
body.app input[type="url"],
body.app input[type="password"],
body.app input[type="datetime-local"],
body.app select,
body.app textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--small);
  background: #121317;
  color: var(--text);
}

body.app input[type="url"],
body.app input[type="datetime-local"] {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color-scheme: dark;
}

body.app input:focus,
body.app select:focus,
body.app textarea:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 149, 255, 0.2);
}

body.app input::placeholder,
body.app textarea::placeholder {
  color: #5e616b;
}

body.app code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--inner);
  color: var(--soft);
}

body.app .card,
.sheet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

.sheet {
  margin-bottom: 18px;
  overflow: hidden;
}

body.app .card > header,
.sheet > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 0;
  background: transparent;
}

body.app .card > header h2,
.sheet > header h2 {
  font-size: 16px;
}

body.app .card > header + table,
body.app .card > header + .rows,
.sheet > header + .ledger,
.sheet > header + table {
  border-top: 1px solid var(--line);
}

.sheet > .stack,
.sheet > form.stack,
.sheet > .weeks,
.sheet > .bars-list,
.sheet > .timeline,
.sheet > .checks,
.sheet > .exports,
.sheet > .help,
.sheet > p:not(.empty),
.sheet > dl,
.sheet > .schedule-form {
  padding: 16px 18px;
}

.sheet > .help {
  padding-top: 0;
}

.sheet .help {
  color: var(--muted);
  font-size: 12.5px;
}

body.app table th {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.app table td,
body.app table th {
  border-bottom-color: var(--line);
}

.ledger {
  width: 100%;
  border-collapse: collapse;
}

.ledger th,
.ledger td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ledger th {
  padding-top: 12px;
  padding-bottom: 10px;
  background: transparent;
}

.ledger tbody tr:last-child td,
.ledger > tr:last-child td {
  border-bottom: 0;
}

.ledger .right,
.ledger th.right {
  text-align: right;
}

.ledger tr[data-href] {
  cursor: pointer;
}

.ledger tr[data-href]:hover td {
  background: #1a1b20;
}

.ledger tr.picked td {
  background: rgba(0, 149, 255, 0.08);
}

.ledger tr.picked td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
}

.ledger.compact td {
  padding: 10px 18px;
}

.ledger .reason {
  max-width: 44ch;
  color: var(--soft);
}

.ledger .mono a {
  color: var(--muted);
}

.ledger .state-voided td,
.ledger .state-voided td .kind,
.ledger tr.state-voided strong {
  color: #61646e;
}

.ledger .state-voided .reason {
  text-decoration: line-through;
}

.ledger .state-ended td:not(:last-child),
.ledger .state-lifted td:not(:last-child) {
  color: var(--muted);
}

.ledger.compare td.now {
  font-weight: 700;
  color: var(--text);
}

.ledger.compare td:not(.now):not(:first-child):not(:last-child) {
  color: #61646e;
}

.ledger .full {
  padding: 1px 8px;
  border-radius: 99px;
  background: rgba(240, 185, 63, 0.16);
  color: var(--warn);
}

.kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 9px 2px 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--c, #8b8e99) 16%, transparent);
  color: color-mix(in srgb, var(--c, #8b8e99) 75%, #fff);
  font-size: 12.5px;
  font-weight: 600;
}

.kind::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--muted));
}

.swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--muted));
}

.state {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--inner);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.state.running,
.state.s-active {
  background: rgba(76, 195, 138, 0.14);
  color: var(--ok);
}

.state.s-pending {
  background: rgba(240, 185, 63, 0.14);
  color: var(--warn);
}

.state.s-denied {
  background: rgba(242, 113, 106, 0.14);
  color: var(--bad);
}

.ledger tr.state-suspended .state {
  background: rgba(242, 113, 106, 0.16);
  color: var(--bad);
}

.dir {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 7px;
  vertical-align: -6px;
}

.dir.up {
  background: rgba(76, 195, 138, 0.14);
  color: var(--ok);
}

.dir.down {
  background: rgba(242, 113, 106, 0.14);
  color: var(--bad);
}

body.app .tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

body.app .tabs a {
  padding: 7px 14px;
  border: 0;
  border-radius: var(--small);
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

body.app .tabs a:hover {
  color: var(--text);
  text-decoration: none;
}

body.app .tabs a.on {
  background: #23252c;
  color: #fff;
  box-shadow: none;
}

body.app .count.soft {
  min-width: 0;
  height: auto;
  margin-left: 4px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.tally > div {
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.tally b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

.tally small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.tally .swatch {
  position: absolute;
  top: 18px;
  right: 16px;
}

.meter {
  display: block;
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--inner);
}

.meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--blue);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.split.even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 84px;
}

body.app .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

body.app .filters select {
  width: auto;
  min-width: 140px;
}

body.app .filters .reset {
  color: var(--muted);
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 6px;
}

.stack > label {
  margin-top: 8px;
  color: var(--soft);
  font-size: 13.5px;
  font-weight: 600;
}

.stack > label:first-of-type {
  margin-top: 0;
}

.stack > .button {
  margin-top: 14px;
  justify-self: start;
}

.stack textarea {
  min-height: 92px;
}

.stack textarea.short {
  min-height: 60px;
}

.stack .help {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

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

.presets button {
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--inner);
  color: var(--soft);
  font: 12.5px/1.6 inherit;
  font-family: inherit;
  cursor: pointer;
}

.presets button:hover {
  border-color: rgba(0, 149, 255, 0.5);
  background: var(--accent-soft);
  color: var(--accent);
}

.pair {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.case > header {
  align-items: center;
  padding-bottom: 0;
}

.case h2 {
  padding: 12px 18px 0;
}

.case h2 .kind {
  font-size: 15px;
  padding: 4px 12px 4px 10px;
}

.case .close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
}

.case .close:hover {
  background: var(--inner);
  color: var(--text);
}

.case-state {
  padding: 8px 18px 0 !important;
  color: var(--muted);
  font-size: 14px;
}

.case-state.s-suspended {
  color: var(--bad);
  font-weight: 600;
}

.case-state.s-active {
  color: var(--ok);
  font-weight: 600;
}

.facts,
.sheet > dl.facts {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px 12px;
  margin: 16px 18px;
  padding: 14px 16px !important;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
  font-size: 14px;
}

.facts dt {
  color: var(--muted);
  font-size: 13px;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.evidence {
  display: block;
  margin: 0 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

.evidence img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.case details.edit {
  margin: 0 18px;
  border-top: 1px solid var(--line);
}

.case details.edit summary {
  padding: 12px 0;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
}

.case details.edit .stack {
  padding: 0 0 14px;
}

.case-actions {
  display: flex;
  gap: 8px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}

.plainlink,
.plainlink:hover {
  color: inherit;
  text-decoration: none;
}

.plainlink:hover .person span {
  color: var(--accent);
}

.plus-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  vertical-align: 1px;
}

.limit-line {
  margin: -12px 0 18px;
  color: var(--muted);
  font-size: 13.5px;
}

.limit-line .mono {
  color: var(--text);
}

.colour-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.colour-field input[type="color"],
.pb-colour input[type="color"] {
  width: 38px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #121317;
  cursor: pointer;
}

.profile-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.profile-head .face {
  display: grid;
  flex: 0 0 64px;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--inner);
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
}

.profile-head .face img {
  width: 100%;
  height: 100%;
}

.profile-head > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.profile-head .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

body.app .chip {
  border-radius: 99px;
  border-color: var(--line-strong);
  background: var(--inner);
  color: var(--soft);
}

body.app .chip.onshift {
  border-color: rgba(76, 195, 138, 0.35);
  background: rgba(76, 195, 138, 0.1);
  color: var(--ok);
}

body.app .chip.onshift .dot {
  background: var(--ok);
}

.weeks {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: 150px;
  gap: 10px;
  align-items: stretch;
}

.week {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  text-align: center;
}

.week .vbar {
  display: block;
  flex: none;
  width: 100%;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: #2a5f9a;
  opacity: 1;
  animation: none;
}

.week.under .vbar {
  background: rgba(242, 113, 106, 0.55);
}

.week:last-child .vbar {
  background: var(--blue);
}

.week small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.bars-list {
  display: grid;
  gap: 10px;
  margin: 0;
  list-style: none;
}

.bars-list li {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.bars-list .meter {
  margin: 0;
  height: 8px;
}

.bars-list b {
  text-align: right;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: flex;
  gap: 4px;
}

.timeline li p {
  margin: 2px 0;
  color: var(--soft);
  font-size: 14px;
}

.timeline li.struck strong {
  text-decoration: line-through;
  color: var(--muted);
}

.plus-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: center;
  margin-bottom: 20px;
  padding: 26px 28px;
  border: 1px solid rgba(0, 149, 255, 0.28);
  border-radius: var(--radius);
  background: #121a26;
}

.plus-hero h1 {
  margin: 12px 0 8px;
  font-size: 26px;
}

.plus-hero p {
  max-width: 56ch;
  color: var(--soft);
}

.plus-mark {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 3px 11px 3px 9px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

body.app .plus-hero .notice {
  border-color: var(--line-strong);
  background: var(--inner);
}

.plans {
  display: grid;
  gap: 10px;
}

.plan {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--inner);
  color: var(--soft);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.plan b {
  color: #fff;
  font-size: 22px;
}

.plan:hover,
.plan.best {
  border-color: rgba(0, 149, 255, 0.55);
  background: rgba(0, 149, 255, 0.08);
}

.checks {
  display: grid;
  gap: 10px;
  margin: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 10px;
  align-items: center;
}

.checks li span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--inner);
  color: var(--muted);
}

.checks li.yes span {
  background: var(--accent-soft);
  color: var(--accent);
}

.exports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule {
  margin-top: 20px;
}

.schedule-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}

.schedule-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.schedule-form label.grow {
  flex: 1 1 200px;
}

.schedule-form input[type="number"] {
  width: 90px;
}

body.app .notice {
  border: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--soft);
}

body.app .notice.ok {
  border-color: rgba(76, 195, 138, 0.35);
  background: rgba(76, 195, 138, 0.08);
}

body.app .notice.error {
  border-color: rgba(242, 113, 106, 0.35);
  background: rgba(242, 113, 106, 0.08);
}

body.app .notice.warn {
  border-color: rgba(240, 185, 63, 0.35);
  background: rgba(240, 185, 63, 0.08);
}

body.app .flash {
  border-radius: var(--radius);
}

body.app .empty {
  padding: 24px 18px;
  color: var(--muted);
}

body.app .form.card.pad,
body.app form.card.pad {
  padding: 8px 18px 4px;
}

body.app .field {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

body.app .field:first-of-type {
  margin-top: 12px;
}

body.app .field > label,
body.app .field > .label,
body.app .field.toggle .label {
  color: var(--text);
  font-weight: 600;
}

body.app .field .help {
  color: var(--muted);
}

body.app .item {
  border-radius: var(--radius);
  border-color: var(--line);
  background: var(--panel);
}

body.app .item[open] {
  border-color: var(--line-strong);
}

body.app .item summary .kind {
  margin-left: 6px;
}

body.app .item summary strong.name {
  font-family: inherit;
}

body.app .savebar {
  border-top-color: var(--line);
}

body.app .switch span {
  border-radius: 99px;
  background: #34353d;
}

body.app .switch span::after {
  border-radius: 50%;
  background: #fff;
}

body.app .switch input:checked + span {
  background: var(--blue);
}

body.app .pager {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

body.app .person i {
  border-radius: 50%;
  background: var(--inner);
  color: var(--soft);
}

body.app .person img {
  border-radius: 50%;
}

body.app .badge {
  padding: 1px 9px;
  border: 0;
  border-radius: 99px;
  background: var(--inner);
  font-size: 12px;
  font-weight: 600;
}

body.app .badge.t-warning,
body.app .badge.Warning { background: rgba(240, 185, 63, 0.14); color: var(--warn); }
body.app .badge.t-kick,
body.app .badge.Kick { background: rgba(240, 144, 76, 0.14); color: #f39a5c; }
body.app .badge.t-ban,
body.app .badge.Ban { background: rgba(242, 113, 106, 0.14); color: var(--bad); }
body.app .badge.t-bolo,
body.app .badge.BOLO { background: rgba(165, 139, 255, 0.14); color: var(--dev); }
body.app .badge.t-note,
body.app .badge.Note { background: var(--inner); color: var(--soft); }
body.app .badge.active,
body.app .badge.accepted { background: rgba(76, 195, 138, 0.14); color: var(--ok); }
body.app .badge.pending { background: rgba(240, 185, 63, 0.14); color: var(--warn); }
body.app .badge.denied { background: rgba(242, 113, 106, 0.14); color: var(--bad); }

body.app .stats {
  gap: 12px;
  border: 0;
}

body.app .stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

body.app .stat + .stat {
  border-left: 1px solid var(--line);
}

body.app .stat strong {
  font-family: inherit;
  font-size: 26px;
}

body.app .hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

body.app .hero-card.has-banner {
  background: var(--panel);
}

body.app .hero-card .sicon {
  border: 0;
  border-radius: 14px;
  background: var(--inner);
  color: var(--text);
}

body.app .hero-card code {
  border-color: var(--line-strong);
  background: var(--inner);
  color: var(--text);
}

body.app .hero-card p {
  color: var(--muted);
}

body.app .vbar {
  border-radius: 5px 5px 2px 2px;
  background: #2a5f9a;
  opacity: 1;
}

body.app .bars .vbar:last-child {
  background: var(--blue);
}

body.app .seg {
  padding: 3px;
  border-color: var(--line);
  border-radius: var(--small);
  background: var(--panel);
}

body.app .seg a {
  border-radius: 7px;
}

body.app .seg a.on {
  background: #23252c;
  color: #fff;
}

body.app .chart svg polyline {
  stroke: var(--blue);
}

body.app .chart svg polygon {
  fill: rgba(0, 149, 255, 0.12);
}

body.app details.menu > div {
  border-color: var(--line-strong);
  border-radius: var(--radius);
  background: var(--raised);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

body.app .session-card.running {
  border-color: rgba(76, 195, 138, 0.35);
}

body.app .tiles div {
  border-color: var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

main.admin {
  max-width: 1100px;
  margin: 0 auto;
  padding: 34px 28px 80px;
}

main.admin .inline-field {
  display: flex;
  gap: 6px;
}

main.admin input[type="number"] {
  width: 90px;
}

.dirty-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--warn);
  vertical-align: 1px;
}

.pb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 20px;
  align-items: start;
}

.pb-editor {
  padding: 16px 18px;
}

.pb-top {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.pb-colour {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
}

body.app .pb-colour input[type="text"] {
  width: 92px;
  padding: 7px 9px;
  font-size: 13px;
}

.pb-ping {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.pb-blocks {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.pb-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

.pb-block:focus-within {
  border-color: rgba(0, 149, 255, 0.5);
}

.pb-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid var(--line);
}

.pb-block-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.pb-controls {
  display: flex;
  gap: 2px;
}

.pb-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}

.pb-icon:hover:not(:disabled) {
  background: #2a2c33;
  color: var(--text);
}

.pb-icon:disabled {
  opacity: 0.3;
  cursor: default;
}

.pb-block-body {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}

.pb-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.pb-tool {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #121317;
  color: var(--soft);
  font: 12.5px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}

.pb-tool:hover {
  border-color: rgba(0, 149, 255, 0.5);
  color: var(--accent);
}

.pb-tool.k-B { font-weight: 700; }
.pb-tool.k-I { font-style: italic; }
.pb-tool.k-U { text-decoration: underline; }
.pb-tool.k-S { text-decoration: line-through; }

.pb-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.pb-count.over,
.pb-usage.over {
  color: var(--bad);
}

body.app .pb-text {
  min-height: 70px;
  resize: vertical;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
}

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

.pb-row.two > input:first-child {
  flex: 0 0 34%;
}

.pb-row input {
  flex: 1;
}

.pb-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-right: 18px;
  font-size: 14px;
}

.pb-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pb-add {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--small);
}

.pb-add .muted {
  margin-right: 4px;
}

.pb-usage {
  margin: 10px 0 0;
}

.pb-errors {
  display: grid;
  gap: 2px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(242, 113, 106, 0.35);
  border-radius: var(--small);
  background: rgba(242, 113, 106, 0.08);
  color: var(--bad);
  font-size: 14px;
}

.pb-errors[hidden] {
  display: none;
}

.pb-save {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
}

.pb-save .save-pill {
  margin-right: auto;
}

body.app .save-pill {
  padding: 2px 10px;
  border: 0;
  border-radius: 99px;
  background: var(--inner);
  color: var(--muted);
  font-size: 12.5px;
}

body.app .save-pill.dirty {
  background: rgba(240, 185, 63, 0.14);
  color: var(--warn);
}

body.app .save-pill.ok {
  background: rgba(76, 195, 138, 0.14);
  color: var(--ok);
}

body.app .save-pill.error {
  background: rgba(242, 113, 106, 0.14);
  color: var(--bad);
}

.pb-side {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 12px;
}

.pb-side > .help {
  color: var(--muted);
  font-size: 12.5px;
}

.pb-vars ul {
  display: grid;
  gap: 2px;
  max-height: 260px;
  margin: 0;
  padding: 10px 12px 12px;
  overflow: auto;
  list-style: none;
}

.pb-vars li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
}

.pb-vars button {
  flex: 0 0 auto;
  padding: 1px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: 12.5px var(--mono);
  cursor: pointer;
}

.pb-vars button:hover {
  background: var(--accent-soft);
}

.pb-tips dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
}

.pb-tips dt {
  white-space: nowrap;
}

.pb-tips dd {
  margin: 0;
  color: var(--muted);
}

.discord-preview {
  padding: 14px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #313338;
  color: #dbdee1;
  font: 15px/1.375 "gg sans", "Noto Sans", "Inter", system-ui, sans-serif;
}

.dp-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.dp-avatar {
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  background: #5865f2;
}

.dp-avatar img {
  width: 100%;
  height: 100%;
}

.dp-head strong {
  color: #f2f3f5;
  font-weight: 600;
}

.dp-app {
  padding: 0 4px;
  border-radius: 3px;
  background: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
}

.dp-time {
  color: #949ba4;
  font-size: 12px;
}

.dp-card {
  margin-left: 44px;
  padding: 14px 16px;
  border: 1px solid #3f4147;
  border-radius: 8px;
  background: #393a41;
  overflow-wrap: anywhere;
}

.dp-card.has-accent {
  border-left: 4px solid var(--accent);
}

.dp-card > * + * {
  margin-top: 8px;
}

.dp-line {
  min-height: 1em;
}

.dp-gap {
  height: 0.6em;
}

.dp-h {
  margin: 4px 0 2px;
  color: #f2f3f5;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.25;
}

h1.dp-h { font-size: 24px; }
h2.dp-h { font-size: 20px; }
h3.dp-h { font-size: 16px; }

.dp-sub {
  color: #949ba4;
  font-size: 13px;
}

.dp-quote {
  margin: 2px 0;
  padding-left: 12px;
  border-left: 4px solid #4e5058;
}

.dp-list {
  margin: 2px 0;
  padding-left: 22px;
}

.dp-card code {
  padding: 1px 4px;
  border: 0;
  border-radius: 4px;
  background: #2b2d31;
  color: #dbdee1;
  font-size: 0.85em;
}

.dp-code {
  margin: 4px 0;
  padding: 8px 10px;
  border: 1px solid #1e1f22;
  border-radius: 4px;
  background: #2b2d31;
  font: 13px/1.4 var(--mono);
  white-space: pre-wrap;
}

.dp-card a {
  color: #00a8fc;
}

.dp-card strong {
  color: #f2f3f5;
}

.dp-mention {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  font-weight: 500;
}

.dp-stamp {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.dp-sep {
  height: 4px;
}

.dp-sep.big {
  height: 16px;
}

.dp-sep.line {
  height: 1px;
  margin-top: 10px !important;
  margin-bottom: 2px;
  background: #4e5058;
}

.dp-sep.line.big {
  margin-top: 18px !important;
  margin-bottom: 10px;
}

.dp-gallery {
  display: grid;
  gap: 4px;
  overflow: hidden;
  border-radius: 8px;
}

.dp-gallery.n2 { grid-template-columns: 1fr 1fr; }
.dp-gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.dp-gallery.n3 img:first-child { grid-row: span 2; }
.dp-gallery.n4 { grid-template-columns: 1fr 1fr; }

.dp-gallery img {
  display: block;
  width: 100%;
  max-height: 300px;
  min-height: 60px;
  object-fit: cover;
  background: #2b2d31;
}

.dp-gallery img.broken,
.dp-thumb.broken {
  opacity: 0.25;
}

.dp-section {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dp-section .dp-text {
  flex: 1;
}

.dp-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  background: #2b2d31;
}

.dp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dp-button {
  padding: 6px 14px;
  border-radius: 6px;
  background: #4e5058;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.dp-button.primary {
  background: #5865f2;
}

.dp-button:not(.primary)::after {
  content: " \2197";
  color: #b5bac1;
}

.dp-missing {
  padding: 18px;
  border: 1px dashed #4e5058;
  border-radius: 6px;
  color: #949ba4;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .split,
  .pb-grid,
  .plus-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail,
  .pb-side {
    position: static;
  }
}

@media (max-width: 760px) {
  body.app .content {
    padding: 24px 16px 60px;
  }

  .split.even {
    grid-template-columns: minmax(0, 1fr);
  }

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

body.app .pad {
  padding: 16px 18px;
}

body.app .end {
  text-align: right;
  white-space: nowrap;
}

body.app .row-off td {
  opacity: 0.6;
}

body.app .check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--soft);
  font-weight: 500;
  cursor: pointer;
}

body.app .check-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--blue);
}

body.app .check-row.big {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

body.app .field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

body.app .field-row > label,
body.app .stack > label:not(.check-row):has(> input, > select, > textarea) {
  display: grid;
  gap: 6px;
  color: var(--soft);
  font-size: 13.5px;
  font-weight: 600;
}

body.app .switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-weight: 600;
  white-space: nowrap;
}

body.app .switch-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

body.app .kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
}

body.app .kv dt {
  color: var(--muted);
  font-size: 13.5px;
}

body.app .kv dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

body.app .link-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.app .link-list a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--small);
  color: var(--soft);
}

body.app .link-list a:hover {
  background: var(--inner);
  color: var(--text);
}

body.app .error-text {
  color: var(--bad);
  font-size: 13px;
}

.notices {
  display: grid;
}

.notice-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line, #26272e);
  background: rgba(0, 149, 255, 0.12);
  color: #dfe9f5;
  font-size: 14px;
  text-align: center;
}

.notice-bar a {
  color: #8fcaff;
  font-weight: 600;
}

.notice-bar.n-success {
  background: rgba(76, 195, 138, 0.12);
  color: #cdeedd;
}

.notice-bar.n-warning {
  background: rgba(240, 185, 63, 0.13);
  color: #f6e2b0;
}

.notice-bar.n-warning a {
  color: #ffd27a;
}

.notice-bar.n-danger {
  background: rgba(242, 113, 106, 0.14);
  color: #fbd5d2;
}

.notice-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--blue);
}

.notice-dot.n-success { background: var(--ok); }
.notice-dot.n-warning { background: var(--warn); }
.notice-dot.n-danger { background: var(--bad); }

body.app .narrow-page {
  display: grid;
  min-height: calc(100vh - 220px);
  place-items: center;
  padding: 48px 20px;
}

body.app .welcome-card {
  width: min(460px, 100%);
  padding: 34px 30px;
  text-align: center;
}

body.app .welcome-card img {
  margin-bottom: 14px;
}

body.app .welcome-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

body.app .welcome-card p {
  color: var(--soft);
  line-height: 1.55;
}

body.app .welcome-card .button {
  margin-top: 8px;
}

body.app .welcome-actions {
  display: grid;
  gap: 8px;
  margin: 20px 0 10px;
}

body.app .welcome-actions .button {
  width: 100%;
  margin: 0;
}

body.app .big-tick {
  display: inline-grid;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: rgba(76, 195, 138, 0.14);
  color: var(--ok);
  font-size: 26px;
  font-weight: 700;
}

body.app .dir-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

body.app .dir-hero {
  margin-bottom: 28px;
}

body.app .dir-hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.02em;
}

body.app .dir-hero > p {
  max-width: 620px;
  margin: 0 0 20px;
  color: var(--soft);
  font-size: 16px;
}

body.app .dir-search {
  display: flex;
  gap: 8px;
  max-width: 640px;
}

body.app .dir-search input {
  flex: 1;
}

body.app .dir-search select {
  width: auto;
}

body.app .dir-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

body.app .dir-tags .chip {
  padding: 4px 11px;
  font-size: 13px;
}

body.app .dir-tags .chip.on {
  border-color: var(--blue);
  background: var(--accent-soft);
  color: var(--accent);
}

body.app .dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

body.app .dir-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

body.app .dir-card:hover {
  border-color: var(--brand, var(--line-strong));
  transform: translateY(-2px);
}

body.app .dir-banner {
  height: 112px;
  background: color-mix(in srgb, var(--brand, var(--blue)) 22%, var(--inner));
  border-bottom: 3px solid var(--brand, var(--blue));
}

body.app .dir-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.app .dir-body {
  padding: 0 16px 16px;
}

body.app .dir-title {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-top: -22px;
}

body.app .dir-title strong {
  display: block;
  margin-top: 26px;
  font-size: 15.5px;
}

body.app .dir-title small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

body.app .dir-icon {
  display: inline-grid;
  flex: none;
  width: 48px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  border: 3px solid var(--panel);
  border-radius: 12px;
  background: var(--inner);
  color: var(--soft);
  font-size: 18px;
  font-weight: 700;
}

body.app .dir-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.app .dir-icon.big {
  width: 92px;
  height: 92px;
  border-width: 4px;
  border-color: var(--bg);
  border-radius: 20px;
  font-size: 34px;
}

body.app .dir-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

body.app .dir-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}

body.app .dir-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5e616b;
}

body.app .dir-live.on {
  color: var(--ok);
}

body.app .dir-live.on i {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.18);
}

body.app .dir-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

body.app .dir-chips > * {
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--inner);
  color: var(--soft);
  font-size: 12px;
}

body.app .dir-chips a:hover {
  color: var(--text);
}

body.app .listing {
  --brand: var(--blue);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px 64px;
}

body.app .listing-banner {
  height: 240px;
  margin: 0 -24px;
  overflow: hidden;
  background: color-mix(in srgb, var(--brand) 22%, var(--inner));
  border-bottom: 3px solid var(--brand);
}

body.app .listing-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.app .listing-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  margin: 0 0 24px;
}

body.app .listing-head > .dir-icon {
  margin-top: -46px;
}

body.app .listing-title {
  padding-top: 14px;
}

body.app .listing-actions {
  padding-top: 14px;
}

body.app .listing-title {
  flex: 1;
  min-width: 240px;
}

body.app .listing-title h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.02em;
}

body.app .listing-title p {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 16px;
}

body.app .listing-actions {
  display: flex;
  gap: 8px;
}

body.app .listing .button:not(.plain) {
  background: var(--brand);
}

body.app .listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

body.app .layout-wide .listing-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.app .layout-wide .listing-side {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

body.app .layout-minimal .listing-banner {
  height: 120px;
}

body.app .layout-minimal .listing-grid {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

body.app .layout-minimal .listing-side {
  display: none;
}

body.app .listing-side .card,
body.app .listing-main .card {
  margin-bottom: 16px;
}

body.app .row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 6px;
}

body.app .row-head h2 {
  margin: 0;
  font-size: 16px;
}

body.app .prose-card {
  padding: 20px 22px;
  color: var(--soft);
  line-height: 1.65;
}

body.app .prose-card h2,
body.app .prose-card h3 {
  margin: 0 0 8px;
  color: var(--text);
}

body.app .prose-card p {
  margin: 0 0 12px;
}

body.app .prose-card > :last-child {
  margin-bottom: 0;
}

body.app .prose-card a {
  color: var(--accent);
}

body.app .listing-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

body.app .listing-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--small);
  object-fit: cover;
}

body.app .stars-big {
  font-size: 18px;
  font-weight: 700;
}

body.app .review-form {
  display: grid;
  gap: 10px;
  padding: 8px 18px 16px;
  border-bottom: 1px solid var(--line);
}

body.app .review-form .pair {
  display: flex;
  gap: 8px;
}

body.app .star-pick {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

body.app .star-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

body.app .star-pick label {
  color: #3a3c45;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.1s;
}

body.app .star-pick input:checked ~ label,
body.app .star-pick label:hover,
body.app .star-pick label:hover ~ label {
  color: var(--warn);
}

body.app .star-pick input:focus-visible + label {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

body.app .review-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.app .review-list li {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

body.app .review-list li:first-child {
  border-top: 0;
}

body.app .review-list li.muted {
  display: block;
}

body.app .review-list .face {
  display: inline-grid;
  flex: none;
  width: 36px;
  height: 36px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: var(--inner);
}

body.app .review-list p {
  margin: 6px 0 0;
  color: var(--soft);
  line-height: 1.5;
}

body.app .staff-tag {
  margin-left: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

body.app .stars {
  color: #3a3c45;
  letter-spacing: 1px;
}

body.app .stars .on,
body.app .stars:not(:has(span)) {
  color: var(--warn);
}

body.app .live-card {
  padding: 18px;
}

body.app .live-num {
  margin-top: 10px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}

body.app .live-num small {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

body.app .live-card p {
  margin: 6px 0 0;
}

body.app .facts-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 0;
  padding: 16px 18px;
}

body.app .facts-card dt {
  color: var(--muted);
}

body.app .facts-card dd {
  margin: 0;
  font-weight: 600;
}

body.app .staff-roles {
  margin: 0;
  padding: 4px 18px 14px;
  list-style: none;
}

body.app .staff-roles li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--soft);
}

body.app .staff-roles b {
  margin-left: auto;
  color: var(--text);
}

body.app .listing-side .link-list {
  padding: 4px 10px 12px;
}

body.app .kinds-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

body.app .kinds-nav[hidden] {
  display: none;
}

body.app .kind-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

body.app .kind-label {
  margin-right: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.app .kinds-nav a {
  position: relative;
  padding: 5px 11px;
  border-radius: 99px;
  color: var(--soft);
  font-size: 13.5px;
}

body.app .kinds-nav a:hover {
  background: var(--inner);
  color: var(--text);
}

body.app .kinds-nav a.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

body.app .pb-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
  color: var(--soft);
  font-size: 13.5px;
}

body.app .pb-share {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

body.app .pb-share label {
  font-weight: 600;
}

body.app .pb-row {
  display: flex;
  gap: 8px;
}

body.app .pb-row input {
  flex: 1;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
}

body.app .post-builder [hidden] {
  display: none;
}

body.app .post-builder.embedded {
  margin-bottom: 16px;
}

body.app .token-made {
  margin-bottom: 18px;
  border-color: rgba(76, 195, 138, 0.4);
}

body.app .token-made .pad > p:first-child {
  margin-top: 0;
}

body.app .file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

body.app .file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

body.app .prefix-input {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--small);
  background: var(--bg);
}

body.app .prefix-input > span {
  display: flex;
  align-items: center;
  padding: 0 4px 0 12px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

body.app .prefix-input input {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-left: 2px;
}

body.app .link-pair .pair,
body.app .link-pair > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px;
  margin-top: 6px;
}

body.app .form-card {
  margin-bottom: 18px;
}

body.app .button.wide {
  width: 100%;
  justify-content: center;
}

body.app .support-code {
  display: inline-block;
  margin: 10px 0;
  padding: 8px 14px;
  font-size: 18px;
  letter-spacing: 0.08em;
}

body.app .reveal summary {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

body.app .support-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

body.app .flows {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body.app .flow-list {
  position: sticky;
  top: 84px;
}

body.app .flow-list ul {
  margin: 0;
  padding: 0 8px;
  list-style: none;
}

body.app .flow-list li + li {
  margin-top: 2px;
}

body.app .flow-item {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--small);
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

body.app .flow-item:hover {
  background: var(--inner);
}

body.app .flow-list li.on .flow-item {
  border-color: var(--line-strong);
  background: var(--inner);
}

body.app .flow-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.app .flow-item-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app .flow-err {
  color: var(--bad);
}

body.app .flow-empty {
  padding: 40px 30px;
  text-align: center;
}

body.app .flow-empty h2 {
  margin: 0 0 8px;
}

body.app .flow-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

body.app .flow-head input[type="text"] {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  padding-left: 0;
}

body.app .flow-head input[type="text"]:focus {
  box-shadow: none;
  outline: none;
}

body.app .flow-when .pad,
body.app .flow-then .pad {
  padding-top: 4px;
}

body.app .flow-options,
body.app .flow-params {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

body.app .flow-options:empty {
  display: none;
}

body.app .flow-field {
  display: grid;
  gap: 5px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
}

body.app .flow-vars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
}

body.app .flow-vars code {
  padding: 1px 6px;
  font-size: 12px;
}

body.app .flow-list-steps {
  display: grid;
  gap: 10px;
}

body.app .flow-list-steps:empty {
  display: none;
}

body.app .flow-step {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--blue);
  border-radius: var(--small);
  background: var(--inner);
}

body.app .flow-step.k-if,
body.app .flow-step.k-while,
body.app .flow-step.k-repeat {
  border-left-color: #a58bff;
}

body.app .flow-step.k-wait,
body.app .flow-step.k-set {
  border-left-color: var(--warn);
}

body.app .flow-step.k-stop {
  border-left-color: var(--bad);
}

body.app .flow-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--line);
}

body.app .flow-step-head strong {
  font-size: 13.5px;
}

body.app .flow-step-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

body.app .flow-step-body > .flow-field {
  max-width: 360px;
}

body.app .flow-step-body .help,
body.app .flow-step-body > p {
  margin: 0;
}

body.app .flow-step .flow-step {
  background: var(--panel);
}

body.app .flow-conds {
  display: grid;
  gap: 8px;
}

body.app .flow-match {
  max-width: 260px;
}

body.app .flow-cond {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

body.app .flow-cond input[hidden] {
  display: block;
  visibility: hidden;
}

body.app .flow-conds .link {
  justify-self: start;
  font-size: 13px;
}

body.app .flow-branch {
  display: grid;
  gap: 8px;
  padding: 10px 0 0 14px;
  border-left: 1px dashed var(--line-strong);
}

body.app .flow-branch-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.app .flow-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

body.app .chip-button {
  padding: 4px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 99px;
  background: transparent;
  color: var(--soft);
  font-size: 12.5px;
  cursor: pointer;
}

body.app .chip-button:hover {
  border-style: solid;
  border-color: var(--blue);
  color: var(--text);
}

body.app .flow-save {
  position: sticky;
  bottom: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(22, 23, 27, 0.94);
  backdrop-filter: blur(6px);
}

body.app .flow-save .save-pill {
  margin-right: auto;
}

body.app .flow-save [hidden] {
  display: none;
}

body.app .run-log,
body.app .run-list {
  margin: 0;
  padding: 0 18px 16px 38px;
  color: var(--soft);
  font-size: 13.5px;
  line-height: 1.7;
}

body.app .run-list {
  padding-left: 18px;
  list-style: none;
}

body.app .run-list li {
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

body.app .run-list li:first-child {
  border-top: 0;
}

body.app .run-list .state {
  margin: 0 6px 0 0;
}

body.app .run-log .end {
  color: var(--ok);
  font-weight: 600;
  text-align: left;
  list-style: none;
}

body.app .run-log .end.bad {
  color: var(--bad);
}

body.app .staff-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

body.app .staff-nav {
  position: sticky;
  top: 64px;
  align-self: start;
  display: grid;
  align-content: start;
  gap: 2px;
  height: calc(100vh - 64px);
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

body.app .staff-nav-label {
  margin: 0 10px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.app .staff-nav a {
  padding: 8px 10px;
  border-radius: var(--small);
  color: var(--soft);
  font-size: 14px;
}

body.app .staff-nav a:hover {
  background: var(--inner);
  color: var(--text);
}

body.app .staff-nav a.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

body.app .staff-nav-foot {
  margin: 16px 10px 0;
}

body.app .staff-main {
  width: min(1100px, 100%);
  padding: 28px 32px 60px;
}

body.app .staff-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  align-items: start;
}

body.app .staff-cols > .sheet {
  margin-bottom: 0;
}

body.app .staff-main > .staff-cols {
  margin-bottom: 18px;
}

body.app .staff-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin-bottom: 18px;
}

body.app .staff-search input {
  flex: 1;
}

body.app .staff-detail {
  border-color: var(--line-strong);
}

body.app .staff-detail > header {
  align-items: center;
  border-bottom: 1px solid var(--line);
}

body.app .staff-detail > header h2 {
  margin-right: auto;
}

body.app .staff-actions {
  display: grid;
  gap: 16px;
  align-content: start;
}

body.app .staff-actions .stack .button {
  margin-top: 4px;
}

body.app .staff-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

body.app .staff-person img {
  border-radius: 50%;
}

body.app .staff-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

body.app td .staff-row-actions,
body.app td form.inline {
  display: inline-flex;
  gap: 6px;
}

body.app .review-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

body.app .review-item p {
  margin: 4px 0 0;
}

body.app .perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--small);
  background: var(--inner);
}

body.app .perm-grid .check-row {
  font-size: 13.5px;
}

body.app .section-title {
  margin: 8px 0 12px;
  font-size: 18px;
}

body.app .stack .flow-save {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  body.app .flows,
  body.app .listing-grid,
  body.app .staff-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app .flow-list,
  body.app .staff-nav {
    position: static;
    height: auto;
  }

  body.app .staff-nav {
    display: flex;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  body.app .staff-nav-label,
  body.app .staff-nav-foot {
    display: none;
  }

  body.app .staff-main {
    padding: 22px 18px 50px;
  }

  body.app .flow-cond {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.app .listing-banner {
    height: 160px;
  }

  body.app .dir-search {
    flex-wrap: wrap;
  }
}

.app main.page:has(.dir-page),
.app main.page:has(.listing),
.app main.page:has(.narrow-page) {
  padding-top: 0;
  padding-bottom: 0;
}

body.app .empty-state {
  padding: 32px 28px;
  text-align: center;
}

body.app .empty-state h2 {
  margin: 0 0 6px;
}

body.app .gift-form {
  display: grid;
  gap: 8px;
}

body.app .gift-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body.app .gift-row select {
  width: auto;
  min-width: 130px;
}

body.app .gift-row input[type="number"] {
  width: 100px;
}

body.app .gift-row input[type="text"] {
  flex: 1;
  min-width: 200px;
}

body.app .gift-row .check-row {
  font-size: 13px;
  white-space: nowrap;
}

body.app .staff-gift {
  border-color: rgba(165, 139, 255, 0.35);
}

body.app .fcard .export-link {
  position: absolute;
  top: 12px;
  right: 40px;
  display: inline-flex;
  height: auto;
  padding: 4px 6px;
}

body.app .link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  color: var(--text);
  transition: border-color 0.15s;
}

body.app .link-card:hover {
  border-color: var(--blue);
}

body.app .link-card > span:first-child {
  display: grid;
  gap: 4px;
}

body.app .link-card .muted {
  font-size: 13.5px;
}

body.app .staff-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid rgba(165, 139, 255, 0.4);
  border-radius: 99px;
  background: rgba(165, 139, 255, 0.12);
  color: #c3b4ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: 1px;
}

body.app .spark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

body.app .spark-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 13.5px;
}

body.app .spark-head b {
  color: var(--text);
  font-size: 18px;
}

body.app .spark-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
}

body.app .spark-bars i {
  flex: 1;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
  opacity: 0.85;
}

body.app .spark-bars i:hover {
  opacity: 1;
}

body.app .spark-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

body.app .detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

body.app .detail-grid > .sheet {
  margin-bottom: 0;
}

body.app .detail-links .pb-row {
  flex-wrap: wrap;
}

body.app .detail-links .pb-row input {
  min-width: 280px;
}

body.app .detail-links .help {
  margin: 8px 0 0;
}

body.app .detail-icon {
  margin-right: 10px;
  border-radius: 8px;
  vertical-align: -6px;
}

body.app .chip-tag {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--inner);
  color: var(--soft);
  font-size: 12px;
}


body.app textarea {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

body.app textarea.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

.sheet:has(> .ledger),
.sheet:has(> table) {
  overflow-x: auto;
}

body.app .top .account a.button {
  color: #fff;
}

body.app .top .account a.button:hover {
  color: #fff;
}

body.app .account-row h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

body.app .person .spire-face {
  border-radius: 6px;
}

@media (max-width: 640px) {
  body.app .account-row {
    flex-wrap: wrap;
  }

  body.app .account-row .acc-text {
    flex: 1 1 0;
    min-width: 150px;
  }

  body.app .account-row > form,
  body.app .account-row > a.button {
    margin-left: 56px;
  }

  body.app .listing-head > .dir-icon {
    margin-top: -36px;
  }

  body.app .listing-title,
  body.app .listing-actions {
    padding-top: 0;
  }
}
