:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --ink: #20242a;
  --muted: #6f7782;
  --line: #dfe3e8;
  --panel: #ffffff;
  --accent: #1f6feb;
  --accent-2: #0f766e;
}

body.login-page {
  min-height: 100vh;
  background: #f3f5f8;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 380px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(32, 36, 42, 0.08);
}

.login-head {
  margin-bottom: 22px;
}

.login-head h1 {
  margin-bottom: 6px;
}

.login-head p {
  color: var(--muted);
}

.login-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #f2b8b5;
  border-radius: 6px;
  background: #fff4f2;
  color: #b42318;
}

.login-form {
  flex-direction: column;
  gap: 14px;
}

.login-form input,
.login-form button {
  width: 100%;
}

.login-form button {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 600;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

.topbar p,
.empty {
  color: var(--muted);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

a,
button {
  color: var(--accent);
}

nav a,
.tabs a,
.actions a,
.card-actions a,
button,
.button-link,
[data-dialog-close] {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  cursor: pointer;
}

nav a.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

main {
  padding: 24px 28px 40px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stats article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats article {
  padding: 18px;
}

.stats strong {
  display: block;
  font-size: 30px;
  line-height: 1.2;
}

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

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.module-card {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  text-decoration: none;
}

.module-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.module-card span {
  color: var(--muted);
}

.module-button {
  width: 100%;
  cursor: pointer;
}

.panel {
  margin-top: 18px;
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.split-grid.unframed {
  padding: 0;
  border-bottom: 0;
}

.embedded-panel {
  margin-top: 0;
}

.subtable {
  min-width: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions:not(td) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

td.actions {
  min-width: 200px;
  white-space: nowrap;
}

td.actions a,
td.actions form {
  margin-right: 6px;
}

.actions form {
  display: inline-flex;
}

.danger-button {
  color: #b42318;
  border-color: #f2b8b5;
}

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

.notice {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #eef8f6;
  color: #0f766e;
}

form {
  display: flex;
  gap: 8px;
}

label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
textarea {
  width: 260px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

select {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.config-table,
.crawl-entry-table {
  min-width: 980px;
}

.source-sites-table {
  min-width: 1160px;
}

.raw-items-table,
.projects-table {
  min-width: 1180px;
}

.review-table {
  min-width: 1240px;
  table-layout: auto;
}

.crawl-entry-table {
  min-width: 1200px;
  table-layout: auto;
}

.actions-col {
  width: 220px;
}

.source-sites-table .actions-col {
  width: 300px;
}

.source-sites-table td.actions {
  min-width: 300px;
}

.crawl-entry-table .actions-col {
  width: 300px;
}

.crawl-entry-table td.actions {
  min-width: 300px;
}

.review-actions-col {
  width: 460px;
}

.review-actions {
  min-width: 460px;
  white-space: normal;
}

.review-actions button,
.review-actions form {
  margin-bottom: 6px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #fbfcfd;
}

.id-col {
  width: 64px;
  max-width: 64px;
  white-space: nowrap;
}

.title-cell {
  width: 38%;
}

.candidate-title-col {
  width: 420px;
}

.candidate-title-cell {
  max-width: 420px;
}

.candidate-title-line {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-title-line + .candidate-title-line {
  margin-top: 6px;
  color: var(--accent-2);
}

.status {
  display: inline-block;
  min-width: 86px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e8f2ff;
  color: #174ea6;
  text-align: center;
}

.source-summary {
  position: relative;
  display: inline-block;
  cursor: help;
  border-bottom: 1px dotted var(--muted);
}

.source-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: none;
  width: max-content;
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px rgb(32 36 42 / 18%);
  white-space: normal;
}

.source-summary:hover .source-tooltip,
.source-summary:focus .source-tooltip {
  display: block;
}

.actions > button:first-child {
  color: #fff;
  border-color: var(--accent-2);
  background: var(--accent-2);
}

.form-panel,
.edit-grid,
.detail-form,
.asset-form {
  display: grid;
  gap: 12px;
}

.form-panel {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.edit-list {
  display: grid;
  gap: 0;
}

.edit-grid {
  grid-template-columns: 64px repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.source-grid,
.entry-grid {
  grid-template-columns: 64px repeat(5, minmax(140px, 1fr)) auto;
}

.form-panel.source-grid,
.form-panel.entry-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
}

.detail-form {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  padding: 16px;
}

.asset-form {
  padding: 12px;
}

.form-panel input,
.edit-grid input,
.detail-form input,
.asset-form input,
.form-panel select,
.edit-grid select,
.detail-form select,
.asset-form select,
.form-panel textarea,
.edit-grid textarea,
.detail-form textarea,
.asset-form textarea {
  width: 100%;
}

.span-2 {
  grid-column: span 2;
}

.record-id,
.form-note,
.meta-text {
  color: var(--muted);
  font-size: 13px;
}

.record-id {
  align-self: center;
  font-weight: 700;
}

.form-note,
.meta-text {
  grid-column: 1 / -1;
}

.checkbox-row {
  min-height: 36px;
  justify-content: center;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.is-required {
  color: #9a3412;
}

.block-empty {
  padding: 16px;
}

.wide-actions {
  min-width: 360px;
}

.error-cell {
  color: #9a3412;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-cell {
  color: var(--muted);
  display: -webkit-box;
  max-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.json-cell,
.path-text {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.detail-table th {
  width: 140px;
}

.content-block {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.content-block pre {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  color: #30343a;
  white-space: pre-wrap;
  word-break: break-word;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
}

.asset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.asset-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #eef1f5;
  border-bottom: 1px solid var(--line);
}

.asset-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: #eef1f5;
  color: var(--muted);
}

.asset-card dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 6px 10px;
  margin: 0;
  padding: 12px;
}

.asset-card dt {
  color: var(--muted);
}

.asset-card dd {
  margin: 0;
  min-width: 0;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 12px;
}

.candidate-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.compare-panel {
  margin-top: 0;
}

.compare-body {
  padding: 16px;
}

.compare-body > h3 {
  line-height: 1.45;
}

.compare-meta {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
}

.compare-meta dt {
  color: var(--muted);
}

.compare-meta dd {
  margin: 0;
  min-width: 0;
}

.compact-block {
  padding: 0;
  border-top: 0;
}

.compact-block pre {
  max-height: 220px;
}

.compact-assets {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  padding: 12px 0 0;
}

.admin-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 60px rgb(32 36 42 / 24%);
}

.admin-dialog::backdrop {
  background: rgb(17 24 39 / 45%);
}

.admin-dialog.fallback-open {
  display: block;
  position: fixed;
  inset: 24px;
  z-index: 100;
  margin: auto;
}

.admin-dialog:target {
  display: block;
  position: fixed;
  inset: 24px;
  z-index: 100;
  margin: auto;
}

.wide-dialog {
  width: min(980px, calc(100vw - 32px));
}

.crawl-config-dialog {
  width: min(1280px, calc(100vw - 24px));
}

.dialog-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  max-height: calc(100vh - 48px);
  padding: 16px;
  overflow: auto;
}

.source-dialog-grid,
.entry-dialog-grid,
.detail-dialog-grid,
.asset-dialog-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.dialog-form input,
.dialog-form select,
.dialog-form textarea {
  width: 100%;
}

.dialog-head {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -16px -16px 4px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.dialog-head h3 {
  margin: 0;
}

.dialog-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.dialog-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.create-entry-panel {
  display: block;
}

.create-entry-panel summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
}

.create-entry-panel summary::-webkit-details-marker {
  display: none;
}

.create-entry-panel[open] summary {
  margin-bottom: 12px;
}

.embedded-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.delete-inline-form {
  justify-content: flex-end;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.dialog-actions button[type="submit"] {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.widget-body {
  background: #fff;
}

.widget-main {
  padding: 0;
}

.widget-panel {
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.search-form {
  flex-wrap: wrap;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.filter-form {
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.filter-form input {
  width: 150px;
}

.search-results {
  padding: 8px 16px;
}

.search-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.search-item img,
.thumb-empty {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f3f5;
}

.search-item a {
  font-weight: 700;
}

.search-item p {
  margin-top: 4px;
  color: var(--muted);
}

.search-item span {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent-2);
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 16px;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.admin-pagination:last-child {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.pagination-summary {
  color: var(--muted);
  font-size: 13px;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.search-demo-body {
  background: #fff;
}

.search-demo {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.search-hero {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 18px 0 26px;
}

.search-brand {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.search-brand strong {
  font-size: 32px;
  font-weight: 750;
}

.search-brand span,
.result-toolbar span,
.image-result small {
  color: var(--muted);
}

.demo-search-form {
  display: grid;
  width: min(760px, 100%);
  gap: 12px;
}

.mode-tabs {
  display: inline-flex;
  justify-self: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f7f9;
}

.mode-tabs button {
  min-width: 72px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.mode-tabs button.active {
  color: #fff;
  background: var(--ink);
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr 42px auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 7px;
  border: 1px solid #cfd6dd;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(27, 31, 36, 0.10);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(31, 111, 235, 0.16);
}

.search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 8px 0 18px;
  font-size: 17px;
}

.search-bar.image-only {
  grid-template-columns: 42px auto;
  justify-content: center;
}

.search-bar.image-only input {
  display: none;
}

.image-picker {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-2);
  cursor: pointer;
}

.image-picker span {
  font-size: 26px;
  line-height: 1;
  transform: translateY(-1px);
}

.search-submit {
  min-width: 92px;
  height: 44px;
  border-color: var(--accent);
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
}

#image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 128px;
  overflow: hidden;
  border: 1px dashed #b7c0ca;
  border-radius: 8px;
  background: #fbfcfd;
}

.drop-zone.hidden {
  display: none;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background: #edf4ff;
}

.drop-zone img {
  display: none;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #f1f3f5;
}

.drop-zone.has-image img {
  display: block;
}

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

.drop-zone.has-image .preview-empty {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 90px);
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#clear-image {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
}

.drop-zone:not(.has-image) #clear-image {
  display: none;
}

.search-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.search-options select {
  min-width: 128px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: var(--muted);
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-toolbar .pager {
  padding: 0;
}

.pager button:disabled {
  color: #a5adb6;
  cursor: default;
  background: #f6f7f9;
}

.image-result-grid {
  display: grid;
  gap: 14px;
  padding-top: 22px;
}

.image-result-grid .empty {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
}

.image-result {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.image-result-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1f4;
}

.image-result-thumb img,
.thumb-empty.large {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

.image-result-main {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}

.image-result-meta,
.image-result-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-result-meta strong {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-size: 18px;
}

.result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.result-badges span {
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #d8dee5;
  border-radius: 999px;
  color: #4d5661;
  background: #f8fafc;
  font-size: 12px;
  line-height: 16px;
}

.image-result-title {
  display: -webkit-box;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.image-result p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.image-result-foot {
  align-self: end;
  margin-top: 2px;
}

.image-result-foot a {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  background: #fff;
  font-size: 13px;
  text-decoration: none;
}

.image-result.skeleton > div,
.image-result.skeleton strong,
.image-result.skeleton span,
.image-result.skeleton p,
.image-result.skeleton small {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef1f4, #f8fafc, #eef1f4);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.2s linear infinite;
}

.image-result.skeleton > div {
  aspect-ratio: 4 / 3;
}

.image-result.skeleton section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.image-result.skeleton span {
  width: 96px;
  height: 22px;
}

.image-result.skeleton strong {
  width: 65%;
  height: 16px;
}

.image-result.skeleton p {
  width: 90%;
  height: 42px;
}

.image-result.skeleton small {
  width: 120px;
  height: 14px;
}

@keyframes skeleton-pulse {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 900px) {
  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .module-grid,
  .split-grid,
  .form-panel,
  .edit-grid,
  .form-panel.source-grid,
  .form-panel.entry-grid,
  .source-grid,
  .entry-grid,
  .detail-form,
  .dialog-form,
  .source-dialog-grid,
  .entry-dialog-grid,
  .detail-dialog-grid,
  .asset-dialog-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  main {
    padding: 16px;
  }

  table {
    min-width: 900px;
  }
}

@media (max-width: 640px) {
  .search-demo {
    width: min(100vw - 20px, 1180px);
    padding-top: 18px;
  }

  .search-brand strong {
    font-size: 27px;
  }

  .demo-search-form {
    gap: 10px;
  }

  .mode-tabs {
    width: 100%;
  }

  .mode-tabs button {
    flex: 1;
    min-width: 0;
  }

  .search-bar {
    grid-template-columns: 1fr 40px 74px;
    gap: 6px;
    min-height: 54px;
    padding: 6px;
  }

  .search-bar input {
    padding-left: 12px;
    font-size: 15px;
  }

  .image-picker {
    width: 40px;
    height: 40px;
  }

  .search-submit {
    min-width: 74px;
    height: 40px;
    padding: 7px 10px;
  }

  .drop-zone {
    min-height: 104px;
  }

  .search-options {
    justify-content: stretch;
  }

  .search-options select {
    flex: 1 1 130px;
    min-width: 0;
  }

  .result-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-toolbar .pager {
    width: 100%;
    justify-content: space-between;
  }

  .image-result {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .image-result-meta,
  .image-result-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .image-result-foot a {
    width: 100%;
    text-align: center;
  }
}
