:root {
  color-scheme: light dark;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;

  --bg: light-dark(#ffffff, #0d1527);
  --surface: light-dark(#f6f8fb, #131d36);
  --surface-2: light-dark(#eceff5, #1a2749);
  --border: light-dark(#d5dbe7, #2a3a63);
  --border-strong: light-dark(#aeb8cc, #41558a);
  --text: light-dark(#0d1527, #edf1fa);
  --text-2: light-dark(#445069, #b7c2dc);
  --muted: light-dark(#5a6580, #93a1c4);
  --accent: light-dark(#0a5fe0, #4a95ff);
  --accent-2: light-dark(#6b29fc, #a584ff);
  --ok: light-dark(#0e7449, #3ddc97);
  --warn: light-dark(#855700, #ffc857);
  --danger: light-dark(#bb262c, #ff7479);
  --on-accent: #ffffff;
  --on-accent-hover: #dbe9ff;
  --grad: linear-gradient(135deg, #0a68f2, #6b29fc);
  --grad-flow: linear-gradient(135deg, #0a68f2 0%, #6b29fc 50%, #0a68f2 100%);
  --backdrop: rgba(5, 9, 20, 0.64);

  --c0: light-dark(#8a94ad, #6b7799);
  --c1: light-dark(#0a5fe0, #4a95ff);
  --c2: light-dark(#6b29fc, #a584ff);
  --c3: light-dark(#0e7449, #3ddc97);
  --c4: light-dark(#c25a00, #ffa056);
  --c5: light-dark(#c2185b, #ff7fb0);
  --c6: light-dark(#00838f, #4dd0e1);
  --c7: light-dark(#9a7300, #ffd34d);
  --c8: light-dark(#bb262c, #ff7479);
  --c9: light-dark(#3949ab, #8c9eff);
  --c10: light-dark(#00796b, #4db6ac);
  --c11: light-dark(#689f38, #b2d46b);
  --c12: light-dark(#5a6580, #93a1c4);
  --chart-in: var(--ok);
  --chart-out: var(--danger);

  --radius: 24px;
  --radius-s: 12px;
  --radius-l: 32px;
  --h-control: 48px;
  --container: 1760px;
  --gutter: clamp(16px, 3.2vw, 80px);

  --tint-lav: light-dark(#f3f0ff, #1b1a43);
  --tint-sky: light-dark(#ecf4ff, #122440);
  --tint-mint: light-dark(#e9f8f0, #0f3029);
  --tint-peach: light-dark(#fff1e6, #3a2418);
  --tint-rose: light-dark(#ffeef3, #3a1826);

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: clamp(20px, 1.7vw, 32px);
  --s6: clamp(28px, 2.6vw, 56px);
  --s7: clamp(40px, 4.5vw, 96px);
  --s8: clamp(56px, 7vw, 150px);

  --fs-s: 15px;
  --fs-m: 17px;
  --fs-l: 20px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 44px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-contrast: more) {
  :root {
    --border: light-dark(#6b7894, #7d8fbf);
    --border-strong: light-dark(#3d4a66, #a9b7dd);
    --muted: light-dark(#3b4660, #c4cee8);
    --text-2: light-dark(#1f2a44, #dde4f5);
  }
}

@media (max-width: 640px) {
  :root {
    --fs-2xl: 26px;
    --fs-3xl: 32px;
  }
}

@media (min-width: 1920px) {
  :root {
    --fs-m: 18px;
    --fs-l: 22px;
    --fs-xl: 26px;
    --fs-2xl: 36px;
    --fs-3xl: 48px;
  }
}

@media (min-width: 2200px) {
  :root {
    --container: 2200px;
  }
}

@media (min-width: 2400px) {
  :root {
    --fs-m: 20px;
    --fs-l: 24px;
    --fs-xl: 30px;
    --fs-2xl: 42px;
    --fs-3xl: 56px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 100px;
}

body {
  overflow-wrap: break-word;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-m);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--fs-3xl);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
}

h4 {
  font-size: var(--fs-l);
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

a:focus,
a:focus-visible {
  outline: none;
}

img,
svg {
  max-width: 100%;
}

hr {
  height: 1px;
  margin: var(--s5) 0;
  border: 0;
  background: var(--border);
}

small,
.small {
  font-size: var(--fs-s);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

a,
button,
img,
input,
select,
textarea,
summary,
label,
.mail-row,
.mail-set-item,
.hub-tab,
.react-btn,
.icon-cell,
.ed-btn,
.ed-emoji-btn,
.post-file,
.lp-mock,
.lp-card,
.lp-card-ico,
.orbit-node,
.orbit-node em,
.side,
.side-group,
.side-group span,
.post-card,
.post-card .post-cover img,
.side-link span,
.side-link .icon,
.palette-field,
.palette-item .icon-s,
.switch input::after,
.dxs-opt,
[class*="-btn"] {
  transition: all .3s;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-s {
  width: 20px;
  height: 20px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.stack-l {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--s4);
}

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

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

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

@media (max-width: 980px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .row-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    grid-template-columns: none;
    gap: var(--s3);
    overflow-x: auto;
    padding-bottom: var(--s2);
    scroll-snap-type: x mandatory;
  }

  .row-scroll > * {
    scroll-snap-align: start;
  }
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header-in {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

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

.brand-mark {
  display: block;
  width: 38px;
  height: auto;
  aspect-ratio: 2498 / 2371;
}

.brand-word {
  font-family: "Sora", var(--font);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--s5);
}

.nav > a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0;
  color: var(--muted);
  font-weight: 600;
}

.nav > a:hover {
  color: var(--text);
}

.nav > a[aria-current="page"] {
  color: var(--accent);
}

.nav-end {
  margin-left: auto;
}

.btn.nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }

  .btn.nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav.is-open {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: var(--s3) var(--gutter) var(--s4);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }

  .site-header {
    position: relative;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--h-control);
  padding: 0 var(--s5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font);
  font-size: var(--fs-m);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

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

.btn:focus,
.btn:focus-visible {
  outline: none;
}

.btn.is-active,
.btn[aria-pressed="true"] {
  color: var(--accent);
}

.btn-primary {
  border-color: transparent;
  background: var(--grad-flow);
  background-size: 200% 100%;
  background-position: 0% 50%;
  color: var(--on-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: var(--on-accent-hover);
  animation: btn-flow 2.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

@keyframes btn-flow {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover,
  .btn-primary:focus-visible {
    animation: none;
    background-position: 100% 50%;
  }
}

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  color: var(--text);
}

.btn-quiet {
  border-color: transparent;
}

.btn-icon {
  flex: none;
  width: var(--h-control);
  min-width: var(--h-control);
  padding: 0;
}

.btn-sm {
  min-height: 44px;
  padding: 0 var(--s4);
}

.btn-sm.btn-icon {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.label {
  color: var(--text-2);
  font-size: var(--fs-s);
  font-weight: 600;
}

.field > .label,
.field > a,
.stack > a:not([class]),
.stack-l > a:not([class]),
.card > a:not([class]) {
  align-self: flex-start;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: var(--h-control);
  padding: 0 var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-m);
  line-height: 1.3;
  outline: none;
}

.textarea,
textarea.input {
  min-height: 120px;
  padding: var(--s3) var(--s4);
  resize: vertical;
}

.input:hover,
.input:focus,
.input:focus-visible,
.textarea:hover,
.textarea:focus,
.textarea:focus-visible,
.select:hover,
.select:focus,
.select:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.select {
  padding-right: 44px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 21px, calc(100% - 16px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field-hint {
  color: var(--muted);
  font-size: var(--fs-s);
}

.field-counter {
  color: var(--muted);
  font-size: var(--fs-s);
  text-align: right;
}

.field-counter.is-warn {
  color: var(--warn);
}

.field-counter.is-over {
  color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: var(--fs-s);
}

.input-group {
  display: flex;
  gap: var(--s2);
}

.input-group .input {
  flex: 1;
}

.check {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  color: var(--text-2);
  cursor: pointer;
}

.check input[type="checkbox"],
.check input[type="radio"] {
  position: relative;
  width: 24px;
  height: 24px;
  margin: 0;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  appearance: none;
  outline: none;
  cursor: pointer;
}

.check input[type="radio"] {
  border-radius: 50%;
}

.check input:hover,
.check input:focus,
.check input:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.check input:checked {
  border-color: transparent;
  background: var(--grad);
}

.check input[type="checkbox"]:checked::after {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 6px;
  height: 11px;
  border: solid var(--on-accent);
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.check input[type="radio"]:checked::after {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--on-accent);
  content: "";
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 44px;
  color: var(--text-2);
  cursor: pointer;
}

.switch input {
  position: relative;
  width: 52px;
  height: 30px;
  margin: 0;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  appearance: none;
  outline: none;
  cursor: pointer;
}

.switch input::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.switch input:hover,
.switch input:focus,
.switch input:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.switch input:checked {
  border-color: transparent;
  background: var(--grad);
}

.switch input:checked::after {
  left: 25px;
  background: var(--on-accent);
}

:where(.card:not(details)) {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.card {
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card.tint-lav {
  border-color: transparent;
  background: var(--tint-lav);
}

.card.tint-sky {
  border-color: transparent;
  background: var(--tint-sky);
}

.card.tint-mint {
  border-color: transparent;
  background: var(--tint-mint);
}

.card.tint-peach {
  border-color: transparent;
  background: var(--tint-peach);
}

.card.tint-rose {
  border-color: transparent;
  background: var(--tint-rose);
}

.tint-lav { background: var(--tint-lav); }
.tint-sky { background: var(--tint-sky); }
.tint-mint { background: var(--tint-mint); }
.tint-peach { background: var(--tint-peach); }
.tint-rose { background: var(--tint-rose); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.card-title {
  margin: 0;
  font-size: var(--fs-l);
  hyphens: manual;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 32px;
  padding: 0 var(--s3);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: var(--fs-s);
}

.stack > .chip,
.stack-l > .chip {
  align-self: flex-start;
}

.chip-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.chip-ok {
  border-color: var(--ok);
  color: var(--ok);
}

.chip-warn {
  border-color: var(--warn);
  color: var(--warn);
}

.chip-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.tabs {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--h-control);
  padding: 0 var(--s4);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: var(--fs-m);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

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

.tab[aria-selected="true"] {
  color: var(--accent);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text-2);
}

.alert-info {
  border-color: var(--accent);
}

.alert-ok {
  border-color: var(--ok);
}

.alert-warn {
  border-color: var(--warn);
}

.alert-danger {
  border-color: var(--danger);
}

.help {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.help > .btn {
  margin: -14px -8px;
}

.help-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--text-2);
  font-size: var(--fs-s);
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  animation: help-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.help-panel.is-right {
  right: 0;
  left: auto;
}

.help-panel.is-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.help-panel[hidden] {
  display: none;
}

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

  to {
    opacity: 1;
    transform: none;
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-s);
}

.table th,
.table td {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: 0;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--grad);
  color: var(--on-accent);
  font-weight: 700;
  overflow: hidden;
}

.avatar.has-img {
  background: var(--surface-2);
}

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

.avatar-xl {
  width: 112px;
  height: 112px;
  font-size: var(--fs-3xl);
}

.avatar-edit {
  display: flex;
  align-items: center;
  gap: var(--s5);
  padding: var(--s4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.avatar-edit.is-drop {
  border-color: var(--accent);
}

.crop-stage {
  display: flex;
  justify-content: center;
}

.crop-canvas {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  touch-action: none;
  outline: none;
}

.crop-canvas.is-drag {
  cursor: grabbing;
}

.crop-canvas:focus-visible {
  border-color: var(--accent);
}

.crop-zoom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  color: var(--muted);
}

.empty {
  padding: var(--s7) var(--s5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

dialog.modal {
  display: none;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--s5);
  overflow-y: auto;
  border: 0;
  background: transparent;
  color: var(--text);
}

dialog.modal[open] {
  display: flex;
}

dialog.modal::backdrop {
  background: var(--backdrop);
}

.modal-card {
  width: 100%;
  max-width: 560px;
  margin: auto;
  padding: var(--s5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
}

.toasts {
  position: fixed;
  right: var(--s4);
  bottom: var(--s4);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  max-width: calc(100vw - 32px);
}

.toast {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--text);
}

.toast-ok {
  border-color: var(--ok);
}

.toast-danger {
  border-color: var(--danger);
}

.hero {
  padding-top: var(--s8);
  padding-bottom: var(--s7);
}

.hero-lead {
  max-width: 720px;
  color: var(--text-2);
  font-size: var(--fs-l);
}

.section {
  padding-top: var(--s7);
  padding-bottom: var(--s7);
}

.section-title {
  margin-bottom: var(--s5);
}

.site-footer {
  margin-top: var(--s8);
  padding: var(--s6) 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--fs-s);
}

.swatch {
  display: flex;
  align-items: flex-end;
  min-height: 96px;
  padding: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: var(--fs-s);
}

.swatch-bg {
  background: var(--bg);
}

.swatch-surface {
  background: var(--surface);
}

.swatch-surface2 {
  background: var(--surface-2);
}

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

.swatch-accent2 {
  background: var(--accent-2);
  color: var(--on-accent);
}

.swatch-grad {
  background: var(--grad);
  color: var(--on-accent);
}

.swatch-ok {
  background: var(--ok);
  color: var(--bg);
}

.swatch-danger {
  background: var(--danger);
  color: var(--bg);
}

h1,
h2,
h3,
h4,
p,
li,
label,
.btn,
.chip,
.card,
.alert,
.toast,
.help-panel,
.empty {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.btn,
.chip {
  white-space: normal;
}

.row > *,
.row-between > *,
.card,
.alert > span {
  min-width: 0;
}

.table th,
.table td {
  min-width: 96px;
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  a,
  button,
  img,
  input,
  select,
  textarea,
  summary,
  label,
  .side,
  .side-group,
  .side-group span,
  .post-card,
  .post-card .post-cover img,
  .side-link span,
  .side-link .icon,
  .palette-field,
  .palette-item .icon-s,
  .switch input::after,
  .dxs-opt,
  [class*="-btn"] {
    transition: none;
  }
}

.auth-card {
  width: 100%;
  max-width: 480px;
}

.auth-card-wide {
  max-width: 720px;
}

.auth-title {
  margin: 0;
  font-size: var(--fs-2xl);
}

.btn-block {
  width: 100%;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--muted);
  font-size: var(--fs-s);
}

.divider-text::before,
.divider-text::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.avatar-s {
  width: 32px;
  height: 32px;
  font-size: var(--fs-s);
}

.nav-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
}

.nav-end .btn-quiet:not(.btn-icon):not(.palette-open) {
  padding: 0;
}

p:empty {
  display: none;
}

.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
  padding: var(--s4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--fs-m);
}

@media (max-width: 480px) {
  .codes {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tabs-links {
  flex: none;
}

.period-range .input {
  width: 170px;
}

.input-compact {
  width: auto;
  min-width: 200px;
  flex: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s6);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: 100%;
  max-width: 280px;
  height: auto;
}

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

  .hero-art {
    justify-content: flex-start;
  }

  .hero-art img {
    max-width: 120px;
  }
}

.app {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: var(--s6);
  padding-top: var(--s6);
}

.side {
  position: sticky;
  top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.side-link {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  padding: 0 var(--s3);
  border-radius: var(--radius-s);
  color: var(--muted);
  font-weight: 600;
}

.side-link:hover {
  color: var(--text);
}

.side-link[aria-current="page"] {
  color: var(--accent);
}

.app-main,
.app-root {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--s5);
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
  }

  .side {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: var(--s2);
    border-bottom: 1px solid var(--border);
  }

  .side-link {
    flex: none;
  }
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  min-height: 44px;
}

.checklist-icon {
  display: inline-flex;
  color: var(--muted);
}

.checklist-item.is-done {
  color: var(--muted);
}

.checklist-item.is-done .checklist-icon {
  color: var(--ok);
}

.module-card {
  color: inherit;
}

.module-card:hover {
  color: inherit;
}

.avatar-l {
  width: 72px;
  height: 72px;
  font-size: var(--fs-xl);
}

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

.profile-names {
  flex: 1;
  min-width: 0;
  gap: var(--s1);
}

.profile-name {
  margin: 0;
  font-size: var(--fs-2xl);
}

.quota {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.meter {
  width: 160px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  appearance: none;
  overflow: hidden;
}

.meter::-webkit-progress-bar {
  background: var(--surface-2);
}

.meter::-webkit-progress-value {
  background: var(--grad);
}

.meter::-moz-progress-bar {
  background: var(--grad);
}

.dropzone {
  border-style: dashed;
  border-color: var(--border-strong);
}

.dropzone.is-drag {
  border-color: var(--accent);
  background: var(--surface-2);
}

.dropzone-head {
  gap: var(--s4);
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-list:empty {
  display: none;
}

.upload-item {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.upload-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
}

.upload-name {
  font-weight: 600;
}

.upload-item .meter {
  width: 100%;
}

.text-ok {
  color: var(--ok);
}

.text-danger {
  color: var(--danger);
}

.filters-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
}

.filters-form > .drop-opts {
  grid-column: 1 / -1;
}

.file-name {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-weight: 600;
}

.file-list {
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
}

.file-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  grid-template-areas: "pick name meta actions";
  align-items: center;
  gap: var(--s2) var(--s4);
  padding: var(--s2) var(--s4) var(--s2) var(--s2);
  border-bottom: 1px solid var(--border);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row.is-picked {
  background: var(--tint-sky);
}

.file-row > .file-pick {
  grid-area: pick;
}

.file-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  cursor: pointer;
}

.drop-opts {
  display: grid;
  gap: var(--s3);
}

.drop-opts > summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
}

.drop-opts > summary::-webkit-details-marker {
  display: none;
}

.file-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s2) var(--s4);
  min-height: 56px;
  padding: var(--s2) var(--s4) var(--s2) var(--s2);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface-2);
}

.file-allname {
  font-weight: 600;
}

.file-bulk {
  grid-column: 2 / -1;
  grid-row: 1;
  justify-content: flex-end;
  gap: var(--s2);
}

.file-bulk[hidden] {
  display: none;
}

.file-count {
  margin-right: auto;
  color: var(--text);
  font-weight: 600;
}

.file-empty {
  grid-column: 3;
}

.file-group {
  padding: var(--s2) var(--s4);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-s);
  font-weight: 600;
}

.file-row .file-name {
  grid-area: name;
  min-width: 0;
}

.file-row .file-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  grid-area: meta;
  min-width: 150px;
  text-align: right;
}

.file-actions {
  display: flex;
  grid-area: actions;
  gap: var(--s2);
}

@media (max-width: 760px) {
  .file-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas: "pick name actions" "pick meta actions";
  }

  .file-meta {
    min-width: 0;
    text-align: left;
  }
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
}

.file-title {
  margin: 0;
  font-size: var(--fs-2xl);
}

.file-preview-card {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.file-preview {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-s);
}

.meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--s2) var(--s4);
  margin: 0;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
}

.hash {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--fs-s);
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .meter {
    width: 120px;
  }
}

.rec-tabs {
  flex-wrap: wrap;
}

.rec-vaultbar {
  margin-bottom: var(--s4);
}

.rec-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.rec-tools {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}

.menu-wrap {
  position: relative;
}

.menu {
  position: absolute;
  top: calc(100% + var(--s1));
  right: 0;
  z-index: 50;
  display: grid;
  gap: 2px;
  min-width: 270px;
  padding: var(--s2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: var(--bg);
}

.menu[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .menu {
    position: fixed;
    top: auto;
    right: var(--gutter);
    bottom: calc(var(--s8) + var(--s3));
    left: var(--gutter);
    min-width: 0;
    max-height: 60vh;
    overflow-y: auto;
  }
}

.menu-title {
  padding: var(--s2) var(--s3) var(--s1);
  color: var(--muted);
  font-size: var(--fs-s);
  font-weight: 600;
}

.menu-sep {
  height: 1px;
  margin: var(--s1) 0;
  border: 0;
  background: var(--border);
}

.menu > form {
  display: grid;
}

.menu .menu-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 44px;
  padding: 0 var(--s3);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

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

.menu .menu-item.is-active {
  color: var(--accent);
}

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

@media (max-width: 560px) {
  .rec-toolbar .rec-sort {
    flex: 1 1 calc(50% - var(--s3));
    min-width: 0;
  }

  .rec-tools {
    flex: 1 1 100%;
  }
}

.rec-search {
  flex: 1 1 280px;
  min-width: 0;
}

.rec-sort {
  flex: 0 1 220px;
  min-width: 180px;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s4);
}

.rec-card {
  align-content: start;
}

.rec-card .card-head {
  margin-bottom: 0;
}

.rec-title {
  min-width: 0;
  font-weight: 700;
}

.rec-sum {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
  color: var(--text-2);
}

.rec-sum:empty {
  display: none;
}

.rec-quick {
  gap: var(--s2);
}

.rec-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
  gap: var(--s4);
}

.rec-filters[hidden] {
  display: none;
}

.rec-fields {
  display: flex;
  flex-direction: column;
}

.rec-field {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: var(--s2) var(--s4);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
}

.rec-field:last-child {
  border-bottom: 0;
}

.rec-label {
  color: var(--muted);
}

.rec-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s1);
  min-width: 0;
}

.rec-value-row,
.rec-secret {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}

.rec-secret-text {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.rec-text {
  white-space: pre-wrap;
}

.rec-h {
  margin: 0;
  font-size: var(--fs-2xl);
}

.rec-back {
  align-self: flex-start;
}

.rec-label-row {
  gap: var(--s1);
}

.req {
  color: var(--danger);
}

.rec-multi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s2);
}

.rec-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s1) var(--s4);
}

.rec-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.rec-picker-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: var(--bg);
}

.rec-picker-list[hidden] {
  display: none;
}

.rec-picker-opt {
  min-height: 44px;
  padding: var(--s2) var(--s4);
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rec-picker-opt:hover,
.rec-picker-opt:focus,
.rec-picker-opt:focus-visible {
  color: var(--accent);
  outline: none;
}

.chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px -12px -6px -6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.chip-x:hover,
.chip-x:focus,
.chip-x:focus-visible {
  color: var(--danger);
  outline: none;
}

.rec-fdef-head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
}

.rec-fdef-actions {
  flex-wrap: nowrap;
  gap: var(--s1);
}

.rec-flags {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0 var(--s4);
}

.rec-icons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.rec-recovery {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--fs-l);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .rec-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .rec-fdef-head {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .rec-field {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s1);
  }

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

.rec-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s3);
}

.rec-map-col {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.rec-errors {
  margin: 0;
  padding-left: var(--s5);
  color: var(--danger);
}

.rec-avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.rec-photo {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-s);
  object-fit: cover;
}

.rec-card-id {
  flex-wrap: nowrap;
  min-width: 0;
}

.rec-legal {
  margin-top: var(--s5);
}

.rec-legal-sum {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.rec-legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s3);
}

.rec-legal-item {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
}

.rec-legal-item:hover {
  color: var(--accent);
}

.bg-c0 { background: var(--c0); }
.bg-c1 { background: var(--c1); }
.bg-c2 { background: var(--c2); }
.bg-c3 { background: var(--c3); }
.bg-c4 { background: var(--c4); }
.bg-c5 { background: var(--c5); }
.bg-c6 { background: var(--c6); }
.bg-c7 { background: var(--c7); }
.bg-c8 { background: var(--c8); }
.bg-c9 { background: var(--c9); }
.bg-c10 { background: var(--c10); }
.bg-c11 { background: var(--c11); }
.bg-c12 { background: var(--c12); }
.bg-in { background: var(--chart-in); }
.bg-out { background: var(--chart-out); }

.fill-c0 { fill: var(--c0); }
.fill-c1 { fill: var(--c1); }
.fill-c2 { fill: var(--c2); }
.fill-c3 { fill: var(--c3); }
.fill-c4 { fill: var(--c4); }
.fill-c5 { fill: var(--c5); }
.fill-c6 { fill: var(--c6); }
.fill-c7 { fill: var(--c7); }
.fill-c8 { fill: var(--c8); }
.fill-c9 { fill: var(--c9); }
.fill-c10 { fill: var(--c10); }
.fill-c11 { fill: var(--c11); }
.fill-c12 { fill: var(--c12); }

.amt-in {
  color: var(--ok);
  font-weight: 600;
}

.amt-out {
  color: var(--danger);
  font-weight: 600;
}

.stats-row {
  align-items: stretch;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.stat-big {
  font-size: var(--fs-xl);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stat-val {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
}

.cat-dot {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--on-accent);
}

.cat-chip .cat-dot {
  align-self: stretch;
  width: 44px;
  height: auto;
  border-radius: 0;
}

.cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  padding: 0 var(--s4) 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: var(--fs-s);
  cursor: pointer;
}

.cat-chip:hover,
.cat-chip:focus,
.cat-chip:focus-visible {
  color: var(--text);
  outline: none;
}

.cat-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  overflow: hidden;
}

.seg-btn {
  min-height: var(--h-control);
  padding: 0 var(--s5);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.seg-btn:hover,
.seg-btn:focus,
.seg-btn:focus-visible {
  color: var(--text);
  outline: none;
}

.seg-btn.is-active {
  color: var(--accent);
  background: var(--surface-2);
}

.input-amount {
  font-size: var(--fs-xl);
  font-weight: 700;
}

.month-title {
  min-width: 160px;
  text-align: center;
}

.tx-day {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.tx-day-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  color: var(--muted);
  font-size: var(--fs-s);
  font-weight: 600;
}

.tx-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.tx-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 60px;
  padding: var(--s2) var(--s4);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}

.tx-row:last-child {
  border-bottom: 0;
}

.tx-row:hover,
.tx-row:focus,
.tx-row:focus-visible {
  color: var(--accent);
  outline: none;
}

.tx-row.is-deleted {
  opacity: 0.6;
}

.tx-main {
  flex: 1;
  min-width: 0;
  color: inherit;
}

.tx-title {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.tx-amt {
  flex: none;
  text-align: right;
}

.tx-sums {
  gap: var(--s2);
}

.bulk-bar {
  position: sticky;
  bottom: var(--s3);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
}

.bulk-bar[hidden] {
  display: none;
}

.fin-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.fin-filters[hidden] {
  display: none;
}

.fin-two {
  align-items: start;
}

.donut-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: var(--s5);
}

.donut-box {
  width: 100%;
  max-width: 220px;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
}

.chart-wrap {
  width: 100%;
  min-height: 120px;
}

.chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}

.chart-axis {
  fill: var(--muted);
  font-size: 15px;
}

.chart-center {
  fill: var(--text);
  font-size: 20px;
  font-weight: 700;
}

.chart-in {
  fill: var(--chart-in);
}

.chart-out {
  fill: var(--chart-out);
}

.chart-empty {
  stroke: var(--surface-2);
}

.chart-path {
  stroke: var(--accent);
  stroke-width: 2.5;
}

.chart-dot {
  fill: var(--accent);
}

.chart-donut path {
  cursor: pointer;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s2);
}

.legend-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-name {
  flex: 1 1 90px;
  min-width: 0;
  overflow-wrap: break-word;
}

.legend-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.legend-link:hover,
.legend-link:focus,
.legend-link:focus-visible {
  color: var(--accent);
  outline: none;
}

.legend-val {
  flex: none;
  margin-left: auto;
  color: var(--muted);
  font-size: var(--fs-s);
  white-space: nowrap;
}

.chart-key {
  gap: var(--s4);
}

.obl-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.obl-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
}

.obl-row:last-child {
  border-bottom: 0;
}

.obl-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  color: var(--text);
}

.obl-main:hover {
  color: var(--accent);
}

.obl-title {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.obl-amt {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s1);
}

.meter-wide {
  width: 100%;
}

.is-paid {
  color: var(--muted);
}

.loan-row {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
}

.loan-row:hover {
  color: var(--accent);
}

.loan-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
}

.cal-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s4);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--s1);
}

.cal-head {
  color: var(--muted);
  font-size: var(--fs-s);
  text-align: center;
}

.cal-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius-s);
  font-size: var(--fs-s);
}

.cal-cell.is-today {
  border: 1px solid var(--accent);
}

.cal-cell.has-items {
  background: var(--surface-2);
  font-weight: 700;
}

.cal-cell.is-overdue {
  color: var(--danger);
}

.cal-dot {
  position: absolute;
  top: 2px;
  right: 4px;
  color: var(--accent);
  font-size: var(--fs-s);
}

.color-dot {
  width: 44px;
  height: 44px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.color-dot.is-active {
  border-color: var(--text);
}

.account-card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

@media (max-width: 860px) {
  .fin-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .donut-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .donut-row .legend {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .rec-tabs {
    flex-wrap: nowrap;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tx-row {
    flex-wrap: wrap;
  }

  .tx-main {
    flex: 1 1 140px;
  }

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

  .obl-row {
    flex-wrap: wrap;
  }
}

.rec-tabs .tab {
  padding: 0 var(--s3);
}

.post-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.post-row-main {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: var(--s1);
  min-width: 0;
}

.post-row-title {
  font-size: var(--fs-l);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.editor-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.post-title-input {
  flex: 1;
  font-size: var(--fs-xl);
  font-weight: 700;
}

.emoji-input {
  width: 72px;
  text-align: center;
  font-size: var(--fs-xl);
}

.block-title {
  gap: var(--s2);
  font-weight: 700;
}

.block-actions {
  gap: var(--s1);
}

.block-media {
  gap: var(--s3);
}

.editor-thumb {
  width: 120px;
  height: 90px;
  border-radius: var(--radius-s);
  object-fit: cover;
}

.thumb-wrap {
  display: inline-flex;
  align-items: flex-start;
}

.add-bar {
  gap: var(--s2);
}

.editor-actions {
  gap: var(--s3);
}

.steps {
  margin: 0;
  padding-left: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.post {
  max-width: 780px;
  margin: 0 auto;
}

.post-title {
  margin: 0;
  font-size: var(--fs-3xl);
  overflow-wrap: anywhere;
}

.post-body > * {
  margin: 0;
}

.post-text p {
  margin: 0 0 var(--s4);
}

.post-h {
  margin: var(--s4) 0 0;
}

.post-quote {
  margin: 0;
  padding: var(--s3) var(--s5);
  border-left: 4px solid var(--accent);
  color: var(--text-2);
}

.post-quote cite {
  display: block;
  margin-top: var(--s2);
  color: var(--muted);
  font-size: var(--fs-s);
}

.post-fig {
  margin: 0;
}

.post-fig img,
.post-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.post-fig figcaption,
.post-cap {
  margin-top: var(--s2);
  color: var(--muted);
  font-size: var(--fs-s);
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s3);
}

.post-hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
}

.post-link {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.post-link:hover {
  color: var(--accent);
}

.yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.yt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  width: 100%;
  height: 100%;
  color: var(--text);
  font-weight: 600;
}

.yt-btn:hover {
  color: var(--accent);
}

.yt-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--on-accent);
}

.yt-frame {
  width: 100%;
  height: 100%;
  border: 0;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s4);
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: 0;
  overflow: hidden;
}

.post-card .post-cover img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-body {
  padding: var(--s4) var(--s5) var(--s5);
}

.post-card-title {
  margin: 0;
  font-size: var(--fs-l);
}

.post-card-title a {
  color: var(--text);
}

.post-card-title a:hover {
  color: var(--accent);
}

@media (max-width: 560px) {
  .editor-head {
    flex-wrap: wrap;
  }

  .post-title {
    font-size: var(--fs-2xl);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 var(--s2);
  border-radius: 999px;
  background: var(--grad);
  color: var(--on-accent);
  font-size: var(--fs-s);
  font-weight: 700;
}

.conv-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.conv-row:hover {
  color: var(--accent);
}

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

.conv-top {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
}

.conv-last {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.friend-id {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
  color: var(--text);
}

.friend-names {
  gap: 0;
  min-width: 0;
}

.thread-head {
  gap: var(--s3);
}

.thread-tools {
  flex-wrap: wrap;
  margin-left: auto;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: 0;
  overflow: hidden;
}

.thread-msgs {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-height: 320px;
  max-height: 60vh;
  padding: var(--s4);
  overflow-y: auto;
}

.msg-day {
  align-self: center;
  color: var(--muted);
  font-size: var(--fs-s);
}

.msg {
  position: relative;
  max-width: min(560px, 85%);
  padding: var(--s3) var(--s4);
  border-radius: 18px;
  overflow-wrap: anywhere;
}

.msg-mine {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--grad);
  color: var(--on-accent);
}

.msg-theirs {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: var(--surface-2);
}

.msg-deleted {
  color: var(--muted);
}

.msg-mine .msg-meta,
.msg-mine .msg-menu,
.msg-mine.msg-deleted,
.msg-mine a {
  color: var(--on-accent);
}

.msg-mine a {
  text-decoration: underline;
}

.msg-text {
  white-space: pre-wrap;
}

.msg-img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  margin-top: var(--s2);
  border-radius: var(--radius-s);
}

.msg-meta {
  margin-top: var(--s1);
}

.msg-menu {
  position: absolute;
  top: 0;
  right: 0;
}

.composer {
  padding: var(--s3) var(--s4) var(--s4);
  border-top: 1px solid var(--border);
}

.chat-input {
  min-height: var(--h-control);
  max-height: 160px;
  resize: vertical;
}

.notif-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.chip-btn {
  min-height: 44px;
  padding: 0 var(--s4);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: var(--fs-m);
  font-weight: 600;
  cursor: pointer;
}

.chip-btn:hover,
.chip-btn:focus-visible {
  color: var(--text);
  outline: none;
}

.chip-btn.is-active {
  color: var(--accent);
}

.notif-group {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.notif-day {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-s);
  font-weight: 700;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.notif-item {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 64px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text);
}

.notif-item:hover {
  color: var(--accent);
}

.notif-item.is-unread {
  border-color: var(--border-strong);
  font-weight: 600;
}

.notif-ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tint-sky);
  color: var(--accent);
}

.notif-ico.is-bad {
  background: var(--tint-rose);
  color: var(--danger);
}

.notif-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.notif-time {
  flex: none;
  white-space: nowrap;
}

.notif-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--grad);
}

.channel-row {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
}

.channel-row:last-child {
  border-bottom: 0;
}

.channel-text {
  flex: 1;
  min-width: 0;
  gap: var(--s1);
}

.pref-head,
.pref-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 96px;
  align-items: center;
  gap: var(--s4);
}

.pref-head {
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--fs-s);
  font-weight: 700;
}

.pref-head span:not(:first-child) {
  text-align: center;
}

.pref-row {
  padding: var(--s1) 0;
  border-bottom: 1px solid var(--border);
}

.pref-row:last-child {
  border-bottom: 0;
}

.pref-row .switch-solo {
  justify-content: center;
}

.pref-label {
  min-width: 0;
}

.stack-0 {
  display: flex;
  flex-direction: column;
}

.rec-form {
  display: grid;
  max-width: calc(2 * 380px + var(--s5));
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 380px));
  align-items: start;
  gap: var(--s4) var(--s5);
}

.rec-form > :not(.field),
.rec-form > .field-wide {
  grid-column: 1 / -1;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s3);
}

.provider-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s2);
  min-height: 64px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: var(--fs-m);
  text-align: center;
  cursor: pointer;
}

.provider-btn:hover,
.provider-btn:focus-visible {
  color: var(--text);
  outline: none;
}

.howto-steps {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin: 0;
  padding-left: var(--s5);
  color: var(--text-2);
}

.fgrid {
  display: grid;
  max-width: calc(2 * 360px + var(--s5));
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 360px));
  align-items: start;
  gap: var(--s4) var(--s5);
}

.fgrid > .field-wide,
.fgrid > .row,
.fgrid > p,
.fgrid > .alert {
  grid-column: 1 / -1;
}

.fgrid > .field-wide .dxs {
  max-width: 100%;
}

.fgrid > .field-slider {
  grid-column: span 2;
  max-width: 760px;
}

.health-addrow > .input,
.health-addrow > .dxd {
  flex: 0 1 200px;
  width: auto;
}

.howto {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text-2);
}

.howto .icon {
  margin-top: 2px;
  color: var(--accent);
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--s4);
}

.bank-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--bg);
}

.bank-card .btn {
  margin-top: auto;
}

.brand-logo {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 56px;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: #5a6580;
}

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

.brand-logo-s {
  width: 44px;
  height: 44px;
  padding: var(--s1);
}

.provider-btn .brand-logo {
  width: 100%;
}

.bank-ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--bg);
  font-size: var(--fs-l);
  font-weight: 800;
}

.bank-title {
  gap: var(--s1);
}

.bank-text {
  margin: 0;
}

@media (max-width: 560px) {
  .pref-head,
  .pref-row {
    grid-template-columns: minmax(0, 1fr) 64px 84px;
    gap: var(--s2);
  }

  .notif-time {
    display: none;
  }
}

.uptime-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 28px;
}

.uptime-bar {
  flex: 1;
  max-width: 14px;
  height: 100%;
  border-radius: 3px;
}

.uptime-bar.is-ok {
  background: var(--ok);
}

.uptime-bar.is-bad {
  background: var(--danger);
}

.bell-link {
  position: relative;
}

.bell-link .badge {
  position: absolute;
  top: -4px;
  right: -4px;
}

.container.app-wide {
  max-width: min(var(--container), 100%);
}

.mail-shell {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 150px);
  min-height: 560px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.mail-bar {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.mail-bar .mail-select {
  flex: 0 1 280px;
}

.mail-bar-settings {
  margin-left: auto;
}

.mail-list-pane,
.mail-view-pane {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.mail-list-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.mail-view-pane {
  padding: var(--s5);
}

.mail-list-head {
  gap: var(--s3);
  padding: var(--s4);
  border-bottom: 1px solid var(--border);
}

.mail-list-title {
  margin: 0;
  font-size: var(--fs-xl);
}

.mail-list-tools,
.mail-bulk {
  flex-wrap: wrap;
  gap: var(--s2);
}

.mail-move {
  width: auto;
  min-width: 160px;
}

.mail-rows {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.mail-empty {
  padding: var(--s6) var(--s4);
  text-align: center;
}

.hub-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}

.hub-title {
  margin-right: var(--s2);
  color: var(--muted);
  font-size: var(--fs-s);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hub-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s4);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hub-tab:hover {
  color: var(--text);
}

.hub-tab[aria-current="page"] {
  background: var(--surface-2);
  color: var(--accent);
}

@media (max-width: 560px) {
  .hub-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--s1);
  }

  .hub-tabs > * {
    flex: none;
  }
}

.mail-alias-form .input {
  flex: 0 1 260px;
}

.mail-set-list {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s3);
}

.mail-set-group {
  padding: var(--s3) var(--s3) var(--s1);
  color: var(--muted);
  font-size: var(--fs-s);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mail-set-sys {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.mail-set-sys > summary {
  list-style: none;
  cursor: pointer;
}

.mail-set-sys > summary::-webkit-details-marker {
  display: none;
}

.mail-set-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 56px;
  padding: var(--s2) var(--s3);
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mail-set-item:hover,
.mail-set-item:focus-visible {
  color: var(--text);
  outline: none;
}

.mail-set-item[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
}

.mail-set-text {
  flex: 1;
  min-width: 0;
  gap: 0;
}

.mail-set-text > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-set-back {
  align-self: flex-start;
}

.mail-row {
  display: grid;
  grid-template-columns: 24px 32px minmax(0, 1fr);
  align-items: center;
  gap: var(--s2);
  min-height: 72px;
  padding: var(--s2) var(--s4);
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
}

.mail-row:hover,
.mail-row:focus,
.mail-row:focus-visible {
  background: var(--surface);
  outline: none;
}

.mail-row.is-current {
  background: var(--surface-2);
}

.mail-row.is-unread {
  color: var(--text);
}

.mail-row.is-unread .mail-from,
.mail-row.is-unread .mail-subject {
  font-weight: 700;
}

.mail-check {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.mail-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mail-star:hover,
.mail-star:focus,
.mail-star:focus-visible {
  color: var(--text);
  outline: none;
}

.mail-star.is-on {
  color: var(--warn);
}

.mail-star.is-on .icon {
  fill: currentColor;
}

.mail-row-main {
  min-width: 0;
}

.mail-row-top,
.mail-row-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-width: 0;
}

.mail-from,
.mail-subject {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-subject {
  flex: 1;
}

.mail-date {
  flex: none;
  font-size: var(--fs-s);
}

.mail-acc-chip {
  flex: none;
  min-height: 24px;
}

.mail-pager {
  position: sticky;
  bottom: 0;
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mail-only-mobile {
  display: none;
}

.mail-pane-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  min-height: 320px;
  text-align: center;
}

.mail-pane-empty .icon {
  width: 48px;
  height: 48px;
}

.mail-toolbar {
  flex-wrap: wrap;
  gap: var(--s2);
}

.mail-msg-subject {
  margin: 0;
  font-size: var(--fs-xl);
  overflow-wrap: anywhere;
}

.mail-msg-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}

.mail-msg-head .avatar-l {
  width: 48px;
  height: 48px;
  font-size: var(--fs-l);
}

.mail-msg-meta {
  flex: 1;
  gap: var(--s1);
  min-width: 0;
}

.mail-msg-from {
  flex-wrap: wrap;
  gap: var(--s2);
}

.mail-body-box {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.mail-frame {
  display: block;
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: #ffffff;
}

.mail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mail-quote {
  margin: var(--s2) 0;
  padding-left: var(--s3);
  border-left: 3px solid var(--border-strong);
  color: var(--muted);
}

.mail-img-bar {
  flex-wrap: wrap;
}

.mail-att-row {
  flex-wrap: wrap;
  gap: var(--s2);
}

.mail-dmarc-row {
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
}

.chip-link {
  min-height: 44px;
  color: var(--text-2);
}

.chip-link:hover,
.chip-link:focus,
.chip-link:focus-visible {
  color: var(--accent);
  outline: none;
}

.mail-thumb {
  max-width: 220px;
  max-height: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  object-fit: cover;
}



.mail-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: var(--s2) var(--s3);
}

.mail-field[hidden] {
  display: none;
}

.mail-field-label {
  color: var(--muted);
}

.mail-cc-toggles {
  gap: var(--s2);
}

.mail-body {
  min-height: 300px;
  resize: vertical;
  font: inherit;
  line-height: 1.55;
}

.mail-att-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.mail-att-list:empty {
  display: none;
}

.mail-compose-actions {
  flex-wrap: wrap;
  gap: var(--s3);
}



.mail-mb-id {
  gap: var(--s1);
  min-width: 0;
}

.mail-alias-list {
  flex-wrap: wrap;
  gap: var(--s2);
}

.mail-ext-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.mail-adv {
  padding: var(--s3) 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s3);
}

.secret-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s);
}

.secret-code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--fs-l);
  overflow-wrap: anywhere;
}

.kv-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s4);
}

.kv-val {
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .mail-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    height: auto;
    min-height: 0;
  }

  .mail-bar .mail-select {
    flex: 1 1 200px;
  }

  .mail-only-mobile {
    display: inline-flex;
  }

  .mail-shell[data-pane="list"] .mail-view-pane,
  .mail-shell[data-pane="view"] .mail-list-pane {
    display: none;
  }

  .mail-view-pane {
    padding: var(--s4);
  }

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

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

.totp-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s5);
}

.qr-box {
  width: 220px;
  max-width: 100%;
  padding: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: #ffffff;
}

.qr {
  display: block;
  width: 100%;
  height: auto;
}

.btn[hidden],
.chip[hidden],
.alert[hidden],
.card[hidden],
.field[hidden] {
  display: none;
}

.health-head {
  flex-wrap: wrap;
  gap: var(--s3);
}

.health-title {
  margin: 0;
  font-size: var(--fs-xl);
}

.health-daynav {
  flex-wrap: wrap;
  gap: var(--s2);
}

.health-date {
  width: auto;
  min-width: 160px;
}

.health-left {
  text-align: right;
}

.health-macros {
  gap: var(--s4);
}

.health-macro {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.health-meals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--s4);
}

.health-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1) 0;
  border-bottom: 1px solid var(--border);
}

.health-entry:last-child {
  border-bottom: 0;
}

.health-entry-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--s1) 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.health-entry-main:hover,
.health-entry-main:focus,
.health-entry-main:focus-visible {
  color: var(--accent);
  outline: none;
}

.health-entry-name {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.health-entry-kcal {
  white-space: nowrap;
  font-weight: 600;
}

.health-results {
  max-height: 46vh;
  overflow-y: auto;
}

.health-food {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  width: 100%;
  min-height: 56px;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.health-food:hover,
.health-food:focus,
.health-food:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.health-food-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  font-weight: 600;
}

.health-add-more,
.health-chips,
.health-kinds {
  flex-wrap: wrap;
  gap: var(--s2);
}

.health-foodrow {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.health-food-id {
  gap: var(--s1);
  min-width: 0;
}

.health-addrow {
  flex-wrap: wrap;
  gap: var(--s3);
}

.health-metric-row {
  gap: var(--s3);
  padding: var(--s1) 0;
  border-bottom: 1px solid var(--border);
}

.chart-target {
  stroke: var(--warn);
  stroke-dasharray: 6 5;
  stroke-width: 2;
}

.chart-trend {
  stroke: var(--accent-2);
  stroke-dasharray: 2 5;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.meter-over::-webkit-progress-value {
  background: var(--danger);
}

.meter-over::-moz-progress-bar {
  background: var(--danger);
}

@media (max-width: 560px) {
  .health-meals {
    grid-template-columns: minmax(0, 1fr);
  }
}

.habit-row {
  gap: var(--s3);
}

.habit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.habit-id {
  gap: var(--s1);
  min-width: 0;
}

.habit-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(44px, 1fr));
  gap: var(--s1);
  overflow-x: auto;
  padding-bottom: var(--s1);
}

.habit-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
}

.habit-dow,
.habit-dom {
  color: var(--muted);
  font-size: var(--fs-s);
}

.habit-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--on-accent);
  cursor: pointer;
}

.habit-cell:hover,
.habit-cell:focus,
.habit-cell:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.habit-cell.is-on {
  border-color: transparent;
  background: var(--grad);
}

.habit-cell.is-off {
  border-style: dashed;
  opacity: 0.55;
}

.habit-cell.is-today {
  border-color: var(--accent);
}

.habit-cell:disabled {
  opacity: 0.35;
  cursor: default;
}

.habit-days {
  flex-wrap: wrap;
  gap: var(--s2);
}

.habit-day {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  cursor: pointer;
}

.habit-months {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s2);
  align-items: end;
}

.habit-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
}

.habit-month-bar {
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 28px;
  height: 90px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow: hidden;
}

.habit-month-fill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--grad);
}

.habit-month-n,
.habit-month-l {
  color: var(--muted);
  font-size: var(--fs-s);
}
.habit-fill-0 {
  height: 0%;
}

.habit-fill-1 {
  height: 10%;
}

.habit-fill-2 {
  height: 20%;
}

.habit-fill-3 {
  height: 30%;
}

.habit-fill-4 {
  height: 40%;
}

.habit-fill-5 {
  height: 50%;
}

.habit-fill-6 {
  height: 60%;
}

.habit-fill-7 {
  height: 70%;
}

.habit-fill-8 {
  height: 80%;
}

.habit-fill-9 {
  height: 90%;
}

.habit-fill-10 {
  height: 100%;
}

@media (max-width: 560px) {
  .habit-months {
    gap: var(--s1);
  }

  .habit-month-l {
    font-size: var(--fs-s);
  }
}

.wish-row {
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--border);
}

.wish-main {
  gap: var(--s1);
  min-width: 0;
}

.today-head {
  flex-wrap: wrap;
  gap: var(--s3);
}

.today-title h1 {
  margin: 0;
}

.today-quick,
.today-chips,
.today-facts {
  flex-wrap: wrap;
  gap: var(--s2);
}

.chip-link {
  color: var(--text);
}

.today-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 52px;
  padding: var(--s1) 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.today-item:last-child {
  border-bottom: 0;
}

.today-item:hover,
.today-item:focus,
.today-item:focus-visible {
  color: var(--accent);
  outline: none;
}

.today-item.is-overdue .today-ico {
  color: var(--danger);
}

.today-ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  color: var(--muted);
}

.today-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.today-text strong {
  overflow-wrap: anywhere;
}

.today-habit {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 52px;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.today-habit:hover,
.today-habit:focus,
.today-habit:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.today-habit.is-on {
  border-color: var(--ok);
}

.today-check {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: transparent;
}

.today-habit.is-on .today-check {
  border-color: transparent;
  background: var(--grad);
  color: var(--on-accent);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: stretch;
  gap: var(--s5);
}

.tile {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  min-width: 0;
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.tile-wide {
  grid-column: 1 / -1;
}

.tile-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.tile-ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent);
}

.tile-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-l);
}

.tile-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-size: var(--fs-s);
  font-weight: 600;
  white-space: nowrap;
}

.tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s3);
}

.tile-body > * {
  width: 100%;
}

.tile-body > .btn {
  width: auto;
  margin-top: auto;
}

.tile-body > p {
  margin: 0;
}

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

.today-list-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  column-gap: var(--s6);
}

.kv {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.kv > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--border);
}

.kv > div:last-child {
  border-bottom: 0;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-size: var(--fs-l);
  font-weight: 700;
}

.page-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s2) var(--s2) var(--s4);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.page-strip-ico {
  display: inline-flex;
  color: var(--accent);
}

.page-strip-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .page-strip {
    border-radius: var(--radius);
    padding: var(--s3) var(--s4);
  }

  .page-strip-text {
    flex-basis: calc(100% - 40px);
  }
}

.legal-doc {
  width: 100%;
}

.legal-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin: 0;
  padding-left: var(--s5);
}

.site-footer .row {
  flex-wrap: wrap;
  gap: var(--s4);
}

.signup-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: var(--s2);
  align-items: end;
}

.signup-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s1);
  min-height: 140px;
}

.signup-bar {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 6px;
  background: var(--accent);
}

.signup-n {
  color: var(--muted);
  font-size: var(--fs-s);
}
.signup-h0 {
  height: 4px;
}

.signup-h1 {
  height: 9px;
}

.signup-h2 {
  height: 18px;
}

.signup-h3 {
  height: 27px;
}

.signup-h4 {
  height: 36px;
}

.signup-h5 {
  height: 45px;
}

.signup-h6 {
  height: 54px;
}

.signup-h7 {
  height: 63px;
}

.signup-h8 {
  height: 72px;
}

.signup-h9 {
  height: 81px;
}

.signup-h10 {
  height: 90px;
}


.sel-bar {
  position: sticky;
  top: 80px;
  z-index: 4;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-color: var(--accent);
}

.sel-info,
.sel-actions {
  flex-wrap: wrap;
  align-items: center;
}

.rec-card.is-selected,
.table tr.is-selected {
  background: var(--surface-2);
}

.rec-check {
  width: 24px;
  height: 24px;
  flex: none;
  accent-color: var(--accent);
}

.msg-star {
  display: inline-flex;
  margin-right: var(--s1);
  color: var(--accent);
  vertical-align: middle;
}

.msg-mine .msg-star {
  color: var(--on-accent);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s2);
}

.media-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  aspect-ratio: 1;
  padding: var(--s2);
  overflow: hidden;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-s);
  text-align: center;
  overflow-wrap: anywhere;
}

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

.chat-file {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
}

.chat-file-main {
  gap: 0;
  min-width: 0;
}

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

.starred-msg {
  gap: var(--s2);
}

.endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s3);
}

.endpoint-name {
  flex: 0 0 120px;
}

.endpoint-val {
  flex: 1 1 260px;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dev-endpoint {
  gap: var(--s1);
}

.dev-steps {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin: 0;
  padding-left: var(--s5);
  color: var(--text-2);
}

.app-new[hidden] {
  display: none;
}
