﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg0: #050b16;
  --bg1: #071022;
  --bg2: #0a1a33;

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.1);

  --glass: rgba(12, 26, 51, 0.74);
  --glass-2: rgba(12, 26, 51, 0.56);
  --panel: rgba(255, 255, 255, 0.04);

  --blue: #2f89ff;
  --blue2: #43b0ff;
  --orange: #ff8a28;

  --danger: #ff5f6d;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;

  --shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(47, 137, 255, 0.2), transparent 55%),
    radial-gradient(900px 520px at 85% 0%, rgba(67, 176, 255, 0.12), transparent 55%),
    radial-gradient(1100px 680px at 50% 115%, rgba(10, 26, 51, 0.9), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 45%, var(--bg0));
  background-attachment: fixed;
  overflow-x: hidden;
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }
}

a {
  color: #68a9ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 30px;
}

.user-layout,
.user-main {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.brand-logo {
  gap: 0;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-img {
  width: 145px;
  height: 81px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.32));
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 81px;
}

.brand-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.22);
}

.brand-cap {
  font-weight: 900;
  letter-spacing: 0.01em;
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 0.95;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.logo-img-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.small {
  font-size: 12px;
}

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

.actions,
.filters,
.chips,
.post-meta-right,
.tools-actions,
.tool-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filters-v2 {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.filters-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.filters-actions {
  display: inline-flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: nowrap;
}

.sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.sort-btn {
  min-width: 96px;
  padding: 9px 12px;
}

.sort-btn.is-active {
  border-color: rgba(67, 176, 255, 0.52);
  background: rgba(67, 176, 255, 0.24);
  color: #e9f5ff;
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search-wrap .input {
  min-height: 46px;
}

.btn-refresh-search {
  min-width: 146px;
}

.filters-select-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filters-select-row .dd {
  min-width: 0;
  width: 100%;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card {
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-body {
  padding: 16px;
  overflow: visible;
}

h2,
h3,
.post-title {
  margin: 0;
}

.hr {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

.badge,
.chip,
.pill,
.post-total-dur,
.post-video-badge,
.loom-dur {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
}

.badge,
.chip,
.pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.94);
}

.chip.accent,
.badge.ai-badge,
.pill.ok,
.post-total-dur,
.loom-dur {
  border-color: rgba(47, 137, 255, 0.34);
  background: rgba(47, 137, 255, 0.16);
}

.sec-chip {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-more {
  border-style: dashed;
  cursor: pointer;
}

.secs-more[hidden] {
  display: none !important;
}

.btn,
.dd-btn,
.tool,
.input,
textarea,
select {
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.94);
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary,
.btn-create-new {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(47, 137, 255, 0.95), rgba(67, 176, 255, 0.92));
  box-shadow: 0 12px 28px rgba(47, 137, 255, 0.24);
}

.btn.danger {
  border-color: rgba(255, 95, 109, 0.38);
  background: rgba(255, 95, 109, 0.14);
  color: #ffd7dc;
}

.btn.small {
  padding: 8px 11px;
  font-size: 12px;
}

.input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  outline: none;
}

.input:focus,
textarea:focus,
select:focus,
.dd-btn:focus {
  border-color: rgba(67, 176, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(67, 176, 255, 0.18);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.post {
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.user-view .post {
  background: linear-gradient(180deg, rgba(12, 26, 51, 0.82), rgba(8, 18, 36, 0.86));
  border-color: rgba(67, 176, 255, 0.26);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

.post-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.post-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.preview {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  overflow: auto;
}

.post .preview {
  min-height: 0;
  overflow: visible;
}

.post .preview:empty {
  display: none;
}

.preview h1,
.preview h2,
.preview h3 {
  margin: 0.55em 0;
}

.preview p {
  margin: 0.55em 0;
  line-height: 1.58;
}

.preview blockquote,
.editor blockquote {
  margin: 0.8em 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(67, 176, 255, 0.75);
  border-radius: 10px;
  background: rgba(67, 176, 255, 0.12);
}

.preview pre,
.editor pre {
  border-radius: 12px;
  padding: 10px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preview code,
.editor code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.preview code {
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.tool {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
}

.tool:hover {
  border-color: rgba(67, 176, 255, 0.44);
}

.tool-sep {
  width: 1px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 4px;
}

.editor {
  margin-top: 10px;
  min-height: 300px;
  max-height: 68vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  padding: 14px;
  line-height: 1.55;
  outline: none;
}

.editor:empty:before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.44);
}

.edit-asides.single {
  display: grid;
  grid-template-columns: 1fr;
}

.edit-pane {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.14);
  padding: 12px;
}

.dd {
  position: relative;
  min-width: 220px;
}

.dd select {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.dd-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 11px 12px;
  cursor: pointer;
}

.dd-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.dd-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 11, 22, 0.98);
  box-shadow: var(--shadow);
  max-height: min(46vh, 380px);
  overflow: auto;
}

.dd.open .dd-menu {
  display: block;
}

.dd-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 11, 22, 0.98);
}

.dd-search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--text);
}

.dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.dd-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dd-item.active {
  background: rgba(47, 137, 255, 0.16);
  border-color: rgba(67, 176, 255, 0.28);
}

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 55;
  display: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 11, 22, 0.98);
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow: auto;
}

.suggest.show {
  display: block;
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.suggest-item:hover,
.suggest-item.active {
  background: rgba(47, 137, 255, 0.14);
}

.suggest-item.active {
  border-color: rgba(67, 176, 255, 0.58);
  background: rgba(47, 137, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(67, 176, 255, 0.34);
}

.suggest-item.active .suggest-tag {
  border-color: rgba(255, 200, 112, 0.66);
  background: rgba(255, 176, 82, 0.2);
  color: #ffe7c5;
}

.suggest-left {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.suggest-tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(67, 176, 255, 0.35);
  background: rgba(67, 176, 255, 0.16);
  color: #cce6ff;
}

.suggest-muted {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.quick-links a,
.actions a.btn,
.actions a.btn:hover {
  color: inherit;
  text-decoration: none;
}

.quick-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.post-links-title {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.post-links-title > i {
  margin-right: 2px;
}

.post-links-title > span:first-of-type {
  justify-self: start;
  font-weight: 800;
}

.post-links-hint {
  justify-self: end;
  text-align: right;
}

.quick-links-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.quick-links-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.user-view .topbar {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.user-view .quick-links {
  margin-top: 0;
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.quick-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 800;
  transition: border-color 0.2s ease, transform 0.1s ease, background 0.2s ease;
}

.quick-link:hover {
  transform: translateY(-1px);
  border-color: rgba(67, 176, 255, 0.44);
  background: rgba(255, 255, 255, 0.08);
}

.badge-new {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, #52b8ff, #2f89ff);
  box-shadow: 0 0 20px rgba(47, 137, 255, 0.5);
}

.ai-badge {
  position: relative;
  overflow: hidden;
  animation: aiGlow 2.3s ease-in-out infinite;
}

.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(67, 176, 255, 1);
  box-shadow: 0 0 16px rgba(67, 176, 255, 0.65);
  animation: aiPulse 1.6s ease-in-out infinite;
}

.ai-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 34%, rgba(255, 255, 255, 0.3) 50%, transparent 66%);
  transform: translateX(-80%);
  animation: aiSweep 2.8s linear infinite;
}

.ai-badge > * {
  position: relative;
  z-index: 1;
}

.analytics-wrap {
  margin-top: 12px;
}

.analytics-grid {
  width: 100%;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-card {
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  padding: 12px;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease, border-color 0.2s ease;
}

.analytics-card:hover {
  border-color: rgba(67, 176, 255, 0.45);
}

.analytics-card.is-in {
  transform: translateY(0);
  opacity: 1;
}

.a-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.a-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}



.a-ico.yt i,
i.fa-youtube,
i.fa-brands.fa-youtube,
i.fa-brands.fa-youtube-square,
i.fa-brands.fa-youtube-play,
.post-video-badge .fa-youtube {
  color: #ff2b2b;
}

.a-title {
  font-size: 13px;
  font-weight: 700;
}

.a-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.a-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.analytics-card.is-loading .a-value,
.analytics-card.is-loading .a-sub {
  opacity: 0.56;
}

.analytics-card.is-loading .a-value {
  color: transparent;
}

.analytics-card.is-loading .a-value::before {
  content: "";
  display: block;
  width: 70%;
  height: 24px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.a-sub .a-spin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.a-sub .a-spin i,
.spinner {
  animation: spin 0.9s linear infinite;
}

.post-links,
.post-videos {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.16);
  padding: 10px;
}

.post-links-list,
.post-videos-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.post-link,
.post-video {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.post-link-main,
.post-video-main {
  min-width: 220px;
  flex: 1;
}

.post-link-note,
.post-video-note {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.post-link-path,
.post-video-url {
  display: inline-block;
  word-break: break-word;
}

.post-video-badge {
  border-radius: 12px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.post-video-badge.is-pending {
  opacity: 0.74;
}

.post-total-dur.is-hidden,
.loom-dur.is-hidden {
  display: none;
}

.btn-more-posts {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.post-enter {
  opacity: 0;
  transform: translateY(10px);
}

.post-enter.post-enter-show {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.post-search-hit {
  border-color: rgba(255, 176, 82, 0.92) !important;
  box-shadow:
    0 0 0 1px rgba(255, 176, 82, 0.86),
    0 0 0 6px rgba(255, 176, 82, 0.2),
    0 0 26px rgba(255, 176, 82, 0.35),
    0 14px 34px rgba(0, 0, 0, 0.42);
  animation: postSearchGlow 1.8s ease-out;
}

.unc-grid-1 {
  display: grid;
  gap: 8px;
}

.unc-field {
  display: grid;
  gap: 6px;
}

.unc-actions {
  display: flex;
  justify-content: flex-end;
}

.unc-hint {
  line-height: 1.35;
}

.tools-fab,
.top-fab {
  position: fixed;
  right: 18px;
  border-radius: 999px;
  border: 1px solid rgba(67, 176, 255, 0.34);
  background: rgba(5, 11, 22, 0.88);
  color: #d6ebff;
  padding: 10px 13px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  z-index: 80;
}

.tools-fab {
  bottom: 18px;
}

.top-fab {
  bottom: 82px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.top-fab.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tools-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.tools-modal.open {
  display: block;
}

.tools-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 18, 0.62);
  backdrop-filter: blur(4px);
  touch-action: none;
}

.tools-panel {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: min(780px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(67, 176, 255, 0.3);
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(67, 176, 255, 0.15), transparent 62%),
    linear-gradient(180deg, rgba(7, 16, 34, 0.99), rgba(5, 11, 22, 0.99));
  box-shadow: var(--shadow);
  padding: 14px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.tools-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tools-title,
.tool-h {
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-box {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  margin-top: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-field {
  display: grid;
  gap: 6px;
}

.tool-field > span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
}

.tool-field input {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

.tool-field input:focus {
  border-color: rgba(67, 176, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(67, 176, 255, 0.16);
}

.tool-out {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(67, 176, 255, 0.28);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  white-space: pre-line;
  min-height: 40px;
}

.result-wrap,
.result-card,
.kv-card,
.raw-json,
.cabys-item,
.result-empty,
.result-error {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.result-loading,
.result-empty,
.result-error,
.result-card,
.raw-json {
  padding: 10px;
}

.result-error {
  display: flex;
  gap: 10px;
  border-color: rgba(255, 95, 109, 0.34);
  background: rgba(255, 95, 109, 0.14);
}

.result-error-title {
  font-weight: 900;
}

.raw-json summary {
  cursor: pointer;
  font-weight: 800;
}

.cabys-list,
.act-list,
.kv-grid,
.tc-grid {
  display: grid;
  gap: 10px;
}

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

.toast {
  position: fixed;
  left: 50%;
  top: 14px;
  width: min(92vw, 430px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(13, 22, 40, 0.86);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
  color: #eaf4ff;
  backdrop-filter: blur(12px) saturate(1.15);
  transform: translateX(calc(-50% + var(--toast-swipe-x, 0px))) translateY(-14px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 95;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(calc(-50% + var(--toast-swipe-x, 0px))) translateY(0) scale(1);
}

.toast.hide {
  opacity: 0;
  transform: translateX(calc(-50% + var(--toast-swipe-x, 0px))) translateY(-12px) scale(0.97);
}

.toast.dragging {
  transition: none;
}

.toast-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
}

.toast-text {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.toast-close {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.toast.toast-success {
  border-color: rgba(79, 209, 144, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(79, 209, 144, 0.22);
}

.toast.toast-success .toast-icon {
  color: #8df0bd;
  background: rgba(79, 209, 144, 0.22);
}

.toast.toast-error {
  border-color: rgba(255, 95, 109, 0.56);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 95, 109, 0.24);
}

.toast.toast-error .toast-icon {
  color: #ffd1d6;
  background: rgba(255, 95, 109, 0.24);
}

.toast.toast-warning {
  border-color: rgba(255, 176, 82, 0.56);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 176, 82, 0.22);
}

.toast.toast-warning .toast-icon {
  color: #ffe4be;
  background: rgba(255, 176, 82, 0.24);
}

.toast.toast-info {
  border-color: rgba(67, 176, 255, 0.56);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(67, 176, 255, 0.22);
}

.toast.toast-info .toast-icon {
  color: #d7ecff;
  background: rgba(67, 176, 255, 0.24);
}

body.scroll-lock {
  overflow: hidden;
}

body.tools-open {
  overflow: hidden;
}

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

@keyframes aiPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
  }
}

@keyframes aiGlow {
  0%,
  100% {
    filter: saturate(1);
  }

  50% {
    filter: saturate(1.2);
  }
}

@keyframes aiSweep {
  from {
    transform: translateX(-80%) skewX(-10deg);
  }

  to {
    transform: translateX(80%) skewX(-10deg);
  }
}

@keyframes postSearchGlow {
  0% {
    transform: translateY(2px) scale(0.995);
    box-shadow:
      0 0 0 0 rgba(255, 176, 82, 0.35),
      0 0 0 0 rgba(255, 176, 82, 0.18),
      0 10px 22px rgba(0, 0, 0, 0.32);
  }

  45% {
    transform: translateY(0) scale(1.003);
    box-shadow:
      0 0 0 1px rgba(255, 176, 82, 0.9),
      0 0 0 10px rgba(255, 176, 82, 0.24),
      0 0 28px rgba(255, 176, 82, 0.42),
      0 16px 36px rgba(0, 0, 0, 0.42);
  }

  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 1px rgba(255, 176, 82, 0.7),
      0 0 0 6px rgba(255, 176, 82, 0.18),
      0 0 18px rgba(255, 176, 82, 0.25),
      0 14px 34px rgba(0, 0, 0, 0.42);
  }
}

@media (max-width: 980px) {
  .brand-img {
    width: 120px;
    height: auto;
    max-height: 56px;
  }

  .brand-lockup {
    min-height: 56px;
    gap: 10px;
  }

  .brand-cap {
    font-size: clamp(24px, 6.2vw, 38px);
  }

  .topbar,
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-links-grid,
  .analytics-grid,
  .tool-grid,
  .row,
  .tc-grid,
  .kv-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filters > * {
    width: 100%;
    min-width: 0 !important;
  }

  .filters-v2 .filters-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .filters-actions {
    width: 100%;
  }

  .filters-actions .btn-refresh-search {
    min-width: 0;
  }

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

  .dd {
    width: 100%;
  }

  .dd-menu {
    position: relative;
    top: 0;
    margin-top: 10px;
  }

  .dd.open {
    padding-bottom: 10px;
  }

  .tools-fab-label,
  .top-fab-label {
    display: none;
  }

  .tools-fab,
  .top-fab {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .toast {
    top: 10px;
    width: min(95vw, 420px);
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
    padding-top: 12px;
  }

  .post-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .post-meta-right {
    justify-content: flex-start;
  }

  .sec-chip {
    max-width: 100%;
  }

  .filters-v2 .filters-search-row {
    grid-template-columns: 1fr;
  }

  .filters-actions {
    flex-direction: column;
  }

  .sort-toggle {
    width: 100%;
    justify-content: stretch;
  }

  .sort-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .filters-v2 .filters-select-row {
    grid-template-columns: 1fr;
  }

  .btn-refresh-search {
    width: 100%;
    min-width: 0;
  }

  .badge-new {
    font-size: 9px;
  }

  .brand-divider {
    display: none;
  }

  .brand-lockup {
    width: 100%;
    min-height: 50px;
    gap: 8px;
    justify-content: space-between;
  }

  .brand-logo {
    min-width: 0;
  }

  .brand-img {
    width: 104px;
    max-height: 50px;
  }

  .brand-cap {
    font-size: clamp(14px, 4.8vw, 22px);
    white-space: nowrap;
    line-height: 1;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    max-width: none;
  }

  .post-links-title {
    grid-template-columns: auto 1fr;
  }

  .post-links-hint {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }

  .tools-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 88svh;
    border-radius: 16px;
    padding: 12px;
  }

  .tools-head {
    position: sticky;
    top: -12px;
    z-index: 2;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(7, 16, 34, 0.99), rgba(7, 16, 34, 0.96));
  }

  .tools-actions,
  .tool-row {
    width: 100%;
  }

  .tools-actions .btn,
  .tool-row .btn {
    flex: 1 1 0;
  }

  .tool-box {
    padding: 10px;
  }

  .toast {
    width: min(96vw, 420px);
    border-radius: 14px;
  }

  .toast-inner {
    padding: 10px 11px;
  }
}
