:root {
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--text);
  background: var(--surface-2);
  font-synthesis: none;
  font-size: 14px;
  --green: #285b45;
  --green-dark: #194632;
  --mint: #eaf1eb;
  --line: #e5e9e6;
  --muted: #849087;
  --sidebar: 228px;
  --text: #28362f;
  --surface: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-line);
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--line-strong);
  outline-offset: 1px;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 27px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hint {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--muted);
  font-weight: 650;
  text-transform: uppercase;
}
.btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  transition:
    background 0.16s,
    transform 0.16s,
    box-shadow 0.16s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--green);
  color: var(--on-media);
  border-color: var(--green);
  box-shadow: 0 2px 2px color-mix(in srgb, var(--shadow) 8%, transparent);
}
.btn-primary:hover {
  background: var(--green-dark);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}
.btn-ghost {
  background: transparent;
}
.btn-ghost:hover {
  background: var(--surface-3);
}
.btn-danger {
  color: var(--danger-text);
  border-color: var(--danger-line);
  background: var(--surface);
}
.icon-button {
  width: 33px;
  height: 33px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--surface-3);
  color: var(--green);
}
.icon-button.active {
  background: var(--surface-3);
  color: var(--green);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 550;
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.3;
}
.badge-green {
  background: var(--surface-3);
  color: var(--accent-text);
}
.badge-amber {
  background: var(--surface-3);
  color: var(--warn-text);
}
.badge-gray {
  background: var(--surface-3);
  color: var(--muted);
}
.badge-red {
  background: var(--surface-3);
  color: var(--danger-text);
}
.badge-blue {
  background: var(--surface-3);
  color: var(--info-text);
}
.input,
.select {
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text);
  width: 100%;
  font-size: 13px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 19px;
}
.field > label {
  font-size: 12px;
  font-weight: 550;
}
.field input[type="range"] {
  accent-color: var(--green);
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.empty-state {
  padding: 65px 20px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  color: var(--muted);
}
.empty-state > svg {
  color: var(--faint);
}
.empty-state h3 {
  color: var(--text);
}
.app-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar);
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 30;
  padding: 29px 16px 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 37px;
}
.brand img {
  width: 36px;
  height: 36px;
}
.brand strong {
  font-size: 22px;
  letter-spacing: 1px;
  line-height: 1.1;
  font-weight: 650;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 5px;
  color: var(--muted);
}
.workspace-switch {
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 0 5px 27px;
  padding: 11px 10px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}
.workspace-avatar {
  background: var(--surface-3);
  border-radius: 5px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--accent-text);
}
.workspace-switch > span:nth-child(2) {
  flex: 1;
  font-size: 12px;
  font-weight: 550;
}
.nav-caption {
  font-size: 10px;
  color: var(--faint);
  margin: 0 15px 9px;
  letter-spacing: 1px;
}
.nav-group {
  margin-bottom: 27px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  height: 43px;
  justify-content: flex-start;
  padding: 0 15px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  gap: 12px;
  transition:
    background 0.17s,
    color 0.17s;
}
.nav-item:hover {
  background: var(--surface-3);
}
.nav-item.active {
  background: var(--surface-3);
  color: var(--accent-text);
  font-weight: 600;
}
.nav-item .nav-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 550;
  background: var(--fill-strong);
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 4px;
}
.nav-item.active svg {
  stroke-width: 1.9;
}
.sidebar-bottom {
  margin-top: auto;
}
.storage-meter {
  margin: 0 12px 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.storage-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
.storage-title span {
  margin-left: auto;
  color: var(--faint);
  font-size: 9px;
}
.storage-track {
  height: 4px;
  border-radius: 4px;
  background: var(--surface-3);
  margin: 10px 0 6px;
  overflow: hidden;
}
.storage-track i {
  height: 100%;
  width: 24%;
  display: block;
  background: var(--accent-mid);
  border-radius: 4px;
}
.storage-caption {
  font-size: 9px;
  color: var(--faint);
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 17px 12px 0;
}
.avatar {
  height: 31px;
  width: 31px;
  background: var(--fill-strong);
  color: var(--warn-text);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
}
.profile-name {
  font-size: 12px;
  font-weight: 550;
}
.profile-role {
  font-size: 9px;
  color: var(--faint);
  margin-top: 3px;
}
.profile .icon-button {
  margin-left: auto;
}
.app-main {
  margin-left: var(--sidebar);
  min-height: 100vh;
}
.app-topbar {
  height: 69px;
  padding: 0 35px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 16px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 11px;
  color: var(--faint);
}
.breadcrumb b {
  font-weight: 500;
  color: var(--text-2);
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.demo-chip {
  font-size: 10px;
  color: var(--accent-text);
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 8px;
  background: var(--surface-2);
}
.demo-chip i {
  width: 5px;
  height: 5px;
  background: var(--accent-mid);
  border-radius: 50%;
}
.topbar-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
}
.topbar-search {
  font-size: 11px;
  border: 0;
  background: transparent;
  gap: 9px;
  color: var(--muted);
}
.topbar-search kbd {
  font-family: inherit;
  font-size: 9px;
  border: 1px solid var(--line);
  padding: 2px 4px;
  border-radius: 3px;
  color: var(--faint);
}
.notification-button {
  position: relative;
}
.notification-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--warn-mid);
  right: 7px;
  top: 6px;
  border-radius: 50%;
}
.mobile-menu {
  display: none;
}
.drawer-close {
  display: none;
}
.page-content {
  max-width: 1640px;
  margin: 0 auto;
  padding: 34px 35px 100px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.page-heading .eyebrow {
  margin-bottom: 9px;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.page-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.scan-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 8px 7px 16px;
  gap: 13px;
  box-shadow: 0 2px 4px color-mix(in srgb, var(--shadow) 1%, transparent);
  margin-bottom: 26px;
}
.scan-icon {
  color: var(--faint);
}
.scan-bar input {
  border: 0;
  background: none;
  outline: none;
  flex: 1;
  min-width: 0;
  height: 33px;
  font-size: 12px;
}
.scan-bar input:focus {
  outline: 0;
}
.scan-bar input::placeholder {
  color: var(--faint);
}
.scan-bar .scan-shortcut {
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 9px;
  color: var(--faint);
  padding: 2px 4px;
}
.scan-bar .btn {
  min-height: 35px;
  padding: 7px 17px;
}
.catalog-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 19px;
  gap: 12px;
}
.type-tabs {
  display: flex;
  gap: 26px;
}
.type-tab {
  height: 43px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 0 0 13px;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.type-tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.type-tab span {
  font-size: 9px;
  color: var(--faint);
  background: var(--surface-3);
  padding: 2px 5px;
  border-radius: 3px;
}
.type-tab.active span {
  background: var(--surface-3);
  color: var(--accent-text);
}
.catalog-sync {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  padding-bottom: 12px;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
}
.filter-control {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 10px;
  max-width: 150px;
}
.filter-search {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 5px;
  padding: 0 9px;
  color: var(--faint);
}
.filter-search input {
  width: 140px;
  border: 0;
  outline: 0;
  background: none;
  font-size: 10px;
  color: var(--muted);
}
.view-toggle {
  display: flex;
  background: var(--surface-3);
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  gap: 2px;
}
.view-toggle button {
  height: 26px;
  width: 29px;
  border-radius: 3px;
}
.view-toggle .active {
  background: var(--surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow) 5%, transparent);
  color: var(--accent-text);
}
.selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 10px;
  color: var(--faint);
}
.selection-summary label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.selection-summary input {
  width: 13px;
  height: 13px;
  margin: 0;
}
.selection-summary .sort-control {
  border: none;
  background: transparent;
  font-size: 10px;
  color: var(--muted);
  max-width: 140px;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 18px;
}
.asset-card {
  min-width: 0;
  position: relative;
  animation: fade-in 0.4s both;
}
.asset-card:nth-child(2) {
  animation-delay: 30ms;
}
.asset-card:nth-child(3) {
  animation-delay: 60ms;
}
.asset-card:nth-child(4) {
  animation-delay: 90ms;
}
.asset-preview {
  position: relative;
  aspect-ratio: 1.57;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-3);
  cursor: pointer;
  outline: 1px solid color-mix(in srgb, var(--accent) 3%, transparent);
  transition: box-shadow 0.18s;
}
.asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.45s ease,
    filter 0.2s;
}
.asset-card:hover .asset-preview img {
  transform: scale(1.035);
}
.asset-preview:after {
  content: "";
  position: absolute;
  inset: 50% 0 0;
  background: linear-gradient(transparent, color-mix(in srgb, var(--stage) 40%, transparent));
  pointer-events: none;
}
.asset-card.selected .asset-preview {
  box-shadow: 0 0 0 2px var(--accent);
  outline: 0;
}
.asset-card.selected .asset-preview img {
  filter: brightness(0.88);
}
.asset-check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.15s;
  accent-color: var(--accent);
}
.asset-card:hover .asset-check,
.asset-card.selected .asset-check,
.asset-check:focus-visible {
  opacity: 1;
}
.asset-top-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 9px;
  padding: 4px 6px;
  border-radius: 4px;
  background: #ffffffed;
  color: var(--accent-text);
  display: flex;
  align-items: center;
  gap: 3px;
  backdrop-filter: blur(6px);
}
.asset-top-badge.locked {
  background: color-mix(in srgb, var(--surface-2) 93%, transparent);
  color: var(--warn-text);
}
.asset-kind {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--on-media);
  font-size: 9px;
  font-weight: 500;
  text-shadow: 0 1px 2px color-mix(in srgb, var(--shadow) 20%, transparent);
}
.asset-duration {
  position: absolute;
  right: 9px;
  bottom: 9px;
  background: color-mix(in srgb, var(--stage) 44%, transparent);
  padding: 3px 5px;
  font-size: 9px;
  color: var(--on-media);
  border-radius: 3px;
  z-index: 2;
  backdrop-filter: blur(5px);
}
.asset-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffffcf;
  color: var(--accent-text);
  opacity: 0;
  z-index: 2;
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
}
.asset-card:hover .asset-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.asset-title-line {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 0 5px;
}
.asset-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: -0.1px;
  flex: 1;
  border: 0;
  background: none;
  display: block;
  text-align: left;
  padding: 0;
}
.asset-title:hover {
  color: var(--green);
}
.asset-favorite {
  width: 22px;
  height: 22px;
  opacity: 0;
  color: var(--faint);
  background: transparent;
  border: 0;
  padding: 2px;
}
.asset-card:hover .asset-favorite,
.asset-favorite.is-favorite {
  opacity: 1;
}
.asset-favorite.is-favorite {
  color: var(--warn-text);
}
.asset-favorite.is-favorite svg {
  fill: color-mix(in srgb, var(--warn-mid) 9%, transparent);
}
.asset-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--faint);
  line-height: 1.5;
}
.site-dot {
  width: 12px;
  height: 12px;
  display: inline-grid;
  place-items: center;
  font-size: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--accent-text);
  font-weight: 700;
}
.asset-meta .meta-spacer {
  margin-left: auto;
}
.asset-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
}
.asset-tags span {
  font-size: 8px;
  color: var(--faint);
  background: var(--surface-3);
  border-radius: 3px;
  padding: 3px 5px;
}
.asset-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}
.asset-list .asset-card {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) 160px 110px;
  gap: 20px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.asset-list .asset-preview {
  width: 130px;
  height: 77px;
  aspect-ratio: auto;
}
.asset-list .asset-title-line {
  padding: 0;
}
.asset-list .asset-meta {
  flex-wrap: wrap;
}
.asset-list .asset-tags {
  margin: 0;
}
.asset-list .asset-check {
  opacity: 1;
}
.asset-list .asset-top-badge {
  font-size: 8px;
  top: 6px;
  right: 6px;
}
.asset-list .asset-kind {
  bottom: 6px;
  left: 6px;
}
.catalog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  margin-top: 29px;
  padding-top: 17px;
}
.catalog-footer span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.catalog-footer button {
  font-size: 10px;
}
.batch-bar {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar) + (100vw - var(--sidebar)) / 2);
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 35px color-mix(in srgb, var(--shadow) 13%, transparent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  z-index: 20;
  animation: batch-in 0.2s ease;
  white-space: nowrap;
}
.batch-bar .batch-count {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 7px;
}
.batch-bar .batch-count strong {
  font-weight: 650;
  color: var(--green);
}
.batch-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}
.batch-clear {
  font-size: 11px;
  color: var(--faint);
  border: 0;
  background: none;
  padding: 8px;
}
.page-transition {
  animation: fade-in 0.2s ease;
}
.scan-progress {
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 14px 17px;
  border-radius: 8px;
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--accent-text);
}
.scan-progress .spin {
  animation: spin 1.8s linear infinite;
}
.scan-progress small {
  margin-left: auto;
  font-size: 10px;
  color: var(--faint);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--stage) 27%, transparent);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  animation: fade-in 0.18s ease;
}
.modal {
  background: var(--surface);
  border: 1px solid #fff6;
  box-shadow: 0 20px 80px color-mix(in srgb, var(--shadow) 14%, transparent);
  border-radius: 13px;
  width: 550px;
  max-height: 90vh;
  overflow: auto;
  animation: modal-in 0.2s ease;
  position: relative;
}
.modal-wide {
  width: 790px;
}
.modal-header {
  padding: 23px 25px 19px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.modal-header h2 {
  font-size: 18px;
}
.modal-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.modal-body {
  padding: 23px 25px;
}
.modal-footer {
  padding: 17px 25px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--surface-2);
}
.modal-footer .hint {
  margin-right: auto;
}
.modal .field:last-child {
  margin-bottom: 0;
}
.modal .input {
  height: 42px;
}
.field-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 6px;
  color: var(--muted);
  padding: 12px 13px;
  font-size: 11px;
  line-height: 1.7;
  margin-top: 18px;
}
.modal-info svg {
  margin-top: 2px;
}
.scan-options {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
  color: var(--muted);
}
.scan-options label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.detail-preview {
  position: relative;
  aspect-ratio: 1.95;
  overflow: hidden;
  background: var(--surface-3);
}
.detail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-preview .detail-label {
  position: absolute;
  bottom: 16px;
  left: 20px;
  background: #fffd;
  padding: 5px 9px;
  font-size: 10px;
  border-radius: 4px;
}
.detail-watermark {
  position: absolute;
  bottom: 18px;
  right: 22px;
  letter-spacing: 2px;
  font-size: 14px;
  color: var(--on-media);
  opacity: 0.7;
  text-shadow: 0 1px 3px color-mix(in srgb, var(--shadow) 33%, transparent);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin: 0 0 20px;
}
.detail-grid dt {
  font-size: 10px;
  color: var(--faint);
  margin-bottom: 6px;
}
.detail-grid dd {
  font-size: 12px;
  margin: 0;
  color: var(--text-2);
}
.detail-version {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
}
.detail-version span:last-child {
  margin-left: auto;
  color: var(--faint);
  font-size: 10px;
}
.detail-tags {
  display: flex;
  gap: 5px;
}
.detail-tags span {
  background: var(--surface-3);
  color: var(--accent-text);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
}
.detail-tags input {
  font-size: 11px;
  max-width: 260px;
}
.version-switch {
  display: flex;
  gap: 4px;
  background: var(--surface-3);
  border-radius: 5px;
  padding: 3px;
}
.version-switch button {
  border: 0;
  background: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--accent-text);
}
.version-switch button.active {
  background: var(--surface);
  color: var(--green);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--shadow) 5%, transparent);
}
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 12px;
}
.history-list li svg {
  color: var(--accent-text);
}
.history-list li span {
  flex: 1;
}
.history-list li time {
  color: var(--faint);
  font-size: 10px;
}
.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 100;
  padding: 13px 17px;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 8px 35px color-mix(in srgb, var(--shadow) 13%, transparent);
  color: var(--accent-text);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.6;
  animation: modal-in 0.2s ease;
}
.toast svg {
  margin-top: 2px;
}
.toast.error {
  color: var(--warn-text);
  border-color: var(--warn-line);
}
.keyboard-hint {
  font-size: 10px;
  color: var(--faint);
}
.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
}
.tour-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tour-step {
  display: flex;
  gap: 12px;
}
.tour-step > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border-radius: 50%;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--accent-text);
}
.tour-step h3 {
  font-size: 13px;
  margin-bottom: 5px;
}
.tour-step p {
  font-size: 11px;
  color: var(--faint);
}
.mobile-nav-backdrop {
  display: none;
}
.prototype-note {
  font-size: 10px;
  line-height: 1.6;
  color: var(--faint);
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 25px;
}
.form-error {
  font-size: 11px;
  color: var(--warn-text);
  padding-top: 7px;
  min-height: 5px;
}
.empty-filter-icon {
  width: 52px;
  height: 52px;
  background: var(--surface-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-mid);
}
.library-collections {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow: auto;
}
.collection-tab {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  gap: 7px;
  font-size: 11px;
}
.collection-tab.active {
  color: var(--accent-text);
  border-color: var(--accent-line);
  background: var(--surface-3);
}
.collection-tab span {
  font-size: 9px;
  opacity: 0.7;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes batch-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  .page-content {
    padding-top: 42px;
  }
  .asset-grid {
    gap: 30px 23px;
  }
  .asset-preview {
    aspect-ratio: 1.65;
  }
  .asset-title {
    font-size: 13px;
  }
  .asset-meta {
    font-size: 10px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 205px;
  }
  .app-sidebar {
    padding: 25px 12px 15px;
  }
  .page-content {
    padding: 28px 25px 100px;
  }
  .app-topbar {
    padding: 0 25px;
  }
  .asset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filter-bar {
    flex-wrap: wrap;
  }
  .catalog-sync {
    display: none;
  }
  .filter-search {
    margin-left: auto;
  }
  .asset-list .asset-card {
    grid-template-columns: 120px minmax(120px, 1fr) 130px;
  }
  .asset-list .asset-tags {
    display: none;
  }
  .page-heading-actions .btn {
    font-size: 11px;
  }
}
@media (max-width: 900px) {
  :root {
    --sidebar: 180px;
  }
  .brand {
    padding: 0 7px;
  }
  .brand strong {
    font-size: 19px;
  }
  .nav-item {
    padding: 0 10px;
    font-size: 11px;
    gap: 9px;
  }
  .nav-caption {
    margin-left: 10px;
  }
  .workspace-switch {
    font-size: 10px;
    padding: 10px 6px;
  }
  .workspace-switch > span:nth-child(2) {
    font-size: 10px;
  }
  .page-content {
    padding: 25px 20px 100px;
  }
  .app-topbar {
    padding: 0 20px;
  }
  .topbar-search {
    display: none;
  }
  .topbar-actions {
    gap: 9px;
  }
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-search {
    order: 2;
    margin-left: 0;
    flex: 1;
  }
  .filter-search input {
    width: 100%;
  }
  .view-toggle {
    margin-left: auto;
  }
  .type-tabs {
    gap: 21px;
  }
  .scan-shortcut {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .page-heading-actions {
    gap: 6px;
  }
  .page-heading-actions .btn {
    padding: 8px 10px;
  }
  .page-heading-actions .secondary-label {
    display: none;
  }
  .page-heading p {
    max-width: 300px;
  }
  .filter-control {
    max-width: 120px;
  }
  .asset-list .asset-card {
    grid-template-columns: 100px minmax(100px, 1fr);
    gap: 12px;
  }
  .asset-list .asset-preview {
    width: 100px;
    height: 65px;
  }
  .asset-list .asset-meta {
    grid-column: 2;
    grid-row: 2;
  }
  .asset-list .asset-preview {
    grid-row: span 2;
  }
  .asset-list .asset-duration,
  .asset-list .asset-kind {
    display: none;
  }
}
@media (max-width: 650px) {
  :root {
    --sidebar: 0px;
  }
  .app-sidebar {
    width: min(285px, 85vw);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.2s, visibility 0.2s;
  }
  .nav-open .app-sidebar {
    visibility: visible;
    transform: translateX(0);
  }
  body.nav-open { overflow: hidden; }
  .drawer-close {
    position: absolute;
    right: 10px;
    top: 18px;
    display: inline-flex;
    width: 42px;
    height: 42px;
  }
  .nav-item { min-height: 44px; font-size: 13px; }
  .nav-open .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--stage) 36%, transparent);
    z-index: 25;
  }
  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 22;
    height: 58px;
    padding: 0 17px;
    gap: 10px;
  }
  .mobile-menu {
    display: inline-flex;
    width: 40px;
    height: 40px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb > span,
  .breadcrumb > svg {
    display: none;
  }
  .topbar-actions {
    gap: 8px;
  }
  .topbar-divider {
    display: none;
  }
  .demo-chip {
    font-size: 9px;
    padding: 4px 6px;
  }
  .page-content {
    padding: 25px 17px 105px;
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
    margin-bottom: 6px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: none;
  }
  .page-heading-actions {
    padding-top: 0;
    justify-content: flex-start;
  }
  .page-heading-actions:empty { display: none; }
  .page-heading-actions .secondary-label { display: inline; }
  .page-heading-actions > .btn {
    padding: 8px 11px;
    font-size: 12px;
    min-height: 40px;
  }
  .scan-bar {
    padding-left: 11px;
    gap: 8px;
    margin-bottom: 21px;
  }
  .scan-bar input {
    font-size: 11px;
  }
  .scan-bar .btn {
    font-size: 10px;
    padding: 6px 11px;
    gap: 5px;
  }
  .scan-bar .btn svg {
    width: 14px;
  }
  .type-tabs {
    gap: 21px;
  }
  .type-tab {
    font-size: 11px;
    gap: 5px;
  }
  .type-tab svg {
    width: 14px;
  }
  .filter-bar {
    gap: 7px;
  }
  .filter-control {
    flex: 1 1 40%;
    max-width: none;
    min-width: 0;
    height: 38px;
    font-size: 12px;
    padding: 0 8px;
  }
  .filter-search {
    flex-basis: 65%;
  }
  .asset-grid {
    gap: 21px 12px;
  }
  .asset-preview {
    aspect-ratio: 1.3;
  }
  .asset-title {
    font-size: 11px;
  }
  .asset-title-line {
    padding-top: 10px;
  }
  .asset-meta {
    font-size: 8px;
    gap: 4px;
  }
  .asset-meta .meta-spacer {
    display: none;
  }
  .asset-tags span {
    font-size: 7px;
  }
  .asset-check {
    opacity: 1;
    width: 15px;
    height: 15px;
    top: 8px;
    left: 8px;
  }
  .asset-top-badge {
    font-size: 7px;
    top: 8px;
    right: 7px;
    padding: 3px 4px;
  }
  .asset-top-badge svg {
    width: 9px;
    height: 9px;
  }
  .asset-kind {
    bottom: 7px;
    left: 7px;
    font-size: 8px;
  }
  .asset-kind svg {
    width: 11px;
    height: 11px;
  }
  .asset-duration {
    font-size: 8px;
    bottom: 7px;
    right: 6px;
    padding: 2px 3px;
  }
  .asset-favorite {
    display: none;
  }
  .asset-play {
    display: none;
  }
  .selection-summary {
    font-size: 9px;
  }
  .catalog-footer {
    font-size: 9px;
    gap: 10px;
  }
  .catalog-footer > span:last-child {
    display: none;
  }
  .batch-bar {
    flex-wrap: wrap;
    bottom: max(12px, env(safe-area-inset-bottom));
    gap: 7px;
    padding: 8px 9px;
    width: calc(100% - 24px);
    justify-content: space-between;
    border-radius: 8px;
  }
  .batch-bar .batch-count {
    font-size: 10px;
    gap: 3px;
  }
  .batch-bar .batch-count svg {
    width: 14px;
  }
  .batch-bar .btn {
    font-size: 12px;
    padding: 7px 9px;
    min-height: 38px;
    gap: 4px;
  }
  .batch-bar .btn svg {
    width: 14px;
  }
  .batch-clear {
    font-size: 10px;
    padding: 7px 2px;
  }
  .batch-divider {
    display: none;
  }
  .modal-backdrop {
    padding: 12px;
    align-items: center;
  }
  .modal {
    max-height: 92vh;
    border-radius: 10px;
  }
  .modal-header {
    padding: 20px 18px 16px;
  }
  .modal-body {
    padding: 19px 18px;
  }
  .modal-footer {
    padding: 14px 18px;
    flex-wrap: wrap;
  }
  .modal-header h2 {
    font-size: 17px;
  }
  .modal-header p {
    font-size: 11px;
  }
  .modal-footer .hint {
    flex-basis: 100%;
  }
  .field-inline {
    gap: 10px;
  }
  .modal-info {
    font-size: 10px;
  }
  .detail-preview {
    aspect-ratio: 1.6;
  }
  .detail-grid {
    gap: 14px;
  }
  .toast {
    right: 12px;
    left: 12px;
    bottom: 16px;
    font-size: 11px;
    max-width: none;
  }
  .detail-tags {
    flex-wrap: wrap;
  }
  .detail-tags input {
    max-width: 180px;
  }
  .library-collections {
    gap: 6px;
  }
  .collection-tab {
    padding: 9px 12px;
    font-size: 10px;
    flex-shrink: 0;
  }
  .prototype-note {
    align-items: flex-start;
    font-size: 9px;
  }
  .type-tab span {
    font-size: 8px;
  }
  .scan-progress {
    font-size: 11px;
    padding: 12px;
    gap: 8px;
  }
  .scan-progress small {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
