@charset "UTF-8";

:root {
  color-scheme: dark;
  --background: #000000;
  --sidebar: var(--background);
  --surface: #0c0c0c;
  --control: #141414;
  --surface-hover: #222222;
  --border-subtle: #222222;
  --border: #303030;
  --text: #f0f0f0;
  --secondary: #b0b0b0;
  --muted: #969696;
  --radius: 8px;
  --sidebar-width: 224px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,255,255,.1);
}
button { color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.download-button:disabled:hover { background: transparent; color: inherit; border-color: transparent; }
.test-preview-note, .test-file-note { color: #9a9a9a; font-size: 14px; line-height: 1.7; }
.test-preview-note { margin: -8px 0 20px; }
.test-file-note { margin: 16px 0; }
.attachment-size { color: #9a9a9a; white-space: nowrap; }
a { color: inherit; text-decoration: none; }
input, select, textarea { min-width: 0; }
:focus-visible { outline: 2px solid #eeeeee; outline-offset: 3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
::selection { background: #d4d4d4; color: #111111; }
[hidden] { display: none !important; }
h1, h2 { text-wrap: balance; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  transform: translateY(-160%); padding: 12px 16px;
  background: #eeeeee; color: #111111; border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Navigation: one category entry per destination. */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  width: var(--sidebar-width); display: flex; flex-direction: column;
  padding: 0 16px; border-right: 1px solid var(--border-subtle);
  background: var(--sidebar); overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  height: 88px; flex-shrink: 0; margin: 0 12px 24px;
  font-size: 20px; font-weight: 600; letter-spacing: .5px;
}
.brand .icon { width: 24px; height: 24px; }
.nav-label { margin: 0 12px 12px; color: var(--muted); font-size: 12px; }
.nav-primary, .collections { display: grid; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 44px; padding: 0 12px; border-radius: 6px;
  color: var(--secondary); text-align: left;
  transition: background-color .15s, color .15s;
}
.nav-item:hover { background: #222222; color: #ffffff; }
.nav-item.active { background: #1c1c1c; color: #ffffff; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item small { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item.active small { color: #d2d2d2; }
.nav-divider { height: 1px; background: #2a2a2a; margin: 16px 12px; }
.collection-heading { margin-top: 36px; }
.collection-dot { width: 6px; height: 6px; margin: 0 6px; border-radius: 2px; background: #a0a0a0; }
.sidebar-bottom {
  display: flex; align-items: center; gap: 10px;
  margin-top: auto; padding: 24px 12px; color: var(--muted); font-size: 12px;
}
.sidebar-bottom .icon { width: 16px; height: 16px; }

/* Page hierarchy and tools. */
main { margin-left: var(--sidebar-width); min-height: 100vh; scroll-margin-top: 16px; }
.topbar {
  height: 72px; padding: 0 24px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--background);
}
.breadcrumb { color: var(--secondary); font-size: 13px; }
.searchbox {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto; width: 320px; height: 40px; padding: 0 12px;
  border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--surface);
  color: var(--muted);
}
.searchbox:focus-within { border-color: #b5b5b5; outline: 1px solid #b5b5b5; }
.searchbox .icon { width: 18px; height: 18px; }
.searchbox input { width: 100%; border: 0; background: transparent; color: var(--text); font-size: 13px; }
.searchbox input:focus-visible { outline: none; }
.searchbox input::placeholder { color: var(--muted); }
.searchbox kbd { font-family: inherit; font-size: 12px; line-height: 20px; min-width: 20px; text-align: center; border: 1px solid #444444; border-radius: 3px; }
.icon-button {
  display: inline-flex; justify-content: center; align-items: center;
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 6px;
  color: var(--secondary); transition: background-color .15s, color .15s;
}
.icon-button:hover { background: var(--surface-hover); color: #ffffff; }
.help-button { font-size: 18px; }
.menu-button { display: none; }
.content { width: 100%; padding: 24px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
h1 { margin: 0; font-size: 26px; line-height: 36px; font-weight: 600; letter-spacing: -.3px; }
.primary-button, .secondary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  transition: background-color .15s, border-color .15s, color .15s;
}
.primary-button { color: #171717; background: #eeeeee; border-color: #eeeeee; }
.primary-button:hover { background: #ffffff; border-color: #ffffff; }
.primary-button .icon { width: 18px; height: 18px; }
.secondary-button { color: #e0e0e0; background: var(--control); border-color: var(--border); }
.secondary-button:hover { background: #333333; border-color: #666666; }
.category-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -4px 0 20px; border-bottom: 1px solid var(--border-subtle); }
.category-tabs { display: flex; align-items: center; gap: 24px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.category-tab { position: relative; min-height: 48px; flex-shrink: 0; padding: 0 2px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.category-tab:hover { color: var(--text); }
.category-tab.active { color: #ffffff; }
.category-tab.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: #eeeeee; border-radius: 2px; }
.category-tab:focus-visible { outline-offset: -4px; }
.language-buttons { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.language-button { min-height: 40px; padding: 8px 14px; border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--secondary); background: var(--surface); font-size: 13px; white-space: nowrap; }
.language-button:hover { color: var(--text); border-color: #444444; }
.language-button.active { color: #ffffff; background: #242424; border-color: #555555; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.browse-tools, .view-tools { display: flex; align-items: center; gap: 16px; min-width: 0; }
.toolbar-divider { height: 16px; width: 1px; background: #333333; }
.result-count { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sort-label { position: relative; display: flex; align-items: center; }
.sort-label select {
  appearance: none; min-height: 40px; padding: 8px 28px 8px 12px;
  border: 1px solid transparent; border-radius: 6px;
  color: var(--secondary); background: var(--background); cursor: pointer; font-size: 13px;
}
.sort-label select:hover { background: #222222; }
.sort-label .icon { pointer-events: none; position: absolute; right: 8px; width: 14px; height: 14px; color: var(--muted); }
select option { background: #222222; color: #eeeeee; }
.view-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; }
.view-switch button { display: grid; place-items: center; width: 32px; height: 32px; color: #a0a0a0; border-radius: 3px; }
.view-switch button:hover { color: #ffffff; }
.view-switch button.active { color: #ffffff; background: var(--surface-hover); }
.view-switch .icon { width: 16px; height: 16px; }

/* Media cards: preview, title, description, download. */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,320px),1fr)); gap: 20px; }
.asset-card {
  min-width: 0; background: var(--surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  transition: border-color .15s;
}
.asset-card:hover { border-color: #4a4a4a; }
.asset-media {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  border-radius: 7px 7px 0 0; background: #202020;
}
.media-open { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; }
.media-open:focus-visible { outline-offset: -4px; }
.media-open img, .media-open video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-open video { opacity: 0; pointer-events: none; }
.media-open video.cover-video, .media-open video.playing { opacity: 1; }
.file-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; background: #111111; color: #bdbdbd; }
.file-art .icon { width: 40px; height: 40px; }
.file-art strong { font-size: 36px; line-height: 1; font-weight: 500; }
.file-art span { font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.font-card-art { padding: 24px; color: var(--text); }
.font-card-art strong { max-width: 100%; font-size: 30px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.font-preview { width: 100%; padding: 24px; text-align: center; }
.font-variant-control { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; font-size: 14px; color: var(--secondary); }
.font-variant-control select { max-width: 100%; min-height: 40px; padding: 0 36px 0 12px; background: var(--control); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.font-preview-sample { min-height: 120px; padding: 20px; font-size: clamp(32px,4vw,56px); line-height: 1.6; color: var(--text); overflow-wrap: anywhere; border-radius: 6px; }
.font-preview-sample:focus-visible { outline: 1px solid var(--secondary); outline-offset: 4px; }
.font-preview p { margin-top: 20px; color: var(--muted); font-size: 13px; }
.file-preview { text-align: center; padding: 40px 20px; color: var(--secondary); }
.file-preview>.icon { width: 64px; height: 64px; color: #d0d0d0; }
.file-preview h3 { font-size: 20px; font-weight: 500; }
.file-preview p { font-size: 13px; }
.duration {
  position: absolute; bottom: 12px; right: 12px; pointer-events: none;
  padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.7);
  color: #eeeeee; font-size: 11px; line-height: 18px; font-variant-numeric: tabular-nums;
}
.card-favorite {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid #ffffff33; border-radius: 6px; background: #171717cc;
  color: #e0e0e0; opacity: 0; transition: opacity .15s, background-color .15s;
}
.card-favorite .icon { width: 17px; height: 17px; }
.card-favorite.active, .asset-card:hover .card-favorite, .asset-card:focus-within .card-favorite { opacity: 1; }
.card-favorite:hover { background: #3c3c3c; color: #ffffff; }
.card-favorite.active .icon { fill: #eeeeee; }
.center-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  display: grid; place-items: center; width: 38px; height: 38px;
  background: #080808bd; border: 1px solid #ffffff30; border-radius: 10px;
  color: #ffffff; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.center-play .icon { width: 18px; height: 18px; }
.media-open:focus-visible .center-play { opacity: 1; }
.card-body { display: flex; align-items: center; gap: 16px; padding: 16px; }
.card-copy { flex: 1; min-width: 0; }
.card-title {
  display: block; max-width: 100%; padding: 0; color: #eeeeee; text-align: left;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 14px; font-weight: 500; line-height: 24px;
}
.card-title:hover { color: #ffffff; text-decoration: none; }
.card-copy p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; min-height: 40px; margin: 6px 0 0;
  color: #a3a3a3; font-size: 12px; line-height: 20px; overflow-wrap: anywhere;
}
.video-resource-card .card-body { min-height: 80px; padding: 16px; gap: 16px; }
.video-resource-card .card-title { line-height: 22px; }
.video-resource-card .card-copy p {
  display: block; min-height: 0; margin: 6px 0 0; line-height: 20px; color: #858585;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.download-button {
  display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 6px; color: #dddddd; background: var(--control);
  transition: background-color .15s, color .15s, border-color .15s;
}
.download-button .icon { width: 18px; height: 18px; }
.download-button:hover { color: #111111; background: #eeeeee; border-color: #eeeeee; }
.empty-state { text-align: center; padding: 72px 24px; border: 1px dashed #424242; border-radius: var(--radius); }
.empty-state>.icon { width: 36px; height: 36px; color: var(--muted); }
.empty-state h2 { font-size: 18px; font-weight: 500; margin: 16px 0 8px; }
.empty-state p { font-size: 13px; color: var(--secondary); margin-bottom: 24px; }
.asset-grid.list-view { grid-template-columns: 1fr; gap: 16px; }
.list-view .asset-card { display: flex; align-items: center; }
.list-view .asset-media { width: 224px; flex-shrink: 0; border-radius: 7px 0 0 7px; }
.list-view .card-body { flex: 1; min-width: 0; padding: 16px 24px; }
.list-view .card-copy p { min-height: 0; }

/* Dialogs and editing states. */
dialog {
  max-height: 90vh; max-height: 90dvh; padding: 24px; overflow: auto; overscroll-behavior: contain;
  border: 1px solid #444444; border-radius: 12px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 72px #00000066;
}
dialog::backdrop { background: #000000b3; }
.import-dialog { width: min(520px,calc(100% - 32px)); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dialog-header h2 { margin: 0; font-size: 20px; font-weight: 600; }
.import-modes { display: flex; gap: 6px; margin: -8px 0 20px; }
.import-modes button { min-height: 40px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; color: var(--secondary); background: var(--control); font-size: 13px; }
.import-modes button.active { color: #ffffff; background: #242424; border-color: #555555; }
#localPathPanel .field-label { margin-top: 0; }
#localPathInput { font-family: "Consolas","Microsoft YaHei",monospace; }
.local-file-note { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.audio-progress-track { display: block; height: 3px; width: 100%; background: currentColor; border-radius: 3px; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 32px 16px; border: 1px dashed #666666; border-radius: var(--radius); background: var(--control); cursor: pointer;
}
.dropzone:hover, .dropzone.dragover { background: #2c2c2c; border-color: #aaaaaa; }
.dropzone:focus-within { outline: 2px solid #eeeeee; outline-offset: 3px; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-circle { display: grid; place-items: center; width: 40px; height: 40px; color: #dddddd; }
.upload-circle .icon { width: 24px; height: 24px; }
.dropzone strong { font-size: 14px; font-weight: 500; }
.dropzone>span:last-child { color: var(--secondary); font-size: 12px; }
.selected-files { max-height: 140px; overflow: auto; margin-top: 12px; color: var(--secondary); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.classification-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.classification-fields label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; color: var(--secondary); }
.classification-fields select { width: 100%; min-height: 40px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--control); }
.import-classification { margin-top: 20px; }
.editor-classification { margin-top: 14px; }
.asset-classification { margin: 0; color: var(--muted); font-size: 12px; }
.field-label { display: block; margin-top: 24px; font-size: 13px; }
.field-label>span { margin-left: 8px; font-size: 12px; color: var(--muted); }
textarea, .edit-title {
  width: 100%; display: block; margin-top: 8px; padding: 10px 12px;
  border: 1px solid #505050; border-radius: 6px; background: var(--control); color: var(--text);
  line-height: 1.6; font-size: 13px; resize: vertical;
}
textarea::placeholder { color: var(--muted); }
.privacy-note { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 16px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.preview-dialog { width: min(1220px,calc(100% - 48px)); padding: 0; border-color: var(--border); }
.preview-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 6px 20px; border-bottom: 1px solid #242424; }
.preview-top h2 { margin: 0; font-size: 13px; font-weight: 500; color: var(--secondary); }
.preview-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,30%); }
.preview-layout-resources { grid-template-columns: minmax(0,1fr) minmax(340px,39%); }
.preview-dialog:has(.preview-layout-resources) { width: min(1360px,calc(100% - 48px)); }
.preview-player { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 280px; padding: 16px; background: var(--background); }
.preview-player video, .preview-player img { display: block; width: 100%; max-height: 68dvh; object-fit: contain; border-radius: 6px; }
.preview-player video { background: #000000; }
.preview-player-video { flex-direction: column; gap: 12px; }
.preview-player-video video { max-height: 65dvh; }
.video-tools { display: flex; width: 100%; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.video-tools-note { color: var(--muted); font-size: 12px; }
.video-tools-note:empty { display: none; }
.video-tools-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.video-tools-actions button { min-height: 36px; padding: 0 10px; font-size: 12px; }
.video-tools-actions .icon { width: 15px; height: 15px; }
.alpha-preview-note { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; font-size: 12px; color: var(--secondary); }
.alpha-preview-note span { width: 14px; height: 14px; border-radius: 2px; background: repeating-conic-gradient(#777 0% 25%,#a0a0a0 0% 50%) 0 0 / 8px 8px; }
@media (min-width: 761px) {
  .preview-layout:has(.preview-player-video), .preview-layout-resources:has(.preview-player > img) { min-height: min(74dvh, 680px); }
  .preview-layout .preview-player-video > video { margin-block: auto; }
}
.preview-layout-resources .preview-player-video { padding: 24px; gap: 16px; }
.preview-layout-resources .preview-details { gap: 16px; padding: 24px; }
.preview-layout-resources .video-tools { justify-content: flex-start; }
.preview-layout-resources .video-tools-actions { margin-left: 0; }
.preview-layout-resources .video-tools-actions button { min-height: 44px; }
.preview-layout-resources .video-tools-note { order: 1; }
.preview-layout-resources .asset-description { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.resource-download-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin-top: auto; padding-top: 16px; }
.resource-download-actions button { min-width: 0; min-height: 44px; padding: 10px 8px; }
.resource-download-actions .secondary-button { background: #242424; border-color: #383838; color: #d0d0d0; }
.resource-download-actions .secondary-button:hover { background: #333333; }
.resource-download-actions .icon { width: 17px; height: 17px; flex-shrink: 0; }
.resource-download-caption { min-width: 0; line-height: 1.5; text-align: center; white-space: normal; }
.download-plugin-caption { display: inline-block; white-space: nowrap; }
.preview-audio { width: 100%; padding: 16px; }
.preview-audio .seek-wave { height: 52px; margin-bottom: 16px; }
.preview-player audio { width: 100%; }
.preview-details { display: flex; flex-direction: column; min-width: 0; gap: 16px; padding: 20px; border-left: 1px solid #242424; }
.asset-overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.asset-overview-heading h3 { margin: 3px 0 0; font-size: 19px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.preview-edit { width: 32px; height: 32px; }
.preview-edit .icon { width: 16px; height: 16px; }
.asset-description { margin: 6px 0 0; color: var(--secondary); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 13px; }
.editor-label { display: block; margin-top: 10px; color: var(--secondary); font-size: 12px; }
.editor-label:first-child { margin-top: 0; }
.editor-actions, .remove-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.editor-error, #removeAttachmentError { margin: 8px 0 0; color: var(--secondary); font-size: 12px; }
.edit-title { margin-top: 0; font-size: 15px; font-weight: 500; }
.edit-title, .edit-description { margin-top: 4px; font-size: 13px; }
.edit-description { min-height: 72px; }
.detail-specs { display: flex; flex-wrap: wrap; gap: 3px 8px; margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.detail-specs span + span::before { content: '·'; margin-right: 8px; }
.related-assets { min-width: 0; border-top: 1px solid #262626; padding-top: 8px; }
.related-assets-downloads { padding: 16px; border: 1px solid #333; border-radius: 8px; background: #111; }
.related-assets-downloads:focus-visible { outline: 1px solid #929292; outline-offset: 3px; }
.related-assets-downloads .related-title h4 { font-size: 15px; font-weight: 600; }
.related-assets-downloads #attachmentList { gap: 16px; }
.related-assets-downloads .related-title { margin-bottom: 8px; }
.resource-group { display: grid; gap: 6px; min-width: 0; }
.resource-group h5 { margin: 0 0 2px; display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 12px; font-weight: 600; }
.resource-group h5 .icon { width: 15px; height: 15px; }
.resource-group h5 span { color: var(--muted); font-variant-numeric: tabular-nums; }
.resource-plugin-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 5px; background: #211b15; color: #e0c4a0; font-size: 12px; line-height: 1.5; }
.resource-plugin-note .icon { width: 15px; height: 15px; flex: 0 0 auto; }
.related-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.related-title h4 { margin: 0; font-size: 13px; font-weight: 500; }
.related-title button { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 6px; border-radius: 5px; color: var(--secondary); font-size: 12px; }
.related-title button .icon { width: 14px; height: 14px; }
.related-title button:hover { color: #ffffff; background: #222222; }
#attachmentList { display: grid; gap: 6px; }
.attachment-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; border: 1px solid var(--border-subtle); background: var(--control); border-radius: 6px; font-size: 12px; }
.attachment-row>span { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.attachment-row .attachment-size { display: block; margin-top: 2px; font-size: 11px; }
.external-resource-row { min-height: 52px; padding: 10px 12px; }
.external-resource-row:hover { border-color: #555555; background: #222222; }
.external-resource-row>.icon:last-child { width: 18px; height: 18px; color: var(--secondary); }
.related-assets-downloads .attachment-row { min-height: 48px; padding-block: 6px; font-size: 13px; }
.related-assets-downloads .attachment-row button:not(.attachment-remove) { width: 38px; height: 38px; }
.related-assets-downloads .attachment-row button:not(.attachment-remove) .icon { width: 18px; height: 18px; }
.attachment-row .icon { width: 15px; height: 15px; }
.attachment-row>.icon { color: var(--muted); }
.attachment-row button { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 5px; padding: 0; }
.attachment-row button:hover { background: #2e2e2e; }
.attachment-row .attachment-remove { position: absolute; z-index: 1; top: 0; left: 0; transform: translate(-30%,-30%); width: 22px; height: 22px; border: 1px solid #444444; border-radius: 50%; background: #111111; opacity: 0; pointer-events: none; transition: opacity .15s; }
.attachment-remove .icon { width: 12px; height: 12px; }
.attachment-row:hover .attachment-remove, .attachment-row:focus-within .attachment-remove { opacity: 1; pointer-events: auto; }
@media (hover: none) { .attachment-row .attachment-remove { position: static; transform: none; width: 32px; height: 32px; opacity: 1; pointer-events: auto; } }
.attachment-empty { margin: 2px 0; font-size: 12px; color: var(--muted); }
.preview-details>.primary-button { width: 100%; margin-top: auto; }
.remove-dialog { width: min(380px,calc(100% - 32px)); }
.remove-dialog h2 { margin: 0; font-size: 17px; }
.remove-dialog p { color: var(--secondary); overflow-wrap: anywhere; }
.help-dialog { width: min(480px,calc(100% - 32px)); }
.help-dialog p { font-size: 13px; line-height: 1.9; color: var(--secondary); }
.download-access-dialog { width: min(440px,calc(100% - 32px)); }
.download-access-dialog .dialog-header { margin-bottom: 16px; }
.download-access-dialog .field-label { margin-top: 20px; margin-bottom: 8px; }
.download-access-file { margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.download-access-dialog .edit-title { min-height: 44px; font-size: 16px; }
#downloadAccessNote { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 12px 0 0; }
#downloadAccessError { color: var(--text); font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
.help-shortcuts { padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--secondary); }
.help-shortcuts kbd { border: 1px solid #555555; border-radius: 3px; padding: 2px 6px; margin: 0 8px; }
.toast {
  position: fixed; left: calc(50% + 112px); bottom: 24px; z-index: 100;
  transform: translate(-50%,8px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 20px; text-align: center;
  border: 1px solid #666666; border-radius: 8px; background: #eeeeee; color: #161616;
  font-size: 13px; box-shadow: 0 8px 32px #00000040; transition: opacity .15s, transform .15s;
}
.toast.visible { opacity: 1; transform: translate(-50%,0); }

/* Audio is always a wide, directly seekable strip, including mixed views. */
.asset-card.audio-row, .list-view .asset-card.audio-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 36px minmax(160px,260px) minmax(100px,1fr) 88px 36px 36px;
  align-items: center; gap: 12px; padding: 10px 14px;
  min-height: 64px; border-radius: var(--radius);
}
.audio-row.is-playing { border-color: #454545; background: var(--control); }
.audio-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: var(--control); color: #eeeeee; border-radius: 9px;
  transition: background-color .15s;
}
.audio-toggle:hover, .audio-toggle[aria-pressed="true"] { background: #3a3a3a; }
.audio-toggle .icon { width: 18px; height: 18px; }
.audio-copy { min-width: 0; }
.audio-copy p { margin: 2px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #a3a3a3; font-size: 12px; line-height: 17px; }
.audio-time { color: #a3a3a3; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.audio-current { color: #dedede; }
.time-divider { color: #808080; margin: 0 3px; }
.audio-row .card-favorite {
  position: static; width: 36px; height: 36px; opacity: 1;
  border: 1px solid transparent; color: #a3a3a3; background: transparent;
}
.audio-row .card-favorite:hover { background: #303030; color: #ffffff; }
.audio-row .card-favorite.active { color: #eeeeee; }
.audio-row .download-button { width: 36px; height: 36px; }
.seek-wave {
  position: relative; height: 38px; min-width: 0; border-radius: 4px;
  cursor: default; touch-action: pan-y; user-select: none;
  --progress: 0%; --hover-at: 50%;
}
.wave-drawing, .wave-base, .wave-played { position: absolute; inset: 0; pointer-events: none; }
.wave-base, .wave-played { display: flex; align-items: center; }
.wave-base { color: #646464; }
.wave-played { color: #eeeeee; clip-path: inset(0 calc(100% - var(--progress)) 0 0); }
.seek-wave svg { width: 100%; height: 100%; max-height: 64px; fill: currentColor; }
.seek-wave:hover .wave-base { color: #858585; }
.wave-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.wave-cursor { position: absolute; top: 8px; bottom: 8px; left: clamp(0px,var(--progress),calc(100% - 1px)); width: 1px; background: #eeeeee; opacity: 0; pointer-events: none; }
.seek-wave:focus-visible .wave-cursor, .is-playing .wave-cursor { opacity: .8; }
.wave-hover-time { position: absolute; left: clamp(22px,var(--hover-at),calc(100% - 22px)); top: -16px; transform: translateX(-50%); padding: 2px 5px; border-radius: 3px; background: #eeeeee; color: #111111; font-size: 10px; font-variant-numeric: tabular-nums; opacity: 0; pointer-events: none; }
.seek-wave:hover .wave-hover-time:not(:empty) { opacity: 1; }

@media (max-width: 970px) {
  .asset-card.audio-row, .list-view .asset-card.audio-row {
    grid-template-columns: 40px minmax(0,1fr) 100px 40px 40px;
    gap: 4px 12px; padding: 8px 12px;
  }
  .audio-row .audio-toggle { grid-column: 1; grid-row: 1; }
  .audio-row .audio-copy { grid-column: 2; grid-row: 1; }
  .audio-row .audio-time { grid-column: 3; grid-row: 1; }
  .audio-row .audio-favorite { grid-column: 4; grid-row: 1; }
  .audio-row .download-button { grid-column: 5; grid-row: 1; }
  .audio-row .seek-wave { grid-column: 1 / -1; grid-row: 2; height: 34px; }
}
@media (max-width: 1150px) {
  :root { --sidebar-width: 208px; }
  .toast { left: calc(50% + 104px); }
}
@media (max-width: 760px) {
  .sidebar { width: 224px; transform: translateX(-100%); transition: transform .2s; box-shadow: 24px 0 64px #00000066; }
  .sidebar.open { transform: translateX(0); }
  main { margin-left: 0; }
  .menu-button { display: inline-flex; }
  .topbar { height: 64px; padding: 0 16px; gap: 8px; }
  .breadcrumb { display: none; }
  .searchbox { flex: 1; width: auto; margin-left: 0; }
  .searchbox kbd { display: none; }
  .icon-button { width: 44px; height: 44px; }
  .content { padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
  h1 { font-size: 24px; line-height: 32px; }
  .page-heading { gap: 16px; margin-bottom: 24px; }
  .category-bar { flex-wrap: wrap; gap: 8px; }
  .category-tabs { width: 100%; gap: 24px; }
  .primary-button, .secondary-button, .language-button { min-height: 44px; }
  .toolbar, .browse-tools, .view-tools { gap: 8px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar-divider { display: none; }
  .result-count { font-size: 12px; }
  .sort-label select { min-height: 44px; padding-left: 8px; font-size: 12px; }
  .view-switch button { width: 36px; height: 36px; }
  .asset-grid { gap: 16px; }
  .card-body { gap: 12px; padding: 16px; }
  .card-favorite { opacity: 1; width: 44px; height: 44px; }
  .download-button { width: 44px; height: 44px; }
  .preview-layout, .preview-layout-resources { grid-template-columns: minmax(0,1fr); }
  .preview-dialog:has(.preview-layout-resources) { width: calc(100% - 24px); }
  .preview-player { min-height: 200px; }
  .preview-details { border-left: 0; border-top: 1px solid var(--border); }
  .preview-layout-resources .preview-player-video { padding: 16px; }
  .preview-layout-resources .preview-details { padding: 20px 16px 32px; }
  .preview-dialog { width: calc(100% - 24px); max-height: 92dvh; }
  .attachment-row button { min-height: 36px; }
  .attachment-row .attachment-remove { min-height: 0; }
  .list-view .asset-media { width: 160px; }
  .list-view .card-body { padding: 16px; }
  .toast { left: 50%; }
}
@media (max-width: 560px) {
  .asset-grid { grid-template-columns: 1fr; }
  .asset-grid.list-view .asset-card { display: block; }
  .list-view .asset-media { width: 100%; border-radius: 7px 7px 0 0; }
  .card-copy p { min-height: 0; }
  .view-tools { margin-left: auto; }
  .asset-card.audio-row, .list-view .asset-card.audio-row {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 36px 40px;
    gap: 4px 8px; padding: 8px 12px;
  }
  .audio-row .audio-toggle, .audio-row .download-button { width: 40px; height: 40px; }
  .audio-row .audio-copy { grid-column: 2; }
  .audio-row .download-button { grid-column: 4; }
  .audio-row .audio-time { grid-column: 3 / 5; grid-row: 2; font-size: 11px; }
  .audio-row .audio-favorite { grid-column: 3; grid-row: 1; }
  .audio-row .seek-wave { grid-column: 1 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
