.xhs-note-studio {
  min-height: 100%;
  padding: 20px;
  color: var(--text, #172033);
}

.xhs-studio-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border: 1px solid rgba(133, 158, 196, 0.25);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(31, 55, 88, 0.94), rgba(25, 91, 91, 0.88));
  color: #fff;
  box-shadow: 0 18px 44px rgba(4, 15, 34, 0.16);
}

.xhs-studio-hero span {
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.72;
}

.xhs-studio-hero h1 {
  margin: 6px 0 8px;
  font-size: 28px;
}

.xhs-studio-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.xhs-fixed-size {
  display: grid;
  min-width: 168px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.09);
}

.xhs-fixed-size strong {
  font-size: 22px;
}

.xhs-fixed-size span {
  margin-top: 4px;
  letter-spacing: 0;
}

.xhs-mode-tabs,
.xhs-page-kind-tabs,
.xhs-note-page-rail,
.xhs-note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.xhs-mode-tabs {
  align-items: stretch;
  justify-content: flex-start;
  margin: 16px 0 10px;
}

.xhs-mode-tab {
  display: grid;
  flex: 0 1 280px;
  gap: 3px;
  min-width: 220px;
  min-height: 78px;
  padding: 13px 16px;
  border-color: #b9c7d8;
  text-align: left;
  background: #ffffff;
  color: #26364b;
}

.xhs-mode-tab strong {
  font-size: 16px;
}

.xhs-mode-tab span {
  color: #647286;
  font-size: 12px;
  font-weight: 500;
}

.xhs-mode-tab.active {
  border-color: #286e66;
  background: #286e66;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(40, 110, 102, 0.18);
}

.xhs-mode-tab.active span {
  color: rgba(255, 255, 255, 0.78);
}

.xhs-current-context {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid #cbd6e3;
  border-radius: 11px;
  background: #f7f9fc;
  color: #4c5a6d;
  font-size: 13px;
}

.xhs-current-context > span,
.xhs-section-kicker {
  color: #286e66;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.xhs-current-context strong,
.xhs-current-context b {
  color: #1f2e42;
}

.xhs-current-context i {
  color: #9aa7b7;
  font-style: normal;
}

.xhs-current-context em {
  margin-left: auto;
  color: #69778a;
  font-style: normal;
}

.xhs-studio-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  min-height: 720px;
}

.xhs-notes-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.xhs-notes-layout .xhs-note-create-list {
  grid-template-columns: 1fr;
}

.xhs-studio-sidebar,
.xhs-studio-workspace,
.xhs-studio-welcome,
.xhs-note-create-top {
  border: 1px solid rgba(133, 158, 196, 0.22);
  border-radius: 16px;
  background: var(--panel-bg, rgba(255, 255, 255, 0.94));
  box-shadow: 0 12px 32px rgba(5, 20, 46, 0.08);
}

.xhs-studio-sidebar {
  padding: 14px;
  overflow: hidden;
}

.xhs-note-create-top {
  padding: 14px;
}

.xhs-note-create-top > header h3,
.xhs-note-create-top > header p {
  margin: 0;
}

.xhs-note-create-top > header p {
  margin-top: 4px;
  color: var(--muted, #6d7685);
  font-size: 12px;
}

.xhs-note-create-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.xhs-side-head,
.xhs-property-section > header,
.xhs-canvas-heading,
.xhs-template-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xhs-side-head h3,
.xhs-property-section h4,
.xhs-note-tools h3 {
  margin: 0;
}

.xhs-section-kicker {
  display: block;
  margin-bottom: 3px;
}

.xhs-side-head p,
.xhs-property-section header span,
.xhs-canvas-heading span,
.xhs-canvas-panel > p,
.xhs-note-tools header p,
.xhs-locked-template-list p {
  margin: 4px 0 0;
  color: var(--muted, #6d7685);
  font-size: 12px;
}

.xhs-side-head button {
  flex: none;
  white-space: nowrap;
}

.xhs-private-notice {
  margin: 12px 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(44, 122, 94, 0.1);
  color: #2c735b;
  font-size: 12px;
}

.xhs-item-list,
.xhs-layer-list,
.xhs-locked-template-list {
  display: grid;
  gap: 7px;
}

.xhs-item-list {
  max-height: 520px;
  overflow-y: auto;
}

.xhs-list-item,
.xhs-layer-select {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #bcc9d9;
  border-radius: 10px;
  text-align: left;
  background: #ffffff;
  color: #1c293b;
}

.xhs-list-item.active,
.xhs-layer-row.active .xhs-layer-select {
  border-color: #2f7cff;
  background: #dfeaff;
  color: #17375f;
  box-shadow: inset 0 0 0 1px rgba(47, 124, 255, 0.16);
}

.xhs-template-list-item.draft {
  border-color: #d4a45d;
  background: #fff6e8;
  color: #6f4814;
}

.xhs-template-list-item.locked {
  border-color: #7eb39d;
  background: #eaf5f0;
  color: #245f4d;
}

.xhs-template-list-item.draft.active {
  border-color: #bc7822;
  background: #f8e5c5;
  color: #603b0e;
  box-shadow: inset 0 0 0 1px rgba(188, 120, 34, 0.2);
}

.xhs-template-list-item.locked.active {
  border-color: #2b7a5d;
  background: #d6ece2;
  color: #174c39;
  box-shadow: inset 0 0 0 1px rgba(43, 122, 93, 0.2);
}

.xhs-template-list-item {
  cursor: pointer;
}

.xhs-template-list-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.xhs-template-card-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.xhs-template-card-title.editable {
  cursor: text;
}

.xhs-template-card-title.editable:hover,
.xhs-template-card-title.editable:focus {
  padding: 2px 4px;
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.76);
}

.xhs-template-list-line small {
  flex: none;
  white-space: nowrap;
  font-size: 10px;
}

.xhs-template-list-item.draft small,
.xhs-template-list-item.draft.active small {
  color: #84591e;
}

.xhs-template-list-item.locked small,
.xhs-template-list-item.locked.active small {
  color: #34705b;
}

.xhs-list-item span,
.xhs-layer-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.xhs-list-item small,
.xhs-layer-select small {
  color: #5d697b;
}

.xhs-list-item.active span,
.xhs-list-item.active small,
.xhs-layer-row.active .xhs-layer-select span,
.xhs-layer-row.active .xhs-layer-select small {
  color: #17375f;
}

.xhs-template-list-item.draft.active span,
.xhs-template-list-item.draft.active small {
  color: #6a4210;
}

.xhs-template-list-item.locked.active span,
.xhs-template-list-item.locked.active small {
  color: #174c39;
}

.xhs-locked-template-list {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(133, 158, 196, 0.2);
}

.xhs-locked-template-list h4 {
  margin: 0 0 4px;
}

.xhs-ai-template-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(133, 158, 196, 0.28);
  border-radius: 11px;
  background: rgba(248, 250, 253, 0.8);
}

.xhs-ai-template-card strong,
.xhs-ai-template-card input,
.xhs-ai-template-card small {
  grid-column: 1 / -1;
}

.xhs-ai-template-card input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(133, 158, 196, 0.34);
  border-radius: 8px;
  background: #e7edf5;
  color: #17233a;
}

.xhs-ai-template-card button {
  min-width: 0;
  padding-inline: 8px;
}

.xhs-ai-template-card small {
  color: #9b5e17;
}

.xhs-studio-workspace {
  min-width: 0;
  padding: 14px;
}

.xhs-template-toolbar {
  min-height: 48px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(133, 158, 196, 0.2);
  flex-wrap: wrap;
}

.xhs-template-ai-settings {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(320px, 2fr) 150px;
  gap: 12px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(44, 122, 94, 0.24);
  border-radius: 12px;
  background: rgba(44, 122, 94, 0.07);
}

.xhs-template-ai-settings > div,
.xhs-template-ai-settings label {
  display: grid;
  gap: 4px;
}

.xhs-template-ai-settings > div span,
.xhs-template-ai-settings label > span {
  color: var(--muted, #6d7685);
  font-size: 11px;
}

.xhs-template-ai-settings textarea,
.xhs-template-ai-settings input {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(133, 158, 196, 0.34);
  border-radius: 8px;
  background: #e7edf5;
  color: #17233a;
  font-weight: 600;
}

.xhs-template-ai-settings textarea {
  height: 60px;
  resize: vertical;
}

.xhs-template-ai-settings .xhs-ai-page-count {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.xhs-template-ai-settings .xhs-ai-page-count span {
  grid-column: 1 / -1;
}

.xhs-toolbar-title {
  display: grid;
  min-width: 150px;
}

.xhs-toolbar-title strong {
  overflow: hidden;
  color: #1f2e42;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-template-title-editable {
  min-width: 180px;
  padding: 4px 7px;
  border: 1px dashed transparent;
  border-radius: 7px;
  cursor: text;
}

.xhs-template-title-editable:hover,
.xhs-template-title-editable:focus {
  border-color: #6aa49a;
  background: #eef6f3;
  outline: none;
}

.xhs-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.xhs-template-toolbar > label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  margin-right: auto;
}

.xhs-template-toolbar > label span {
  flex: none;
  font-size: 12px;
  color: var(--muted, #6d7685);
}

.xhs-template-toolbar > label input {
  min-width: 180px;
}

.xhs-template-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.xhs-template-status.locked {
  background: rgba(44, 122, 94, 0.12);
  color: #2b7458;
}

.xhs-template-status.draft {
  background: rgba(187, 119, 23, 0.14);
  color: #966114;
}

.xhs-page-management {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #d4deea;
  border-radius: 12px;
  background: #f7f9fc;
}

.xhs-note-actions > span {
  margin-right: 4px;
  color: #647286;
  font-size: 12px;
  font-weight: 700;
}

.xhs-editor-grid {
  display: grid;
  grid-template-columns: 230px minmax(360px, 1fr) 330px;
  gap: 14px;
  align-items: start;
}

.xhs-reference-panel,
.xhs-canvas-panel,
.xhs-properties-panel,
.xhs-note-tools {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(133, 158, 196, 0.2);
  border-radius: 13px;
  background: rgba(248, 250, 253, 0.7);
}

.xhs-reference-panel header h3 {
  margin: 0;
}

.xhs-reference-panel header p {
  margin: 4px 0 0;
  color: var(--muted, #6d7685);
  font-size: 12px;
}

.xhs-reference-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  margin: 12px 0;
  overflow: hidden;
  border: 1px dashed rgba(133, 158, 196, 0.45);
  border-radius: 10px;
  background: #eceff3;
}

.xhs-reference-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.xhs-reference-frame div {
  display: grid;
  gap: 6px;
  padding: 16px;
  text-align: center;
  color: #697384;
}

.xhs-reference-panel > select,
.xhs-reference-panel > label {
  width: 100%;
  margin-top: 8px;
}

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

.xhs-reference-actions > label,
.xhs-reference-actions > button {
  width: 100%;
  min-width: 0;
}

.xhs-reference-layout-button {
  white-space: nowrap;
}

.xhs-reference-strategy {
  display: grid;
  grid-template-columns: 1fr 54px 54px;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.xhs-reference-strategy > span {
  color: #64748b;
  font-size: 12px;
}

.xhs-reference-strategy > strong {
  color: #1f6f63;
  font-size: 13px;
  font-weight: 700;
}

.xhs-reference-strategy > button {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: #236d63;
  font-size: 12px;
}

.xhs-reference-strategy > button.active {
  background: #236d63;
  color: #fff;
}

.xhs-canvas-heading {
  margin-bottom: 10px;
}

.xhs-canvas-shell {
  position: relative;
  width: min(100%, 450px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(7, 18, 38, 0.2);
}

.xhs-canvas-with-pages {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}

.xhs-canvas-with-pages .xhs-canvas-shell {
  flex: 1 1 450px;
  max-width: 450px;
  margin: 0;
}

.xhs-canvas-with-pages > .xhs-page-kind-tabs,
.xhs-canvas-with-pages > .xhs-note-page-rail {
  display: flex;
  flex: 0 0 88px;
  flex-direction: column;
  align-items: stretch;
  max-height: 420px;
  margin: 0 0 36px;
  padding: 0;
  overflow-y: auto;
  background: transparent;
}

.xhs-canvas-with-pages > .xhs-page-kind-tabs button,
.xhs-canvas-with-pages > .xhs-note-page-rail button {
  width: 100%;
  white-space: nowrap;
}

.xhs-canvas-with-pages > .xhs-page-kind-tabs {
  flex: 0 0 34px;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.xhs-canvas-with-pages > .xhs-page-kind-tabs .xhs-page-number {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  line-height: 30px;
  text-align: center;
}

.xhs-canvas-shell canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  touch-action: none;
}

.xhs-layer-overlay {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  border: 1px dashed rgba(47, 124, 255, 0.72);
  transform-origin: center;
  pointer-events: none;
}

.xhs-text-merge-selected {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border: 2px solid rgba(36, 167, 125, 0.92);
  background: rgba(36, 167, 125, 0.12);
  transform-origin: center;
  pointer-events: none;
}

.xhs-text-merge-marquee {
  position: absolute;
  z-index: 6;
  box-sizing: border-box;
  border: 2px solid #2f7cff;
  background: rgba(47, 124, 255, 0.12);
  pointer-events: none;
}

.xhs-text-merge-marquee[hidden] {
  display: none;
}

.xhs-layer-overlay.editing {
  border-style: solid;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.xhs-inline-text-editor {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  outline: none;
  background: transparent;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
  pointer-events: none;
}

.xhs-layer-overlay.editing .xhs-inline-text-editor {
  pointer-events: auto;
  user-select: text;
  visibility: hidden;
  overflow: visible;
}

.xhs-resize-handle {
  position: absolute;
  z-index: 4;
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid rgba(47, 124, 255, 0.92);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(11, 40, 82, 0.2);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.xhs-resize-handle.corner {
  z-index: 5;
  width: 10px;
  height: 10px;
  border-color: #df8322;
  background: #fff4df;
  box-shadow: 0 1px 4px rgba(170, 91, 12, 0.28);
}

.xhs-resize-handle.edge {
  z-index: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.xhs-resize-handle.edge::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: auto;
}

.xhs-resize-handle.edge::after {
  content: "";
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #2f7cff;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(11, 40, 82, 0.2);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.xhs-resize-handle.nw { left: -5px; top: -5px; cursor: nwse-resize; }
.xhs-resize-handle.ne { right: -5px; top: -5px; cursor: nesw-resize; }
.xhs-resize-handle.se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.xhs-resize-handle.sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.xhs-resize-handle.n,
.xhs-resize-handle.s {
  left: 0;
  width: 100%;
  height: 14px;
  cursor: ns-resize;
}
.xhs-resize-handle.n { top: -7px; }
.xhs-resize-handle.s { bottom: -7px; }
.xhs-resize-handle.e,
.xhs-resize-handle.w {
  top: 0;
  width: 14px;
  height: 100%;
  cursor: ew-resize;
}
.xhs-resize-handle.e { right: -7px; }
.xhs-resize-handle.w { left: -7px; }

.xhs-properties-panel {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(100vh - 300px);
  min-height: 420px;
  max-height: 780px;
  overflow: hidden;
}

.xhs-property-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  flex: none;
}

.xhs-property-tabs button {
  min-width: 0;
  padding-inline: 6px;
}

.xhs-property-tabs button.secondary {
  border-color: #2b6e66;
  background: #ffffff;
  color: #245f58;
}

.xhs-property-tabs button:not(.secondary) {
  border-color: #286e66;
  background: #286e66;
  color: #ffffff;
}

.xhs-property-content {
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.xhs-property-content-combined {
  display: grid;
  gap: 8px;
}

.xhs-generate-workspace {
  min-width: 0;
}

.xhs-property-section {
  padding: 11px;
  border: 1px solid rgba(133, 158, 196, 0.2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.74);
}

.xhs-property-section > header {
  margin-bottom: 10px;
}

.xhs-property-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.xhs-property-grid label {
  display: grid;
  gap: 4px;
}

.xhs-property-grid label > span {
  font-size: 11px;
  color: var(--muted, #6d7685);
}

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

.xhs-property-grid input,
.xhs-property-grid select,
.xhs-property-grid textarea,
.xhs-reference-panel select,
.xhs-template-toolbar input,
.xhs-decoration-add select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(133, 158, 196, 0.34);
  border-radius: 8px;
  background: #e7edf5;
  color: #17233a;
  caret-color: #17233a;
  font-weight: 600;
}

.xhs-property-grid input[type="color"] {
  padding: 3px;
}

.xhs-layer-actions,
.xhs-upload-row,
.xhs-layer-order,
.xhs-decoration-add {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.xhs-upload-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.xhs-upload-row .xhs-file-button,
.xhs-upload-row .xhs-ai-background-button {
  min-width: 0;
  min-height: 40px;
  padding: 6px 4px;
  border: 1px solid #286e66;
  border-radius: 9px;
  background: #286e66;
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
}

.xhs-upload-row .xhs-ai-background-button {
  border-color: #b56b24;
  background: linear-gradient(135deg, #fff7ea, #f8e3c1);
  color: #754315;
}

.xhs-upload-row .xhs-ai-background-button:hover:not(:disabled) {
  border-color: #8e4e17;
  background: linear-gradient(135deg, #fff3dd, #f2d29d);
}

.xhs-page-background-grid {
  grid-template-columns: minmax(62px, 0.65fr) minmax(0, 1.35fr);
}

.xhs-layer-actions button,
.xhs-decoration-add button {
  border-color: #286e66;
  background: #286e66;
  color: #ffffff;
}

.xhs-decoration-add {
  margin: 8px 0;
}

.xhs-decoration-add select {
  flex: 1;
  min-width: 130px;
}

.xhs-layer-list {
  max-height: 190px;
  margin-top: 8px;
  overflow-y: auto;
}

.xhs-layer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
  padding: 6px;
  border: 1px solid #bcc9d9;
  border-radius: 10px;
  background: #ffffff;
}

.xhs-layer-row.active {
  border-color: #2f7cff;
  background: #dfeaff;
  box-shadow: inset 0 0 0 1px rgba(47, 124, 255, 0.16);
}

.xhs-layer-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.xhs-layer-name-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  min-width: 0;
}

.xhs-layer-index {
  min-width: 0;
  min-height: 28px;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

.xhs-layer-inline-name {
  min-width: 0;
  min-height: 28px;
  padding: 4px 5px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #1c293b;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.xhs-layer-inline-name.editable:hover,
.xhs-layer-inline-name.editable:focus {
  border-color: #2f7cff;
  outline: none;
  background: #ffffff;
}

.xhs-layer-ai-mode {
  width: 100%;
  min-height: 28px;
  padding: 3px 5px;
  border: 1px solid rgba(133, 158, 196, 0.42);
  border-radius: 7px;
  background: #edf2f8;
  color: #344258;
  font-size: 11px;
  font-weight: 700;
}

.xhs-layer-kind {
  padding-left: 5px;
  color: #5d697b;
  font-size: 11px;
}

.xhs-layer-delete {
  align-self: end;
  min-width: 52px;
  height: 28px;
  min-height: 28px;
  padding: 3px 8px;
  font-size: 11px;
  border-color: #a84b43;
  background: #a84b43;
  color: #ffffff;
}

.xhs-layer-order {
  margin-top: 10px;
}

.xhs-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  cursor: pointer;
}

.xhs-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.xhs-studio-welcome,
.xhs-studio-loading {
  display: grid;
  place-content: center;
  min-height: 620px;
  padding: 40px;
  text-align: center;
}

.xhs-studio-welcome h2 {
  margin-bottom: 8px;
}

.xhs-studio-welcome p {
  max-width: 520px;
  color: var(--muted, #6d7685);
}

.xhs-studio-welcome button {
  justify-self: center;
  margin-top: 12px;
}

.xhs-template-chooser {
  box-sizing: border-box;
  width: min(100%, 720px);
  min-height: 100%;
  margin: 0 auto;
  padding: 72px 24px 32px;
  overflow-y: auto;
}

.xhs-template-chooser > h2,
.xhs-template-chooser > p {
  margin-inline: auto;
  text-align: center;
}

.xhs-template-chooser > p {
  margin-top: 8px;
  color: var(--muted, #6d7685);
}

.xhs-template-chooser .xhs-settings-template-section {
  margin-top: 20px;
  text-align: left;
}

.xhs-empty-small {
  padding: 18px 10px;
  color: var(--muted, #6d7685);
  text-align: center;
  font-size: 12px;
}

.xhs-note-actions {
  margin-bottom: 12px;
}

.xhs-note-editor-grid {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.xhs-note-tools {
  display: grid;
  align-content: start;
  gap: 14px;
}

.xhs-note-tools h3,
.xhs-note-tools p {
  margin: 0;
}

.xhs-recent-notes {
  padding-top: 14px;
  border-top: 1px solid rgba(133, 158, 196, 0.24);
}

.xhs-recent-notes > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.xhs-recent-notes h4 {
  margin: 0;
}

.xhs-recent-notes header span {
  color: var(--muted, #6d7685);
  font-size: 11px;
}

.xhs-recent-note-list {
  display: grid;
  gap: 7px;
}

.xhs-note-tools p {
  margin-top: 6px;
  color: #566477;
  line-height: 1.55;
}

.xhs-note-export-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 8px 0;
  background: rgba(248, 250, 253, 0.96);
  backdrop-filter: blur(8px);
}

.xhs-inline-help {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #c6d3e2;
  border-radius: 10px;
  background: #f3f6fa;
  color: #516075;
  font-size: 12px;
  line-height: 1.5;
}

.xhs-inline-help strong {
  color: #1f3047;
  font-size: 13px;
}

.xhs-dialog-backdrop {
  position: fixed;
  z-index: 10100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 21, 35, 0.52);
  backdrop-filter: blur(5px);
  animation: xhs-dialog-fade 140ms ease-out;
}

.xhs-dialog {
  box-sizing: border-box;
  width: min(460px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid #d7e0ea;
  border-radius: 18px;
  background: #ffffff;
  color: #1e2c3f;
  box-shadow: 0 26px 70px rgba(7, 18, 38, 0.28);
  animation: xhs-dialog-enter 160ms ease-out;
}

.xhs-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.xhs-dialog-header span {
  color: #286e66;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.xhs-dialog-header h2 {
  margin: 4px 0 0;
  color: #1c2b3e;
  font-size: 21px;
}

.xhs-dialog-close {
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #eef2f6;
  color: #637185;
  font-size: 22px;
  line-height: 1;
}

.xhs-dialog-message {
  margin: 18px 0 9px;
  color: #526074;
  font-size: 14px;
  line-height: 1.65;
}

.xhs-dialog-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aebdce;
  border-radius: 10px;
  outline: none;
  background: #f8fafc;
  color: #1c2b3e;
  font-size: 15px;
}

.xhs-dialog-input:focus {
  border-color: #2f7cff;
  box-shadow: 0 0 0 3px rgba(47, 124, 255, 0.15);
}

.xhs-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.xhs-dialog-actions button {
  min-width: 92px;
}

.xhs-dialog.xhs-ai-background-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.xhs-ai-background-content {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.xhs-ai-background-loading,
.xhs-ai-background-failure {
  display: grid;
  place-items: center;
  min-height: min(520px, 62dvh);
  padding: 28px;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  background: #f6f8fb;
  text-align: center;
}

.xhs-ai-background-loading i {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border: 4px solid #d9e4e2;
  border-top-color: #286e66;
  border-radius: 50%;
  animation: xhs-ai-background-spin 850ms linear infinite;
}

.xhs-ai-background-loading strong,
.xhs-ai-background-failure strong {
  color: #213349;
  font-size: 17px;
}

.xhs-ai-background-loading span,
.xhs-ai-background-failure span {
  max-width: 460px;
  margin-top: 8px;
  color: #68778a;
  font-size: 13px;
  line-height: 1.65;
}

.xhs-ai-background-preview-frame {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #d5dee8;
  border-radius: 14px;
  background: #eef2f5;
}

.xhs-ai-background-preview-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 62dvh;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(8, 21, 39, 0.18);
}

.xhs-ai-background-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #66758a;
  font-size: 12px;
}

.xhs-ai-background-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #26374d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-ai-background-error {
  padding: 10px 12px;
  border: 1px solid #e8b9ae;
  border-radius: 10px;
  background: #fff3f0;
  color: #9a3e2c;
  font-size: 13px;
  line-height: 1.55;
}

.xhs-ai-background-failure {
  min-height: 260px;
  border-color: #e8c8c1;
  background: #fff8f6;
}

.xhs-ai-background-actions {
  margin-top: 0;
}

.xhs-ai-background-actions button {
  min-width: 128px;
}

@keyframes xhs-ai-background-spin {
  to { transform: rotate(360deg); }
}

@keyframes xhs-dialog-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes xhs-dialog-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body[data-theme="tech"] .xhs-studio-sidebar,
body[data-theme="tech"] .xhs-studio-workspace,
body[data-theme="tech"] .xhs-studio-welcome,
body[data-theme="tech"] .xhs-note-create-top,
body[data-theme="tech"] .xhs-reference-panel,
body[data-theme="tech"] .xhs-canvas-panel,
body[data-theme="tech"] .xhs-properties-panel,
body[data-theme="tech"] .xhs-note-tools,
body[data-theme="tech"] .xhs-property-section {
  background: rgba(8, 20, 39, 0.86);
  border-color: rgba(85, 147, 224, 0.24);
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-property-grid input,
body[data-theme="tech"] .xhs-property-grid select,
body[data-theme="tech"] .xhs-property-grid textarea,
body[data-theme="tech"] .xhs-reference-panel select,
body[data-theme="tech"] .xhs-template-toolbar input,
body[data-theme="tech"] .xhs-decoration-add select {
  background: rgba(9, 25, 48, 0.95);
  color: #e8f0fc;
  border-color: rgba(85, 147, 224, 0.34);
}

body[data-theme="tech"] .xhs-template-ai-settings,
body[data-theme="tech"] .xhs-ai-template-card {
  background: rgba(8, 28, 39, 0.88);
  border-color: rgba(73, 174, 146, 0.3);
}

body[data-theme="tech"] .xhs-template-ai-settings textarea,
body[data-theme="tech"] .xhs-template-ai-settings input,
body[data-theme="tech"] .xhs-ai-template-card input {
  background: rgba(9, 25, 48, 0.95);
  color: #e8f0fc;
  border-color: rgba(85, 147, 224, 0.34);
}

body[data-theme="tech"] .xhs-list-item.active,
body[data-theme="tech"] .xhs-layer-row.active {
  background: rgba(47, 124, 255, 0.22);
}

body[data-theme="tech"] .xhs-list-item,
body[data-theme="tech"] .xhs-layer-row {
  border-color: rgba(112, 157, 213, 0.46);
  background: rgba(13, 31, 55, 0.92);
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-list-item small,
body[data-theme="tech"] .xhs-layer-kind,
body[data-theme="tech"] .xhs-list-item.active span,
body[data-theme="tech"] .xhs-list-item.active small,
body[data-theme="tech"] .xhs-layer-row.active .xhs-layer-inline-name,
body[data-theme="tech"] .xhs-layer-row.active .xhs-layer-kind {
  color: #d5e3f6;
}

body[data-theme="tech"] .xhs-layer-inline-name,
body[data-theme="tech"] .xhs-layer-index {
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-layer-inline-name.editable:hover,
body[data-theme="tech"] .xhs-layer-inline-name.editable:focus,
body[data-theme="tech"] .xhs-layer-ai-mode {
  border-color: rgba(85, 147, 224, 0.48);
  background: rgba(9, 25, 48, 0.95);
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-note-tools p {
  color: #c6d4e8;
}

body[data-theme="tech"] .xhs-inline-help {
  border-color: rgba(85, 147, 224, 0.34);
  background: rgba(9, 25, 48, 0.95);
  color: #c6d4e8;
}

body[data-theme="tech"] .xhs-inline-help strong {
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-note-export-bar {
  background: rgba(8, 20, 39, 0.96);
}

body[data-theme="tech"] .xhs-current-context,
body[data-theme="tech"] .xhs-page-management {
  border-color: rgba(85, 147, 224, 0.3);
  background: rgba(8, 20, 39, 0.72);
  color: #c6d4e8;
}

body[data-theme="tech"] .xhs-current-context strong,
body[data-theme="tech"] .xhs-current-context b,
body[data-theme="tech"] .xhs-toolbar-title strong {
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-mode-tab.secondary {
  border-color: rgba(85, 147, 224, 0.34);
  background: rgba(8, 20, 39, 0.82);
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-mode-tab.secondary span,
body[data-theme="tech"] .xhs-current-context em {
  color: #b9c9de;
}

body[data-theme="tech"] .xhs-dialog {
  border-color: rgba(85, 147, 224, 0.35);
  background: #0d2038;
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-dialog-header h2 {
  color: #f1f6ff;
}

body[data-theme="tech"] .xhs-dialog-message {
  color: #c6d4e8;
}

body[data-theme="tech"] .xhs-dialog-close,
body[data-theme="tech"] .xhs-dialog-input {
  border-color: rgba(85, 147, 224, 0.38);
  background: #102b4a;
  color: #f1f6ff;
}

@media (max-width: 1420px) {
  .xhs-editor-grid {
    grid-template-columns: 200px minmax(330px, 1fr) 290px;
  }
}

@media (max-width: 1120px) {
  .xhs-studio-body {
    grid-template-columns: 1fr;
  }
  .xhs-studio-sidebar {
    max-height: none;
  }
  .xhs-item-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 220px;
  }
  .xhs-editor-grid {
    grid-template-columns: 210px minmax(360px, 1fr);
  }
  .xhs-properties-panel {
    grid-column: 1 / -1;
    position: static;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .xhs-property-content {
    overflow: visible;
  }
  .xhs-template-ai-settings {
    grid-template-columns: 1fr 2fr 130px;
  }
  .xhs-note-create-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .xhs-note-studio {
    padding: 10px;
  }
  .xhs-studio-hero,
  .xhs-template-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .xhs-fixed-size {
    min-width: 0;
  }
  .xhs-mode-tab {
    flex: 1 1 220px;
  }
  .xhs-current-context {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .xhs-current-context em {
    flex-basis: 100%;
    margin-left: 0;
  }
  .xhs-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .xhs-dialog {
    padding: 18px;
  }
  .xhs-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xhs-dialog-actions button:only-child {
    grid-column: 1 / -1;
  }
  .xhs-dialog.xhs-ai-background-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 14px;
  }
  .xhs-ai-background-preview-frame {
    min-height: 280px;
    padding: 8px;
  }
  .xhs-ai-background-preview-frame img {
    max-height: 54dvh;
  }
  .xhs-ai-background-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .xhs-item-list,
  .xhs-editor-grid,
  .xhs-properties-panel,
  .xhs-note-editor-grid {
    grid-template-columns: 1fr;
  }
  .xhs-reference-panel {
    order: 2;
  }
  .xhs-canvas-panel {
    order: 1;
  }
  .xhs-properties-panel {
    order: 3;
  }
  .xhs-template-toolbar > label {
    min-width: 0;
  }
  .xhs-template-ai-settings {
    grid-template-columns: 1fr;
  }
  .xhs-note-create-list {
    grid-template-columns: 1fr;
  }
  .xhs-canvas-with-pages {
    align-items: stretch;
    flex-direction: column;
  }
  .xhs-canvas-with-pages .xhs-canvas-shell {
    width: 100%;
    margin: 0 auto;
  }
  .xhs-canvas-with-pages > .xhs-page-kind-tabs,
  .xhs-canvas-with-pages > .xhs-note-page-rail {
    flex: none;
    flex-direction: row;
    max-height: none;
    margin: 0;
    overflow-x: auto;
  }
  .xhs-canvas-with-pages > .xhs-page-kind-tabs button,
  .xhs-canvas-with-pages > .xhs-note-page-rail button {
    width: auto;
  }
}

/* V1.74 · 极简一屏图文制作工作台 */
.xhs-note-studio {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.xhs-feature-home {
  display: grid;
  min-height: 100%;
  place-content: center;
  gap: 24px;
  text-align: center;
}

.xhs-feature-home header h1,
.xhs-feature-home header p {
  margin: 0;
}

.xhs-feature-home header p {
  margin-top: 6px;
  color: var(--muted, #6d7685);
}

.xhs-home-shortcuts {
  display: flex;
  justify-content: center;
  gap: 26px;
}

.xhs-home-shortcuts button {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 92px;
  min-height: 92px;
  padding: 10px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #245f58;
  box-shadow: none;
}

.xhs-home-shortcuts button:hover,
.xhs-home-shortcuts button:focus-visible {
  background: rgba(40, 110, 102, 0.08);
  outline: none;
}

.xhs-home-shortcuts button > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(40, 110, 102, 0.36);
  border-radius: 15px;
  background: #ffffff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(21, 56, 61, 0.08);
}

.xhs-home-shortcuts button strong {
  font-size: 13px;
}

.xhs-minimal-editor {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(133, 158, 196, 0.22);
  border-radius: 16px;
  background: var(--panel-bg, rgba(255, 255, 255, 0.94));
  box-shadow: 0 12px 32px rgba(5, 20, 46, 0.08);
}

.xhs-workspace-switch {
  position: absolute;
  z-index: 30;
  top: 17px;
  right: 18px;
  display: flex;
  gap: 6px;
}

.xhs-workspace-switch button {
  min-width: 0;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(21, 56, 61, 0.08);
}

.xhs-workspace-switch button.active {
  background: #276b5e;
  border-color: #276b5e;
  color: #fff;
}

.xhs-right-workbench > .xhs-workbench-heading {
  padding-right: 150px;
}

.xhs-one-screen-grid {
  display: grid;
  grid-template-columns: clamp(220px, 17vw, 282px) minmax(420px, 1fr) clamp(240px, 20vw, 320px);
  gap: 10px;
  height: 100%;
  padding: 10px;
}

.xhs-workbench {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(133, 158, 196, 0.22);
  border-radius: 13px;
  background: rgba(247, 249, 252, 0.9);
}

.xhs-right-workbench {
  display: grid;
  grid-template-rows: 40px minmax(90px, 14%) minmax(0, 1fr);
}

.xhs-right-settings-scroll {
  min-height: 0;
  display: grid;
  grid-template-rows: max-content max-content;
  align-content: start;
  overflow: hidden;
}

.xhs-template-page-settings {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}

.xhs-template-page-settings select {
  width: 100%;
  min-width: 0;
}

.xhs-template-page-settings small {
  color: #637a78;
  font-size: 11px;
  line-height: 1.5;
}

.xhs-workbench-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(133, 158, 196, 0.18);
}

.xhs-workbench-heading strong {
  color: #213044;
  font-size: 14px;
}

.xhs-workbench-close {
  display: none;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 50%;
}

.xhs-workbench-scroll {
  display: grid;
  gap: 8px;
  height: calc(100% - 44px);
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.xhs-right-template-top,
.xhs-right-layer-middle,
.xhs-right-template-bottom {
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.xhs-right-layer-middle,
.xhs-right-template-bottom {
  overflow: visible;
  scrollbar-gutter: auto;
}

.xhs-right-template-top,
.xhs-right-layer-middle {
  border-bottom: 1px solid rgba(133, 158, 196, 0.18);
}

.xhs-right-template-top {
  overflow: hidden;
}

.xhs-right-template-top .xhs-settings-template-section {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  margin: 0;
  padding: 8px;
}

.xhs-right-template-top .xhs-private-notice {
  margin: 7px 0;
  padding: 6px 8px;
}

.xhs-right-template-top .xhs-settings-template-section .xhs-item-list {
  max-height: none;
  min-height: 0;
}

.xhs-right-layer-middle .xhs-property-section {
  margin: 0;
  padding: 7px;
}

.xhs-right-layer-middle .xhs-property-section > header {
  position: static;
  margin: 0 0 6px;
  padding: 0;
  background: transparent;
}

.xhs-right-layer-middle .xhs-property-grid {
  gap: 5px;
}

.xhs-right-layer-middle .xhs-property-grid label {
  gap: 2px;
}

.xhs-right-layer-middle .xhs-property-grid label > span {
  font-size: 10px;
}

.xhs-right-layer-middle .xhs-property-grid input,
.xhs-right-layer-middle .xhs-property-grid select {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 12px;
}

.xhs-right-layer-middle .xhs-layer-copy-actions {
  margin-top: 6px;
}

.xhs-right-layer-middle .xhs-layer-copy-actions button {
  min-height: 30px;
  padding-block: 4px;
}

.xhs-right-template-bottom .xhs-template-management-panel {
  min-height: 0;
}

.xhs-template-left-workbench {
  display: grid;
  grid-template-rows: 44px auto minmax(0, 1fr);
}

.xhs-template-left-workbench .xhs-workbench-scroll {
  height: auto;
  min-height: 0;
  grid-auto-rows: max-content;
  align-content: start;
}

.xhs-template-reference-slot {
  padding: 8px 8px 0;
  border-bottom: 1px solid rgba(133, 158, 196, 0.18);
}

.xhs-reference-panel-inline {
  padding: 8px;
  border: 1px solid rgba(133, 158, 196, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
}

.xhs-reference-panel-inline header h3 {
  font-size: 13px;
}

.xhs-reference-panel-inline header p {
  display: none;
}

.xhs-reference-panel-inline .xhs-reference-frame {
  width: auto;
  max-width: 100%;
  height: clamp(140px, 22dvh, 200px);
  aspect-ratio: 3 / 4;
  margin: 7px auto;
  border-radius: 7px;
}

.xhs-reference-panel-inline > select,
.xhs-reference-panel-inline .xhs-reference-actions > label,
.xhs-reference-panel-inline .xhs-reference-actions > button {
  min-height: 30px;
  margin-top: 5px;
  font-size: 11px;
}

.xhs-reference-panel-inline .xhs-reference-actions {
  gap: 5px;
  margin-top: 0;
}

.xhs-workbench .xhs-property-section {
  background: rgba(255, 255, 255, 0.84);
}

.xhs-workbench .xhs-layer-list {
  max-height: none;
}

.xhs-layer-list-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.xhs-layer-list-actions .danger {
  width: 100%;
}

.xhs-layer-copy-actions {
  margin-top: 10px;
}

.xhs-layer-copy-actions button {
  width: 100%;
}

.xhs-ai-debug textarea,
.xhs-external-ai-prompt textarea {
  display: block; box-sizing: border-box; width: 100%; min-width: 0;
  padding: 9px; border: 1px solid #b8d2ce; border-radius: 8px;
  background: #fff; color: #24333b; font: inherit; font-size: 12px;
  line-height: 1.55; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere;
}
.xhs-complete-ai-hint, .xhs-ai-debug small, .xhs-external-ai-prompt small {
  color: #6b7781; font-size: 11px; line-height: 1.5;
}
.xhs-ai-debug { min-width: 0; border: 1px solid #c8ddd7; border-radius: 9px; background: #f7fbf9; }
.xhs-ai-debug > summary { padding: 10px; cursor: pointer; color: #245f59; font-weight: 700; font-size: 13px; }
.xhs-ai-debug > summary small { margin-left: 6px; font-weight: 400; }
.xhs-ai-debug-body { display: grid; gap: 8px; padding: 0 10px 10px; min-width: 0; }
.xhs-ai-debug-body p { margin: 0; font-size: 12px; line-height: 1.55; }
.xhs-ai-debug-body label { display: grid; gap: 4px; font-size: 12px; }
.xhs-ai-debug-tabs { display: flex; gap: 6px; }
.xhs-ai-debug-tabs button { flex: 1; min-width: 0; padding: 6px; font-size: 12px; }
.xhs-ai-debug textarea { min-height: 170px; max-height: 380px; font-family: ui-monospace, monospace; }
.xhs-ai-debug-warning { color: #9a4b27; background: #fff4e8; border-radius: 6px; padding: 7px; overflow-wrap: anywhere; }
.xhs-external-ai-prompt summary { cursor: pointer; font-size: 12px; }
.xhs-template-management-panel .xhs-external-ai-prompt textarea { min-height: 170px; margin-top: 7px; }
.xhs-copy-ai-prompt { width: fit-content; font-size: 12px; padding: 7px 10px; }

.xhs-ai-preview-card > small { display: block; font-size: 11px; color: #637a78; margin-bottom: 3px; }
body[data-theme="tech"] .xhs-ai-debug { background: #172534; border-color: #365065; }
body[data-theme="tech"] .xhs-ai-debug > summary { color: #98d5c9; }

.xhs-canvas-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: 14px 28px 30px;
  border-radius: 13px;
  background: rgba(245, 248, 251, 0.72);
}

.xhs-template-canvas-layout {
  display: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
  place-items: center;
}

.xhs-canvas-frame {
  position: relative;
  width: auto;
  max-width: 100%;
  height: min(92%, 1100px, 82dvh);
  max-height: min(1100px, 82dvh);
  aspect-ratio: 3 / 4;
}

.xhs-canvas-frame .xhs-canvas-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
}

.xhs-canvas-frame .xhs-canvas-shell canvas {
  width: 100%;
  height: 100%;
}

.xhs-canvas-frame > .xhs-page-kind-tabs {
  position: absolute;
  right: 0;
  bottom: -20px;
  display: flex;
  gap: 7px;
  padding: 0;
  background: transparent;
}

.xhs-ai-preview-results {
  position: absolute;
  z-index: 2;
  top: 9%;
  left: clamp(18px, 3.8%, 54px);
  display: grid;
  width: clamp(150px, 17.5%, 230px);
  min-width: 0;
  grid-template-rows: repeat(2, auto);
  gap: clamp(20px, 5dvh, 58px);
  pointer-events: none;
}

.xhs-ai-preview-count-0 {
  display: none;
}

.xhs-ai-preview-card {
  display: block;
  min-height: 0;
}

.xhs-ai-preview-card canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  min-height: 0;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(18, 34, 59, 0.12);
}

.xhs-ai-preview-count-1 .xhs-ai-preview-card:first-child {
  grid-row: 1;
}

.xhs-page-dot {
  width: 9px;
  min-width: 9px;
  height: 9px;
  min-height: 9px;
  padding: 0;
  border: 1px solid #286e66;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: none;
}

.xhs-page-dot.active {
  background: #286e66;
  box-shadow: 0 0 0 2px rgba(40, 110, 102, 0.12);
}

.xhs-settings-button {
  position: absolute;
  z-index: 12;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(40, 110, 102, 0.3);
  border-radius: 50%;
  background: #ffffff;
  color: #286e66;
  box-shadow: 0 8px 20px rgba(21, 56, 61, 0.12);
}

.xhs-settings-button span {
  font-size: 20px;
  line-height: 1;
}

.xhs-settings-button i {
  display: none;
}

.xhs-settings-button.dirty i {
  position: absolute;
  top: -1px;
  right: -1px;
  display: block;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #d38a22;
}

.xhs-settings-button.locked::after {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #2b7a5d;
  color: #ffffff;
  content: "\1f512";
  font-size: 7px;
}

.xhs-settings-backdrop {
  position: absolute;
  z-index: 30;
  inset: 0;
  background: rgba(19, 31, 45, 0.24);
  backdrop-filter: blur(2px);
}

.xhs-settings-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 92%);
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
  box-shadow: -18px 0 42px rgba(10, 24, 44, 0.2);
  overscroll-behavior: contain;
}

.xhs-settings-head,
.xhs-settings-current > header,
.xhs-settings-ai > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xhs-settings-head span,
.xhs-settings-current header div > span,
.xhs-settings-ai header span {
  display: block;
  color: var(--muted, #6d7685);
  font-size: 11px;
}

.xhs-settings-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.xhs-settings-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
}

.xhs-back-home {
  width: 100%;
  margin: 14px 0 10px;
}

.xhs-settings-template-section,
.xhs-settings-current,
.xhs-settings-ai,
.xhs-settings-drawer .xhs-reference-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(133, 158, 196, 0.24);
  border-radius: 12px;
  background: #ffffff;
}

.xhs-settings-template-section .xhs-item-list {
  max-height: 280px;
}

.xhs-settings-current > header {
  align-items: flex-start;
}

.xhs-settings-current > header > div {
  display: grid;
  min-width: 0;
  flex: 1;
}

.xhs-settings-current .xhs-toolbar-actions {
  margin-top: 12px;
}

.xhs-settings-ai,
.xhs-settings-ai label {
  display: grid;
  gap: 8px;
}

.xhs-settings-ai > header {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.xhs-settings-ai label > span {
  color: var(--muted, #6d7685);
  font-size: 11px;
}

.xhs-settings-ai textarea,
.xhs-settings-ai input {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid rgba(133, 158, 196, 0.34);
  border-radius: 8px;
  background: #e7edf5;
  color: #17233a;
  font-weight: 600;
}

.xhs-settings-ai textarea {
  min-height: 92px;
  resize: vertical;
}

.xhs-settings-ai .xhs-ai-page-count > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.xhs-template-management-panel {
  display: grid;
  min-width: 0;
  gap: 8px;
  align-content: start;
}

.xhs-template-management-panel > section,
.xhs-template-management-panel .xhs-settings-current header > div { min-width: 0; }

.xhs-template-management-panel .xhs-back-home {
  margin: 0;
}

.xhs-template-management-panel .xhs-settings-template-section,
.xhs-template-management-panel .xhs-settings-current,
.xhs-template-management-panel .xhs-settings-ai {
  margin-top: 0;
  padding: 10px;
}

.xhs-template-management-panel .xhs-settings-template-section .xhs-item-list {
  max-height: 220px;
}

.xhs-template-management-panel .xhs-private-notice {
  margin: 8px 0;
  padding: 7px 8px;
}

.xhs-template-management-panel .xhs-side-head h3 {
  font-size: 14px;
}

.xhs-template-management-panel .xhs-side-head p {
  display: none;
}

.xhs-template-management-panel .xhs-list-item {
  padding: 8px 9px;
}

.xhs-template-management-panel .xhs-settings-ai textarea {
  min-height: 132px;
}

.xhs-template-management-panel .xhs-settings-current .xhs-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.xhs-template-management-panel .xhs-settings-current .xhs-toolbar-actions button {
  min-width: 0;
  padding-inline: 7px;
  white-space: nowrap;
}

.xhs-empty-editor .xhs-studio-welcome {
  min-height: 100%;
  border: 0;
  box-shadow: none;
}

.xhs-mobile-workbench-buttons {
  display: none;
}

.xhs-notes-hub {
  position: relative;
  display: grid;
  gap: 12px;
}

.xhs-notes-home-button {
  justify-self: end;
  min-height: 34px;
}

.xhs-notes-welcome {
  min-height: 360px;
}

body[data-theme="tech"] .xhs-minimal-editor,
body[data-theme="tech"] .xhs-workbench,
body[data-theme="tech"] .xhs-canvas-stage,
body[data-theme="tech"] .xhs-settings-drawer,
body[data-theme="tech"] .xhs-settings-template-section,
body[data-theme="tech"] .xhs-settings-current,
body[data-theme="tech"] .xhs-settings-ai,
body[data-theme="tech"] .xhs-settings-drawer .xhs-reference-panel {
  border-color: rgba(85, 147, 224, 0.28);
  background: rgba(8, 20, 39, 0.94);
}

.xhs-reference-warning {
  padding: 8px 10px;
  border: 1px solid #e7b65b;
  border-radius: 8px;
  background: #fff8e8;
  color: #805713;
  font-size: 12px;
  line-height: 1.5;
}

.xhs-reference-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.xhs-reference-review {
  width: min(1540px, 98vw);
  height: min(940px, 96vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 16px;
  background: #f7f9fc;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.xhs-reference-review-head,
.xhs-reference-review-summary,
.xhs-reference-review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #d9e1ec;
  background: #ffffff;
}

.xhs-reference-review-head {
  justify-content: space-between;
}

.xhs-reference-review-head h2,
.xhs-reference-review-head p {
  margin: 2px 0 0;
}

.xhs-reference-review-head p {
  color: #607086;
  font-size: 13px;
}

.xhs-reference-review-head span {
  color: #237567;
  font-size: 12px;
  font-weight: 700;
}

.xhs-reference-review-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
}

.xhs-reference-review-summary {
  flex-wrap: wrap;
}

.xhs-reference-review-summary span {
  color: #607086;
  font-size: 13px;
}

.xhs-reference-review-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(560px, 1.25fr) minmax(420px, 0.75fr);
  gap: 14px;
  padding: 14px;
}

.xhs-reference-review-visuals,
.xhs-reference-review-list {
  min-height: 0;
  overflow: auto;
}

.xhs-reference-review-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.xhs-reference-review-visuals > div {
  padding: 10px;
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  background: white;
}

.xhs-reference-review-visuals h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.xhs-reference-review-visuals img,
.xhs-reference-review-visuals canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: white;
}

.xhs-reference-overlay-stage {
  grid-column: auto;
}

.xhs-reference-overlay-stage > div {
  position: relative;
  width: min(100%, 430px);
  margin: 0 auto;
  aspect-ratio: 3 / 4;
}

.xhs-reference-overlay-stage > div img,
.xhs-reference-overlay-stage > div canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.xhs-reference-overlay-stage label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
}

.xhs-reference-review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.xhs-reference-review-item {
  padding: 10px;
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  background: white;
}

.xhs-reference-review-item.warning {
  border-color: #dc6b5f;
  box-shadow: inset 4px 0 #dc6b5f;
}

.xhs-reference-review-item.confirmed {
  border-color: #3a9b82;
  box-shadow: inset 4px 0 #3a9b82;
}

.xhs-reference-review-item > header,
.xhs-reference-review-item > footer,
.xhs-reference-review-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.xhs-reference-review-item > header {
  justify-content: space-between;
  font-size: 12px;
}

.xhs-reference-review-crop {
  width: 100%;
  height: 80px;
  margin: 8px 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.xhs-reference-review-item textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.xhs-reference-review-geometry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.xhs-reference-review-geometry label {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
}

.xhs-reference-review-geometry input,
.xhs-reference-review-geometry select {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
}

.xhs-reference-review-item p,
.xhs-reference-review-metrics {
  margin: 6px 0;
  color: #607086;
  font-size: 12px;
}

.xhs-reference-review-status,
.xhs-reference-review-alternatives {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 7px 0;
  color: #607086;
  font-size: 12px;
}

.xhs-reference-review-status span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4f6;
}

.xhs-reference-review-alternatives button {
  min-height: 30px;
  padding: 4px 9px;
}

.xhs-reference-review-actions {
  justify-content: flex-end;
  border-top: 1px solid #d9e1ec;
  border-bottom: 0;
}

@media (max-width: 980px) {
  .xhs-reference-review-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .xhs-reference-review-visuals,
  .xhs-reference-review-list {
    overflow: visible;
  }
}

body[data-theme="tech"] .xhs-workbench-heading strong,
body[data-theme="tech"] .xhs-settings-head h2,
body[data-theme="tech"] .xhs-settings-current strong,
body[data-theme="tech"] .xhs-settings-ai strong {
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-settings-button,
body[data-theme="tech"] .xhs-home-shortcuts button > span {
  border-color: rgba(85, 147, 224, 0.4);
  background: #102b4a;
  color: #dceaff;
}

@media (max-width: 1100px) {
  .xhs-one-screen-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .xhs-workbench {
    position: absolute;
    z-index: 20;
    top: 0;
    bottom: 0;
    width: min(330px, calc(100% - 60px));
    border-radius: 0 14px 14px 0;
    box-shadow: 18px 0 38px rgba(8, 22, 42, 0.2);
    transition: transform 160ms ease;
  }

  .xhs-left-workbench {
    left: 0;
    transform: translateX(-105%);
  }

  .xhs-right-workbench {
    right: 0;
    border-radius: 14px 0 0 14px;
    box-shadow: -18px 0 38px rgba(8, 22, 42, 0.2);
    transform: translateX(105%);
  }

  .xhs-workbench.open {
    transform: translateX(0);
  }

  .xhs-workbench-close {
    display: grid;
    place-items: center;
  }

  .xhs-mobile-workbench-buttons {
    position: absolute;
    z-index: 12;
    top: 18px;
    left: 18px;
    display: flex;
    gap: 7px;
  }

  .xhs-mobile-workbench-buttons button {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
  }

  .xhs-canvas-stage {
    padding-inline: 48px;
  }
}

@media (max-width: 760px) {
  .xhs-note-studio {
    padding: 4px;
  }

  .xhs-minimal-editor {
    height: 100%;
    min-height: 0;
    border-radius: 10px;
  }

  .xhs-one-screen-grid {
    padding: 4px;
  }

  .xhs-canvas-stage {
    padding: 54px 24px 34px;
  }

  .xhs-settings-button {
    top: 12px;
    right: 12px;
  }

  .xhs-mobile-workbench-buttons {
    top: 12px;
    left: 12px;
  }

  .xhs-home-shortcuts {
    gap: 14px;
  }
}

/* 极简一屏“我的笔记”工作台 */
.xhs-note-minimal-editor {
  border-radius: 12px;
  background: #f6f8fa;
  box-shadow: none;
}

.xhs-note-one-screen-grid {
  display: grid;
  grid-template-columns: 216px minmax(480px, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.xhs-note-workbench {
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
}

.xhs-note-left-workbench {
  border-right: 1px solid rgba(133, 158, 196, 0.2);
}

.xhs-note-side-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(133, 158, 196, 0.18);
}

.xhs-note-side-heading > strong {
  min-width: 0;
  overflow: hidden;
  color: #1f2e42;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-note-title-editable {
  flex: 1;
  padding: 4px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  cursor: text;
}

.xhs-note-title-editable:hover,
.xhs-note-title-editable:focus {
  border-color: rgba(40, 110, 102, 0.3);
  background: #ffffff;
}

.xhs-note-return-template {
  flex: none;
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.xhs-compact-icon-button {
  display: inline-grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
}

.xhs-note-side-scroll {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.xhs-note-compact-section,
.xhs-recent-notes {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid rgba(133, 158, 196, 0.18);
  background: transparent;
}

.xhs-note-compact-section label {
  display: grid;
  gap: 4px;
}

.xhs-note-compact-section label > span {
  color: #69778a;
  font-size: 10px;
  font-weight: 700;
}

.xhs-note-compact-section input,
.xhs-note-compact-section select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(133, 158, 196, 0.3);
  border-radius: 7px;
  background: #f2f5f8;
  color: #1f2e42;
  font-size: 12px;
  font-weight: 600;
}

.xhs-note-generate-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.xhs-note-generate-button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.xhs-note-inline-warning {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 0;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9b621a;
  font-size: 10px;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.xhs-note-inline-warning:hover,
.xhs-note-inline-warning:focus-visible {
  color: #75430c;
  text-decoration: underline;
  outline: none;
}

.xhs-note-inline-warning i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d18a27;
}

.xhs-note-page-actions > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #25364b;
  font-size: 12px;
}

.xhs-note-page-actions > header span {
  color: #69778a;
  font-size: 10px;
}

.xhs-note-page-actions > div {
  display: flex;
  gap: 6px;
}

.xhs-note-left-actions {
  display: grid;
  gap: 7px;
}

.xhs-note-left-actions .xhs-note-finish-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.xhs-settings-ai.attention {
  outline: 2px solid rgba(209, 138, 39, 0.55);
  outline-offset: -2px;
}

.xhs-note-canvas-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: 12px 40px 24px 24px;
  background: #f6f8fa;
}

.xhs-note-canvas-frame {
  position: relative;
  width: auto;
  max-width: 100%;
  height: min(92%, 1100px, 82dvh);
  max-height: min(1100px, 82dvh);
  aspect-ratio: 3 / 4;
}

.xhs-note-canvas-frame .xhs-canvas-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border-radius: 3px;
  box-shadow: 0 10px 26px rgba(16, 28, 44, 0.16);
}

.xhs-note-canvas-frame .xhs-canvas-shell canvas {
  width: 100%;
  height: 100%;
}

.xhs-note-page-dots {
  position: absolute;
  right: -31px;
  bottom: 0;
  display: grid;
  max-height: min(240px, 70%);
  gap: 5px;
  padding: 1px;
  overflow-y: auto;
  scrollbar-width: none;
}

.xhs-note-page-dots::-webkit-scrollbar {
  display: none;
}

.xhs-note-page-dots button {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid #286e66;
  border-radius: 50%;
  background: #ffffff;
  color: #286e66;
  font-size: 9px;
  line-height: 20px;
  box-shadow: none;
}

.xhs-note-page-dots button.active {
  background: #286e66;
  color: #ffffff;
}

.xhs-note-empty-stage > div {
  display: grid;
  place-items: center;
  gap: 7px;
  color: #7a8797;
  font-size: 12px;
}

.xhs-note-empty-stage i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #b8c4d2;
  border-radius: 50%;
  font-style: normal;
}

.xhs-note-generating {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  background: rgba(246, 248, 250, 0.72);
  color: #286e66;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(2px);
}

.xhs-note-generating i {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border: 2px solid rgba(40, 110, 102, 0.2);
  border-top-color: #286e66;
  border-radius: 50%;
  animation: xhs-note-spin 0.8s linear infinite;
}

@keyframes xhs-note-spin {
  to { transform: rotate(360deg); }
}

.xhs-note-finish-heading {
  justify-content: space-between;
}

.xhs-note-finish-actions {
  display: flex;
  gap: 4px;
}

.xhs-note-finish-actions .xhs-compact-icon-button {
  width: 100%;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  border-radius: 7px;
  font-size: 12px;
}

.xhs-note-save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #69778a;
  font-size: 10px;
  white-space: nowrap;
}

.xhs-note-save-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8a97a7;
}

.xhs-note-save-state.saved i {
  background: #2b7a5d;
}

.xhs-note-save-state.dirty i {
  background: #d18a27;
}

.xhs-note-save-state.saving i {
  background: #4382c4;
}

.xhs-note-save-state.error {
  color: #a33a34;
}

.xhs-note-save-state.error i {
  background: #bd433a;
}

.xhs-recent-notes > header {
  margin: 0;
}

.xhs-recent-notes h4 {
  color: #25364b;
  font-size: 12px;
}

.xhs-recent-notes > header button {
  min-height: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #286e66;
  font-size: 10px;
  box-shadow: none;
}

.xhs-recent-note-list {
  gap: 0;
}

.xhs-note-history-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  padding: 6px 2px;
  border: 0;
  border-bottom: 1px solid rgba(133, 158, 196, 0.14);
  border-radius: 0;
  background: transparent;
  color: #25364b;
  text-align: left;
  box-shadow: none;
}

.xhs-note-history-row:last-child {
  border-bottom: 0;
}

.xhs-note-history-row i {
  width: 6px;
  height: 6px;
  border: 1px solid #91a0b2;
  border-radius: 50%;
}

.xhs-note-history-row.active i {
  border-color: #286e66;
  background: #286e66;
}

.xhs-note-history-row span {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-note-history-row small {
  color: #7a8797;
  font-size: 9px;
}

.xhs-note-history-row:hover,
.xhs-note-history-row:focus-visible,
.xhs-note-history-row.active {
  background: rgba(40, 110, 102, 0.06);
  outline: none;
}

.xhs-note-settings-drawer {
  width: min(360px, 92%);
}

.xhs-note-settings-drawer .xhs-recent-notes {
  margin-top: 10px;
  padding: 0;
  border: 0;
}

.xhs-note-settings-drawer .xhs-recent-note-list {
  max-height: calc(100dvh - 190px);
  overflow-y: auto;
}

body[data-theme="tech"] .xhs-note-minimal-editor,
body[data-theme="tech"] .xhs-note-workbench,
body[data-theme="tech"] .xhs-note-canvas-stage {
  border-color: rgba(85, 147, 224, 0.24);
  background: rgba(8, 20, 39, 0.94);
}

body[data-theme="tech"] .xhs-note-side-heading > strong,
body[data-theme="tech"] .xhs-recent-notes h4,
body[data-theme="tech"] .xhs-note-history-row {
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-note-compact-section input,
body[data-theme="tech"] .xhs-note-compact-section select {
  border-color: rgba(85, 147, 224, 0.34);
  background: #10233b;
  color: #e8f0fc;
}

.xhs-layer-actions .xhs-copy-library-entry {
  border-color: #286e66;
  background: #ffffff;
  color: #286e66;
}

.xhs-copy-library-workspace {
  box-sizing: border-box;
  height: 100%;
  padding: 28px clamp(16px, 4vw, 54px);
  overflow-y: auto;
}

.xhs-copy-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 980px);
  margin: 0 auto;
}

.xhs-copy-library-head > div {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.xhs-copy-library-head span {
  display: block;
  color: var(--muted, #6d7685);
  font-size: 11px;
}

.xhs-copy-library-head h2 {
  margin: 2px 0 0;
  overflow: hidden;
  color: #1f2e42;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-copy-library-help {
  width: min(100%, 980px);
  margin: 14px auto 18px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(40, 110, 102, 0.07);
  color: #526174;
  font-size: 12px;
  line-height: 1.7;
}

.xhs-copy-library-workspace > .error-box,
.xhs-copy-library-list {
  width: min(100%, 980px);
  margin-inline: auto;
}

.xhs-copy-library-list {
  display: grid;
  gap: 12px;
}

.xhs-copy-library-entry {
  overflow: hidden;
  border: 1px solid #9abda9;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(15, 44, 53, 0.05);
}

.xhs-copy-library-entry.used {
  border-color: #d59b97;
}

.xhs-copy-library-entry > summary {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 9px 14px;
  background: #edf8f0;
  color: #246a43;
  cursor: pointer;
  list-style: none;
}

.xhs-copy-library-entry.used > summary {
  background: #fff0ef;
  color: #a33c35;
}

.xhs-copy-library-entry > summary::-webkit-details-marker {
  display: none;
}

.xhs-copy-library-number {
  display: inline-grid;
  min-width: 45px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #2f7950;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.xhs-copy-library-entry.used .xhs-copy-library-number {
  background: #b94c44;
}

.xhs-copy-library-entry > summary em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1cb;
  color: #8b6015;
  font-size: 10px;
  font-style: normal;
}

.xhs-copy-library-entry > summary small {
  justify-self: end;
  color: #6c798a;
}

.xhs-copy-library-invalid {
  margin: 12px 14px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7df;
  color: #805a17;
  font-size: 11px;
}

.xhs-copy-library-editor {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.xhs-copy-library-raw-text {
  box-sizing: border-box;
  width: 100%;
  min-height: 420px;
  padding: 14px 16px;
  resize: vertical;
  border: 1px solid #b8c7d6;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2e42;
  font: 14px/1.8 "PingFang SC", "Microsoft YaHei", sans-serif;
  tab-size: 2;
}

.xhs-copy-library-raw-text:focus {
  border-color: #2f7950;
  outline: 3px solid rgba(47, 121, 80, 0.12);
}

.xhs-copy-library-raw-text:disabled {
  background: #f2f4f6;
  color: #687483;
}

.xhs-copy-library-usage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.xhs-copy-library-usage > span,
.xhs-copy-library-format-error {
  margin: 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: #edf8f0;
  color: #2f6847;
  font-size: 11px;
  line-height: 1.5;
}

.xhs-copy-library-usage > span.missing {
  background: #fff7df;
  color: #805a17;
}

.xhs-copy-library-usage > span.over-limit,
.xhs-copy-library-format-error {
  grid-column: 1 / -1;
  background: #fff0ef;
  color: #a33c35;
  font-weight: 700;
}

.xhs-copy-library-pages {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.xhs-copy-library-page {
  padding: 12px;
  border: 1px solid rgba(133, 158, 196, 0.24);
  border-radius: 10px;
  background: #f8fafc;
}

.xhs-copy-library-page > header,
.xhs-copy-library-entry-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.xhs-copy-library-page > header strong {
  color: #25364b;
  font-size: 13px;
}

.xhs-copy-library-page > header button,
.xhs-copy-library-entry-actions button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11px;
}

.xhs-copy-library-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.xhs-copy-library-fields label {
  display: grid;
  gap: 5px;
}

.xhs-copy-library-fields label > span {
  color: #5e6c7d;
  font-size: 11px;
  font-weight: 700;
}

.xhs-copy-library-fields textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 88px;
  padding: 9px 10px;
  resize: vertical;
  border: 1px solid #c6d1de;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2e42;
  font: inherit;
  line-height: 1.6;
}

.xhs-copy-library-fields textarea:disabled {
  background: #f1f3f5;
  color: #687483;
}

.xhs-copy-library-no-fields {
  grid-column: 1 / -1;
  padding: 10px;
  color: #7a8797;
  font-size: 11px;
  text-align: center;
}

.xhs-copy-library-entry-actions {
  justify-content: flex-start;
  padding: 0 14px 14px;
}

.xhs-copy-library-entry-actions .danger {
  margin-left: auto;
}

.xhs-copy-library-empty {
  display: grid;
  gap: 7px;
  min-height: 180px;
  place-content: center;
  border: 1px dashed #b8c7d6;
  border-radius: 13px;
  color: #748194;
  text-align: center;
}

.xhs-copy-library-empty strong {
  color: #304158;
}

body[data-theme="tech"] .xhs-copy-library-workspace,
body[data-theme="tech"] .xhs-copy-library-entry,
body[data-theme="tech"] .xhs-copy-library-page {
  border-color: rgba(85, 147, 224, 0.26);
  background: #10233b;
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-copy-library-head h2,
body[data-theme="tech"] .xhs-copy-library-page > header strong,
body[data-theme="tech"] .xhs-copy-library-empty strong {
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-copy-library-fields textarea {
  border-color: rgba(85, 147, 224, 0.34);
  background: #0b1c31;
  color: #e8f0fc;
}

body[data-theme="tech"] .xhs-copy-library-raw-text {
  border-color: rgba(85, 147, 224, 0.34);
  background: #0b1c31;
  color: #e8f0fc;
}

@media (max-width: 760px) {
  .xhs-copy-library-workspace {
    padding: 16px 10px;
  }

  .xhs-copy-library-head,
  .xhs-copy-library-head > div {
    align-items: stretch;
    flex-direction: column;
  }

  .xhs-copy-library-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .xhs-copy-library-usage {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .xhs-note-one-screen-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .xhs-note-workbench {
    position: absolute;
    z-index: 20;
    top: 0;
    bottom: 0;
    width: min(280px, calc(100% - 54px));
    transition: transform 160ms ease;
    box-shadow: 14px 0 30px rgba(8, 22, 42, 0.16);
  }

  .xhs-note-left-workbench {
    left: 0;
    transform: translateX(-105%);
  }

  .xhs-note-workbench.open {
    transform: translateX(0);
  }

  .xhs-note-workbench .xhs-workbench-close {
    display: grid;
    place-items: center;
  }

  .xhs-note-mobile-workbench-buttons {
    display: flex;
  }
}

@media (max-width: 760px) {
  .xhs-note-canvas-stage {
    padding: 54px 34px 28px 16px;
  }

  .xhs-note-page-dots {
    right: -29px;
  }
}

/* Compact template controls; long AI text is edited in the modal only. */
.xhs-right-workbench > .xhs-workbench-heading { min-height: 40px; padding-block: 7px; }
.xhs-right-template-top, .xhs-right-layer-middle, .xhs-right-template-bottom { padding: 5px; }
.xhs-right-template-top .xhs-settings-template-section { grid-template-rows: auto minmax(0, 1fr); padding: 6px; gap: 5px; }
.xhs-right-template-top .xhs-private-notice, .xhs-right-template-top .xhs-side-head p { display: none; }
.xhs-right-template-top .xhs-side-head h3 { font-size: 13px; margin: 0; }
.xhs-right-template-top .xhs-side-head button { min-height: 28px; padding: 4px 8px; font-size: 11px; }
.xhs-right-template-top .xhs-list-item { padding: 6px 8px; }
.xhs-right-layer-middle .xhs-property-grid { gap: 5px; }
.xhs-right-layer-middle .xhs-property-section { padding: 5px; }
.xhs-right-layer-middle .xhs-property-section > header { margin-bottom: 4px; }
.xhs-right-layer-middle .xhs-property-grid label { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px; }
.xhs-right-layer-middle .xhs-property-grid label > span { font-size: 10px; white-space: nowrap; }
.xhs-right-layer-middle .xhs-property-grid input,
.xhs-right-layer-middle .xhs-property-grid select { min-width: 0; width: 100%; height: 28px; padding: 3px 4px; }
.xhs-right-layer-middle .xhs-layer-copy-actions { margin-top: 5px; }
.xhs-right-template-bottom .xhs-template-management-panel { gap: 6px; }
.xhs-right-template-bottom .xhs-template-management-panel > section { padding: 7px; }
.xhs-right-template-bottom .xhs-settings-current header { gap: 5px; }
.xhs-right-template-bottom .xhs-settings-current header strong { font-size: 13px; }
.xhs-right-template-bottom .xhs-settings-current header > div > span { display: none; }
.xhs-right-template-bottom .xhs-settings-current header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xhs-right-template-bottom .xhs-template-status { padding: 4px 6px; font-size: 10px; white-space: nowrap; }
.xhs-right-template-bottom .xhs-settings-current .xhs-toolbar-actions { margin-top: 4px; gap: 4px; }
.xhs-right-template-bottom .xhs-settings-current .xhs-toolbar-actions button { min-height: 30px; padding: 4px; font-size: 11px; }
.xhs-right-template-bottom .xhs-settings-ai { gap: 3px; }
.xhs-right-template-bottom .xhs-settings-ai > header strong { font-size: 13px; }
.xhs-right-template-bottom .xhs-template-page-settings { grid-template-columns: minmax(0, 1fr) 72px; gap: 4px 7px; margin: 2px 0; }
.xhs-right-template-bottom .xhs-template-page-settings > label:first-child { grid-column: 1 / -1; }
.xhs-right-template-bottom .xhs-template-page-settings:has(.xhs-ai-page-count) > label:first-child { grid-column: auto; }
.xhs-right-template-bottom .xhs-template-page-settings > small { grid-column: 1 / -1; font-size: 10px; }
.xhs-right-template-bottom .xhs-template-page-settings label { gap: 3px; }
.xhs-right-template-bottom .xhs-template-page-settings select,
.xhs-right-template-bottom .xhs-template-page-settings input { min-height: 28px; height: 28px; padding: 3px 5px; font-size: 12px; }
.xhs-page-summary-note { display: block; }
.xhs-right-template-bottom .xhs-page-summary-note { display: none; }
.xhs-prompt-entry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.xhs-prompt-entry-actions button { min-height: 32px; min-width: 0; padding: 5px; font-size: 12px; white-space: nowrap; }
[data-xhs-prompt-status] { font-size: 11px; }

.xhs-prompt-backdrop { position: fixed; z-index: 10090; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12,21,35,.48); backdrop-filter: blur(4px); }
.xhs-dialog.xhs-prompt-dialog { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 12px; width: min(900px,calc(100vw - 32px)); height: min(780px,calc(100dvh - 40px)); padding: 20px; overflow: hidden; outline: none; }
.xhs-prompt-tabs { display: flex; gap: 8px; }
.xhs-prompt-tabs button { min-height: 32px; padding: 6px 14px; font-size: 13px; }
.xhs-prompt-tabs .active { background: #276b5e; color: #fff; border-color: #276b5e; }
.xhs-prompt-dialog-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.xhs-prompt-dialog .xhs-prompt-editor { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; gap: 8px; }
.xhs-prompt-editor [data-xhs-prompt-controls] { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px 12px; }
.xhs-prompt-editor [data-xhs-prompt-controls] > small { color: #66787c; font-size: 12px; line-height: 1.5; }
.xhs-prompt-editor [data-xhs-prompt-controls] > p { grid-column: 1 / -1; margin: 0; }
.xhs-prompt-dialog textarea[data-xhs-complete-ai-prompt] { height: clamp(160px,40dvh,400px); min-height: 160px; resize: none; background: #f6f8fb; font-size: 15px; font-weight: 400; line-height: 1.7; }
.xhs-prompt-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid #dce5e9; padding-top: 12px; }
.xhs-prompt-footer > small { flex: 1; min-width: 0; font-size: 12px; color: #657780; }
.xhs-prompt-footer button { min-height: 34px; padding: 6px 14px; white-space: nowrap; }
.xhs-prompt-dialog .xhs-ai-debug { border: 0; background: transparent; }
.xhs-prompt-dialog .xhs-ai-debug > summary { display: none; }
.xhs-prompt-dialog .xhs-ai-debug-body { padding: 0; }
.xhs-prompt-dialog .xhs-ai-debug textarea { height: clamp(160px,44dvh,400px); max-height: none; resize: none; font-size: 14px; }
@media (max-height: 720px) {
  .xhs-right-workbench { grid-template-rows: 36px 96px minmax(0,1fr); }
  .xhs-right-workbench > .xhs-workbench-heading { min-height: 36px; padding-block: 5px; }
  .xhs-right-layer-middle .xhs-property-grid { gap: 3px; }
  .xhs-right-layer-middle .xhs-property-grid input, .xhs-right-layer-middle .xhs-property-grid select { min-height: 25px; height: 25px; }
  .xhs-right-template-bottom .xhs-template-management-panel > section { padding: 5px; }
}
@media (max-width: 600px) {
  .xhs-prompt-backdrop { padding: 8px; }
  .xhs-dialog.xhs-prompt-dialog { padding: 12px; height: calc(100dvh - 16px); width: calc(100vw - 16px); gap: 8px; }
  .xhs-prompt-editor [data-xhs-prompt-controls] { grid-template-columns: 1fr; }
  .xhs-prompt-footer { flex-wrap: wrap; }
  .xhs-prompt-footer > small { flex-basis: 100%; }
}

/* Independent editable pages and whole-page copy. */
.xhs-page-manager { width:100%; max-width:640px; margin:12px auto 0; }
.xhs-page-manager-actions { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px; margin:0 0 10px; }
.xhs-page-manager-actions strong { font-size:13px; margin-right:8px; }
.xhs-page-manager-actions button { padding:7px 12px; font-size:13px; }
.xhs-page-thumbnails { display:flex; gap:8px; overflow-x:auto; padding:4px 4px 10px; max-width:100%; }
.xhs-page-thumbnails .xhs-page-thumbnail { flex:0 0 70px; display:flex; flex-direction:column; align-items:center; padding:5px; border:2px solid transparent; border-radius:9px; background:#f1f4f2; color:#344b44; box-shadow:none; }
.xhs-page-thumbnails .xhs-page-thumbnail.active { border-color:#276459; background:#e9f3ef; }
.xhs-page-thumbnail canvas { display:block; width:48px; height:64px; background:white; border:1px solid #dce4de; }
.xhs-page-thumbnail span { font-size:11px; line-height:1.5; margin-top:5px; white-space:nowrap; }
.xhs-page-copy-dialog { max-width:580px; width:min(580px,calc(100vw - 32px)); }
.xhs-copy-choice { display:grid; grid-template-columns:100px 1fr; gap:12px; align-items:center; margin:18px 0; }
.xhs-copy-choice select { width:100%; min-width:0; padding:10px; }
.xhs-copy-target-preview { display:flex; align-items:center; gap:18px; padding:16px; background:#f4f7f4; border-radius:10px; color:#50655a; }
.xhs-copy-target-preview canvas { width:81px; height:108px; flex:none; background:white; border:1px solid #dce4de; }
.xhs-page-settings-help { font-size:12px; color:#65766a; line-height:1.6; }
.xhs-template-canvas-layout { min-width:0; }
.xhs-page-manager + .xhs-page-kind-tabs { display:none; }
.xhs-template-canvas-layout { width:100%; grid-template-rows:minmax(0,1fr) auto; gap:8px; }
.xhs-template-canvas-layout > .xhs-canvas-frame { height:min(100%,1100px); max-height:100%; min-height:0; }
.xhs-template-canvas-layout > .xhs-page-manager { margin-top:0; min-width:0; }
.xhs-last-page-role { display:flex !important; align-items:center; gap:6px; font-size:12px; }
.xhs-last-page-role input { width:auto; }
