/* Extracted from index.html. Case library, case tips, case detail, review stats, and trash modal styles. */

.case-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.case-top-main {
  flex: 1 1 auto;
  min-width: 0;
}
.case-review-rank {
  position: fixed;
  right: 8px;
  top: 100px;
  width: 180px;
  z-index: 10;
  border: none;
  box-shadow: none;
  border-radius: 8px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 10px 12px;
  box-sizing: border-box;
}
html.theme-dark .case-review-rank {
  background: transparent;
  border: none;
  box-shadow: none;
}
.case-review-rank-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}
.case-review-rank-list {
  max-height: 560px; /* 约 20 行 */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.case-review-rank-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.case-review-rank-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 22px;
}
.case-review-rank-top {
  width: 67%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.case-review-rank-bar-wrap {
  display: none;
}
.case-review-rank-bar {
  width: 67%;
}
.case-review-rank-bar-row {
  display: none;
}
.case-review-rank-name {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-review-rank-bar {
  height: 8px;
  border-radius: 999px;
  /* 浅色：深色底轨道；暗色见下方覆盖 */
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
html.theme-dark .case-review-rank-bar {
  background: rgba(255, 255, 255, 0.12);
}
.case-review-rank-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e6a800 0%, #ffc107 100%);
  transition: width 0.45s ease;
}
.case-review-rank-count {
  font-size: 12px;
  color: var(--muted);
  min-width: 20px;
  text-align: right;
}
.case-monthly-stats {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 12px;
}
html.theme-dark .case-monthly-stats {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.case-monthly-stats-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.case-monthly-stats-range {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.case-monthly-stats-range input {
  width: 100%;
  box-sizing: border-box;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
}
.case-monthly-stats-query-btn {
  height: 30px;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  color: #1d1d1f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.case-monthly-stats-query-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.case-monthly-stats-status {
  margin: 6px 0;
  color: var(--muted);
  min-height: 18px;
  line-height: 1.4;
}
.case-monthly-stats-users {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}
.case-trash-entry {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
html.theme-dark .case-trash-entry {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.case-trash-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.case-trash-btn:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}
html.theme-dark .case-trash-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
}
.case-trash-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}
.case-trash-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  padding: 18px;
  box-sizing: border-box;
}
.case-trash-modal.show {
  display: flex;
}
.case-trash-card {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 42px));
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.case-trash-head {
  height: 52px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.case-trash-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.case-trash-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.case-trash-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}
html.theme-dark .case-trash-close:hover {
  background: rgba(255, 255, 255, 0.08);
}
.case-trash-body {
  padding: 12px;
  overflow-y: auto;
}
.case-trash-status,
.case-trash-empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.case-trash-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
}
.case-trash-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.06);
}
.case-trash-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-trash-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.case-trash-actions {
  display: flex;
  gap: 6px;
}
.case-trash-action-btn {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.case-trash-action-btn.danger {
  color: #c0392b;
}
.case-delete-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.26);
  padding: 18px;
  box-sizing: border-box;
}
.case-delete-choice-modal.show {
  display: flex;
}
.case-delete-choice-card {
  width: min(360px, 100%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
  padding: 18px;
  box-sizing: border-box;
}
.case-delete-choice-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.case-delete-choice-text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.case-delete-choice-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.case-delete-choice-btn {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.case-delete-choice-btn.primary {
  border-color: transparent;
  background: var(--blue);
  color: #1d1d1f;
}
.case-delete-choice-btn.danger {
  color: #c0392b;
}
.case-monthly-stats-user {
  border-radius: 8px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.03);
}
html.theme-dark .case-monthly-stats-user {
  background: rgba(255, 255, 255, 0.06);
}
.case-monthly-stats-user-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--text);
}
.case-monthly-stats-case {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  margin-top: 2px;
}
.case-monthly-stats-case-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-monthly-stats-case-count {
  flex: 0 0 auto;
  white-space: nowrap;
}
.case-monthly-stats-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  padding: 20px;
  box-sizing: border-box;
}
.case-monthly-stats-modal.show {
  display: flex;
}
.case-monthly-stats-modal-card {
  width: min(980px, calc(100vw - 40px));
  max-height: min(82vh, 860px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.case-monthly-stats-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.case-monthly-stats-modal-title {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}
.case-monthly-stats-close-btn {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #ff5c60;
  color: #fff;
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  padding: 0;
  transform: scale(1);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.18s ease;
}
.case-monthly-stats-close-btn:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.03);
}
.case-monthly-stats-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  gap: 8px;
}
.case-monthly-stats-export-btn {
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--blue);
  color: #1d1d1f;
  cursor: pointer;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
}
.case-monthly-stats-export-btn:hover {
  background: #e5e3dd;
}
.case-monthly-stats-modal-sub {
  padding: 10px 16px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.case-monthly-stats-modal-body {
  padding: 12px 16px 16px;
  overflow: auto;
}
.case-monthly-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.case-monthly-stats-table th,
.case-monthly-stats-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
  color: var(--text);
}
.case-monthly-stats-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  font-weight: 600;
}
.case-monthly-stats-empty {
  color: var(--muted);
  padding: 10px 0;
  font-size: 13px;
}

.case-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.case-section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.case-categories-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.case-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.case-sort-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.case-layout.case-detail-fullpage .case-header,
.case-layout.case-detail-fullpage .case-categories-row {
  display: none;
}

.case-sort-btn {
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.case-sort-btn:hover {
  border-color: rgba(0, 0, 0, 0.16);
}

.case-sort-btn.active {
  background: var(--blue);
  color: #1d1d1f;
  border-color: rgba(29, 29, 31, 0.18);
  font-weight: 600;
}

.case-sort-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 2px;
}

/* 案例库：排序区勿贴满行宽，与下方卡片列右缘对齐（卡片 264×2+gap 后右侧留白时，排序条会多出约一截） */
#ai-case .case-sort-actions {
  margin-right: 20px;
}

.case-tips-page {
  width: 960px;
  max-width: 960px;
  margin: 0 auto;
  padding: 6px 4px 80px;
}
body:has(#ai-case-tips.panel.active) .container {
  width: 1000px;
  max-width: 1000px;
}
.case-tips-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
}
.case-tips-title {
  margin: 0;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.12;
}
.case-tips-note {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
  line-height: 1.45;
}
.case-tips-new-btn {
  height: 42px;
  border: 0;
  background: var(--text);
  color: var(--surface);
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 760;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.case-tips-new-btn:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}
.case-tips-entry-under-personal {
  display: flex;
  justify-content: center;
  padding: 18px 0 36px;
}
.case-tips-entry-btn {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 16px;
  font-weight: 760;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.case-tips-search-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.04);
  margin-bottom: 18px;
}
.case-tips-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  overflow: visible;
  scrollbar-width: none;
}
.case-tips-toolbar::-webkit-scrollbar {
  display: none;
}
.case-tips-search {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 94%, var(--soft));
  color: var(--text);
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.case-tips-search:focus {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
.case-tips-toolbar .case-tips-new-btn {
  height: 48px;
  border-radius: 16px;
  padding: 0 20px;
}
.case-tips-stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.case-tips-view-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, var(--soft));
  padding: 3px;
  position: relative;
  overflow: hidden;
}
.case-tips-view-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc((100% - 10px) / 2);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--text);
  transform: translateX(0);
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.18, 1);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}
.case-tips-view-toggle.is-list-selected::before {
  transform: translateX(calc(100% + 4px));
}
.case-tips-view-btn {
  position: relative;
  z-index: 1;
  min-width: 52px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.case-tips-view-btn:hover {
  transform: scale(1.035);
  color: var(--text);
}
.case-tips-view-btn.active {
  color: var(--surface);
}
.case-tips-auto-jump-toggle {
  width: 48px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, var(--soft));
  padding: 3px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.case-tips-auto-jump-toggle:hover {
  transform: scale(1.035);
}
.case-tips-auto-jump-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.18, 1), background 0.18s ease;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}
.case-tips-auto-jump-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 20;
  width: max-content;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, var(--soft));
  color: var(--text);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.18s cubic-bezier(0.2, 0.9, 0.18, 1);
}
.case-tips-auto-jump-toggle:hover::after,
.case-tips-auto-jump-toggle:focus-visible::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.case-tips-auto-jump-toggle .case-tips-auto-jump-tip-arrow,
.case-tips-auto-jump-toggle::selection {
  background: transparent;
}
.case-tips-auto-jump-toggle.is-on {
  background: color-mix(in srgb, var(--text) 88%, var(--surface));
  border-color: var(--text);
}
.case-tips-auto-jump-toggle.is-on::before {
  transform: translateX(20px);
  background: var(--surface);
}
.case-tips-count-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, var(--soft));
  color: var(--muted);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.case-tips-count-pill strong {
  color: var(--text);
  font-size: 15px;
  margin-right: 4px;
}
.case-tips-favorite-filter {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.case-tips-favorite-filter svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease, fill 0.18s ease;
}
.case-tips-favorite-filter:hover {
  transform: translateY(-1px) scale(1.035);
  color: var(--text);
}
.case-tips-favorite-filter.active {
  background: color-mix(in srgb, #facc15 18%, var(--surface));
  border-color: color-mix(in srgb, #facc15 55%, var(--line));
  color: #b45309;
}
.case-tips-favorite-filter.active svg {
  fill: currentColor;
}
.case-tips-filter,
.case-tips-sort {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 18px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.case-tips-filter:hover,
.case-tips-sort:hover {
  transform: translateY(-1px) scale(1.035);
}
.case-tips-filter.active,
.case-tips-sort.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}
.case-tips-chips {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.case-tips-chips::-webkit-scrollbar {
  display: none;
}
.case-tips-chip {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.035);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}
html.theme-dark .case-tips-chip {
  background: rgba(255, 255, 255, 0.06);
}
.case-tips-chip.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}
.case-tips-masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.case-tips-masonry.is-list-mode {
  grid-template-columns: 1fr;
}
.case-tips-masonry.is-list-mode .case-tips-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 168px;
  max-height: 168px;
}
.case-tips-masonry.is-list-mode .case-tips-cover {
  height: 168px;
  min-height: 168px;
}
.case-tips-masonry.is-list-mode .case-tips-img {
  height: 168px;
}
.case-tips-masonry.is-list-mode .case-tips-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  grid-template-rows: 22px 30px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 6px;
  padding: 17px 20px 16px;
}
.case-tips-masonry.is-list-mode .case-tips-meta,
.case-tips-masonry.is-list-mode .case-tips-name,
.case-tips-masonry.is-list-mode .case-tips-sku,
.case-tips-masonry.is-list-mode .case-tips-prompt {
  margin: 0;
  min-width: 0;
}
.case-tips-masonry.is-list-mode .case-tips-meta {
  grid-column: 1 / 3;
  grid-row: 1;
  align-items: center;
  line-height: 22px;
}
.case-tips-masonry.is-list-mode .case-tips-meta span:first-child {
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-tips-masonry.is-list-mode .case-tips-meta span:last-child {
  margin-left: auto;
  white-space: nowrap;
}
.case-tips-masonry.is-list-mode .case-tips-name,
.case-tips-masonry.is-list-mode .case-tips-prompt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-tips-masonry.is-list-mode .case-tips-name {
  grid-column: 1;
  grid-row: 2;
  -webkit-line-clamp: 1;
  line-height: 30px;
  margin: 0;
}
.case-tips-masonry.is-list-mode .case-tips-sku {
  display: none;
}
.case-tips-masonry.is-list-mode .case-tips-prompt {
  grid-column: 1;
  grid-row: 3;
  -webkit-line-clamp: 2;
  align-self: start;
  font-size: 12px;
  line-height: 1.38;
  max-height: calc(1.38em * 2);
}
.case-tips-masonry.is-list-mode .case-tips-card-actions {
  grid-column: 2;
  grid-row: 2 / 4;
  justify-content: flex-end;
  align-self: center;
  align-items: center;
  margin-top: 0;
}
.case-tips-masonry.is-list-mode .case-tips-mark {
  display: none;
}
.case-tips-masonry.is-card-mode .case-tips-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
}
.case-tips-masonry.is-card-mode .case-tips-cover {
  height: 52%;
  min-height: 0;
  flex: 0 0 52%;
}
.case-tips-masonry.is-card-mode .case-tips-img {
  height: 100%;
  min-height: 0;
}
.case-tips-masonry.is-card-mode .case-tips-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: 18px 22px minmax(0, 1fr) auto;
  gap: 5px;
  padding: 11px 14px 11px;
}
.case-tips-masonry.is-card-mode .case-tips-name,
.case-tips-masonry.is-card-mode .case-tips-sku,
.case-tips-masonry.is-card-mode .case-tips-prompt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-tips-masonry.is-card-mode .case-tips-name {
  -webkit-line-clamp: 1;
}
.case-tips-masonry.is-card-mode .case-tips-sku {
  -webkit-line-clamp: 1;
}
.case-tips-masonry.is-card-mode .case-tips-prompt {
  -webkit-line-clamp: 2;
  align-self: start;
  max-height: calc(1.42em * 2);
  font-size: 12px;
  line-height: 1.38;
}
.case-tips-masonry.is-card-mode .case-tips-card-actions {
  margin-top: auto;
}
.case-tips-masonry.is-card-mode .case-tips-meta,
.case-tips-masonry.is-card-mode .case-tips-name,
.case-tips-masonry.is-card-mode .case-tips-sku,
.case-tips-masonry.is-card-mode .case-tips-prompt {
  margin: 0;
  min-width: 0;
}
.case-tips-masonry.is-card-mode .case-tips-meta {
  align-items: center;
  font-size: 11px;
  line-height: 18px;
  overflow: hidden;
}
.case-tips-masonry.is-card-mode .case-tips-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-tips-masonry.is-card-mode .case-tips-name {
  font-size: 15px;
  line-height: 22px;
}
.case-tips-masonry.is-card-mode .case-tips-sku {
  display: none;
}
.case-tips-masonry.is-card-mode .case-tips-mark {
  display: none;
}
.case-tips-masonry.is-card-mode .case-tips-card-actions {
  align-self: end;
  align-items: center;
  margin-top: 0;
}
.case-tips-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 0;
  overflow: hidden;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.case-tips-card:hover {
  transform: translateY(-3px) scale(1.012);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  border-color: color-mix(in srgb, var(--text) 16%, var(--line));
}
.case-tips-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.case-tips-stack-indicator {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, var(--soft));
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 860;
  line-height: 1;
  pointer-events: none;
}
.case-tips-stack-indicator svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.82;
}
.case-tips-card-action {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}
.case-tips-cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 138px;
  gap: 1px;
  background: color-mix(in srgb, var(--line) 70%, var(--soft));
  position: relative;
  overflow: hidden;
}
.case-tips-img {
  height: 138px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 98%, white), color-mix(in srgb, var(--soft) 88%, var(--line)));
}
.case-tips-img.result {
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, white), color-mix(in srgb, var(--soft) 78%, var(--line)));
}
.case-tips-cover img.case-tips-img {
  width: 100%;
  object-fit: cover;
  background: var(--line);
}
.case-tips-body {
  padding: 15px;
}
.case-tips-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.case-tips-name {
  font-size: 17px;
  font-weight: 820;
  line-height: 1.25;
  margin-bottom: 7px;
  color: var(--text);
}
.case-tips-sku {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.case-tips-prompt {
  font-size: 13px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  margin: 0;
}
.case-tips-mark {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}
.case-tips-empty-card {
  border: 1px dashed var(--line);
  border-radius: 18px;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 18px;
  text-align: center;
  line-height: 1.5;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  font-weight: 700;
}
.case-tips-editor-grid {
  display: grid;
  gap: 12px;
}
.tool-modal-card.case-tips-editor-modal-card {
  width: min(1120px, 94vw);
}
.tool-modal-card.case-tips-detail-modal-card {
  width: min(960px, 94vw);
  max-height: min(92vh, 880px);
  min-height: 0;
  overflow: hidden;
}
.tool-modal-card.case-tips-detail-modal-card.case-tips-detail-multi {
  height: min(92vh, 880px);
}
.tool-modal-card.case-tips-detail-modal-card.case-tips-detail-single {
  height: auto;
}
.tool-modal-card.case-tips-detail-modal-card .tool-modal-content {
  flex: 1 1 auto;
  overflow: hidden;
  min-height: 0;
}
.case-tips-detail {
  display: grid;
  grid-template-rows: auto auto 42px;
  gap: 18px;
  color: var(--text);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}
.tool-modal-card.case-tips-detail-multi .case-tips-detail {
  grid-template-rows: auto minmax(0, 1fr) 42px;
}
.tool-modal-card.case-tips-detail-single .case-tips-detail {
  height: auto;
}
.case-tips-detail-head {
  display: grid;
  gap: 10px;
  padding-bottom: 0;
}
.case-tips-detail-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 860;
  letter-spacing: 0;
}
.case-tips-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}
.case-tips-detail-meta span,
.case-tips-detail-field {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--soft));
}
.case-tips-detail-notes {
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}
.case-tips-detail-groups {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 2px;
  scrollbar-width: none;
}
.case-tips-detail-groups::-webkit-scrollbar {
  display: none;
}
.case-tips-detail-group {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, var(--soft));
  position: relative;
}
.case-tips-detail-cover-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 20%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--blue) 54%, var(--line));
  color: color-mix(in srgb, var(--text) 88%, var(--blue));
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
}
.case-tips-detail-select {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 17px;
  height: 17px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 46%, var(--line));
  border-radius: 50%;
  background: var(--surface);
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.08);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.case-tips-detail-select:hover {
  transform: scale(1.06);
}
.case-tips-detail-select input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.case-tips-detail-select svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none;
}
.case-tips-detail-select:has(input:checked) {
  background: var(--surface);
  border-color: color-mix(in srgb, #22c55e 48%, var(--line));
  color: #22c55e;
}
.case-tips-detail-select:has(input:checked) svg {
  opacity: 1;
  transform: scale(1);
}
.case-tips-detail-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}
.case-tips-detail-refs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.case-tips-detail-results {
  display: grid;
  gap: 8px;
}
.case-tips-detail-thumb {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  padding: 0;
  cursor: zoom-in;
}
.case-tips-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.case-tips-detail-empty {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  background: var(--surface);
}
.case-tips-detail-prompt {
  min-height: 128px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: color-mix(in srgb, var(--text) 86%, var(--muted));
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.case-tips-detail-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-top: 4px;
  flex-shrink: 0;
  background: var(--surface);
  position: relative;
  z-index: 3;
}
.case-tips-detail-action {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 15px;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.case-tips-detail-action:hover {
  transform: translateY(-1px) scale(1.035);
  color: var(--text);
}
.case-tips-detail-action.favorite {
  width: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.case-tips-detail-action.favorite svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.case-tips-detail-action.favorite.active {
  color: #b45309;
  border-color: color-mix(in srgb, #facc15 55%, var(--line));
  background: color-mix(in srgb, #facc15 18%, var(--surface));
}
.case-tips-detail-action.favorite.active svg {
  fill: currentColor;
}
.case-tips-detail-action.import {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}
.case-tips-detail-action.danger:hover {
  color: #d92d20;
  border-color: color-mix(in srgb, #d92d20 45%, var(--line));
}
.tool-modal-card.case-tips-append-modal-card {
  width: min(740px, 92vw);
}
.case-tips-append-shell {
  display: grid;
  gap: 12px;
}
.case-tips-append-search {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, var(--soft));
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}
.case-tips-append-search:focus {
  border-color: var(--line);
  box-shadow: none;
}
.case-tips-append-picker {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 2px;
}
.case-tips-append-option {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.case-tips-append-thumb {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, var(--soft));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}
.case-tips-append-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-tips-append-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.case-tips-append-option:hover {
  background: color-mix(in srgb, var(--surface) 92%, var(--soft));
  border-color: color-mix(in srgb, var(--text) 16%, var(--line));
}
.case-tips-append-option:disabled {
  opacity: 0.58;
  cursor: wait;
}
.case-tips-append-option strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 840;
}
.case-tips-append-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}
.case-tips-append-option p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.case-tips-editor-top {
  display: grid;
  grid-template-columns: 304px 200px minmax(420px, 1fr);
  gap: 20px;
}
.case-tips-editor-notes {
  min-width: 0;
}
.case-tips-editor-main {
  display: grid;
  grid-template-columns: 304px minmax(420px, 1fr) 200px;
  gap: 20px;
  align-items: start;
}
.case-tips-editor-primary-shell {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}
.case-tips-editor-extra-list {
  display: grid;
  gap: 18px;
}
.case-tips-editor-group-shell {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  transform-origin: top center;
  transition: opacity 0.2s ease, transform 0.22s ease, max-height 0.24s ease, margin 0.24s ease, padding 0.24s ease;
}
.case-tips-editor-group-shell.is-entering {
  animation: caseTipsGroupEnter 0.28s cubic-bezier(0.2, 0.9, 0.18, 1) both;
}
.case-tips-editor-group-shell.is-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  max-height: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;
  overflow: hidden;
}
@keyframes caseTipsGroupEnter {
  0% { opacity: 0; transform: translateY(14px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.case-tips-editor-group-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.case-tips-editor-cover-btn {
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.case-tips-editor-cover-btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}
.case-tips-editor-cover-btn.is-active {
  border-color: color-mix(in srgb, var(--blue) 58%, var(--line));
  background: color-mix(in srgb, var(--blue) 18%, var(--surface));
  color: var(--text);
}
.case-tips-editor-cover-btn:focus-visible,
.case-tips-editor-group-delete:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 74%, transparent);
  outline-offset: 2px;
}
.case-tips-editor-group-delete {
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}
.case-tips-editor-group-delete:hover {
  color: var(--text);
  transform: scale(1.04);
}
.case-tips-editor-group {
  display: grid;
  grid-template-columns: 304px minmax(420px, 1fr) 200px;
  gap: 20px;
  align-items: start;
}
.case-tips-editor-row {
  display: grid;
  gap: 6px;
}
.case-tips-editor-row span {
  font-size: 13px;
  font-weight: 760;
  color: var(--muted);
}
.case-tips-editor-input,
.case-tips-editor-textarea,
.case-tips-editor-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  outline: none;
}
.case-tips-editor-input,
.case-tips-editor-select {
  height: 42px;
}
.case-tips-editor-textarea {
  height: 200px;
  min-height: 200px;
  resize: none;
}
.case-tips-editor-highlight-stack {
  height: 200px;
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.case-tips-editor-highlight-stack .case-admin-highlight-mirror-inner {
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  min-height: 200px;
}
.case-tips-editor-highlight-stack .case-tips-editor-textarea {
  height: 200px;
  min-height: 200px;
  border: 0;
  border-radius: 12px;
}
.case-tips-editor-highlight-stack:focus-within {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--blue) 72%, transparent);
}
.case-tips-editor-images {
  display: grid;
  gap: 8px;
}
.case-tips-editor-images:focus {
  outline: none;
}
.case-tips-editor-images[data-case-tip-images="referenceImages"] {
  grid-template-columns: repeat(3, 96px);
}
.case-tips-editor-images[data-case-tip-images="resultImages"] {
  grid-template-columns: 200px;
}
.case-tips-editor-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.035);
}
.case-tips-editor-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-tips-editor-thumb button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: white;
  cursor: pointer;
}
.case-tips-editor-add {
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.case-tips-editor-images.is-dragging .case-tips-editor-add,
.case-tips-editor-images.is-dragging .case-tips-editor-thumb {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 9%, transparent);
}
.case-tips-editor-upload-hint {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 84%, var(--text));
  font-size: 11px;
  line-height: 1.35;
  font-weight: 680;
}
.case-tips-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.case-tips-editor-stack-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 4px;
}
.case-tips-editor-stack-btn {
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.case-tips-editor-stack-btn:hover {
  transform: translateY(-1px) scale(1.025);
}
.case-tips-editor-actions button {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0 14px;
  font-weight: 760;
  cursor: pointer;
}
.case-tips-editor-save {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text) !important;
}
.case-tips-editor-save:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--muted) 34%, var(--surface));
  color: var(--muted);
  border-color: var(--line) !important;
}
@media (max-width: 760px) {
  .case-tips-editor-top,
  .case-tips-editor-main,
  .case-tips-editor-group,
  .case-tips-detail-group {
    grid-template-columns: 1fr;
  }
  .case-tips-editor-name,
  .case-tips-editor-sku {
    grid-column: auto;
  }
  .case-tips-editor-group-head {
    align-items: flex-start;
  }
  .case-tips-hero {
    align-items: flex-start;
  }
  .case-tips-new-btn {
    width: auto;
  }
  .case-tips-title {
    font-size: 28px;
  }
  .case-tips-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .case-tips-search {
    width: 100%;
    min-width: 0;
  }
  .case-tips-masonry {
    grid-template-columns: 1fr;
  }
}

html.theme-dark .case-sort-btn {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

html.theme-dark .case-sort-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

html.theme-dark .case-sort-btn.active {
  background: var(--blue);
  color: #1d1d1f;
  border-color: rgba(29, 29, 31, 0.18);
  font-weight: 600;
}

.case-search-tag {
  height: 32px;
  min-width: 140px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 0 14px;
  box-sizing: border-box;
}

.case-search-tag::placeholder {
  color: var(--muted);
}

.case-search-tag:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.18);
}

html.theme-dark .case-search-tag {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

html.theme-dark .case-search-tag:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

html.theme-dark .case-search-tag::placeholder {
  color: var(--muted);
}

.case-category-btn {
  height: 36px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0 18px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.case-category-btn:hover {
  background: transparent;
  color: var(--text);
  transform: scale(1.06);
}

.case-category-btn.active {
  background: var(--blue);
  color: #1d1d1f;
  border-color: rgba(29, 29, 31, 0.18);
  font-weight: 600;
  transform: scale(1.06);
}

html.theme-dark .case-category-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

html.theme-dark .case-category-btn:hover {
  background: transparent;
  color: #fff;
  transform: scale(1.06);
}

html.theme-dark .case-category-btn.active {
  background: var(--blue);
  color: #1d1d1f;
  border-color: rgba(29, 29, 31, 0.18);
  font-weight: 600;
  transform: scale(1.06);
}

.case-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.case-list-load-sentinel {
  flex: 0 0 100%;
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.case-review-group-heading {
  flex: 0 0 100%;
  width: 100%;
  height: 38px;
  margin: 10px 0 2px;
  padding: 0 10px 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.case-review-group-heading:first-child { margin-top: 0; }
.case-review-group-heading:hover { background: rgba(29, 29, 31, 0.035); }
.case-review-group-heading-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.case-review-group-heading-main strong {
  font-size: 14px;
  font-weight: 650;
}
.case-review-group-heading-main > span:last-child {
  color: var(--muted);
  font-size: 12px;
}
.case-review-group-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #a5a8ad;
}
.case-review-group-dot-pending { background: #f0a31a; }
.case-review-group-dot-rejected { background: #d75b52; }
.case-review-group-dot-approved { background: #38a169; }
.case-review-group-heading svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}
.case-review-group-heading.is-collapsed svg { transform: rotate(-90deg); }
.case-review-group-item-collapsed { display: none !important; }
html.theme-dark .case-review-group-heading:hover { background: rgba(255, 255, 255, 0.05); }
@media (prefers-reduced-motion: reduce) {
  .case-review-group-heading,
  .case-review-group-heading svg { transition: none; }
}

.case-tag {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 264px;
  height: 264px;
  min-width: 264px;
  max-width: 264px;
  min-height: 264px;
  max-height: 264px;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--surface);
  cursor: pointer;
  padding: 14px;
  text-align: left;
  box-sizing: border-box;
  transition: transform 0.2s ease;
  overflow: hidden;
}
.case-tag:hover {
  transform: scale(1.03);
}
.case-tag-wrap-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.case-tag-add-new {
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--surface);
}
.case-tag-add-icon {
  font-size: 62px;
  line-height: 1;
  color: var(--muted);
  font-weight: 400;
  user-select: none;
  margin-top: -2px;
}
.case-tag-add-new:hover .case-tag-add-icon {
  color: var(--text);
}
.case-tag-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
  flex-shrink: 0;
  margin-bottom: 8px;
  text-align: left;
}
.case-tag-author {
  display: block;
  margin-top: -4px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-tag-thumbs {
  --case-thumb-size: 112px;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: flex-start;
}
.case-tag-thumb-wrap {
  position: relative;
  flex: 0 0 auto;
  max-width: var(--case-thumb-size);
  max-height: var(--case-thumb-size);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.case-tag p.case-tag-intro,
.case-tag .case-tag-intro,
.case-tag-intro {
  flex-shrink: 0;
  margin: 13px 0 0;
  padding: 0;
  font-size: 13px !important;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.case-tag-thumb-wrap span {
  font-size: 12px;
  color: var(--muted);
}
.case-tag-thumb-wrap:not(:has(img)) {
  width: var(--case-thumb-size);
  height: var(--case-thumb-size);
}
.case-tag-thumb-wrap img {
  max-width: var(--case-thumb-size);
  max-height: var(--case-thumb-size);
  width: auto;
  height: auto;
  display: block;
}
html.theme-dark .case-tag {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.1);
}
html.theme-dark .case-tag-thumb-wrap {
  background: transparent;
}

.case-tag-status {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.case-tag-status.pending {
  background: rgba(255, 193, 7, 0.25);
  color: #b45309;
}
.case-tag-status.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.case-tag-status.original-missing {
  background: rgba(255, 149, 0, 0.14);
  color: #a54b00;
}
html.theme-dark .case-tag-status.pending {
  color: #fcd34d;
}
html.theme-dark .case-tag-status.rejected {
  color: #fca5a5;
}
html.theme-dark .case-tag-status.original-missing { color: #ffb75e; }
.case-detail-admin-review {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}
html.theme-dark .case-detail-admin-review {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.case-admin-status {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}
.case-admin-unsaved-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  color: #9a6700;
  font-size: 12px;
  font-weight: 650;
}
.case-admin-unsaved-indicator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5a623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.14);
}
.case-admin-unsaved-indicator[hidden] {
  display: none !important;
}
.case-admin-save-changes-btn.has-unsaved-changes:not(.is-saving):not(.is-success):not(.is-failed) {
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.14);
}
html.theme-dark .case-admin-unsaved-indicator {
  color: #f6c453;
}
.case-admin-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.case-admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
}
.case-admin-field span {
  color: var(--muted);
  font-size: 12px;
}
.case-admin-input,
.case-admin-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font: inherit;
  font-size: 14px;
}
.case-admin-field-categories .case-admin-category-chips {
  max-width: 100%;
}
.case-admin-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-sizing: border-box;
}
.case-admin-cat-chip {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: var(--surface, #f5f5f7);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.case-admin-cat-chip:hover {
  border-color: rgba(0, 0, 0, 0.28);
}
.case-admin-cat-chip.is-selected {
  border-color: rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.08);
  box-shadow: none;
}
html.theme-dark .case-admin-cat-chip {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.18);
}
html.theme-dark .case-admin-cat-chip:hover {
  border-color: rgba(255, 255, 255, 0.28);
}
html.theme-dark .case-admin-cat-chip.is-selected {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}
.case-admin-input-narrow {
  max-width: 120px;
}
#case-admin-edit-intro,
.case-custom-intro {
  overflow-y: hidden;
  resize: none;
}
html.theme-dark .case-admin-input,
html.theme-dark .case-admin-textarea {
  border-color: rgba(255, 255, 255, 0.15);
  background: #2a2a2a;
  color: var(--text);
}
.case-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.case-admin-actions-view {
  justify-content: flex-end;
  margin-top: 14px;
}
.case-admin-actions.case-admin-actions-top-edit {
  justify-content: flex-end;
  margin-top: 12px;
  margin-bottom: 10px;
}
.case-admin-save-btn,
.case-admin-approve-btn,
.case-admin-reject-btn,
.case-admin-delete-case {
  padding: 8px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: var(--surface);
}
.case-admin-save-btn.primary {
  background: #1d1d1f;
  color: #fff;
  border-color: transparent;
}
.case-admin-save-changes-btn {
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.case-admin-save-changes-btn:disabled {
  cursor: default;
  opacity: 1;
}
.case-admin-save-changes-btn.is-saving {
  background: #1d1d1f;
  color: #fff;
}
.case-admin-save-changes-btn.is-success {
  background: #168447;
  border-color: #168447;
  color: #fff;
}
.case-admin-save-changes-btn.is-failed {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}
.case-admin-save-spinner {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: case-admin-save-spin 0.72s linear infinite;
}
.case-admin-save-check {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  position: relative;
}
.case-admin-save-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 5px;
  height: 3px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}
@keyframes case-admin-save-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .case-admin-save-spinner { animation: none; }
  .case-admin-save-changes-btn { transition: none; }
}
.case-admin-save-btn.case-custom-submit {
  background: var(--blue);
  color: #1d1d1f;
  border-color: transparent;
  font-weight: 600;
}
.case-admin-save-btn.case-custom-submit:hover {
  filter: brightness(0.96);
}
.case-admin-save-btn.case-custom-submit:active {
  transform: scale(0.98);
}
.case-admin-approve-btn {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
}
.case-admin-reject-btn {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}
.case-admin-delete-case {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #b91c1c;
  display: none;
}
html.command-key-held .case-admin-delete-case,
body.command-key-held .case-admin-delete-case {
  display: inline-flex;
}
html.theme-dark .case-admin-delete-case {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.2);
}

.case-detail-prompt-box-admin .case-admin-task-prompt {
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--surface, #fff);
  resize: vertical;
}

html.theme-dark .case-detail-prompt-box-admin .case-admin-task-prompt {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.case-admin-task-tools {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 10px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
}
.case-admin-task-tools::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid rgba(29, 29, 31, 0.07);
  border-radius: 14px;
  background: rgba(244, 245, 247, 0.62);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.case-admin-task-tools:hover::before {
  border-color: rgba(29, 29, 31, 0.09);
  background: rgba(244, 245, 247, 0.74);
}
.case-admin-move-task,
.case-admin-delete-task {
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(54, 59, 68, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}
.case-admin-move-task svg,
.case-admin-delete-task svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.case-admin-move-task svg {
  fill: currentColor;
  stroke: none;
}
.case-admin-delete-task svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.case-admin-move-task:hover:not(:disabled) {
  background: rgba(29, 29, 31, 0.07);
  color: rgba(29, 29, 31, 0.92);
}
.case-admin-move-task:disabled {
  opacity: 0.3;
  cursor: pointer !important;
}
.case-admin-delete-task:hover {
  background: rgba(180, 35, 24, 0.09);
  color: rgba(180, 35, 24, 0.92);
}
.case-admin-delete-task:active {
  background: rgba(180, 35, 24, 0.14);
}
html.theme-dark .case-admin-task-tools {
  background: transparent;
}
html.theme-dark .case-admin-task-tools::before {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(52, 53, 56, 0.62);
}
html.theme-dark .case-admin-task-tools:hover::before {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(52, 53, 56, 0.76);
}
html.theme-dark .case-admin-move-task,
html.theme-dark .case-admin-delete-task {
  color: rgba(255, 255, 255, 0.72);
}
html.theme-dark .case-admin-move-task:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
html.theme-dark .case-admin-delete-task:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.case-detail-prompt-box-admin .case-detail-prompt-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.case-highlight-mark {
  background: #FFC106;
  color: #111;
  border-radius: 0;
  padding: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
html.theme-dark .case-highlight-mark {
  background: #FFC106;
  color: #111;
}
/* 管理员编辑态：底层镜像显示高亮，上层 textarea 文字透明（textarea 无法内嵌 HTML） */
.case-admin-highlight-stack {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.case-admin-highlight-stack-intro {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: var(--surface, #fff);
}
html.theme-dark .case-admin-highlight-stack-intro {
  border-color: rgba(255, 255, 255, 0.15);
  background: #2a2a2a;
}
.case-admin-highlight-stack-intro .case-admin-highlight-textarea {
  border: 0 !important;
  border-radius: 10px;
}
.case-admin-highlight-mirror-clip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}
.case-admin-highlight-mirror-inner {
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: var(--text);
}
.case-admin-highlight-stack-intro .case-admin-highlight-mirror-inner {
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.5;
}
.case-admin-highlight-stack-prompt {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  outline: none;
}
html.theme-dark .case-admin-highlight-stack-prompt {
  background: transparent;
}
.case-admin-highlight-stack-prompt .case-admin-task-prompt.case-admin-highlight-textarea {
  border: 0 !important;
  flex: 1 1 auto;
  min-height: 120px;
  align-self: stretch;
  resize: vertical;
}
/* 阅读态用于绕开复制按钮的 float；管理员编辑态无复制条，保留会导致底部空白点击异常 */
.case-detail-prompt-box-admin .case-detail-prompt-text-wrap::before {
  content: none !important;
  float: none !important;
  width: 0 !important;
  height: 0 !important;
  shape-outside: none !important;
}
.case-detail-prompt-box-admin .case-detail-prompt-text-wrap {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* 外层 overflow:hidden 会裁切系统焦点环，出现“半截蓝线”；改为内阴影聚焦 */
.case-detail-prompt-box-admin .case-detail-prompt-text-wrap:focus-within {
  outline: none;
}
.case-detail-prompt-box-admin .case-admin-highlight-stack-prompt:focus-within {
  outline: none;
  box-shadow: none;
}
.case-detail-prompt-box-admin:focus-within {
  box-shadow: inset 0 0 0 2px var(--blue, #0a84ff);
}
.case-detail-prompt-box-admin .case-admin-task-prompt.case-admin-highlight-textarea:focus {
  outline: none !important;
}
.case-admin-highlight-stack-prompt .case-admin-highlight-mirror-inner {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
  min-height: 120px;
}
.case-admin-highlight-textarea {
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: var(--text);
}
html.theme-dark .case-admin-highlight-textarea {
  caret-color: #f0f0f0;
}
.case-highlight-toolbar {
  position: fixed;
  z-index: 1200;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.case-highlight-toolbar.show {
  display: inline-flex;
}
.case-highlight-toolbar button {
  height: 30px;
  min-width: 70px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 30, 30, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.case-highlight-toolbar button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(42, 42, 42, 0.96);
}
.case-highlight-toolbar .case-highlight-btn-apply {
  color: #fff;
}
.case-highlight-toolbar .case-highlight-btn-remove {
  color: #fff;
}

.case-tag-wrap {
  position: relative;
  display: inline-block;
}
.case-tag-like {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 20px;
  min-width: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.2s ease, color 0.2s ease;
}
.case-tag-wrap.has-admin-actions .case-tag-like {
  right: 28px;
}
.case-tag-like:not(.is-liked):hover {
  color: #ff5c60;
}
.case-tag-like:active {
  transform: scale(0.96);
}
.case-tag-wrap:hover .case-tag-like {
  transform: scale(1.03);
}
.case-tag-like.is-liked {
  color: #fcc007;
}
.case-tag-like.is-liked .case-tag-like-count {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.case-tag-like.is-liked .case-tag-like-icon {
  stroke: #fcc007;
  filter: drop-shadow(0 1px 1px rgba(252, 192, 7, 0.45));
}
.case-tag-like.is-liked:hover {
  color: #e6b206;
}
.case-tag-like.is-liked:hover .case-tag-like-icon {
  stroke: #e6b206;
}
.case-tag-like-count {
  font-weight: 300;
  letter-spacing: 0.01em;
  min-width: 8px;
  text-align: right;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
}
.case-tag-like-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  transform: translateY(0.5px);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.65));
}
.case-tag-wrap.case-tag-stagger-enter {
  opacity: 0;
  transform: translateY(6px) scale(0.99);
  visibility: hidden;
}
.case-tag-wrap.case-tag-stagger-enter.case-tag-stagger-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.case-tag-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #ff5c60;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  padding: 0;
  transform: scale(1);
  transition: transform 0.16s ease, box-shadow 0.2s ease, opacity 0.15s ease;
  opacity: 1;
  pointer-events: auto;
}
.case-tag-delete:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.03);
}
.case-tag-delete:active {
  transform: scale(1.14);
}
html.theme-dark .case-tag-delete {
  background: #ff5c60;
  color: #fff;
}
html.theme-dark .case-tag-delete:hover {
  background: #ff5c60;
  filter: brightness(1.03);
}
html.theme-dark .case-tag-like {
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
}
html.theme-dark .case-tag-like:not(.is-liked):hover {
  color: #ff9da0;
}
html.theme-dark .case-tag-like.is-liked,
html.theme-dark .case-tag-like.is-liked:hover {
  color: #fcc007;
}
html.theme-dark .case-tag-like.is-liked .case-tag-like-icon {
  stroke: #fcc007;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.case-detail-intro-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.case-detail-intro-text {
  flex: 1;
  min-width: 0;
}
.case-detail-intro-like.case-tag-like {
  position: static;
  flex-shrink: 0;
  align-self: flex-end;
  transform: none;
  margin-left: auto;
}
.case-detail-intro-like.case-tag-like:active {
  transform: scale(0.96);
}
.case-detail-intro-section .case-detail-intro-like.case-tag-like:hover {
  transform: scale(1.03);
}

.case-list-wrap {
  position: relative;
  margin-top: 8px;
  overflow: visible;
}
.case-detail-view {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: visible;
  transition: opacity 0.2s ease;
}
.case-detail-view.case-enter-initial { opacity: 0; }
.case-detail-view.case-enter-done { opacity: 1; }
.case-detail-edge-nav {
  position: fixed;
  top: 50%;
  z-index: 90;
  width: 44px;
  height: 58px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(29, 29, 31, 0.72);
  box-shadow: 0 8px 28px rgba(29, 29, 31, 0.08);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}
.case-detail-edge-nav-prev { left: 18px; }
.case-detail-edge-nav-next { right: 18px; }
.case-detail-edge-nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.case-detail-edge-nav:hover:not(:disabled) {
  border-color: rgba(29, 29, 31, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #1d1d1f;
  box-shadow: 0 10px 34px rgba(29, 29, 31, 0.12);
}
.case-detail-edge-nav:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
}
.case-detail-edge-nav:focus-visible {
  outline: 2px solid rgba(0, 122, 255, 0.5);
  outline-offset: 3px;
}
.case-detail-edge-nav:disabled {
  opacity: 0.24;
  cursor: default;
  box-shadow: none;
}
html.theme-dark .case-detail-edge-nav {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(38, 38, 40, 0.76);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.24);
}
html.theme-dark .case-detail-edge-nav:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(54, 54, 57, 0.94);
  color: #fff;
}
.case-detail-header-row {
  position: sticky;
  top: 50px;
  z-index: 40;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 -12px 14px;
  padding: 10px 12px;
  border-bottom: 0;
  background: var(--bg);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.case-detail-header-row::before {
  content: "";
  position: absolute;
  inset: 0 -56px;
  z-index: -1;
  background: var(--bg);
  pointer-events: none;
}
.case-detail-view .case-detail-back {
  flex-shrink: 0;
  margin-bottom: 0;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.case-detail-view .case-detail-back:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.14);
}
.case-detail-current-name {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-detail-sticky-review-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.22s;
}
.case-detail-sticky-review-actions.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}
.case-detail-sticky-review-actions > button {
  min-height: 34px;
  padding: 7px 13px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .case-detail-header-row { gap: 10px; }
  .case-detail-header-row::before { inset-inline: -20px; }
  .case-detail-current-name { font-size: 16px; }
  .case-detail-sticky-review-actions [data-case-sticky-review-action="save"],
  .case-detail-sticky-review-actions [data-case-sticky-review-action="reject"] { display: none; }
  .case-detail-sticky-review-actions > button {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .case-detail-sticky-review-actions { transition: none; }
}
html.theme-dark .case-detail-view .case-detail-back {
  border-color: rgba(255, 255, 255, 0.12);
  background: #242424;
}
html.theme-dark .case-detail-view .case-detail-back:hover {
  background: rgba(255, 255, 255, 0.06);
}
html.theme-dark .case-detail-header-row {
  background: var(--bg);
  border-bottom-color: transparent;
  box-shadow: none;
}
@media (max-width: 760px) {
  .case-detail-edge-nav { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .case-detail-view,
  .case-detail-edge-nav { transition: none; }
}
.case-detail-view .case-detail-body {
  padding: 0;
  overflow: visible;
}
.case-detail-loading {
  margin: 32px 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.case-detail-view .case-detail-body .case-detail-head {
  display: none;
}
.case-detail-view .case-detail-head {
  margin-bottom: 12px;
}
.case-detail-view .case-detail-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.case-detail-view .case-detail-author-inline {
  margin-left: 8px;
  font-size: 0.82em;
  font-weight: 500;
  color: var(--muted);
  vertical-align: baseline;
}
.case-detail-view .case-list-item-intro {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  white-space: pre-wrap;
  word-break: break-word;
}
.case-detail-view .case-list-item-tasks {
  display: flex;
}
.case-detail-section-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
body.command-key-held .case-detail-import-btn {
  min-width: 100px;
  height: 36px;
  font-size: 14px;
  padding: 0 18px;
}

.case-detail-body.layout-a {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.case-detail-body.layout-a .case-detail-head {
  padding: 20px 24px;
  margin-bottom: 0;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}
.case-detail-body.layout-a .case-detail-title { font-size: 20px; }
.case-detail-body.layout-a .case-detail-intro-section {
  padding: 20px 24px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
}
.case-detail-body.layout-a .case-detail-section-title { margin-bottom: 14px; font-size: 15px; color: var(--muted); }
.case-detail-body.layout-a .case-list-item-intro { font-size: 14px; line-height: 1.65; color: var(--text); margin: 0; }
.case-detail-body.layout-a .case-detail-tasks-section { margin-top: 0; }
.case-detail-body.layout-a .case-list-item-tasks { flex-direction: column; gap: 20px; margin-top: 0; }
.case-detail-body.layout-a .case-task-card {
  padding: 20px 24px;
  gap: 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.case-detail-body.layout-a .case-task-ref-img,
.case-detail-body.layout-a .case-task-result-img { width: 72px; height: 72px; border-radius: 8px; }
.case-detail-body.layout-a .case-task-prompt { font-size: 13px; line-height: 1.5; }

.case-detail-body.layout-b {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.case-detail-body.layout-b .case-detail-head {
  padding-bottom: 28px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.case-detail-body.layout-b .case-detail-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.case-detail-body.layout-b .case-detail-intro-section {
  padding: 28px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.case-detail-body.layout-b .case-detail-section-title { display: none; }
.case-detail-body.layout-b .case-list-item-intro { font-size: 15px; line-height: 1.75; color: var(--text); margin: 0; }
.case-detail-body.layout-b .case-detail-tasks-section { padding: 28px 0 0; }
.case-detail-body.layout-b .case-list-item-tasks { flex-direction: column; gap: 28px; margin-top: 0; }
.case-detail-body.layout-b .case-task-card {
  padding: 20px 0;
  gap: 20px;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.case-detail-body.layout-b .case-task-card:last-child { border-bottom: none; }
.case-detail-body.layout-b .case-task-ref-img,
.case-detail-body.layout-b .case-task-result-img { width: 80px; height: 80px; border-radius: 10px; }
.case-detail-body.layout-b .case-task-prompt { font-size: 14px; line-height: 1.55; }

.case-detail-body.layout-c {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.case-detail-body.layout-c .case-detail-head {
  padding-bottom: 12px;
  margin-bottom: 0;
}
.case-detail-body.layout-c .case-detail-title { font-size: 20px; }
.case-detail-body.layout-c .case-detail-intro-section {
  padding: 14px 0 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.case-detail-body.layout-c .case-detail-section-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.case-detail-body.layout-c .case-list-item-intro {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
  max-width: 100%;
}
.case-detail-body.layout-c {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.case-detail-body.layout-c .case-detail-tasks-section {
  padding: 32px 0 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.case-detail-body.layout-c .case-list-item-tasks {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.case-detail-body.layout-c .case-detail-tasks-section .case-detail-section-title {
  margin-bottom: 20px;
}
.case-detail-body.layout-c .case-list-item-tasks { flex-direction: column; gap: 14px; margin-top: 0; }
.case-detail-body.layout-c .case-task-card {
  padding: 24px 26px;
  gap: 22px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.case-detail-body.layout-c .case-task-ref-img,
.case-detail-body.layout-c .case-task-result-img { width: 72px; height: 72px; border-radius: 10px; }
.case-detail-body.layout-c .case-task-prompt { font-size: 14px; line-height: 1.6; }
html.theme-dark .case-detail-body.layout-a .case-detail-head,
html.theme-dark .case-detail-body.layout-a .case-detail-intro-section { border-color: rgba(255, 255, 255, 0.08); }
html.theme-dark .case-detail-body.layout-a .case-detail-intro-section { background: rgba(255, 255, 255, 0.03); }
html.theme-dark .case-detail-body.layout-b .case-detail-head,
html.theme-dark .case-detail-body.layout-b .case-detail-intro-section,
html.theme-dark .case-detail-body.layout-b .case-task-card { border-color: rgba(255, 255, 255, 0.08); }
html.theme-dark .case-detail-header-row { border-color: rgba(255, 255, 255, 0.08); }
html.theme-dark .case-detail-body.layout-c .case-detail-intro-section { border-color: rgba(255, 255, 255, 0.08); }
html.theme-dark .case-detail-body.layout-c .case-task-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
html.theme-dark .case-detail-task-index-tag {
  background: var(--blue);
  border-color: rgba(255, 255, 255, 0.12);
  color: #1d1d1f;
}
html.theme-dark .case-detail-result-slot { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }

.case-detail-tasks-narrow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-detail-task-shell {
  position: relative;
  padding-left: 0;
  overflow: visible;
}
.case-detail-task-index-tag {
  position: absolute;
  left: 0;
  top: 10px;
  width: 34px;
  height: 40px;
  padding: 0;
  transform: translateX(-72%);
  border-radius: 10px;
  background: var(--blue);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}
.case-detail-task-card {
  position: relative;
  z-index: 2;
  height: 390px;
  min-height: 390px;
  max-height: 390px;
  overflow: auto;
  padding: 22px 0 5px 20px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 22px;
  background: var(--surface);
  box-sizing: border-box;
}
.case-detail-task-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-rows: auto 1fr;
  gap: 16px 24px;
  align-items: start;
  min-height: 0;
  height: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
.case-detail-upload-panel {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}
.case-detail-upload-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 12px;
}
.case-detail-upload-slot {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  max-width: 150px;
  max-height: 150px;
  justify-self: center;
  cursor: pointer;
  transition: transform 0.22s ease;
}
.case-detail-upload-slot:hover {
  transform: scale(1.05);
}
.case-detail-upload-slot img {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  display: block;
}
.case-detail-upload-slot-placeholder {
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
  cursor: default;
  opacity: 0.35;
}
.case-detail-upload-slot-placeholder:hover {
  transform: none;
}
.case-custom-upload-slot {
  width: 100%;
  min-width: 72px;
  max-width: 150px;
  min-height: 72px;
  max-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.4);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  appearance: none;
  -webkit-appearance: none;
}
.case-custom-upload-slot:hover {
  transform: none;
  color: rgba(0, 0, 0, 0.62);
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.06);
}
html.theme-dark .case-detail-upload-slot-placeholder {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.35;
}
html.theme-dark .case-custom-upload-slot {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.48);
}
html.theme-dark .case-custom-upload-slot:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}
.case-custom-result-empty {
  width: 100%;
  max-width: 346px;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.42);
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.22s ease, color 0.2s ease, border-color 0.2s ease;
  user-select: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}
.case-custom-result-empty:hover {
  transform: none;
  color: rgba(0, 0, 0, 0.62);
  border-color: rgba(0, 0, 0, 0.2);
}
.case-custom-remove-img {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.case-detail-upload-slot:hover .case-custom-remove-img,
.case-detail-result-slot:hover .case-custom-remove-img {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}
.case-custom-remove-img:hover {
  background: rgba(205, 49, 49, 0.92);
  transform: translateY(0);
}
.case-custom-remove-img:active { transform: scale(0.94); }
.case-result-remove-btn {
  top: 10px;
  right: auto;
  left: 10px;
  width: auto;
  min-width: 66px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(24, 24, 26, 0.68);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.case-result-remove-btn:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(205, 49, 49, 0.92);
}
.case-result-remove-btn:active {
  transform: scale(0.96);
}
.case-detail-result-slot.case-admin-result-replace-slot {
  transition: box-shadow 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}
.case-detail-result-slot.case-admin-result-replace-slot.case-admin-result-drop-target,
.case-detail-result-slot.case-admin-result-replace-slot.case-admin-result-drop-target:hover {
  box-shadow: inset 0 0 0 3px rgba(0, 113, 227, 0.72), 0 8px 24px rgba(0, 113, 227, 0.16);
  filter: brightness(0.78);
  transform: scale(0.985);
}
.case-detail-result-slot.case-admin-result-replace-slot.case-admin-result-drop-target::after {
  content: "松开替换";
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(10, 20, 34, 0.34);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}
.case-detail-result-slot.case-admin-result-replace-slot.case-admin-result-drop-processing {
  opacity: 0.72;
  pointer-events: none;
}
.case-result-original-missing {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(30, 24, 17, 0.72);
  color: #fff3df;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.case-result-restore-original {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #252525;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.case-result-restore-original:hover { background: #fff; }
.case-result-restore-original:active { transform: scale(0.96); }
.case-result-deleted-state {
  width: 100%;
  max-width: 346px;
  aspect-ratio: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-result-deleted-state .case-custom-result-empty {
  width: 100%;
  height: 100%;
  max-width: none;
}
.case-result-delete-undo {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(185, 28, 28, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #b42318;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, transform 0.12s ease;
}
.case-result-delete-undo:hover {
  border-color: rgba(185, 28, 28, 0.38);
  background: #fff;
  color: #991b1b;
}
.case-result-delete-undo:active {
  transform: scale(0.97);
}
.case-detail-upload-slot.case-deleting,
.case-detail-result-slot.case-deleting {
  opacity: 0;
  transform: scale(0.88);
  filter: blur(0.5px);
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
  pointer-events: none;
}
.case-custom-close-task {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #ff5c60;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  padding: 0;
  transform: scale(1);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.case-custom-close-task:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.03);
}
.case-custom-close-task:active {
  transform: scale(1.14);
}
.case-detail-task-shell.case-deleting {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  filter: blur(0.5px);
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
  pointer-events: none;
}
.case-admin-task-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 16px;
}
.case-admin-add-task {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: #eceef1;
  color: #424750;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.case-admin-add-task svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  pointer-events: none;
}
.case-admin-add-task span {
  pointer-events: none;
}
.case-admin-add-task:hover:not(:disabled) {
  background: #dfe2e6;
  color: #1d1d1f;
}
.case-admin-add-task:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.case-admin-task-count {
  color: var(--muted);
  font-size: 12px;
}
html.theme-dark .case-admin-add-task {
  background: #343538;
  color: rgba(255, 255, 255, 0.7);
}
html.theme-dark .case-admin-add-task:hover:not(:disabled) {
  background: #45474b;
  color: #fff;
}
.case-admin-task-motion-add { animation: case-admin-task-add 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.case-admin-task-motion-swap-up { animation: case-admin-task-swap-up 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.case-admin-task-motion-swap-down { animation: case-admin-task-swap-down 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.case-admin-task-motion-displace-up { animation: case-admin-task-displace-up 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.case-admin-task-motion-displace-down { animation: case-admin-task-displace-down 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes case-admin-task-add {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes case-admin-task-swap-up {
  from { opacity: 0.58; transform: translateY(72px) scale(0.985); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes case-admin-task-swap-down {
  from { opacity: 0.58; transform: translateY(-72px) scale(0.985); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes case-admin-task-displace-up {
  from { opacity: 0.68; transform: translateY(54px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes case-admin-task-displace-down {
  from { opacity: 0.68; transform: translateY(-54px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .case-admin-task-motion-add,
  .case-admin-task-motion-swap-up,
  .case-admin-task-motion-swap-down,
  .case-admin-task-motion-displace-up,
  .case-admin-task-motion-displace-down { animation: none; }
}
.case-admin-task-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 12020;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 22, 26, 0.22);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.case-admin-task-confirm-overlay.is-visible { opacity: 1; }
.case-admin-task-confirm-overlay.is-closing { opacity: 0; }
.case-admin-task-confirm {
  width: min(390px, calc(100vw - 40px));
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.case-admin-task-confirm-overlay.is-visible .case-admin-task-confirm { transform: translateY(0) scale(1); }
.case-admin-task-confirm-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 7px;
  background: #f4e8e7;
  color: #b42318;
}
.case-admin-task-confirm-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.case-admin-task-confirm-copy h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
  color: #1d1d1f;
}
.case-admin-task-confirm-copy p {
  margin: 0;
  color: #686d76;
  font-size: 13px;
  line-height: 1.6;
}
.case-admin-task-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.case-admin-task-confirm-actions button {
  min-width: 72px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.case-admin-task-confirm-cancel { background: #eceef1; color: #3f444d; }
.case-admin-task-confirm-delete { background: #b42318; color: #fff; }
.case-admin-task-confirm-cancel:hover { background: #dfe2e6; }
.case-admin-task-confirm-delete:hover { background: #961f16; }
html.theme-dark .case-admin-task-confirm {
  border-color: rgba(255, 255, 255, 0.1);
  background: #28292c;
}
html.theme-dark .case-admin-task-confirm-copy h3 { color: #f5f5f7; }
html.theme-dark .case-admin-task-confirm-copy p { color: rgba(255, 255, 255, 0.62); }
html.theme-dark .case-admin-task-confirm-cancel { background: #3b3d41; color: #f5f5f7; }
@media (prefers-reduced-motion: reduce) {
  .case-admin-task-confirm-overlay,
  .case-admin-task-confirm { transition: none; }
}
.case-custom-create-footer {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
.case-custom-create-footer .case-custom-add-task {
  min-width: 44px;
  width: 44px;
  height: 32px;
  padding: 0;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}
html.theme-dark .case-custom-result-empty {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.48);
}
html.theme-dark .case-custom-result-empty:hover {
  color: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.2);
}
.case-custom-create-root .case-detail-upload-slot:hover,
.case-custom-create-root .case-detail-result-slot:hover {
  transform: none;
}
.case-custom-upload-filled {
  transition: transform 0.18s ease, box-shadow 0.18s ease, outline-color 0.18s ease;
}
.case-custom-upload-filled.case-grab-active {
  transform: scale(0.98);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  cursor: grabbing;
}
.case-custom-upload-filled.case-grab-active img {
  transform: scale(0.96);
  filter: brightness(0.98);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.case-custom-upload-filled.case-drag-source {
  opacity: 0.16;
  transform: scale(0.9);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.28);
}
.case-custom-upload-filled.case-drag-target,
.case-custom-upload-slot.case-drag-target {
  outline: 2px solid rgba(0, 113, 227, 0.45);
  outline-offset: -2px;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.15);
}
.case-custom-create-root .case-detail-prompt-actions {
  display: none !important;
}
@keyframes case-custom-required-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.case-custom-required-shake {
  animation: case-custom-required-shake 0.42s ease;
}
.case-custom-required-outline {
  box-shadow: 0 0 0 2px rgba(255, 76, 76, 0.45) !important;
  border-radius: 10px;
}
html.theme-dark .case-custom-remove-img { background: rgba(0, 0, 0, 0.62); color: #fff; }
html.theme-dark .case-result-remove-btn {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(18, 18, 20, 0.72);
}
html.theme-dark .case-result-remove-btn:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(220, 55, 55, 0.94);
}
html.theme-dark .case-result-delete-undo {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(34, 35, 38, 0.9);
  color: #fca5a5;
}
html.theme-dark .case-result-delete-undo:hover {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(50, 51, 55, 0.96);
  color: #fecaca;
}
html.theme-dark .case-custom-close-task { background: #ff5c60; color: #fff; }
.case-custom-create-root .case-detail-task-card {
  padding-bottom: 22px;
}
.case-detail-prompt-panel {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.case-detail-prompt-box {
  width: 100%;
  min-height: 120px;
  max-height: 180px;
  flex: 1;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.case-detail-prompt-text-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 18px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
}
.case-detail-prompt-text-wrap::before { content: none; }
.case-detail-prompt-box:not(.case-detail-prompt-box-admin) .case-detail-prompt-text-wrap {
  padding: 20px 18px 48px;
}
.case-detail-prompt-text-wrap::-webkit-scrollbar {
  display: none;
}
.case-detail-prompt-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px 12px 18px;
  z-index: 1;
}
.case-detail-prompt-copy {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #e8e8e8;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease-out;
}
.case-detail-prompt-copy:hover {
  background: #ddd;
  color: var(--text);
}
.case-detail-prompt-copy:active {
  transform: scale(0.96);
}
.case-detail-prompt-copy .case-detail-prompt-copy-check {
  display: none;
}
.case-detail-prompt-copy.is-copied .case-detail-prompt-copy-icon {
  display: none;
}
.case-detail-prompt-copy.is-copied .case-detail-prompt-copy-check {
  display: block;
}
.case-prompt-length-notice {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 62px);
  padding: 3px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface, #fff) 90%, #f5a623 10%);
  color: color-mix(in srgb, var(--muted) 78%, #9a6700 22%);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}
.case-detail-prompt-box:has(.case-prompt-length-notice) .case-admin-highlight-textarea {
  padding-bottom: 38px !important;
}
html.theme-dark .case-prompt-length-notice {
  background: rgba(47, 43, 32, 0.94);
  color: #e8c46a;
}
html.theme-dark .case-detail-prompt-copy {
  background: #3d3d3d;
  color: rgba(255, 255, 255, 0.85);
}
html.theme-dark .case-detail-prompt-copy:hover {
  background: #4a4a4a;
  color: #fff;
}
.case-detail-prompt-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
  margin: 0;
}
.case-detail-result-panel {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 360px;
  max-width: 360px;
  align-self: stretch;
  margin-left: -6px;
  position: relative;
}
.case-detail-import-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  height: 32px;
  min-width: 88px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: #1d1d1f;
  background: var(--blue);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: background 0.35s ease, color 0.35s ease, transform 0.2s ease, opacity 0.15s ease;
  z-index: 2;
}
.case-detail-result-slot .case-detail-import-btn {
  opacity: 0;
  pointer-events: none;
  transition-delay: 0s;
}
.case-detail-result-slot:hover .case-detail-import-btn {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.22s;
}
.case-detail-import-btn:hover {
  transform: scale(1.04);
}
.case-detail-import-btn:active {
  transform: scale(0.96);
}
.case-detail-import-check {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: -2px;
  animation: task-complete-toast-icon-pop 0.4s ease-out forwards;
}
.case-detail-import-check svg {
  width: 100%;
  height: 100%;
  color: #35c759;
}
html.theme-dark .case-detail-import-btn {
  background: var(--blue);
  color: #1d1d1f;
}
.case-detail-result-stack {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 14px;
}
.case-detail-result-slot {
  position: relative;
  display: inline-block;
  max-width: 346px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.22s ease;
}
.case-detail-result-slot:hover {
  transform: scale(1.03);
}
.case-detail-result-slot img {
  max-width: 346px;
  max-height: 346px;
  width: auto;
  height: auto;
  display: block;
}
.case-detail-tasks-narrow .case-task-empty {
  font-size: 12px;
  color: var(--muted);
}
html.theme-dark .case-detail-task-card { border-color: rgba(255, 255, 255, 0.08); background: #242424; }
html.theme-dark .case-detail-upload-slot { background: rgba(255, 255, 255, 0.06); }
html.theme-dark .case-detail-result-slot { background: rgba(255, 255, 255, 0.06); }
.case-detail-set-preview {
  position: absolute;
  left: 8px;
  bottom: 8px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transition-delay: 0s;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.case-detail-upload-slot:hover .case-detail-set-preview,
.case-detail-result-slot:hover .case-detail-set-preview {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.22s;
}
.case-detail-set-preview:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.04);
}
.case-detail-set-preview.is-preview {
  opacity: 1;
  pointer-events: auto;
  background: #35c759;
  color: #fff;
}
html.theme-dark .case-detail-prompt-box { border-color: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); }

/* 新建案例提示词：与「超级香蕉」一致——仅一层外框（.prompt-box），内层 textarea 透明无底框 */
.case-custom-create-root .case-detail-prompt-box.case-detail-prompt-box-admin {
  position: relative;
  width: 100%;
  max-height: none !important;
  flex: 1;
  min-height: 0;
  padding: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 16px !important;
  background: var(--soft) !important;
  box-shadow: none !important;
  box-sizing: border-box;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
html.theme-dark .case-custom-create-root .case-detail-prompt-box.case-detail-prompt-box-admin {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: #242424 !important;
}
.case-custom-create-root .case-detail-prompt-text-wrap {
  flex: 1 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  padding: 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
}
.case-custom-create-root .case-admin-highlight-stack-prompt {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.case-custom-create-root .case-admin-highlight-stack-prompt:focus-within {
  box-shadow: none !important;
}
.case-custom-create-root .case-admin-highlight-stack-prompt .case-admin-highlight-mirror-inner {
  min-height: 120px !important;
  padding: 10px 12px 12px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
.case-custom-create-root .case-detail-prompt-text-wrap::before {
  content: none !important;
  display: none !important;
}
.case-custom-create-root .case-detail-prompt-box-admin .case-admin-task-prompt {
  width: 100% !important;
  flex: 1 1 0 !important;
  min-height: 120px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  padding: 10px 12px 12px 12px !important;
  border: none !important;
  border-radius: 0 !important;
  resize: none !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: var(--text) !important;
  background: transparent !important;
  outline: none !important;
  scrollbar-width: none;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  align-self: stretch !important;
}
.case-custom-create-root .case-admin-task-prompt::-webkit-scrollbar {
  display: none;
}
html.theme-dark .case-custom-create-root .case-detail-prompt-box-admin .case-admin-task-prompt {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: #f0f0f0 !important;
  background: transparent !important;
  border: none !important;
}
.case-custom-create-root .case-detail-prompt-box-admin .case-admin-task-prompt::placeholder {
  color: rgba(0, 0, 0, 0.42);
  -webkit-text-fill-color: rgba(0, 0, 0, 0.42);
  opacity: 1;
}
html.theme-dark .case-custom-create-root .case-detail-prompt-box-admin .case-admin-task-prompt::placeholder {
  color: rgba(255, 255, 255, 0.5);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.case-list-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
}

.case-list-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-list-item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.case-list-item-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--soft);
  color: var(--text);
}

.case-list-item-rate {
  font-size: 13px;
  color: var(--muted);
}

.case-list-item-intro {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.case-list-item-tasks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.case-task-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}

.case-task-refs,
.case-task-results {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-task-ref-img,
.case-task-result-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}

.case-task-result-wrap {
  display: block;
}

.case-task-prompt {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.case-task-empty {
  font-size: 12px;
  color: var(--muted);
}

html.theme-dark .case-list-item {
  background: #242424;
  border-color: rgba(255, 255, 255, 0.08);
}

html.theme-dark .case-task-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.case-list-empty {
  margin: 0;
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}

/* 案例库 / 个人案例按钮：统一浅色、深色与键盘交互状态。 */
#ai-case button:focus-visible,
#ai-case-personal button:focus-visible,
.case-monthly-stats-modal button:focus-visible,
.case-trash-modal button:focus-visible,
.case-delete-choice-modal button:focus-visible,
.case-admin-task-confirm-overlay button:focus-visible {
  outline: 2px solid #0a84ff;
  outline-offset: 2px;
}

.case-monthly-stats-query-btn,
.case-monthly-stats-export-btn,
.case-trash-action-btn,
.case-delete-choice-btn,
.case-admin-save-btn,
.case-admin-approve-btn,
.case-admin-reject-btn,
.case-admin-delete-case,
.case-admin-task-confirm-actions button {
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, filter 0.16s ease, transform 0.12s ease;
}

.case-monthly-stats-query-btn:hover:not(:disabled),
.case-monthly-stats-export-btn:hover:not(:disabled) {
  background: var(--blue);
  filter: brightness(0.94);
}
.case-monthly-stats-query-btn:active:not(:disabled),
.case-monthly-stats-export-btn:active:not(:disabled),
.case-trash-action-btn:active:not(:disabled),
.case-delete-choice-btn:active:not(:disabled),
.case-admin-save-btn:active:not(:disabled),
.case-admin-approve-btn:active:not(:disabled),
.case-admin-reject-btn:active:not(:disabled),
.case-admin-delete-case:active:not(:disabled),
.case-admin-task-confirm-actions button:active:not(:disabled) {
  transform: scale(0.97);
}

.case-trash-action-btn:hover:not(:disabled),
.case-delete-choice-btn:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.045);
}
.case-trash-action-btn.danger:hover:not(:disabled),
.case-delete-choice-btn.danger:hover:not(:disabled) {
  border-color: rgba(185, 28, 28, 0.34);
  background: rgba(239, 68, 68, 0.1);
  color: #a71919;
}
.case-delete-choice-btn.primary:hover:not(:disabled) {
  border-color: transparent;
  background: var(--blue);
  filter: brightness(0.94);
}

.case-admin-save-btn,
.case-admin-approve-btn,
.case-admin-reject-btn,
.case-admin-delete-case {
  color: var(--text);
}
.case-admin-save-btn:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.045);
}
.case-admin-save-btn.primary:hover:not(:disabled) {
  border-color: transparent;
  background: #303033;
}
.case-admin-approve-btn {
  color: #166534;
}
.case-admin-approve-btn:hover:not(:disabled) {
  border-color: rgba(22, 163, 74, 0.52);
  background: rgba(34, 197, 94, 0.28);
}
.case-admin-reject-btn,
.case-owner-delete-case {
  color: #b42318;
}
.case-admin-reject-btn:hover:not(:disabled),
.case-owner-delete-case:hover:not(:disabled),
.case-admin-delete-case:hover:not(:disabled) {
  border-color: rgba(220, 38, 38, 0.48);
  background: rgba(239, 68, 68, 0.18);
  color: #991b1b;
}
.case-owner-delete-case {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.1);
}

html.theme-dark .case-admin-save-btn,
html.theme-dark .case-admin-approve-btn,
html.theme-dark .case-admin-reject-btn,
html.theme-dark .case-admin-delete-case {
  border-color: rgba(255, 255, 255, 0.16);
  background: #292a2d;
  color: rgba(255, 255, 255, 0.9);
}
html.theme-dark .case-admin-save-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
  background: #343539;
  color: #fff;
}
html.theme-dark .case-admin-save-btn.primary,
html.theme-dark .case-admin-save-btn.is-saving {
  border-color: rgba(255, 255, 255, 0.16);
  background: #f5f5f7;
  color: #1d1d1f;
}
html.theme-dark .case-admin-save-btn.primary:hover:not(:disabled),
html.theme-dark .case-admin-save-btn.is-saving:hover:not(:disabled) {
  background: #fff;
  color: #1d1d1f;
}
html.theme-dark .case-admin-save-btn.case-custom-submit {
  border-color: transparent;
  background: var(--blue);
  color: #1d1d1f;
}
html.theme-dark .case-admin-save-btn.is-success {
  border-color: #28a45e;
  background: #168447;
  color: #fff;
}
html.theme-dark .case-admin-save-btn.is-failed {
  border-color: #d74338;
  background: #b42318;
  color: #fff;
}
html.theme-dark .case-admin-approve-btn {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(34, 197, 94, 0.17);
  color: #86efac;
}
html.theme-dark .case-admin-approve-btn:hover:not(:disabled) {
  border-color: rgba(74, 222, 128, 0.58);
  background: rgba(34, 197, 94, 0.26);
  color: #bbf7d0;
}
html.theme-dark .case-admin-reject-btn,
html.theme-dark .case-admin-delete-case,
html.theme-dark .case-owner-delete-case {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}
html.theme-dark .case-admin-reject-btn:hover:not(:disabled),
html.theme-dark .case-admin-delete-case:hover:not(:disabled),
html.theme-dark .case-owner-delete-case:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

html.theme-dark .case-trash-action-btn:hover:not(:disabled),
html.theme-dark .case-delete-choice-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}
html.theme-dark .case-trash-action-btn.danger,
html.theme-dark .case-delete-choice-btn.danger {
  color: #fca5a5;
}
html.theme-dark .case-trash-action-btn.danger:hover:not(:disabled),
html.theme-dark .case-delete-choice-btn.danger:hover:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}
html.theme-dark .case-delete-choice-btn.primary:hover:not(:disabled) {
  border-color: transparent;
  background: var(--blue);
  color: #1d1d1f;
}

html.theme-dark .case-admin-task-confirm-cancel:hover:not(:disabled) {
  background: #4a4c51;
  color: #fff;
}
html.theme-dark .case-admin-task-confirm-delete:hover:not(:disabled) {
  background: #d0372b;
}

.case-admin-move-task:disabled {
  cursor: not-allowed !important;
}

html.theme-dark .case-custom-upload-slot:hover,
html.theme-dark .case-custom-result-empty:hover {
  border-color: rgba(255, 255, 255, 0.68);
}

.case-detail-upload-slot:focus-within .case-custom-remove-img,
.case-detail-result-slot:focus-within .case-custom-remove-img,
.case-detail-upload-slot:focus-within .case-detail-set-preview,
.case-detail-result-slot:focus-within .case-detail-set-preview,
.case-detail-result-slot:focus-within .case-detail-import-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

@media (hover: none) {
  .case-detail-upload-slot .case-custom-remove-img,
  .case-detail-result-slot .case-custom-remove-img,
  .case-detail-upload-slot .case-detail-set-preview,
  .case-detail-result-slot .case-detail-set-preview,
  .case-detail-result-slot .case-detail-import-btn {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
  }
}
