:root {
  --brand: #d62833;
  --brand-dark: #ab1f29;
  --brand-soft: #fff1f2;
  --ink: #272729;
  --text: #3f3f42;
  --muted: #6d6b6c;
  --line: #e6e3e4;
  --panel: #ffffff;
  --bg: #f7f7f8;
  --green: #16835b;
  --orange: #c77228;
  --blue: #2563a8;
  --danger: #b42318;
  --shadow: 0 10px 26px rgba(60, 55, 58, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 12px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #eee9e9;
  border-radius: 8px;
  background: #fff;
}

.brand-logo img {
  width: 52px;
  height: 52px;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 19px;
  line-height: 1.15;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #58565a;
  text-align: left;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  border: 1px solid #dedede;
  border-radius: 7px;
  color: var(--muted);
  background: #fff;
  stroke-width: 2;
}

.nav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
  box-shadow: inset 3px 0 0 var(--brand);
}

.nav-item.is-active svg {
  color: var(--brand);
  border-color: #f5b9bf;
}

.environment-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid #eadadb;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff7f7 0%, #fff 100%);
}

.environment-card strong,
.environment-card span,
.environment-card small {
  display: block;
}

.environment-card strong {
  font-size: 13px;
}

.environment-card span,
.environment-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 76px;
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-box {
  width: 326px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  color: #9a9698;
}

.search-box svg {
  width: 16px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
  font-size: 13px;
}

.primary-button {
  border: 0;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 20px rgba(214, 40, 51, 0.16);
}

.secondary-button {
  border: 0;
  background: #3e3b3c;
  color: #fff;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #494547;
}

.danger-button {
  border: 0;
  background: var(--danger);
  color: #fff;
}

.icon-button {
  width: 38px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.danger-button svg,
.icon-button svg {
  width: 16px;
  height: 16px;
}

.identity-badge {
  min-width: 94px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.workspace {
  padding: 26px 32px 32px;
}

.status-bar {
  min-height: 0;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.status-bar:empty {
  display: none;
}

.is-hidden {
  display: none !important;
}

.login-view {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.login-card h2 {
  margin: 0;
  font-size: 24px;
}

.login-card label,
.field label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.login-card input,
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: 0;
}

.login-card input,
.field input,
.field select {
  height: 40px;
  padding: 0 12px;
}

.field textarea {
  min-height: 140px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.view-panel {
  min-width: 0;
}

.kpi-grid,
.content-grid {
  display: grid;
  gap: 16px;
}

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

.content-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.9fr);
  margin-top: 16px;
}

.card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi-card {
  min-height: 122px;
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--brand);
}

.kpi-card:nth-child(2)::before {
  background: #6d6b6c;
}

.kpi-card:nth-child(3)::before {
  background: var(--green);
}

.kpi-card:nth-child(4)::before {
  background: var(--orange);
}

.kpi-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  margin-top: 30px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.panel {
  padding: 20px;
}

.panel-header,
.table-toolbar,
.filter-row,
.drawer-header,
.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-header {
  margin-bottom: 16px;
}

.panel-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.panel-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.chart-panel {
  min-height: 388px;
}

.line-chart {
  width: 100%;
  height: 260px;
  margin-top: 8px;
  overflow: visible;
}

.donut-layout {
  min-height: 292px;
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 18px;
}

.donut {
  width: 174px;
  height: 174px;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(var(--brand) 0 58%, #6d6b6c 58% 75%, var(--orange) 75% 89%, #d8d5d6 89% 100%);
}

.donut::after {
  content: attr(data-total) "\A总数";
  white-space: pre;
  position: absolute;
  inset: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

.legend-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 9px;
  color: #555153;
  font-size: 13px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.table-panel {
  margin-top: 16px;
}

.table-toolbar {
  margin-bottom: 14px;
}

.table-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-row {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.filter-row input,
.filter-row select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

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

.data-table th {
  height: 42px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #faf9f9;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 900;
}

.data-table td {
  height: 58px;
  padding: 0 14px;
  border-bottom: 1px solid #eeeaea;
  color: #444043;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table .name-cell {
  color: var(--ink);
  font-weight: 900;
}

.case-table {
  min-width: 980px;
}

.case-table th:nth-child(1),
.case-table td:nth-child(1) {
  width: 56px;
  text-align: center;
}

.case-row-select,
.case-selection-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

.case-selection-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.case-selection-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#caseBulkStatus {
  min-width: 126px;
}

.case-table th:nth-child(2) {
  width: 31%;
}

.case-table th:nth-child(3) {
  width: 11%;
}

.case-table th:nth-child(4),
.case-table th:nth-child(7),
.case-table th:nth-child(8) {
  width: 8%;
}

.case-table th:nth-child(5),
.case-table th:nth-child(6) {
  width: 11%;
}

.case-table td:nth-child(2) {
  white-space: normal;
}

.case-quick-title {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
}

.case-quick-title input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.case-quick-title input:hover,
.case-quick-title input:focus {
  border-color: var(--line);
  background: #fff;
  outline: none;
}

.case-quick-title input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.case-quick-title .icon-button {
  width: 30px;
  min-height: 30px;
  border-radius: 6px;
}

.case-quick-title .icon-button:disabled {
  visibility: hidden;
}

.case-status-select {
  width: 100%;
  min-width: 96px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 26px 0 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.case-status-select:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.case-status-select.draft {
  background-color: #fff3f4;
  color: var(--brand);
}

.case-status-select.published {
  background-color: #e8f6ef;
  color: var(--green);
}

.case-status-select.hidden {
  background-color: #f0f2f5;
  color: #4b535c;
}

.case-status-select:disabled {
  cursor: wait;
  opacity: 0.6;
}

.table-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.table-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.table-switch > span {
  width: 34px;
  height: 20px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #c9c5c7;
  transition: background 0.16s ease;
}

.table-switch > span::after {
  content: "";
  width: 14px;
  height: 14px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease;
}

.table-switch input:checked + span {
  background: var(--green);
}

.table-switch input:checked + span::after {
  transform: translateX(14px);
}

.table-switch input:disabled + span {
  opacity: 0.55;
}

.table-switch strong {
  color: var(--muted);
  font-size: 11px;
}

.case-sort-notice {
  min-height: 58px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #efd5a0;
  border-radius: 7px;
  background: #fff9e8;
  color: #7b5a19;
}

.case-sort-notice svg {
  width: 19px;
  height: 19px;
}

.case-sort-notice strong,
.case-sort-notice p {
  display: block;
  margin: 0;
}

.case-sort-notice strong {
  font-size: 12px;
}

.case-sort-notice p {
  margin-top: 3px;
  font-size: 11px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.tag,
.status-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.tag {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.status-pill.pending,
.status-pill.draft {
  background: #fff3f4;
  color: var(--brand);
}

.status-pill.contacted,
.status-pill.hidden {
  background: #f0f2f5;
  color: #4b535c;
}

.status-pill.completed,
.status-pill.published,
.status-pill.enabled {
  background: #e8f6ef;
  color: var(--green);
}

.status-pill.invalid,
.status-pill.disabled {
  background: #f2f2f3;
  color: var(--muted);
}

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

.field.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

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

.cell-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.read-field {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eeeaea;
}

.read-field span {
  color: var(--muted);
  font-size: 13px;
}

.read-field strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.read-field.is-multiline strong {
  white-space: pre-wrap;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  background: rgba(39, 39, 41, 0.22);
}

.drawer {
  width: min(760px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  box-shadow: -20px 0 46px rgba(39, 39, 41, 0.18);
}

.drawer-header,
.drawer-footer {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.drawer-inline,
.drawer-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer-inline select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.drawer-footer-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.drawer-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drawer-header h2 {
  margin: 0;
  font-size: 20px;
}

.drawer-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.section-heading h3 {
  margin: 0;
  font-size: 15px;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.image-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: start;
  gap: 14px;
}

.hero-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
}

.image-field-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.image-field-card.is-dirty {
  border-color: #e8a5ab;
  box-shadow: inset 0 0 0 1px #f9d3d6;
}

.image-field-header {
  min-height: 64px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.image-field-header strong,
.image-field-header p {
  display: block;
}

.image-field-header strong {
  font-size: 14px;
}

.image-field-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.image-field-header > span {
  flex: 0 0 auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 6px;
  background: #f2f2f3;
  color: #5e5b5d;
  font-size: 11px;
  font-weight: 900;
}

.media-preview-button {
  width: min(100%, 180px);
  align-self: center;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
}

.media-preview-frame {
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4e1e2;
  border-radius: 7px;
  background: #f4f4f5;
}

.media-preview-frame::after {
  content: "点击查看大图";
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(27, 26, 27, 0.72);
  color: #fff;
  font-size: 10px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.has-preview .media-preview-button:hover .media-preview-frame::after {
  opacity: 1;
}

.media-preview-frame img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: none;
  object-fit: cover;
}

[data-image-card="logoFileId"] .media-preview-frame img,
[data-image-card="wechatQrFileId"] .media-preview-frame img {
  padding: 14px;
  background: #fff;
  object-fit: contain;
}

.image-field-card.has-preview .media-preview-frame img {
  display: block;
}

.media-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #918d8f;
  font-size: 12px;
}

.media-preview-empty svg {
  width: 24px;
  height: 24px;
}

.image-field-card.has-preview .media-preview-empty {
  display: none;
}

.image-file-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.image-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
}

.image-file-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  outline: 0;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
}

.image-file-input:focus {
  border-color: #d98990;
  box-shadow: 0 0 0 3px #fff1f2;
}

.image-field-actions {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.image-field-actions .ghost-button {
  flex: 0 0 auto;
}

.danger-text-action {
  color: var(--danger);
}

.image-save-state {
  min-width: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.image-field-card.is-dirty .image-save-state {
  color: var(--brand);
}

.site-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 26px -20px -20px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.modal-open {
  overflow: hidden;
}

.crop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 23, 24, 0.64);
}

.crop-dialog {
  width: min(840px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 15, 16, 0.3);
}

.crop-header,
.crop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.crop-header {
  border-bottom: 1px solid var(--line);
}

.crop-header h2 {
  margin: 0;
  font-size: 18px;
}

.crop-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.crop-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px;
}

.crop-stage {
  height: min(56vh, 560px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #393739;
  border-radius: 7px;
  background: #242224;
}

.crop-stage canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  cursor: grab;
  touch-action: none;
}

.crop-stage canvas.is-dragging {
  cursor: grabbing;
}

.crop-controls {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px 52px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.crop-controls svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.crop-controls input {
  width: 100%;
  accent-color: var(--brand);
}

.crop-controls strong {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.crop-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.crop-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.crop-footer button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.draft-state {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: #eef7f2;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.draft-state.is-dirty {
  background: #fff4e8;
  color: var(--orange);
}

.page-content-layout {
  min-height: 620px;
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 24px;
}

.content-section-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.content-section-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.content-section-tabs button.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 3px 0 0 var(--brand);
}

.page-visual-editor {
  min-width: 0;
}

.visual-editor-heading,
.editor-section-title,
.repeat-list-heading,
.visual-object-heading,
.repeat-card > header,
.editor-media-actions,
.editor-media-tile footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visual-editor-heading {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.visual-editor-heading h2,
.editor-section-title h3,
.visual-object-heading h3,
.repeat-list-heading h4 {
  margin: 0;
}

.visual-editor-heading h2 {
  font-size: 18px;
}

.visual-editor-heading p,
.editor-section-title p,
.repeat-list-heading p,
.visual-object-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.visual-editor-heading > span {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.visual-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.visual-field {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visual-field.is-wide {
  grid-column: 1 / -1;
}

.visual-field > label {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.visual-field > label em {
  margin-left: 6px;
  color: var(--brand);
  font-size: 10px;
  font-style: normal;
}

.visual-field input,
.visual-field textarea,
.visual-field select,
.repeat-string-item input,
.media-file-id {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: 0;
}

.visual-field input,
.visual-field select,
.repeat-string-item input,
.media-file-id {
  height: 40px;
  padding: 0 12px;
}

.visual-field textarea {
  min-height: 98px;
  padding: 11px 12px;
  line-height: 1.65;
  resize: vertical;
}

.visual-field input:focus,
.visual-field textarea:focus,
.visual-field select:focus,
.repeat-string-item input:focus,
.media-file-id:focus {
  border-color: #d98990;
  box-shadow: 0 0 0 3px #fff1f2;
}

.visual-field input:disabled {
  background: #f4f4f5;
  color: #777277;
  cursor: not-allowed;
}

.visual-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.visual-field.is-technical small,
.visual-field.is-technical > label {
  color: #686268;
}

.field-counter {
  position: absolute;
  right: 9px;
  bottom: 7px;
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #969095;
  font-size: 10px;
}

.switch-control {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control > span {
  width: 38px;
  height: 22px;
  position: relative;
  border-radius: 11px;
  background: #c9c5c7;
  transition: background 0.16s ease;
}

.switch-control > span::after {
  content: "";
  width: 16px;
  height: 16px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease;
}

.switch-control input:checked + span {
  background: var(--green);
}

.switch-control input:checked + span::after {
  transform: translateX(16px);
}

.switch-control strong {
  color: var(--muted);
  font-size: 12px;
}

.visual-object-section,
.editor-form-section,
.repeat-list,
.visual-checklist {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.visual-object-heading,
.editor-section-title,
.repeat-list-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.visual-object-heading h3,
.editor-section-title h3 {
  font-size: 15px;
}

.visual-object-heading > p {
  padding: 3px 7px;
  border-radius: 5px;
  background: #f3f2f3;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.repeat-list-heading h4 {
  font-size: 14px;
}

.repeat-card-list,
.repeat-string-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repeat-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fcfcfc;
}

.repeat-card > header {
  margin-bottom: 12px;
}

.repeat-card > header strong {
  font-size: 12px;
}

.repeat-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.repeat-item-actions .icon-button {
  width: 30px;
  min-height: 30px;
  border-radius: 6px;
}

.repeat-item-actions .icon-button svg {
  width: 14px;
  height: 14px;
}

.repeat-item-actions button:disabled {
  cursor: default;
  opacity: 0.35;
}

.danger-icon-button {
  color: var(--danger);
}

.repeat-string-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.repeat-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f1eff0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.inline-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.page-content-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.page-content-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.drawer {
  width: min(900px, 100vw);
}

.editor-health {
  min-height: 64px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5d9b8;
  border-radius: 7px;
  background: #fff9e8;
  color: #8a6720;
}

.editor-health.has-errors {
  border-color: #f0c4c7;
  background: #fff3f4;
  color: var(--danger);
}

.editor-health.is-ready {
  border-color: #b9dfcd;
  background: #eef9f3;
  color: var(--green);
}

.editor-health svg {
  width: 22px;
  height: 22px;
}

.editor-health strong,
.editor-health p {
  display: block;
  margin: 0;
}

.editor-health strong {
  font-size: 13px;
}

.editor-health p {
  margin-top: 4px;
  font-size: 11px;
}

.editor-section-title h3 {
  font-size: 16px;
}

.editor-media-field,
.editor-video-field {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #efeced;
}

.editor-media-preview {
  width: 100%;
  min-height: 120px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f4f4f5;
  color: var(--muted);
}

.editor-media-preview img,
.editor-media-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.editor-media-preview span,
.video-empty,
.editor-media-tile button > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.editor-media-copy strong {
  font-size: 14px;
}

.editor-media-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.editor-media-actions {
  justify-content: flex-start;
}

.media-file-id {
  grid-column: 2 / -1;
  height: 34px;
  color: var(--muted);
  font-size: 10px;
}

.editor-media-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.editor-media-pair .editor-media-field {
  grid-template-columns: 140px minmax(0, 1fr);
}

.editor-media-pair .editor-media-actions,
.editor-media-pair .media-file-id {
  grid-column: 1 / -1;
}

.editor-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.editor-media-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.editor-media-tile > button {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: #f4f4f5;
}

.editor-media-tile footer {
  padding: 7px;
}

.editor-media-tile footer > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.editor-video-field {
  grid-template-columns: minmax(0, 1fr) auto;
}

.editor-video-field video,
.video-empty {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 360px;
  border-radius: 7px;
  background: #242224;
}

.video-empty {
  min-height: 160px;
}

.editor-video-field .media-file-id {
  grid-column: 1 / -1;
}

.readonly-meta {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f7f8;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  word-break: break-all;
}

.map-location-field {
  min-height: 96px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #cbc6c9;
  border-radius: 7px;
  background: #fafafa;
}

.map-location-field.has-location {
  border-style: solid;
  border-color: #b9dfcd;
  background: #f2faf6;
}

.map-location-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--line);
}

.map-location-icon svg {
  width: 20px;
  height: 20px;
}

.map-location-copy {
  min-width: 0;
}

.map-location-copy strong,
.map-location-name,
.map-location-copy p,
.map-location-copy small {
  display: block;
}

.map-location-copy strong {
  color: var(--muted);
  font-size: 11px;
}

.map-location-name {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.map-location-copy p,
.map-location-copy small {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
}

.map-location-copy small {
  font-family: Consolas, monospace;
}

.map-location-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 24, 27, 0.58);
}

.map-picker-panel {
  width: min(980px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(16, 24, 40, 0.28);
}

.map-picker-panel header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.map-picker-panel header strong {
  font-size: 16px;
}

.map-picker-panel header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.map-picker-panel iframe {
  width: 100%;
  height: min(680px, 72vh);
  display: block;
  border: 0;
  background: #f4f4f5;
}

.video-capture-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 24, 27, 0.54);
}

.video-capture-panel {
  width: min(860px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(16, 24, 40, 0.28);
}

.video-capture-panel header,
.video-capture-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-capture-panel header strong {
  font-size: 16px;
}

.video-capture-panel header p,
.video-capture-message {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.video-capture-panel video {
  width: 100%;
  max-height: 58vh;
  border-radius: 7px;
  background: #18181b;
}

.video-capture-actions span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.checklist-grid label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-size: 12px;
}

.checklist-grid input {
  accent-color: var(--brand);
}

.checklist-grid span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-library {
  display: grid;
  gap: 16px;
}

.asset-library-header,
.asset-library-actions,
.asset-library-filters,
.asset-upload-setting-fields,
.asset-selection-toolbar,
.asset-selection-toolbar > div,
.asset-stats,
.asset-rights-notice label,
.asset-card-heading,
.asset-card-actions,
.asset-card-actions > div,
.resource-upload-queue > header,
.resource-upload-queue > header > div,
.asset-picker-header,
.asset-picker-toolbar,
.asset-picker-footer,
.asset-picker-footer > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-library-header {
  justify-content: space-between;
  min-height: 72px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.asset-library-header h2 {
  margin: 0;
  font-size: 20px;
}

.asset-library-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.asset-library-actions {
  flex: 0 0 auto;
}

.asset-library-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.asset-upload-settings {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid #d7e2db;
  border-radius: 7px;
  background: #f5faf7;
}

.asset-upload-setting-fields {
  flex-wrap: wrap;
}

.asset-metadata-actions {
  display: flex;
  align-self: end;
  gap: 8px;
}

.asset-upload-setting-fields label {
  min-width: 160px;
  display: grid;
  gap: 5px;
}

.asset-upload-setting-fields label > span,
.asset-filter-grid label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.asset-upload-setting-fields select,
.asset-filter-grid select,
.asset-filter-grid input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  outline: 0;
  font-size: 12px;
}

.asset-upload-setting-fields select:focus,
.asset-filter-grid select:focus,
.asset-filter-grid input:focus {
  border-color: #d98990;
  box-shadow: 0 0 0 3px #fff1f2;
}

.asset-upload-settings small {
  color: #42604f;
  font-size: 11px;
  line-height: 1.5;
}

.asset-stats {
  min-height: 70px;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.asset-stats span {
  min-width: 118px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.asset-stats strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.asset-rights-notice {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #ead9b3;
  border-radius: 7px;
  background: #fff9e8;
}

.asset-api-alert {
  min-height: 62px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid #efc1c5;
  border-radius: 7px;
  background: #fff3f4;
  color: var(--danger);
}

.asset-api-alert > svg {
  width: 21px;
  height: 21px;
}

.asset-api-alert strong,
.asset-api-alert p {
  display: block;
  margin: 0;
}

.asset-api-alert strong {
  font-size: 13px;
}

.asset-api-alert p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
}

.asset-rights-notice label {
  color: #725313;
  font-size: 13px;
  font-weight: 900;
}

.asset-rights-notice input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.asset-rights-notice small {
  color: #8a6720;
  font-size: 11px;
  line-height: 1.5;
}

.asset-library-filters {
  flex-wrap: wrap;
  justify-content: space-between;
  min-height: 42px;
}

.asset-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

.asset-filter-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.asset-filter-grid .ghost-button {
  white-space: nowrap;
}

.asset-type-tabs {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.asset-type-tabs button {
  min-width: 76px;
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-type-tabs button:last-child {
  border-right: 0;
}

.asset-type-tabs button.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.asset-library-search,
.asset-picker-search {
  min-width: min(280px, 100%);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
}

.asset-library-search svg,
.asset-picker-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.asset-library-search input,
.asset-picker-search input,
.asset-library-filters select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.asset-library-search input,
.asset-picker-search input {
  width: 100%;
}

.asset-library-filters select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 28px 0 10px;
  background: #fff;
}

.asset-result-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.asset-selection-toolbar {
  min-height: 48px;
  justify-content: space-between;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-selection-toolbar > div {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.asset-selection-toolbar button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.asset-selection-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.asset-library-more {
  display: flex;
  justify-content: center;
  padding: 2px 0 8px;
}

.asset-library-more .ghost-button {
  min-width: 160px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 210px));
  justify-content: start;
  gap: 12px;
}

.asset-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.asset-card.is-selected {
  border-color: #d98990;
  box-shadow: 0 0 0 2px #fff1f2, var(--shadow);
}

.asset-card-select {
  width: 30px;
  height: 30px;
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.asset-card-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.asset-card-select span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  background: rgba(39, 39, 41, 0.78);
  color: transparent;
  box-shadow: 0 2px 8px rgba(24, 24, 27, 0.2);
}

.asset-card-select input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.asset-card-select input:focus-visible + span {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.asset-card-select.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.asset-card-select svg {
  width: 14px;
  height: 14px;
}

.asset-card-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0;
  background: #f1f1f2;
  color: var(--muted);
}

.asset-card-preview img,
.asset-card-preview video,
.asset-picker-media img,
.asset-picker-media video,
.asset-editor-preview img,
.asset-editor-preview video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.asset-card-preview.is-empty {
  cursor: default;
  gap: 6px;
  font-size: 12px;
}

.asset-card-preview.is-empty svg {
  width: 24px;
  height: 24px;
}

.asset-video-mark {
  width: 34px;
  height: 34px;
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.76);
  color: #fff;
}

.asset-video-mark svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}

.asset-card-copy {
  display: grid;
  gap: 8px;
  padding: 12px 12px 10px;
}

.asset-card-heading {
  min-width: 0;
  justify-content: space-between;
}

.asset-card-heading h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.asset-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.asset-card-copy .asset-classification {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #555154;
}

.asset-classification svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.asset-type-pill,
.asset-auth-state,
.asset-usage-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 5px;
  padding: 0 7px;
  background: #f1eff0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.asset-type-pill.video {
  background: #e9f0fb;
  color: var(--blue);
}

.asset-type-pill.image {
  background: #fdf0e5;
  color: #a55318;
}

.asset-tag-list {
  min-height: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.asset-tag-list span {
  max-width: 100%;
  overflow: hidden;
  border-radius: 4px;
  padding: 3px 6px;
  background: #f6f5f5;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.asset-tag-list span.is-empty {
  padding-left: 0;
  background: transparent;
}

.asset-card-actions {
  justify-content: space-between;
  min-height: 45px;
  padding: 7px 8px 7px 12px;
  border-top: 1px solid var(--line);
}

.asset-card-actions > div {
  gap: 5px;
}

.asset-card-actions .icon-button {
  width: 30px;
  min-height: 30px;
}

.asset-card-actions .icon-button svg {
  width: 14px;
  height: 14px;
}

.asset-auth-state {
  color: #8a6720;
  background: #fff4dc;
}

.asset-auth-state.is-confirmed {
  color: var(--green);
  background: #eaf7ef;
}

.asset-usage-state {
  color: var(--muted);
  background: #f1eff0;
}

.asset-usage-state.is-in-use {
  color: var(--green);
  background: #eaf7ef;
}

.asset-card-actions .icon-button.is-danger {
  color: var(--danger);
}

.asset-card-actions .icon-button.is-danger:hover {
  border-color: #efc1c5;
  background: #fff3f4;
}

.asset-card-actions .icon-button:disabled,
.asset-card-actions .icon-button:disabled:hover {
  cursor: not-allowed;
  border-color: var(--line);
  background: #f5f5f6;
  color: #a4a0a2;
}

.resource-upload-queue {
  overflow: hidden;
  border: 1px solid #c9dfd1;
  border-radius: 8px;
  background: #f4fbf7;
}

.resource-upload-queue > header {
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #d9ebe0;
}

.resource-upload-queue strong {
  color: #246342;
  font-size: 13px;
}

.resource-upload-queue p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.resource-upload-list {
  max-height: 220px;
  overflow: auto;
  background: #fff;
}

.resource-upload-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 20px minmax(140px, 0.9fr) minmax(160px, 1.1fr);
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #f0eeee;
  color: var(--text);
  font-size: 12px;
}

.resource-upload-row:last-child {
  border-bottom: 0;
}

.resource-upload-row > svg {
  width: 15px;
  color: var(--muted);
}

.resource-upload-row > span,
.resource-upload-row > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-upload-row > small {
  color: var(--muted);
  font-size: 11px;
}

.resource-upload-row.is-done > svg,
.resource-upload-row.is-done > small {
  color: var(--green);
}

.resource-upload-row.is-failed > svg,
.resource-upload-row.is-failed > small,
.resource-upload-row.is-rejected > svg,
.resource-upload-row.is-rejected > small {
  color: var(--danger);
}

.asset-editor-preview {
  width: 100%;
  max-height: 340px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3f3f4;
}

.asset-editor-preview.is-empty {
  min-height: 180px;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.media-metadata-manager {
  max-width: 620px;
  display: grid;
  gap: 22px;
}

.media-metadata-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.media-metadata-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.media-metadata-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.media-metadata-row:last-child {
  border-bottom: 0;
}

.media-metadata-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f3f3f4;
  color: var(--muted);
}

.media-metadata-icon svg {
  width: 16px;
  height: 16px;
}

.media-metadata-row > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.media-metadata-row strong,
.media-metadata-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-metadata-row strong {
  font-size: 13px;
}

.media-metadata-row small,
.media-metadata-empty {
  color: var(--muted);
  font-size: 11px;
}

.media-metadata-row .icon-button.is-danger {
  color: var(--danger);
}

.media-metadata-row .icon-button:disabled {
  cursor: not-allowed;
  color: #aaa6a8;
  opacity: 0.55;
}

.media-metadata-empty {
  padding: 22px;
  text-align: center;
}

.media-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 18, 20, 0.78);
}

.media-preview-dialog {
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: #171719;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.media-preview-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #343438;
  color: #fff;
}

.media-preview-header > div {
  min-width: 0;
}

.media-preview-header h2,
.media-preview-header p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-preview-header h2 {
  font-size: 16px;
}

.media-preview-header p {
  margin-top: 5px;
  color: #b8b8bd;
  font-size: 11px;
}

.media-preview-header .icon-button {
  flex: 0 0 auto;
  border-color: #45454a;
  background: #262629;
  color: #fff;
}

.media-preview-body {
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: auto;
  background: #0d0d0e;
}

.media-preview-body img,
.media-preview-body video {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  display: block;
  object-fit: contain;
}

.media-preview-body video {
  width: 100%;
}

.asset-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 24, 27, 0.58);
}

.asset-picker-dialog {
  width: min(1080px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(16, 24, 40, 0.28);
}

.asset-picker-header,
.asset-picker-footer {
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.asset-picker-header h2 {
  margin: 0;
  font-size: 18px;
}

.asset-picker-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.asset-picker-toolbar {
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.asset-picker-toolbar > span,
.asset-picker-selection {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.asset-picker-body {
  min-height: 260px;
  overflow: auto;
  padding: 16px 18px;
}

.asset-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.asset-picker-item {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.asset-picker-item:hover {
  border-color: #d9a8ac;
}

.asset-picker-item.is-selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.asset-picker-item.is-existing {
  cursor: default;
  opacity: 0.55;
}

.asset-picker-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f2f2f3;
  color: var(--muted);
}

.asset-picker-media > svg {
  width: 22px;
  height: 22px;
}

.asset-picker-video-mark {
  width: 28px;
  height: 28px;
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.72);
  color: #fff;
  padding: 7px;
}

.asset-picker-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.asset-picker-copy strong,
.asset-picker-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-picker-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.asset-picker-copy small {
  color: var(--muted);
  font-size: 10px;
}

.asset-picker-check {
  width: 28px;
  height: 28px;
  position: absolute;
  right: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.58);
  color: #fff;
}

.asset-picker-item.is-selected .asset-picker-check {
  border-color: var(--brand);
  background: var(--brand);
}

.asset-picker-check svg {
  width: 15px;
  height: 15px;
}

.asset-picker-message {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.asset-picker-message.is-error {
  color: var(--danger);
}

.asset-picker-load-more {
  min-height: 36px;
  display: block;
  margin: 16px auto 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.asset-picker-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.asset-picker-footer > div {
  justify-content: flex-end;
}

.asset-picker-footer .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    position: static;
    height: auto;
    gap: 10px;
    padding: 12px 14px 8px;
  }

  .brand {
    min-height: 58px;
    padding: 2px 6px 8px;
  }

  .nav-list {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    padding: 0 10px;
  }

  .nav-item.is-active {
    box-shadow: inset 0 -3px 0 var(--brand);
  }

  .environment-card {
    display: none;
  }

  .topbar,
  .top-actions,
  .panel-header,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
    padding: 16px 18px;
  }

  .top-actions {
    width: 100%;
    flex-flow: row wrap;
    align-items: center;
  }

  .top-actions .search-box {
    flex: 1 1 100%;
  }

  #quickCreateCase {
    width: auto;
    flex: 1;
  }

  .identity-badge {
    flex: 0 0 auto;
  }

  .search-box,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

  .table-toolbar-actions {
    width: 100%;
  }

  .table-toolbar-actions > button {
    flex: 1;
  }

  .workspace {
    padding: 18px;
  }

  .panel {
    min-width: 0;
    overflow: hidden;
  }

  .kpi-grid,
  .content-grid,
  .form-grid,
  .donut-layout,
  .drawer-kpis,
  .image-settings-grid,
  .hero-settings-grid {
    grid-template-columns: 1fr;
  }

  .read-field {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .drawer-inline,
  .drawer-footer,
  .drawer-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-form-actions {
    align-items: stretch;
    margin-right: -20px;
    margin-left: -20px;
  }

  .image-field-header {
    min-height: 0;
  }

  .page-content-layout {
    grid-template-columns: 1fr;
  }

  .content-section-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content-section-tabs button {
    flex: 0 0 auto;
    min-width: 92px;
    text-align: center;
  }

  .visual-field-grid,
  .editor-media-pair,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .editor-media-field,
  .editor-video-field,
  .editor-media-pair .editor-media-field {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .editor-media-actions,
  .media-file-id,
  .editor-media-pair .editor-media-actions,
  .editor-media-pair .media-file-id {
    grid-column: 1;
  }

  .editor-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .repeat-string-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .repeat-string-item .repeat-item-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .repeat-list-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .repeat-list-heading .ghost-button {
    width: 100%;
  }

  .case-sort-notice {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .case-sort-notice > button {
    grid-column: 1 / -1;
  }

  .asset-library-header,
  .asset-library-actions,
  .asset-library-filters,
  .asset-picker-toolbar,
  .asset-picker-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-library-actions {
    width: 100%;
  }

  .asset-upload-setting-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-upload-setting-fields label {
    min-width: 0;
  }

  .asset-metadata-actions {
    grid-column: 1 / -1;
  }

  .asset-metadata-actions .ghost-button {
    flex: 1;
  }

  .asset-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-filter-grid .ghost-button {
    width: 100%;
  }

  .asset-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-stats span {
    min-width: 0;
  }

  .asset-library-search,
  .asset-picker-search {
    width: 100%;
  }

  .asset-library-filters select {
    width: 100%;
  }

  .asset-type-tabs {
    width: 100%;
  }

  .asset-type-tabs button {
    flex: 1;
  }

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

  .asset-selection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-selection-toolbar > div {
    width: 100%;
  }

  .asset-selection-toolbar button {
    width: auto;
    flex: 1;
  }

  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 210px));
  }

  .asset-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-upload-row {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .resource-upload-row > small {
    grid-column: 2;
    white-space: normal;
  }

  .asset-picker-backdrop {
    padding: 10px;
  }

  .media-preview-backdrop {
    padding: 10px;
  }

  .media-preview-dialog {
    max-height: calc(100vh - 20px);
  }

  .asset-picker-dialog {
    max-height: calc(100vh - 20px);
  }

  .asset-picker-footer > div {
    width: 100%;
  }

  .asset-picker-footer .ghost-button,
  .asset-picker-footer .primary-button {
    width: auto;
    flex: 1;
  }

  .map-location-field {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .map-location-actions {
    grid-column: 1 / -1;
  }

  .map-location-actions .ghost-button {
    width: auto;
    flex: 1;
  }

  .map-picker-modal {
    padding: 10px;
  }

  .map-picker-panel iframe {
    height: 72vh;
  }

  .drawer-footer-actions {
    width: 100%;
    flex-direction: row;
  }

  .drawer-footer-actions > button {
    width: auto;
    flex: 1;
  }

  .image-field-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .image-field-actions .ghost-button {
    grid-column: 1 / -1;
  }

  .image-field-actions .danger-text-action {
    justify-self: start;
  }

  .image-field-actions .image-save-state {
    justify-self: end;
  }

  .crop-backdrop {
    padding: 10px;
  }

  .crop-dialog {
    max-height: calc(100vh - 20px);
  }

  .crop-stage {
    height: 46vh;
  }

  .crop-footer {
    flex-direction: row;
  }

  .crop-footer button {
    width: auto;
    flex: 1;
  }
}

@media (max-width: 560px) {
  .asset-upload-setting-fields,
  .asset-filter-grid {
    grid-template-columns: 1fr;
  }

  .asset-metadata-actions,
  .media-metadata-form {
    grid-template-columns: 1fr;
  }

  .asset-metadata-actions {
    display: grid;
  }

  .asset-selection-toolbar > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-selection-toolbar .danger-button {
    grid-column: 1 / -1;
  }

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

  .asset-card-preview {
    aspect-ratio: 16 / 9;
  }

  .resource-upload-queue > header {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-upload-queue > header > div:last-child {
    width: 100%;
  }

  .resource-upload-queue > header .ghost-button {
    flex: 1;
  }

  .asset-picker-header {
    align-items: flex-start;
  }

  .asset-picker-header > div {
    min-width: 0;
  }

  .asset-picker-header p {
    line-height: 1.45;
  }

  .media-preview-header {
    align-items: flex-start;
  }

  .media-preview-body {
    min-height: 220px;
  }
}

.ai-interview-panel,
.ai-review-list {
  display: grid;
  gap: 14px;
}

.ai-interview-toolbar,
.ai-review-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ai-interview-toolbar p,
.ai-interview-actions span,
.ai-review-item small {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.6;
}

.ai-interview-question-list,
.ai-interview-candidates {
  display: grid;
  gap: 10px;
}

.ai-interview-question,
.ai-interview-candidate,
.ai-review-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.ai-interview-question-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.6;
}

.ai-interview-question-title > span {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}

.ai-interview-question-title b {
  color: #b42318;
  font-size: 11px;
}

.ai-interview-answer {
  display: grid;
  gap: 8px;
  margin: 12px 0 0 32px;
}

.ai-interview-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-interview-answer textarea,
.ai-review-item textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}

.ai-interview-actions,
.ai-review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-interview-candidate > div,
.ai-review-item-heading > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ai-interview-candidate span,
.ai-review-item-heading span {
  color: #6b7280;
  font-size: 11px;
}

.ai-interview-candidate p {
  margin: 8px 0;
  white-space: pre-wrap;
  line-height: 1.7;
}

.ai-empty-state,
.ai-interview-skip {
  color: #6b7280;
  font-size: 13px;
}

.review-library,
.review-detail-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-library-header,
.review-detail-header,
.review-toolbar,
.review-card-top,
.review-card-meta,
.review-card-footer,
.review-detail-actions,
.review-detail-summary,
.review-admin-player-meta,
.review-upload-fields,
.review-form-grid,
.review-member-row,
.review-finalize-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-library-header,
.review-detail-header,
.review-toolbar,
.review-card-top,
.review-card-footer,
.review-detail-summary,
.review-finalize-bar {
  justify-content: space-between;
}

.review-library-header {
  align-items: flex-end;
}

.review-toolbar {
  justify-content: flex-start;
  padding: 12px 0;
  color: var(--muted, #6d6b6c);
}

.review-toolbar label,
.review-detail-status label,
.review-upload-fields label,
.review-project-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #4c5260;
  font-size: 13px;
  font-weight: 700;
}

.review-toolbar select,
.review-detail-status select,
.review-upload-fields input,
.review-project-form input,
.review-project-form textarea {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  background: #fff;
  color: #252833;
  font: inherit;
}

.review-project-form textarea {
  min-height: 92px;
  resize: vertical;
}

.review-form-grid {
  align-items: stretch;
}

.review-form-grid > label {
  flex: 1;
}

.check-line {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}

.review-summary {
  color: #6d6b6c;
  font-size: 13px;
}

.review-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.review-project-card {
  display: flex;
  min-height: 188px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(25, 37, 65, 0.05);
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.review-project-card:hover {
  border-color: #b8c5dd;
  box-shadow: 0 12px 30px rgba(25, 37, 65, 0.1);
  transform: translateY(-2px);
}

.review-card-top {
  align-items: flex-start;
}

.review-card-top h3 {
  max-width: 260px;
  margin: 7px 0 0;
  color: #17213c;
  font-size: 19px;
  line-height: 1.35;
}

.review-card-kicker {
  color: #bf2630;
  font-size: 12px;
  font-weight: 800;
}

.review-card-meta {
  flex-wrap: wrap;
  margin: 22px 0;
  color: #69738a;
  font-size: 13px;
}

.review-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.review-card-meta svg {
  width: 15px;
  height: 15px;
}

.review-card-footer {
  padding-top: 14px;
  border-top: 1px solid #edf0f4;
  font-size: 13px;
}

.review-open-count {
  color: #bf2630;
}

.review-detail-header {
  align-items: center;
}

.review-detail-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.review-detail-summary {
  align-items: flex-start;
  padding: 22px;
}

.review-detail-summary h2 {
  margin: 7px 0 8px;
  color: #17213c;
  font-size: 26px;
}

.review-detail-summary p {
  max-width: 680px;
  margin: 0;
  color: #6d7484;
  line-height: 1.6;
}

.review-detail-status {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-direction: column;
}

.review-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.review-player-panel {
  overflow: hidden;
}

.review-admin-video {
  display: block;
  width: 100%;
  max-height: 620px;
  min-height: 280px;
  background: #080b13;
  object-fit: contain;
}

.review-admin-player-meta {
  flex-wrap: wrap;
  padding: 11px 16px;
  color: #6d7484;
  font-size: 13px;
}

.review-version-upload {
  margin-top: 12px;
  padding: 18px;
  border-top: 1px solid #e5e9ef;
}

.review-upload-fields {
  align-items: flex-end;
  flex-wrap: wrap;
}

.review-upload-fields label {
  min-width: 130px;
  flex: 1;
}

.review-upload-fields input[type="file"] {
  min-height: auto;
  padding: 8px;
}

.review-side-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-access-card {
  background: #fffaf0;
}

.review-mini-code {
  width: 188px;
  height: 188px;
  display: grid;
  margin: 4px auto 10px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e3d5af;
  border-radius: 8px;
  background: #fff;
}

.review-mini-code img {
  display: block;
  width: 176px;
  height: 176px;
  object-fit: contain;
}

.review-mini-code-loading,
.review-mini-code-error {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  color: #7c6d52;
  text-align: center;
  font-size: 12px;
}

.review-mini-code-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #eadfca;
  border-top-color: #a56b20;
  border-radius: 50%;
  animation: review-code-spin 0.8s linear infinite;
}

.review-mini-code.is-error {
  background: #fffdf8;
}

.review-mini-code-error svg {
  width: 36px;
  height: 36px;
  color: #a56b20;
}

.review-mini-code-error strong {
  color: #5f4a2c;
  font-size: 13px;
}

.review-mini-code-error span {
  line-height: 1.5;
}

.review-mini-code-caption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  color: #5f4a2c;
  font-size: 12px;
}

.review-mini-code-caption span {
  min-width: 0;
  overflow: hidden;
  color: #8c7656;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-access-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.review-access-actions .ghost-button {
  min-width: 0;
  padding: 0 10px;
  white-space: nowrap;
}

.review-access-actions .ghost-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.review-share-code {
  overflow-wrap: anywhere;
  margin: 14px 0 10px;
  padding: 12px;
  border: 1px dashed #d3b26d;
  border-radius: 8px;
  background: #fff;
  color: #8b5c1f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

@keyframes review-code-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .review-mini-code-spinner {
    animation: none;
  }
}

.review-version-list {
  display: flex;
  flex-direction: column;
}

.review-version-row,
.review-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #edf0f4;
}

.review-version-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.review-version-row span,
.review-version-row small {
  overflow: hidden;
  color: #7b8494;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-version-row.is-current strong {
  color: #bf2630;
}

.review-members-card .empty-state {
  padding: 14px 0;
}

.review-comments-panel .panel-header {
  align-items: center;
}

.review-comments-table td {
  vertical-align: top;
}

.review-time-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  color: #3158b5;
  text-align: left;
}

.review-time-link small,
.review-comment-cell small {
  display: block;
  color: #7b8494;
  font-size: 12px;
}

.review-comment-cell {
  max-width: 420px;
  white-space: pre-wrap;
  line-height: 1.6;
}

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

.review-finalize-bar {
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #e3d5af;
  border-radius: 10px;
  background: #fffaf0;
}

.review-finalize-bar > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-finalize-bar span {
  color: #7c6d52;
  font-size: 13px;
}

.review-finalized-label {
  color: #167146 !important;
  font-weight: 800;
}

@media (max-width: 900px) {
  .review-detail-grid {
    grid-template-columns: 1fr;
  }

  .review-side-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .review-library-header,
  .review-detail-header,
  .review-detail-summary,
  .review-finalize-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .review-detail-actions {
    justify-content: stretch;
  }

  .review-detail-actions > button {
    flex: 1;
  }

  .review-side-stack {
    display: flex;
  }

  .review-access-actions {
    grid-template-columns: 1fr;
  }

  .review-form-grid {
    flex-direction: column;
  }

  .review-finalize-bar > button {
    width: 100%;
  }
}

/* Card AI knowledge workspace */
.drawer:has(.ai-editor) {
  width: min(1040px, 100vw);
}

.ai-card-action {
  color: #3158b5;
}

.ai-editor {
  --ai-ink: #20242b;
  --ai-muted: #687080;
  --ai-line: #dfe3e9;
  --ai-surface: #f7f8fa;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--ai-ink);
}

.ai-editor-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  background: #20242b;
  color: #fff;
}

.ai-editor-banner h2 {
  margin: 4px 0 7px;
  font-size: 20px;
  letter-spacing: 0;
}

.ai-editor-banner p {
  max-width: 620px;
  margin: 0;
  color: #c9ced8;
  font-size: 13px;
  line-height: 1.65;
}

.ai-kicker {
  color: #96a9d8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.ai-enable-toggle {
  min-width: 144px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #525965;
  border-radius: 8px;
  padding: 0 14px;
  background: #2b3038;
  font-size: 13px;
  font-weight: 900;
}

.ai-enable-toggle input,
.ai-source-card input,
.ai-option-group input,
.ai-module-flags input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}

.ai-step-nav {
  position: sticky;
  top: -22px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(25, 31, 40, 0.06);
  backdrop-filter: blur(8px);
}

.ai-step-nav button {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-right: 1px solid var(--ai-line);
  padding: 0 8px;
  background: transparent;
  color: #4f5664;
  font-size: 12px;
  font-weight: 800;
}

.ai-step-nav button:last-child {
  border-right: 0;
}

.ai-step-nav button:hover,
.ai-step-nav button:focus-visible {
  background: #f1f4f8;
  color: #244ea3;
  outline: 2px solid transparent;
}

.ai-step-nav button span {
  color: #8b93a1;
  font-size: 10px;
}

.ai-editor-section {
  scroll-margin-top: 72px;
  padding: 22px;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  background: #fff;
}

.ai-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.ai-section-heading h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.ai-section-heading p {
  margin: 5px 0 0;
  color: var(--ai-muted);
  font-size: 12px;
  line-height: 1.6;
}

.ai-step-number {
  min-width: 36px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #edf1f7;
  color: #3158b5;
  font-size: 11px;
  font-weight: 900;
}

.ai-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-source-card {
  min-width: 0;
  min-height: 94px;
  display: grid;
  grid-template-columns: auto 34px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.ai-source-card:hover,
.ai-source-card.is-selected {
  border-color: #91a7d7;
  background: #f5f7fc;
}

.ai-source-card strong,
.ai-source-card small {
  display: block;
}

.ai-source-card strong {
  font-size: 13px;
}

.ai-source-card small {
  margin-top: 5px;
  color: var(--ai-muted);
  font-size: 11px;
  line-height: 1.5;
}

.ai-source-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e9edf5;
  color: #3158b5;
  font-size: 12px;
  font-weight: 900;
}

.ai-source-icon svg {
  width: 17px;
  height: 17px;
}

.ai-source-options,
.ai-boundary-grid,
.ai-form-grid,
.ai-meta-grid {
  display: grid;
  gap: 14px;
}

.ai-source-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.ai-option-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 14px;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  background: var(--ai-surface);
}

.ai-option-group strong {
  width: 100%;
  font-size: 12px;
}

.ai-option-group label,
.ai-module-flags label {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #535b69;
  font-size: 12px;
}

.ai-space-filter {
  width: 100%;
  align-items: flex-start !important;
  flex-direction: column;
}

.ai-space-filter input {
  width: 100%;
}

.ai-option-group.is-disabled {
  opacity: 0.48;
}

.ai-inline-note {
  margin: 14px 0 0;
  color: var(--ai-muted);
  font-size: 11px;
  line-height: 1.6;
}

.ai-form-grid,
.ai-boundary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-boundary-grid {
  margin-top: 14px;
}

.ai-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ai-field-wide {
  grid-column: 1 / -1;
}

.ai-field > span {
  color: #4d5460;
  font-size: 12px;
  font-weight: 800;
}

.ai-field b,
.ai-module-header h3 b {
  color: var(--brand);
  font-size: 10px;
}

.ai-field input,
.ai-field textarea,
.ai-field select,
.ai-test-row input,
.ai-test-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d7dbe2;
  border-radius: 7px;
  padding: 0 11px;
  outline: 0;
  background: #fff;
  color: var(--ai-ink);
  font-size: 13px;
  line-height: 1.6;
}

.ai-field input,
.ai-field select,
.ai-test-row input,
.ai-test-row select {
  min-height: 42px;
}

.ai-field textarea {
  min-height: 118px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
}

.ai-greeting-tools,
.ai-greeting-result {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-greeting-tools > span {
  color: var(--ai-muted);
  font-size: 11px;
}

.ai-greeting-result {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--ai-line);
  border-radius: 7px;
  background: #f8fafd;
}

.ai-greeting-result[hidden] {
  display: none;
}

.ai-greeting-result textarea {
  flex: 1;
  min-height: 80px;
  background: #fff;
}

.ai-greeting-result .ghost-button {
  flex: 0 0 auto;
}

.ai-field input:focus,
.ai-field textarea:focus,
.ai-field select:focus,
.ai-test-row input:focus {
  border-color: #7895cf;
  box-shadow: 0 0 0 3px #eef2fb;
}

.ai-suggest-section .ai-field textarea {
  min-height: 150px;
}

.ai-knowledge-list,
.ai-extra-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-knowledge-module,
.ai-extra-item {
  padding: 17px;
  border: 1px solid var(--ai-line);
  border-left: 4px solid #c7ccd5;
  border-radius: 8px;
  background: var(--ai-surface);
}

.ai-knowledge-module.is-complete {
  border-left-color: #2d855d;
}

.ai-module-header,
.ai-extra-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.ai-module-header h3 {
  margin: 4px 0;
  font-size: 14px;
  letter-spacing: 0;
}

.ai-module-header p {
  margin: 0;
  color: var(--ai-muted);
  font-size: 11px;
  line-height: 1.55;
}

.ai-module-status,
.ai-module-type {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 3px 6px;
  background: #e7e9ee;
  color: #687080;
  font-size: 9px;
  font-weight: 900;
}

.ai-knowledge-module.is-complete .ai-module-status {
  background: #e6f4ed;
  color: #26734f;
}

.ai-module-type {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ai-visitor-questions {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-left: 3px solid #9eadd0;
  background: #fff;
  color: #596172;
  font-size: 11px;
  line-height: 1.6;
}

.ai-meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.ai-meta-grid .ai-field textarea {
  min-height: 80px;
}

.ai-module-flags {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ai-extra-header {
  align-items: center;
}

.ai-remove-extra {
  min-width: 40px;
  min-height: 40px;
  font-size: 20px;
}

.ai-add-extra {
  min-height: 44px;
  margin-top: 14px;
}

.ai-health-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 18px;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  background: var(--ai-surface);
}

.ai-health-ring {
  width: 104px;
  height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at center, #fff 62%, transparent 64%), conic-gradient(#2d855d var(--ai-health), #dfe3e9 0);
}

.ai-health-ring strong {
  font-size: 20px;
}

.ai-health-ring span {
  margin-top: 2px;
  color: var(--ai-muted);
  font-size: 9px;
}

.ai-health-card > div > strong {
  font-size: 14px;
}

.ai-health-card > div > p {
  margin: 6px 0 10px;
  color: var(--ai-muted);
  font-size: 12px;
}

.ai-health-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-health-checks span {
  border-radius: 5px;
  padding: 5px 7px;
  background: #eceff3;
  color: #6b7280;
  font-size: 10px;
  font-weight: 800;
}

.ai-health-checks span.is-ok {
  background: #e6f4ed;
  color: #26734f;
}

.ai-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.ai-test-row button {
  min-height: 44px;
}

.ai-preview-history {
  display: block;
  margin-top: 10px;
  color: var(--ai-muted);
  font-size: 11px;
}

.ai-preview-history textarea {
  width: 100%;
  min-height: 68px;
  box-sizing: border-box;
  margin-top: 5px;
  border: 1px solid #d7dbe2;
  border-radius: 7px;
  padding: 8px 10px;
  resize: vertical;
  color: var(--ai-ink);
  font: inherit;
  line-height: 1.5;
}

.ai-preview-result {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  color: var(--ai-muted);
  font-size: 12px;
}

.ai-preview-result strong {
  color: var(--ai-ink);
}

.ai-preview-result small {
  line-height: 1.5;
}

.ai-context-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #cfd8e8;
  border-radius: 8px;
  background: #f7f9fc;
}

.ai-context-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-context-summary strong {
  color: var(--ai-ink);
  font-size: 13px;
}

.ai-context-summary span,
.ai-context-summary small,
.ai-context-actions span {
  color: var(--ai-muted);
  font-size: 11px;
  line-height: 1.55;
}

.ai-context-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.ai-context-columns > div {
  min-width: 0;
}

.ai-context-columns h4 {
  margin: 0 0 7px;
  color: var(--ai-ink);
  font-size: 12px;
}

.ai-context-record {
  margin-top: 7px;
  border: 1px solid #d9e0ec;
  border-radius: 6px;
  background: #fff;
}

.ai-context-record summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  cursor: pointer;
  color: var(--ai-ink);
  font-size: 11px;
  font-weight: 800;
}

.ai-context-record summary small {
  flex: 0 0 auto;
  color: var(--ai-muted);
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.ai-context-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  padding: 0 10px 8px;
  color: var(--ai-muted);
  font-size: 10px;
}

.ai-context-record pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  padding: 10px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfe;
  color: #333b49;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-context-diagnostics {
  margin-top: 14px;
  border-top: 1px solid #dfe5ef;
  padding-top: 10px;
}

.ai-context-diagnostics > summary {
  cursor: pointer;
  color: var(--ai-ink);
  font-size: 12px;
  font-weight: 800;
}

.ai-context-note {
  margin: 8px 0 10px;
  color: var(--ai-muted);
  font-size: 11px;
  line-height: 1.6;
}

.ai-context-messages {
  margin-top: 14px;
  border-top: 1px solid #dfe5ef;
  padding-top: 10px;
}

.ai-context-messages > summary {
  cursor: pointer;
  color: var(--ai-ink);
  font-size: 12px;
  font-weight: 800;
}

.ai-context-message {
  margin-top: 8px;
  border: 1px solid #d9e0ec;
  border-radius: 6px;
  background: #fff;
}

.ai-context-message strong {
  display: block;
  padding: 7px 9px;
  border-bottom: 1px solid #edf0f4;
  color: #3158b5;
  font-size: 10px;
}

.ai-context-message pre {
  max-height: 300px;
  margin: 0;
  overflow: auto;
  padding: 9px;
  color: #333b49;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-context-diagnostic {
  margin-top: 8px;
}

.ai-context-empty {
  margin: 0;
  color: var(--ai-muted);
  font-size: 11px;
}

.ai-context-prompt {
  border-top: 1px solid #dfe5ef;
  padding-top: 10px;
}

.ai-context-prompt summary {
  cursor: pointer;
  color: #3158b5;
  font-size: 12px;
  font-weight: 800;
}

.ai-context-prompt textarea {
  width: 100%;
  min-height: 260px;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px solid #d7dbe2;
  border-radius: 7px;
  padding: 10px;
  resize: vertical;
  background: #fff;
  color: #333b49;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}

.ai-publish-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 15px;
  padding: 12px 14px;
  border: 1px solid #ead6aa;
  border-radius: 8px;
  background: #fffaf0;
  color: #6d6048;
  font-size: 11px;
  line-height: 1.6;
}

.ai-publish-note strong {
  flex: 0 0 auto;
  color: #725019;
}

@media (max-width: 820px) {
  .ai-source-grid,
  .ai-source-options,
  .ai-form-grid,
  .ai-boundary-grid,
  .ai-meta-grid {
    grid-template-columns: 1fr;
  }

  .ai-step-nav {
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    overflow-x: auto;
  }

  .ai-step-nav button {
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .ai-editor-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-enable-toggle {
    width: 100%;
  }

  .ai-editor-section {
    padding: 16px;
  }

  .ai-health-card,
  .ai-test-row {
    grid-template-columns: 1fr;
  }

  .ai-health-ring {
    margin: 0 auto;
  }

  .ai-test-row button,
  .drawer-footer-actions > button {
    width: 100%;
  }

  .ai-publish-note {
    flex-direction: column;
  }

  .ai-context-columns {
    grid-template-columns: 1fr;
  }

  .ai-context-record summary {
    flex-direction: column;
  }

  .ai-context-record summary small {
    text-align: left;
  }
}
