/* SwipeAD Radar — painel. Escuro, minimalista, um acento verde. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/vendor/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/vendor/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #08080a;
  --bg-2: #0c0c0f;
  --surface: #111114;
  --surface-2: #17171b;
  --surface-3: #1e1e23;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.11);
  --line-3: rgba(255, 255, 255, 0.18);
  --text: #ededef;
  --text-2: #a3a3ad;
  --text-3: #6f6f7a;
  --accent: #3ecf8e;
  --accent-text: #6ee7b0;
  --accent-soft: rgba(62, 207, 142, 0.11);
  --accent-line: rgba(62, 207, 142, 0.28);
  --danger: #f2777a;
  --danger-soft: rgba(242, 119, 122, 0.1);
  --warn: #e8b85a;
  --warn-soft: rgba(232, 184, 90, 0.1);
  --info: #8ab4f8;
  --info-soft: rgba(138, 180, 248, 0.1);
  --r-sm: 6px;
  --r: 9px;
  --r-lg: 13px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.6);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sidebar: 236px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
a {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
::selection {
  background: rgba(62, 207, 142, 0.25);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ico {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}
.ico-sm {
  width: 14px;
  height: 14px;
}
.ico-lg {
  width: 20px;
  height: 20px;
}

/* ---------------------------------------------------------------- scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  user-select: none;
}
.btn:hover {
  background: var(--surface-3);
  border-color: var(--line-3);
}
.btn:active {
  transform: translateY(0.5px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--text);
  color: #0a0a0c;
  border-color: transparent;
}
.btn-primary:hover {
  background: #fff;
  border-color: transparent;
}
.btn-accent {
  background: var(--accent);
  color: #04130c;
  border-color: transparent;
}
.btn-accent:hover {
  background: #52dca0;
  border-color: transparent;
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: transparent;
}
.btn-danger {
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-soft);
  border-color: rgba(242, 119, 122, 0.3);
}
.btn-icon {
  width: 32px;
  padding: 0;
}
.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}
.btn-sm.btn-icon {
  width: 28px;
}
.btn.is-on {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.kbd {
  font: 500 11px/1 var(--font);
  color: var(--text-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 3px 5px;
  background: var(--bg-2);
}

/* ---------------------------------------------------------------- form controls */
.input,
.select,
.textarea {
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  padding: 0 10px;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  min-width: 0;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--line-3);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(62, 207, 142, 0.55);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.12);
}
.textarea {
  height: auto;
  min-height: 84px;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.5;
  width: 100%;
}
.select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f6f7a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}
.select option {
  background: var(--surface-2);
  color: var(--text);
}
.select.is-set {
  border-color: var(--accent-line);
  color: var(--accent-text);
  background-color: var(--accent-soft);
}
.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
.hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch .track {
  width: 34px;
  height: 20px;
  border-radius: 20px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  position: relative;
  transition: background 0.18s, border-color 0.18s;
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform 0.2s var(--ease), background 0.18s;
}
.switch input:checked + .track {
  background: var(--accent);
  border-color: transparent;
}
.switch input:checked + .track::after {
  transform: translateX(14px);
  background: #04130c;
}
.switch input:focus-visible + .track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- badges & chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge-accent {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.badge-warn {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: rgba(232, 184, 90, 0.25);
}
.badge-info {
  color: var(--info);
  background: var(--info-soft);
  border-color: rgba(138, 180, 248, 0.25);
}
.badge-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(242, 119, 122, 0.25);
}
.badge-dashed {
  border-style: dashed;
  background: transparent;
  color: var(--text-3);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.chip:hover {
  color: var(--text);
  border-color: var(--line-3);
  background: var(--surface);
}
.chip[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--line-3);
}
.chip .n {
  color: var(--text-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .n {
  color: var(--accent-text);
}

/* ---------------------------------------------------------------- shell */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  text-decoration: none;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #17171b, #101013);
  border: 1px solid var(--line-2);
  color: var(--accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.brand-mark .ico {
  width: 16px;
  height: 16px;
}
.brand-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.2;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover {
  background: var(--surface);
  color: var(--text);
}
.nav-item[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
}
.nav-item[aria-current="page"] .ico {
  color: var(--accent);
}
button.nav-item {
  border: 0;
  background: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}
.nav-item .count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  padding: 0 10px;
}
.status-line .dot {
  color: var(--accent);
}
.status-line .dot.is-busy {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.page {
  padding: 22px 28px 64px;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}
.page-sub {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.page-sub b {
  color: var(--text-2);
  font-weight: 500;
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.topbar {
  display: none;
}
.tabbar {
  display: none;
}

/* ---------------------------------------------------------------- toolbar */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  margin: 0 -28px 18px;
  padding: 10px 28px 12px;
  border-bottom: 1px solid var(--line);
}
.toolbar-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.toolbar-row + .toolbar-row {
  margin-top: 10px;
}
.search {
  position: relative;
  flex: 1 1 320px;
  max-width: 440px;
}
.search .ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.search .input {
  width: 100%;
  padding-left: 32px;
  padding-right: 34px;
  height: 34px;
}
.search .kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.seg {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  flex: none;
}
.seg button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.seg button:hover {
  color: var(--text);
}
.seg button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line-2);
}
.seg .n {
  color: var(--text-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.filters {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.filters .select {
  height: 30px;
  font-size: 12.5px;
  width: auto;
  max-width: 220px;
  color: var(--text-2);
}
.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px;
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}
.chips::-webkit-scrollbar {
  display: none;
}
.active-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.pill-x {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 4px 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 500;
  max-width: 280px;
}
.pill-x span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill-x button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.8;
}
.pill-x button:hover {
  opacity: 1;
  background: rgba(62, 207, 142, 0.18);
}
.link-btn {
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
}
.link-btn:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------------------------------------------------------------- grid & cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
  content-visibility: auto;
  contain-intrinsic-size: 260px 440px;
}
.card:hover {
  border-color: var(--line-3);
  box-shadow: var(--shadow);
}
.card.is-discarded {
  opacity: 0.55;
}
.card-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-lg);
}
.card-open:focus-visible {
  outline-offset: -2px;
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s var(--ease), opacity 0.3s;
  opacity: 0;
}
.card-media img.is-loaded {
  opacity: 1;
}
.card:hover .card-media img {
  transform: scale(1.025);
}
.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 10, 0.32));
  pointer-events: none;
}
.card-textonly {
  position: absolute;
  inset: 0;
  padding: 48px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.035), transparent 60%),
    var(--surface-2);
}
.card-textonly p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-textonly .muted {
  margin-top: auto;
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 11.5px;
}
.card-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}
.glass {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(10, 10, 12, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #e6e6ea;
  font-size: 11.5px;
  font-weight: 500;
}
.glass .ico {
  width: 13px;
  height: 13px;
}
.glass-accent {
  color: var(--accent-text);
}
.card-badges {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.card-views {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  pointer-events: none;
}
.card-body {
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.card-head {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.card-adv {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--text-3);
  font-size: 11.5px;
}
.card-meta .sep {
  flex: none;
}
.card-time {
  white-space: nowrap;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.card-caption {
  margin: 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(12.5px * 1.45 * 2);
}
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.card-domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.card-foot .badge {
  display: block;
  min-width: 0;
  flex: 0 1 auto;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-actions {
  display: flex;
  gap: 2px;
  position: relative;
  z-index: 2;
  margin-left: auto;
  flex: none;
}
.card-actions .btn {
  color: var(--text-3);
}
.card-actions .btn:hover {
  color: var(--text);
}
.card-actions .btn.is-on {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 40%, var(--surface) 80%);
  background-size: 300% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -200% 0;
  }
}
.card.is-skeleton .card-media {
  background: none;
}
.card.is-skeleton .card-media .skeleton {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
}
.new-pill {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s var(--ease);
  box-shadow: var(--shadow-lg);
}
.new-pill.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---------------------------------------------------------------- empty */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: radial-gradient(60% 80% at 50% 0%, rgba(62, 207, 142, 0.04), transparent 70%);
}
.empty-art {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  margin-bottom: 18px;
}
.empty-art::before,
.empty-art::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 24px;
  border: 1px solid var(--line);
}
.empty-art::after {
  inset: -22px;
  border-radius: 32px;
  border-color: rgba(255, 255, 255, 0.035);
}
.empty-art .ico {
  width: 24px;
  height: 24px;
}
.empty h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.empty p {
  margin: 0 0 18px;
  color: var(--text-3);
  max-width: 380px;
  font-size: 13px;
}
.empty .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------------------------------------------------------------- drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.2s;
}
.overlay.is-open {
  opacity: 1;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(600px, 100vw);
  background: var(--bg-2);
  border-left: 1px solid var(--line-2);
  z-index: 51;
  display: flex;
  flex-direction: column;
  transform: translateX(24px);
  opacity: 0;
  transition: transform 0.26s var(--ease), opacity 0.2s;
  box-shadow: var(--shadow-lg);
}
.drawer.is-open {
  transform: none;
  opacity: 1;
}
.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}
.drawer-title {
  min-width: 0;
  flex: 1;
}
.drawer-title h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.drawer-title .sub {
  color: var(--text-3);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.drawer-nav {
  display: flex;
  gap: 2px;
}
.drawer-body {
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
}
.drawer-media {
  background: #000;
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  min-height: 96px;
}
.drawer-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.drawer-media > a {
  display: block;
}
.thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  width: 100%;
  justify-content: center;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.thumb {
  position: relative;
  width: 52px;
  height: 64px;
  padding: 0;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}
.thumb:hover {
  opacity: 0.9;
}
.thumb[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.thumb-n {
  position: absolute;
  right: 3px;
  bottom: 3px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(10, 10, 12, 0.7);
  color: #e6e6ea;
}
.drawer-media img {
  max-height: 64vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.drawer-media .noimg {
  color: var(--text-3);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  text-align: center;
}
.drawer-actions {
  display: flex;
  gap: 6px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
}
.drawer-actions .spacer {
  flex: 1;
}
.section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.section:last-child {
  border-bottom: 0;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 0 0 12px;
}
.section-title .right {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  display: flex;
  gap: 6px;
}
.kv {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 9px 14px;
  font-size: 13px;
  margin: 0;
}
.kv dt {
  color: var(--text-3);
}
.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.kv .link-btn {
  padding: 0;
  font-size: 13px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  overflow-wrap: anywhere;
}
.kv .link-btn .ico {
  color: var(--text-3);
}
.url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 8px 6px 8px 12px;
}
.url-box .u {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.url-box .u .host {
  color: var(--accent-text);
}
.url-box + .kv,
.url-box ~ .hint {
  margin-top: 12px;
}
.section > div + .kv,
.section > .hint + .kv {
  margin-top: 14px;
}
.url-origin {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}
.prose + .prose,
.prose + .folds {
  margin-top: 12px;
}
.prose.mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
}
details.fold {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
details.fold + details.fold {
  margin-top: 8px;
}
details.fold summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
details.fold summary::-webkit-details-marker {
  display: none;
}
details.fold summary .chev {
  margin-left: auto;
  transition: transform 0.2s;
  color: var(--text-3);
}
details.fold[open] summary .chev {
  transform: rotate(180deg);
}
details.fold .fold-body {
  padding: 0 12px 12px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.timeline li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--text-2);
}
.timeline li:first-child {
  border-top: 0;
}
.timeline time {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.timeline .tl-dev {
  margin-left: auto;
  color: var(--text-3);
}

.classify {
  display: grid;
  gap: 14px;
}
.classify-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.classify .select,
.classify .input {
  width: 100%;
}
.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  cursor: text;
}
.tag-editor:focus-within {
  border-color: rgba(62, 207, 142, 0.55);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.12);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 3px 0 9px;
  border-radius: 5px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--text);
}
.tag button {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  border-radius: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.tag button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.tag-editor input {
  border: 0;
  background: transparent;
  outline: none;
  flex: 1;
  min-width: 120px;
  height: 24px;
  font-size: 13px;
  padding: 0 4px;
}
.tag-editor input::placeholder {
  color: var(--text-3);
}
.tags-static {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.save-row .note {
  margin-right: auto;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------------------------------------------------------------- modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(460px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(0.985);
  opacity: 0;
  transition: transform 0.22s var(--ease), opacity 0.18s;
}
.modal.is-open .modal-card {
  transform: none;
  opacity: 1;
}
.modal-head {
  padding: 18px 20px 0;
}
.modal-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.modal-head p {
  margin: 6px 0 0;
  color: var(--text-3);
  font-size: 13px;
}
.modal-body {
  padding: 16px 20px;
}
.modal-foot {
  padding: 12px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.token-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 6px 10px 12px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--accent-line);
}
.token-box code {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
  color: var(--accent-text);
  user-select: all;
}
.callout {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-top: 12px;
}
.callout .ico {
  color: var(--warn);
  margin-top: 2px;
}
.callout-info .ico {
  color: var(--info);
}

/* ---------------------------------------------------------------- devices */
.dev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.dev {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dev.is-revoked {
  opacity: 0.6;
}
.dev-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.dev-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  flex: none;
}
.dev-id {
  flex: 1;
  min-width: 0;
}
.dev-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dev-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}
.dev-state {
  margin-left: auto;
  flex: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.stat {
  padding: 10px 12px;
  background: var(--bg-2);
}
.stat + .stat {
  border-left: 1px solid var(--line);
}
.stat-v {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-l {
  font-size: 11.5px;
  color: var(--text-3);
}
.dev-msg {
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  overflow-wrap: anywhere;
}
.dev-foot {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.dev-foot .token-hint {
  margin-right: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
}

.diag {
  margin-top: 36px;
}
.diag-head {
  margin-bottom: 12px;
}
.diag-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.diag-title .ico {
  color: var(--text-3);
}
.diag-list {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.diag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
}
.diag-row + .diag-row {
  border-top: 1px solid var(--line);
}
.diag-main {
  min-width: 0;
  flex: 1;
}
.diag-when {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.diag-meta {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.diag-actions {
  display: flex;
  gap: 6px;
  flex: none;
}
.diag-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  color: var(--text-3);
  font-size: 13px;
}
.modal-card.modal-wide {
  width: min(560px, 100%);
}
.shot {
  display: block;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #000;
}
.shot img {
  max-height: 64vh;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- settings */
.settings {
  display: grid;
  gap: 16px;
  max-width: 820px;
}
.set-card {
  padding: 20px;
}
.set-card h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.set-card > p {
  margin: 4px 0 16px;
  color: var(--text-3);
  font-size: 13px;
}
.set-rows {
  display: grid;
  gap: 2px;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.set-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.set-row .t {
  font-size: 13.5px;
  font-weight: 500;
}
.set-row .d {
  font-size: 12.5px;
  color: var(--text-3);
}
.num-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.num-field {
  position: relative;
}
.num-field .input {
  width: 100%;
  padding-right: 40px;
  font-variant-numeric: tabular-nums;
}
.num-field .unit {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.set-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.savebar {
  position: sticky;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 820px;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s var(--ease), opacity 0.18s;
}
.savebar.is-shown {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.savebar span {
  font-size: 13px;
  color: var(--text-2);
  margin-right: auto;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
  display: grid;
  gap: 10px;
}
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.steps li::before {
  content: counter(s);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}
.steps .badge {
  vertical-align: -5px;
  margin: 0 2px;
}
.steps b {
  color: var(--text);
  font-weight: 500;
}

/* ---------------------------------------------------------------- toast */
.toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #1c1c21;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: toast-in 0.25s var(--ease);
  pointer-events: auto;
}
.toast .ico {
  color: var(--accent);
}
.toast.is-error .ico {
  color: var(--danger);
}
.toast button {
  margin-left: 6px;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------------------------------------------------------------- auth / standalone pages */
.center-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px 300px at 50% -60px, rgba(62, 207, 142, 0.08), transparent 70%),
    var(--bg);
}
.auth {
  width: min(360px, 100%);
}
.auth .brand {
  justify-content: center;
  padding-bottom: 26px;
}
.auth .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
.auth .brand-mark .ico {
  width: 22px;
  height: 22px;
}
.auth h1 {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.auth p.lead {
  text-align: center;
  color: var(--text-3);
  margin: 0 0 24px;
  font-size: 13px;
}
.auth form {
  display: grid;
  gap: 12px;
}
.auth .input {
  height: 40px;
  width: 100%;
  font-size: 14px;
}
.auth .btn {
  height: 40px;
  font-size: 14px;
}
.form-error {
  color: var(--danger);
  font-size: 12.5px;
  min-height: 18px;
  margin: 0;
}
.auth-foot {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-3);
}
.auth-foot a {
  color: var(--text-2);
}

.dl {
  width: min(640px, 100%);
}
.dl-hero {
  text-align: center;
  padding: 8px 0 28px;
}
.dl-hero .brand {
  justify-content: center;
  padding-bottom: 20px;
}
.dl-hero h1 {
  font-size: clamp(22px, 5vw, 28px);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  font-weight: 600;
}
.dl-hero p {
  color: var(--text-2);
  margin: 0 auto 22px;
  max-width: 460px;
}
.dl-hero .btn {
  height: 44px;
  padding: 0 20px;
  font-size: 14.5px;
  border-radius: 10px;
}
.dl-meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.dl-steps {
  display: grid;
  gap: 12px;
}
.dl-step {
  padding: 18px 18px 18px 16px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
}
.dl-num {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-weight: 600;
  font-size: 13px;
}
.dl-step h2 {
  margin: 4px 0 6px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dl-step ol + p {
  margin-top: 10px;
}
.dl-step p,
.dl-step li {
  color: var(--text-2);
  font-size: 13.5px;
  margin: 0;
}
.dl-step ol {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.dl-step b {
  color: var(--text);
  font-weight: 500;
}
.path {
  display: inline;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .filters {
    margin-left: 0;
  }
  .toolbar-row.wrap-md {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }
  body {
    font-size: 14px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
  }
  .topbar .brand {
    padding: 0;
  }
  .topbar .status-line {
    margin-left: auto;
    padding: 0;
  }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--bg-2) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 0 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    text-decoration: none;
  }
  .tabbar a[aria-current="page"] {
    color: var(--text);
  }
  .tabbar a[aria-current="page"] .ico {
    color: var(--accent);
  }
  .tabbar .ico {
    width: 20px;
    height: 20px;
  }
  .page {
    padding: 16px 14px 96px;
  }
  .page-head {
    margin-bottom: 12px;
    align-items: center;
  }
  .page-title {
    font-size: 18px;
  }
  .page-actions .btn-label {
    display: none;
  }
  .page-actions .btn:not(.btn-icon) {
    width: 32px;
    padding: 0;
  }
  .toolbar {
    margin: 0 -14px 14px;
    padding: 10px 14px;
  }
  .toolbar-row {
    flex-wrap: wrap;
  }
  .search {
    flex-basis: 100%;
    max-width: none;
  }
  .search .kbd {
    display: none;
  }
  .seg {
    order: 2;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }
  .filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 0 14px;
    width: calc(100% + 28px);
  }
  .filters::-webkit-scrollbar,
  .seg::-webkit-scrollbar {
    display: none;
  }
  .filters .select {
    flex: none;
  }
  .chips {
    margin: 0 -14px;
    padding: 1px 14px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .card-body {
    padding: 9px 10px 10px;
    gap: 5px;
  }
  .card-caption {
    font-size: 12px;
  }
  .card-textonly .muted-t {
    display: none;
  }
  .card-textonly p {
    font-size: 13px;
    -webkit-line-clamp: 8;
  }
  .card-top {
    top: 8px;
    left: 8px;
    right: 8px;
  }
  .card-actions .btn + .btn {
    display: none;
  }
  .drawer {
    width: 100vw;
    border-left: 0;
    transform: translateY(24px);
  }
  .drawer-media img {
    max-height: 56vh;
  }
  .drawer-actions .spacer {
    display: none;
  }
  .drawer-actions > .btn {
    flex: 1 1 0;
    padding: 0 8px;
  }
  .save-row {
    flex-wrap: wrap;
  }
  .save-row .note {
    flex-basis: 100%;
  }
  .dl-step {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .kv {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .classify-row {
    grid-template-columns: 1fr;
  }
  .dev-grid {
    grid-template-columns: 1fr;
  }
  .dev-head {
    flex-wrap: wrap;
  }
  .dev-id {
    flex-basis: calc(100% - 48px);
  }
  .dev-state {
    margin-left: 48px;
    margin-top: -6px;
  }
  .dev-foot .token-hint {
    flex-basis: 100%;
    margin-bottom: 2px;
  }
  .dev-foot .btn {
    flex: 1 1 0;
  }
  .savebar {
    bottom: 76px;
  }
  .diag-row {
    flex-wrap: wrap;
  }
  .diag-actions {
    width: 100%;
  }
  .diag-actions .btn:not(.btn-icon) {
    flex: 1;
  }
  .toasts {
    bottom: 80px;
    width: calc(100% - 28px);
  }
  .empty {
    padding: 52px 18px;
  }
  .new-pill {
    top: 64px;
  }
}

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