:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #171a1c;
  --muted: #66717a;
  --line: #d9dee3;
  --teal: #0d7c86;
  --plum: #884064;
  --amber: #b46524;
  --blue: #315f9f;
  --soft-teal: #e7f3f4;
  --soft-plum: #f7edf2;
  --shadow: 0 16px 38px rgba(20, 28, 33, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(16px, 4vw, 42px);
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--plum);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.import-button {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.import-button:hover {
  background: #096971;
}

.import-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

.admin-entry-button,
.admin-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.admin-entry-button.secondary,
.admin-button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.admin-entry-button:hover,
.admin-entry-button:focus-visible,
.admin-button:hover,
.admin-button:focus-visible {
  filter: brightness(0.96);
  outline: none;
}

.admin-session {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-status.is-error {
  color: #9f2f3c;
}

.login-dialog {
  width: min(420px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(20, 28, 33, 0.28);
}

.login-dialog::backdrop {
  background: rgba(20, 28, 33, 0.46);
}

.login-panel {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 22px;
}

.login-panel h2 {
  padding-right: 34px;
  font-size: 20px;
}

.login-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.login-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-field select,
.login-field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 0 10px;
}

.login-field select:focus,
.login-field input:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(13, 124, 134, 0.18);
}

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

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) repeat(3, minmax(120px, 0.75fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(251, 252, 253, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toolbar .toolbar-hidden-filter {
  display: none;
}

.toolbar input[type="search"],
.toolbar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 0 10px;
}

.toolbar input[type="search"]:focus,
.toolbar select:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(13, 124, 134, 0.18);
  outline-offset: 0;
}

.toggle-row {
  grid-template-columns: 16px auto;
  align-items: center;
  min-height: 38px;
  color: var(--ink);
  white-space: nowrap;
}

.toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.stats {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.stats strong {
  color: var(--ink);
  font-size: 23px;
}

.stats span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.restore-button {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(136, 64, 100, 0.38);
  border-radius: 6px;
  background: #fff;
  color: var(--plum);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.restore-button:hover {
  background: var(--soft-plum);
}

.gallery-shell {
  padding: 20px clamp(16px, 4vw, 42px) 48px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 18px;
}

.source-note {
  color: var(--muted);
  font-size: 13px;
}

.poc-dashboard {
  display: grid;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.poc-dashboard[hidden] {
  display: none;
}

.poc-dashboard-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.poc-dashboard-head h2,
.poc-dashboard-head h3 {
  font-size: 18px;
}

.poc-dashboard-head.compact h3 {
  font-size: 15px;
}

.poc-progress-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.poc-progress-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.poc-progress-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.poc-progress-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.poc-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebef;
}

.poc-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.poc-progress-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poc-progress-metrics span {
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.poc-review-section {
  display: grid;
  gap: 10px;
}

.poc-review-queue {
  display: grid;
  gap: 8px;
}

.poc-review-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.poc-review-item img {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  background: #edf1f4;
}

.poc-review-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.poc-review-copy strong,
.poc-review-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poc-review-copy strong {
  font-size: 13px;
}

.poc-review-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.poc-review-actions {
  display: flex;
  gap: 7px;
}

.poc-review-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.poc-review-actions button:hover,
.poc-review-actions button:focus-visible {
  border-color: rgba(13, 124, 134, 0.42);
  background: var(--soft-teal);
  outline: none;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pin {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(20, 28, 33, 0.08);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.pin:hover,
.pin:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(13, 124, 134, 0.48);
  box-shadow: var(--shadow);
  outline: none;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(90deg, rgba(49, 95, 159, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(13, 124, 134, 0.1) 1px, transparent 1px),
    #edf1f4;
  background-size: 22px 22px;
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #edf1f4;
}

.delete-card {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  background: rgba(20, 28, 33, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0.86;
  transition: opacity 140ms ease, background 140ms ease;
}

.pin:hover .delete-card,
.pin:focus-within .delete-card {
  opacity: 1;
}

.delete-card:hover,
.delete-card:focus-visible {
  background: #9f2f3c;
  outline: none;
}

.assignment-badge,
.review-status {
  position: absolute;
  left: 8px;
  z-index: 1;
  max-width: calc(100% - 64px);
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(20, 28, 33, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-badge {
  top: 8px;
}

.review-status {
  top: 38px;
}

.review-status[data-status="valid"] {
  background: rgba(26, 118, 76, 0.86);
}

.review-status[data-status="hide_requested"] {
  background: rgba(180, 101, 36, 0.9);
}

.review-status[data-status="hidden"] {
  background: rgba(159, 47, 60, 0.86);
}

.review-status[data-status="hide_rejected"] {
  background: rgba(49, 95, 159, 0.88);
}

.thumb-empty {
  min-height: 150px;
  display: none;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.thumb.is-empty img {
  display: none;
}

.thumb.is-empty .thumb-empty {
  display: grid;
}

.pin-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px 11px 12px;
}

.pin-title {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.meta-line .model,
#detailModel {
  border-color: rgba(136, 64, 100, 0.36);
  color: var(--plum);
  background: var(--soft-plum);
}

.meta-line .source,
#detailSourcePlatform {
  border-color: rgba(180, 101, 36, 0.34);
  color: var(--amber);
  background: #fff5ea;
}

.meta-line .tool,
#detailTool {
  border-color: rgba(49, 95, 159, 0.32);
  color: var(--blue);
  background: #eef4ff;
}

.meta-line .category,
#detailCategory {
  border-color: rgba(13, 124, 134, 0.35);
  color: var(--teal);
  background: var(--soft-teal);
}

.meta-line .workflow,
#detailWorkflow,
#detailOperation {
  border-color: rgba(26, 118, 76, 0.34);
  color: #1a764c;
  background: #eaf7f0;
}

#detailLanguage {
  border-color: rgba(102, 113, 122, 0.3);
  color: var(--muted);
  background: #f5f7f8;
}

#detailAssignment {
  border-color: rgba(180, 101, 36, 0.34);
  color: var(--amber);
  background: #fff5ea;
}

.prompt-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.pin-actions button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pin-actions button:hover,
.pin-actions button:focus-visible {
  border-color: rgba(13, 124, 134, 0.42);
  background: var(--soft-teal);
  outline: none;
}

.pin-actions .mark-invalid-card:hover,
.pin-actions .mark-invalid-card:focus-visible {
  border-color: rgba(159, 47, 60, 0.32);
  background: #fff1f3;
  color: #9f2f3c;
}

.empty-state {
  display: inline-block;
  width: 100%;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.detail-dialog {
  width: min(1160px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(20, 28, 33, 0.28);
}

.detail-dialog::backdrop {
  background: rgba(20, 28, 33, 0.48);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(20, 28, 33, 0.82);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(230px, 0.72fr) minmax(330px, 0.95fr);
  min-height: 540px;
}

.detail-image {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #edf1f4;
  border-right: 1px solid var(--line);
}

.reference-detail {
  background: #f3f5f2;
}

.detail-image img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
  display: block;
  background: #111416;
}

.detail-image.is-empty img {
  display: none;
}

.detail-image.is-empty::before {
  content: "未提供原始图 / 参考图";
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(13, 124, 134, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(136, 64, 100, 0.11) 1px, transparent 1px),
    #f6f8f8;
  background-size: 22px 22px;
}

.detail-image figcaption {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-copy {
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 18px;
}

.detail-meta {
  margin-bottom: 12px;
}

.detail-copy h2 {
  margin-bottom: 14px;
  font-size: 19px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-copy h3 {
  margin-top: 18px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
}

.detail-copy p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.58;
}

.import-grid {
  width: 100%;
  border: 0;
}

.import-image-panel {
  min-height: 540px;
}

.import-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  background:
    linear-gradient(90deg, rgba(13, 124, 134, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(136, 64, 100, 0.11) 1px, transparent 1px),
    #f6f8f8;
  background-size: 22px 22px;
  cursor: pointer;
}

.generated-detail .import-dropzone {
  background-color: #eef3f5;
}

.reference-detail .import-dropzone {
  background-color: #f4f6f2;
}

.import-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.import-dropzone img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
  display: none;
  background: #111416;
}

.import-dropzone.has-image img {
  display: block;
}

.import-empty {
  max-width: 210px;
  padding: 12px 14px;
  border: 1px solid rgba(13, 124, 134, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.import-dropzone.has-image .import-empty {
  display: none;
}

.import-copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.import-copy h2 {
  margin-bottom: 2px;
}

.review-prompt-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 0 10px;
}

.review-prompt-field input:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(13, 124, 134, 0.18);
}

.import-actions {
  justify-content: flex-end;
}

.review-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfb;
}

.review-prompt-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.review-prompt-field textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 10px;
}

.review-prompt-field textarea:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(13, 124, 134, 0.18);
}

.review-message {
  min-height: 19px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.review-message.is-error {
  color: #9f2f3c;
}

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

.secondary-review-actions {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.review-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.review-button.valid {
  border-color: rgba(26, 118, 76, 0.38);
  color: #1a764c;
}

.review-button.invalid {
  border-color: rgba(159, 47, 60, 0.3);
  color: #9f2f3c;
}

.review-button:hover,
.review-button:focus-visible {
  background: #fff;
  filter: brightness(0.97);
  outline: none;
}

.review-button:disabled,
.delete-detail-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.all-images {
  margin-top: 4px;
}

.all-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}

.all-image-button {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #edf1f4;
  cursor: pointer;
}

.all-image-button:hover,
.all-image-button:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.all-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-copy a {
  display: inline-flex;
  color: var(--plum);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.detail-copy a:hover {
  text-decoration: underline;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.delete-detail-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #c85b66;
  border-radius: 6px;
  background: #fff;
  color: #9f2f3c;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.delete-detail-button:hover {
  background: #fff1f3;
}
.image-preview-dialog {
  width: min(1320px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111417;
  color: #fff;
  box-shadow: 0 24px 80px rgba(10, 14, 16, 0.45);
}

.image-preview-dialog::backdrop {
  background: rgba(10, 14, 16, 0.84);
}

.image-preview-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: min(92vh, 980px);
}

.image-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 20, 23, 0.95);
}

.image-preview-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#imagePreviewTitle {
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#imagePreviewMeta {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.image-preview-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.image-preview-controls button,
.image-preview-controls a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.image-preview-controls button:hover,
.image-preview-controls button:focus-visible,
.image-preview-controls a:hover,
.image-preview-controls a:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

#imagePreviewClose {
  min-width: 36px;
  padding: 0 12px;
  font-size: 18px;
  line-height: 1;
}

.image-preview-viewport {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(49, 95, 159, 0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(13, 124, 134, 0.1), transparent 30%),
    #12161a;
  touch-action: none;
  cursor: grab;
}

.image-preview-viewport.is-dragging {
  cursor: grabbing;
}

.image-preview-viewport img {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: top left;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.image-preview-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.detail-image,
.detail-image img,
.all-image-button img {
  cursor: zoom-in;
}

.detail-image.is-empty,
.detail-image.is-empty img {
  cursor: default;
}

.detail-image:hover figcaption,
.all-image-button:hover img {
  opacity: 0.95;
}

.detail-image:focus-visible,
.all-image-button:focus-visible {
  outline: 2px solid rgba(13, 124, 134, 0.42);
  outline-offset: 2px;
}

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

  .topbar-actions {
    width: 100%;
    align-items: stretch;
    justify-content: space-between;
  }

  .image-preview-shell {
    height: min(88vh, 900px);
  }
}

@media (max-width: 620px) {
  .image-preview-dialog {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

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

  .image-preview-controls {
    justify-content: flex-start;
  }

  .image-preview-shell {
    height: calc(100vh - 12px);
  }
}

@media (max-width: 1080px) {
  .poc-progress-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .poc-review-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .poc-review-actions {
    grid-column: 1 / -1;
  }

  .toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-image {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-image img,
  .detail-image.is-empty::before {
    min-height: 320px;
    max-height: 70vh;
  }
}

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

  .topbar-actions {
    width: 100%;
  }

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

  .admin-entry-button,
  .admin-session,
  .admin-session .admin-entry-button {
    width: 100%;
  }

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

  .import-button {
    width: 100%;
  }

  .toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .poc-dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .poc-progress-list {
    grid-template-columns: 1fr;
  }

  .poc-review-item {
    grid-template-columns: 1fr;
  }

  .poc-review-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .poc-review-actions {
    flex-wrap: wrap;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .delete-card {
    opacity: 1;
  }
}
