/* MitsuPost — interface mobile.
   Papel de arroz quente + tinta sumi + acento vermelhão (shu-iro). Três círculos são a marca e o
   indicador de status por rede em toda a UI. */

@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d9;
  --card: #fbf9f4;
  --card-press: #f1ece2;
  --ink: #1c1a17;
  --ink-2: #5e5850;
  --ink-3: #8f887d;
  --line: rgba(28, 26, 23, 0.11);
  --line-strong: rgba(28, 26, 23, 0.2);
  --shu: #e0402a;
  --shu-press: #c4321e;
  --shu-soft: rgba(224, 64, 42, 0.1);
  --on-shu: #fffaf3;
  --ok: #2e7a4d;
  --ok-soft: rgba(46, 122, 77, 0.12);
  --warn: #b7790c;
  --warn-soft: rgba(183, 121, 12, 0.13);
  --err: #c2352a;
  --err-soft: rgba(194, 53, 42, 0.11);
  --idle: rgba(28, 26, 23, 0.16);
  --shadow: 0 1px 0 rgba(28, 26, 23, 0.04), 0 8px 24px -12px rgba(28, 26, 23, 0.18);
  --shadow-cta: 0 10px 24px -10px rgba(224, 64, 42, 0.55);

  --font-display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --gutter: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12110f;
    --paper-2: #1a1916;
    --card: #1d1b18;
    --card-press: #25231f;
    --ink: #f1ece2;
    --ink-2: #b4ac9f;
    --ink-3: #82796d;
    --line: rgba(241, 236, 226, 0.1);
    --line-strong: rgba(241, 236, 226, 0.2);
    --shu: #ff5b3f;
    --shu-press: #e8452a;
    --shu-soft: rgba(255, 91, 63, 0.14);
    --on-shu: #1a0b07;
    --ok: #5cc48a;
    --ok-soft: rgba(92, 196, 138, 0.14);
    --warn: #f0b23c;
    --warn-soft: rgba(240, 178, 60, 0.14);
    --err: #ff6b5e;
    --err-soft: rgba(255, 107, 94, 0.14);
    --idle: rgba(241, 236, 226, 0.18);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
    --shadow-cta: 0 10px 26px -12px rgba(255, 91, 63, 0.6);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  touch-action: manipulation;
}

a {
  color: inherit;
}

.brand,
.back,
.icon-btn,
.btn,
.cta,
.h-row {
  text-decoration: none;
}

:focus-visible {
  outline: 2.5px solid var(--shu);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.noscript {
  padding: 40px var(--gutter);
  text-align: center;
}

/* ---------- Estrutura ---------- */

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
}

.screen {
  padding: calc(var(--safe-top) + 10px) var(--gutter) calc(var(--safe-bottom) + 40px);
  /* "backwards": terminada a animação, o transform deixa de valer e não vira referência de position: fixed */
  animation: screen-in 0.38s var(--ease) backwards;
}

.screen--with-dock {
  padding-bottom: calc(var(--safe-bottom) + 112px);
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin: 0 -6px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.mark {
  display: inline-flex;
  gap: 3px;
}

.mark i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.mark i:last-child {
  background: var(--shu);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.2s, transform 0.15s var(--ease);
}

.icon-btn:active {
  background: var(--paper-2);
  transform: scale(0.94);
}

.icon-btn svg {
  width: 23px;
  height: 23px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 0 12px 0 4px;
  border-radius: 22px;
  font-weight: 560;
  font-size: 16px;
}

.back svg {
  width: 24px;
  height: 24px;
}

.back:active {
  background: var(--paper-2);
}

.hero {
  margin: 8px 0 26px;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 10.5vw, 46px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--shu);
}

.hero p {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 10px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.section-aside {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}

/* ---------- Seletor de vídeo ---------- */

.picker {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
}

.picker input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.picker--empty {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 4.2;
  max-height: 46vh;
  background:
    radial-gradient(circle at 50% 40%, var(--shu-soft), transparent 55%),
    var(--card);
  border: 1.5px dashed var(--line-strong);
  text-align: center;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}

.picker--empty:active {
  transform: scale(0.985);
  border-color: var(--shu);
}

.picker-plus {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--shu);
  color: var(--on-shu);
  box-shadow: var(--shadow-cta);
}

.picker-plus svg {
  width: 30px;
  height: 30px;
}

.picker-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.picker-sub {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14.5px;
}

.preview {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #0b0a09;
  aspect-ratio: 9 / 13;
  max-height: max(300px, calc(100dvh - 360px));
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.preview-meta {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chip--glass {
  background: rgba(12, 11, 10, 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}

.preview-swap {
  position: absolute;
  top: 12px;
  right: 12px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
}

.preview-swap input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.preview-sound {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.preview-sound svg {
  width: 19px;
  height: 19px;
}

.notes {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.4;
}

.note svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.note--warn {
  background: var(--warn-soft);
  color: var(--ink);
}

.note--warn svg {
  color: var(--warn);
}

.note--err {
  background: var(--err-soft);
}

.note--err svg {
  color: var(--err);
}

.note--spaced {
  margin-bottom: 18px;
}

/* ---------- Redes ---------- */

.networks {
  overflow: hidden;
}

.net-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 66px;
  padding: 10px 16px;
  text-align: left;
  transition: background 0.15s;
}

.net-row + .net-row {
  border-top: 1px solid var(--line);
}

.net-row:active {
  background: var(--card-press);
}

.net-row[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.net-glyph {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink);
}

.net-glyph svg {
  width: 22px;
  height: 22px;
}

.net-text {
  flex: 1;
  min-width: 0;
}

.net-name {
  display: block;
  font-weight: 640;
  font-size: 16.5px;
}

.net-sub {
  display: block;
  margin-top: 1px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.switch {
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: var(--idle);
  transition: background 0.25s var(--ease);
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s var(--ease);
}

[aria-checked="true"] .switch {
  background: var(--shu);
}

[aria-checked="true"] .switch::after {
  transform: translateX(20px);
}

/* ---------- Campos ---------- */

.field {
  position: relative;
  padding: 14px 16px 10px;
}

.field textarea,
.field input {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
  line-height: 1.5;
  resize: none;
}

.field textarea {
  min-height: 132px;
}

.field textarea::placeholder,
.field input::placeholder {
  color: var(--ink-3);
}

.field:focus-within {
  border-color: var(--line-strong);
}

.field-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.count--over {
  color: var(--err);
  font-weight: 650;
}

.count--near {
  color: var(--warn);
}

.hint {
  margin: 8px 4px 0;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ---------- Dock (ação principal) ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 22px var(--gutter) calc(var(--safe-bottom) + 14px);
  /* sólida atrás do botão; só uma faixa fina de degradê no topo */
  background: linear-gradient(to bottom, transparent, var(--paper) 22px);
  pointer-events: none;
}

.dock-inner {
  max-width: 520px;
  margin: 0 auto;
  pointer-events: auto;
}

.dock-hint {
  margin: 0 0 8px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
}

.dock-hint:empty {
  display: none;
}

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  border-radius: var(--r-md);
  background: var(--shu);
  color: var(--on-shu);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 18.5px;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-cta);
  overflow: hidden;
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.cta:active {
  transform: scale(0.98);
  background: var(--shu-press);
}

.cta:disabled {
  background: var(--paper-2);
  color: var(--ink-3);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.cta svg {
  width: 21px;
  height: 21px;
}

.cta--ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cta--ghost:active {
  background: var(--card-press);
}

.cta-dots {
  display: inline-flex;
  gap: 4px;
}

.cta-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
}

.cta-dots i.on {
  opacity: 1;
}

/* Barra de envio */

.upload {
  position: relative;
  height: 58px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.upload-fill {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--shu-soft);
  transition: transform 0.3s linear;
}

.upload-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: var(--shu);
}

.upload-body {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px 0 18px;
  gap: 12px;
}

.upload-pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  min-width: 58px;
  font-variant-numeric: tabular-nums;
}

.upload-text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.upload-text strong {
  display: block;
  color: var(--ink);
  font-weight: 640;
}

/* ---------- Detalhe ---------- */

.detail-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 6px 0 24px;
}

.thumb {
  flex: none;
  width: 78px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: var(--paper-2);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.thumb--placeholder {
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.thumb--placeholder svg {
  width: 26px;
  height: 26px;
}

.detail-title {
  margin: 2px 0 6px;
  font-family: var(--font-display);
  font-weight: 680;
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  height: 30px;
  padding: 0 12px 0 10px;
  border-radius: 15px;
  font-size: 13.5px;
  font-weight: 650;
}

.status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.tone-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.tone-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.tone-err {
  background: var(--err-soft);
  color: var(--err);
}

.tone-live {
  background: var(--shu-soft);
  color: var(--shu);
}

.tone-live i {
  animation: pulse 1.4s ease-in-out infinite;
}

.celebrate {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -4px 0 22px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--ok-soft);
}

.celebrate-dots {
  display: inline-flex;
  gap: 5px;
}

.celebrate-dots i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ok);
  animation: pop 0.55s var(--ease) both;
}

.celebrate-dots i:nth-child(2) {
  animation-delay: 0.08s;
}

.celebrate-dots i:nth-child(3) {
  animation-delay: 0.16s;
}

.celebrate strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.015em;
}

.celebrate span {
  font-size: 14px;
  color: var(--ink-2);
}

@keyframes pop {
  0% {
    transform: scale(0);
  }
  70% {
    transform: scale(1.25);
  }
}

.lanes {
  display: grid;
  gap: 12px;
}

.lane {
  padding: 16px;
}

.lane-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lane-name {
  flex: 1;
  font-weight: 650;
  font-size: 16.5px;
}

.lane-state {
  font-size: 14px;
  font-weight: 650;
}

.lane-state.ok {
  color: var(--ok);
}

.lane-state.err {
  color: var(--err);
}

.lane-state.live {
  color: var(--shu);
}

.lane-state.idle {
  color: var(--ink-3);
}

.track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 2px 4px;
}

.step {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.step:last-child {
  justify-items: end;
  text-align: right;
}

.step:nth-child(2),
.step:nth-child(3) {
  justify-items: center;
  text-align: center;
}

.step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--idle);
}

.step:first-child::before {
  left: 7px;
}

.step:last-child::before {
  right: 7px;
}

.step.done::before,
.step.current::before {
  background: var(--ink);
}

.step.current::before {
  background: linear-gradient(to right, var(--ink) 50%, var(--idle) 50%);
}

.step:last-child.current::before,
.step:last-child.done::before {
  background: var(--ink);
}

.dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--idle);
}

.step.done .dot {
  background: var(--ink);
  border-color: var(--ink);
}

.step.current .dot {
  background: var(--shu);
  border-color: var(--shu);
  box-shadow: 0 0 0 0 var(--shu);
  animation: ring 1.6s ease-out infinite;
}

.step.current {
  color: var(--ink);
  font-weight: 650;
}

.lane.is-ok .step.done .dot,
.lane.is-ok .step:last-child .dot {
  background: var(--ok);
  border-color: var(--ok);
}

.lane.is-ok .step::before {
  background: var(--ok);
}

.lane.is-ok .step:last-child {
  color: var(--ok);
  font-weight: 650;
}

.lane.is-err .step.current .dot {
  background: var(--err);
  border-color: var(--err);
  animation: none;
}

.lane.is-err .step.current {
  color: var(--err);
}

@keyframes ring {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--shu) 45%, transparent);
  }
  100% {
    box-shadow: 0 0 0 10px transparent;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.lane-error {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--err-soft);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.lane-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.lane-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 16px;
  border-radius: 13px;
  font-weight: 640;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.15s;
}

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

.btn svg {
  width: 17px;
  height: 17px;
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--soft {
  background: var(--paper-2);
  color: var(--ink);
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
}

.caption-box {
  padding: 16px;
  font-size: 15.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.caption-box.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-btn {
  margin-top: 6px;
  padding: 8px 2px;
  font-weight: 640;
  font-size: 14.5px;
  color: var(--shu);
}

/* ---------- Histórico ---------- */

.history {
  overflow: hidden;
}

.h-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s;
}

.h-row + .h-row {
  border-top: 1px solid var(--line);
}

.h-row:active {
  background: var(--card-press);
}

.h-row .thumb {
  width: 46px;
  border-radius: 9px;
  box-shadow: none;
}

.h-text {
  flex: 1;
  min-width: 0;
}

.h-title {
  display: block;
  font-weight: 620;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-sub {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.trio {
  flex: none;
  display: inline-flex;
  gap: 4px;
}

.trio i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--idle);
}

.trio i.ok {
  background: var(--ok);
  box-shadow: none;
}

.trio i.err {
  background: var(--err);
  box-shadow: none;
}

.trio i.live {
  background: var(--shu);
  box-shadow: none;
  animation: pulse 1.4s ease-in-out infinite;
}

.trio i.wait {
  background: var(--ink-3);
  box-shadow: none;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
}

.empty .mark i {
  width: 16px;
  height: 16px;
  background: var(--idle);
}

.empty .mark i:last-child {
  background: var(--shu);
}

.empty h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
}

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

.skeleton {
  height: 70px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--paper-2) 30%, var(--card) 50%, var(--paper-2) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton + .skeleton {
  margin-top: 10px;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -50% 0;
  }
}

/* ---------- Login ---------- */

.login {
  display: grid;
  align-content: center;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 24px) var(--gutter) calc(var(--safe-bottom) + 24px);
  animation: screen-in 0.45s var(--ease) backwards;
}

.login-mark {
  display: inline-flex;
  gap: 7px;
  margin-bottom: 26px;
}

.login-mark i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  animation: pop 0.6s var(--ease) both;
}

.login-mark i:nth-child(2) {
  animation-delay: 0.08s;
}

.login-mark i:nth-child(3) {
  background: var(--shu);
  animation-delay: 0.16s;
}

.login h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 720;
  font-size: clamp(44px, 13vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.login-tag {
  margin: 12px 0 36px;
  color: var(--ink-2);
  font-size: 17px;
}

.login-tag span {
  font-family: var(--font-display);
  color: var(--ink-3);
}

.login-field {
  display: block;
  padding: 0 16px;
}

.login-field span {
  display: block;
  padding-top: 12px;
  font-size: 12.5px;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.login-field input {
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 18px;
}

.login .cta {
  margin-top: 14px;
}

.login-error {
  min-height: 22px;
  margin: 12px 4px 0;
  color: var(--err);
  font-size: 14.5px;
  font-weight: 560;
}

.shake {
  animation: shake 0.42s var(--ease);
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-7px);
  }
  40%,
  80% {
    transform: translateX(7px);
  }
}

/* ---------- Toasts, carregamento ---------- */

.toasts {
  position: fixed;
  top: calc(var(--safe-top) + 10px);
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 var(--gutter);
  pointer-events: none;
}

.toast {
  max-width: 520px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14.5px;
  font-weight: 560;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.35s var(--ease) both;
  pointer-events: auto;
}

.toast.out {
  animation: toast-out 0.25s ease-in both;
}

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

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

.boot {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 42vh;
}

.boot span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 1s ease-in-out infinite;
}

.boot span:nth-child(2) {
  animation-delay: 0.15s;
}

.boot span:nth-child(3) {
  background: var(--shu);
  animation-delay: 0.3s;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@media (min-width: 600px) {
  .screen {
    padding-top: 28px;
  }
}
