* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #101827;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: #2878ff;
}

.ghost-button {
  color: #101827;
  background: #fff;
  border: 1px solid #d9e4f2;
}

.home-page {
  min-width: 1200px;
  background: #fff;
}

.home-content-layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 146px);
}

.cross-border-sidebar {
  display: flex;
  flex: 0 0 80px;
  width: 80px;
  padding-top: 20px;
  border-right: 1px solid #e2e8f0;
  background: #fff;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cross-sidebar-item {
  display: flex;
  width: 100%;
  min-height: 66px;
  padding: 10px 0;
  border-right: 3px solid transparent;
  color: #64748b;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.cross-sidebar-item iconify-icon {
  font-size: 24px;
  line-height: 1;
}

.cross-sidebar-item:hover,
.cross-sidebar-item.active {
  border-right-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.home-shell {
  width: min(1318px, calc(100vw - 210px));
  min-width: 1120px;
  margin: 0 auto;
  padding-top: 46px;
  padding-bottom: 34px;
}

.home-title {
  margin: 0 0 24px;
  text-align: center;
  color: #080d18;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.image-type-selector {
  display: grid;
  grid-template-columns: auto 178px 178px;
  align-items: stretch;
  gap: 10px;
  width: max-content;
  margin: 0 auto 22px;
}

.type-label {
  align-self: center;
  color: #101827;
  font-size: 14px;
  line-height: 20px;
  font-weight: 900;
}

.type-option {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 52px;
  padding: 8px 14px 8px 42px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fff;
  color: #566276;
  cursor: pointer;
}

.type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-option::before {
  position: absolute;
  left: 15px;
  top: 16px;
  width: 16px;
  height: 16px;
  border: 1px solid #d9e0e8;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.type-option:has(input:checked) {
  border-color: #2878ff;
  background: #edf5ff;
  color: #101827;
  box-shadow: 0 8px 18px rgba(40, 120, 255, 0.08);
}

.type-option:has(input:checked)::before {
  border-color: #2878ff;
  border-width: 5px;
}

.type-name {
  font-size: 15px;
  line-height: 20px;
  font-weight: 900;
}

.type-copy {
  margin-top: 2px;
  color: #7b8798;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.collector-label {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
  color: #101827;
  font-size: 14px;
  line-height: 22px;
  font-weight: 800;
}

.collector {
  position: relative;
}

.free-badge {
  min-width: 40px;
  height: 22px;
  padding: 0 10px;
  border-radius: 11px;
  background: #98ff18;
  color: #101827;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}

.link-row {
  display: grid;
  grid-template-columns: 52px minmax(600px, 1fr) 112px 112px;
  gap: 12px;
  align-items: center;
}

.menu-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.menu-tile-default-icon {
  width: 24px;
  height: 24px;
}

.menu-tile-platform {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  overflow: hidden;
}

.menu-tile-platform img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.menu-tile:hover,
.menu-tile[aria-expanded="true"] {
  border-color: #2878ff;
  box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.1);
}

.platform-popover {
  position: absolute;
  left: 0;
  top: 88px;
  z-index: 20;
  width: min(720px, 100%);
  padding: 14px;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.platform-popover-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #101827;
  font-size: 14px;
}

.platform-popover-head strong {
  font-weight: 700;
}

.platform-popover-head span {
  color: #7a8698;
}

.platform-popover-head button {
  margin-left: auto;
  border: 0;
  color: #8893a2;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.platform-tile {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 6px;
  border-radius: 10px;
  background: #f4f8ff;
  color: #526071;
  font-size: 12px;
  text-align: center;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.platform-tile:hover {
  background: #e8f0fe;
}

.platform-tile-selected {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #2878ff;
}

.platform-logo,
.platform-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fff;
}

.platform-logo img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.platform-logo-fallback {
  color: #fff;
  background: var(--platform-tone, #2878ff);
  font-size: 11px;
  font-weight: 700;
}

.link-input {
  height: 52px;
  padding: 0 20px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  color: #101827;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(9, 32, 67, 0.04);
  font-size: 14px;
  font-weight: 800;
  line-height: 52px;
  outline: none;
}

.link-input::placeholder {
  color: #a7b1c0;
}

.link-input:focus {
  border-color: #2878ff;
  box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.12);
}

.parse-button,
.history-button {
  height: 52px;
  font-size: 14px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(610px, 1fr) minmax(610px, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.left-column {
  min-width: 0;
}

.drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 248px;
  padding: 22px 30px 28px;
  border: 1px dashed #a9c1df;
  border-radius: 12px;
  background: #fff;
}

.drop-type-title {
  margin-bottom: 16px;
  color: #101827;
  text-align: center;
  font-size: 16px;
  line-height: 22px;
  font-weight: 900;
}

.add-button {
  display: flex;
  width: 150px;
  height: 48px;
  margin: 0 auto 22px;
  font-size: 18px;
}

.drop-copy {
  margin: 0;
  color: #8994a8;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
}

.notice-card {
  height: 152px;
  margin-top: 20px;
  padding: 18px 18px 18px 26px;
  border: 1px solid #d4e4f6;
  border-radius: 10px;
  background: #eff7ff;
  color: #566276;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.8;
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 24px;
  color: #566276;
  font-weight: 900;
}

.notice-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  background: #ff8a22;
  font-size: 14px;
  line-height: 20px;
}

.notice-card ol,
.modal-notice ol {
  margin: 0;
  padding-left: 25px;
}

.workflow-card {
  position: relative;
  height: 428px;
  overflow: hidden;
  border: 1px solid #d9e9ff;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5fbff 0%, #d9eaff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.workflow-card::before,
.workflow-card::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.43);
}

.workflow-card::before {
  right: 10px;
  top: -18px;
  width: 244px;
  height: 244px;
}

.workflow-card::after {
  left: -14px;
  bottom: -50px;
  width: 240px;
  height: 240px;
}

.workflow-title {
  position: relative;
  z-index: 1;
  width: 172px;
  height: 40px;
  margin: 40px 0 25px 40px;
  border-radius: 10px;
  background: #fff;
  color: #101827;
  text-align: center;
  font-size: 16px;
  line-height: 40px;
  font-weight: 900;
}

.steps-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 28px 1fr 28px 1fr;
  align-items: center;
  gap: 8px;
  width: calc(100% - 78px);
  margin: 0 auto 43px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  padding: 16px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 35px rgba(93, 133, 188, 0.13);
}

.flow-step h2 {
  margin: 0 0 5px;
  color: #101827;
  font-size: 17px;
  line-height: 22px;
  font-weight: 900;
}

.flow-step p {
  margin: 0;
  color: #627089;
  font-size: 12px;
  line-height: 18px;
  font-weight: 800;
}

.step-icon {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.step-plus {
  color: #fff;
  background: #3383ff;
  text-align: center;
  font-size: 38px;
  line-height: 36px;
  font-weight: 800;
}

.step-upload {
  background: #95ff18;
}

.step-upload::before {
  position: absolute;
  left: 16px;
  top: 11px;
  width: 7px;
  height: 21px;
  border-radius: 4px;
  background: #102018;
  content: "";
}

.step-upload::after {
  position: absolute;
  left: 8px;
  top: 7px;
  width: 19px;
  height: 19px;
  border-left: 6px solid #102018;
  border-top: 6px solid #102018;
  transform: rotate(45deg);
  content: "";
}

.step-screen {
  background: #ff881f;
}

.step-screen::before {
  position: absolute;
  left: 9px;
  top: 10px;
  width: 20px;
  height: 16px;
  border: 4px solid #fff;
  border-radius: 4px;
  content: "";
}

.step-screen::after {
  position: absolute;
  left: 12px;
  bottom: 7px;
  width: 14px;
  height: 4px;
  border-radius: 8px;
  background: #fff;
  content: "";
}

.flow-dot {
  height: 4px;
  border-radius: 4px;
  background: radial-gradient(circle, #9cb9de 2px, transparent 3px) left center / 12px 4px repeat-x;
}

.benefit-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 10px;
  width: calc(100% - 70px);
  height: 80px;
  margin: 0 auto;
  padding: 0 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #101827;
  font-size: 15px;
  line-height: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.benefit span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #2878ff;
  background: #d7e6ff;
  font-size: 30px;
  font-weight: 900;
}

.flow-pill {
  position: relative;
  z-index: 1;
  width: 246px;
  height: 32px;
  margin: 16px auto 0;
  border-radius: 18px;
  color: #fff;
  background: #0e192b;
  text-align: center;
  font-size: 14px;
  line-height: 32px;
  font-weight: 900;
}

body.modal-open {
  overflow: hidden;
}

.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.58);
}

.app-modal-overlay[hidden] {
  display: none;
}

.history-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: block;
  padding: 0;
  background: rgba(15, 23, 42, 0.22);
}

.history-modal-overlay[hidden] {
  display: none;
}

.history-modal {
  position: absolute;
  top: var(--history-modal-top, 120px);
  left: var(--history-modal-left, 24px);
  width: min(560px, calc(100vw - 48px));
  max-height: calc(100vh - var(--history-modal-top, 120px) - 24px);
  min-height: min(520px, calc(100vh - var(--history-modal-top, 120px) - 24px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 28px 30px 26px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.history-modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 20px;
}

.history-modal-head h2 {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.history-modal-head p {
  margin: 14px 0 0;
  color: #8b94a3;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
}

.history-close-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8b94a3;
  font-size: 42px;
  line-height: 34px;
  cursor: pointer;
}

.history-close-button:hover {
  color: #1f2937;
  background: #f3f6fb;
}

.history-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 18px 20px;
  padding-right: 4px;
}

.history-card {
  position: relative;
  min-width: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.history-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 999px;
  color: #536071;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.history-card-delete:hover,
.history-card-delete:focus-visible {
  color: #d92d20;
  border-color: rgba(248, 113, 113, 0.55);
  background: #fff5f5;
  outline: none;
}

.history-card:focus-visible .history-thumb,
.history-card:hover .history-thumb {
  outline-color: #2878ff;
  box-shadow: 0 14px 30px rgba(40, 120, 255, 0.14);
}

.history-thumb {
  position: relative;
  aspect-ratio: 1 / 0.72;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #f2f4f8 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f8 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f8 75%);
  background-color: #fff;
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  outline: 1px solid rgba(203, 213, 225, 0.72);
  transition: box-shadow 0.15s ease, outline-color 0.15s ease;
}

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

.history-thumb > span:not(.history-thumb-placeholder) {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 70px;
  padding: 8px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(38, 45, 58, 0.7);
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

.history-thumb-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
}

.history-card-meta {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.history-card-meta strong {
  overflow: hidden;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-meta em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.history-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 600;
}

.history-status {
  min-height: 24px;
  color: #a7b3c4;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.app-language-modal {
  width: min(1720px, calc(100vw - 56px));
  height: min(860px, calc(100vh - 56px));
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.app-language-modal .modal-grid {
  height: calc(100% - 38px);
}

.app-language-modal .modal-upload-area,
.app-language-modal .image-list-area,
.app-language-modal .language-panel {
  min-height: 0;
  height: 100%;
}

.app-language-modal .image-list-area {
  overflow: auto;
  padding: 16px;
}

.modal-page {
  min-width: 1200px;
  background:
    linear-gradient(rgba(34, 34, 34, 0.72), rgba(34, 34, 34, 0.72)),
    radial-gradient(circle at 50% -20px, rgba(255, 80, 80, 0.55), transparent 18%),
    #5c5c5c;
}

.language-modal {
  width: calc(100vw - 12px);
  min-height: calc(100vh - 12px);
  margin: 6px;
  padding: 23px 24px 24px;
  border-radius: 8px;
  background: #fff;
}

.language-modal.app-language-modal {
  width: min(1280px, calc(100vw - 120px));
  height: min(800px, calc(100vh - 60px));
  min-height: 0;
  margin: 0;
  padding: 24px 28px 28px;
  border-radius: 16px;
}

.language-modal.app-language-modal .modal-grid {
  grid-template-columns: minmax(0, 1fr) 480px;
  grid-template-areas: "image-panel language-panel";
  gap: 18px;
  height: calc(100% - 46px);
}

.language-modal.app-language-modal .modal-upload-area,
.language-modal.app-language-modal .image-list-area,
.language-modal.app-language-modal .language-panel {
  height: 100%;
  min-height: 0;
}

.language-modal.app-language-modal [hidden] {
  display: none !important;
}

.language-modal.app-language-modal .modal-upload-area {
  grid-area: image-panel;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 48px;
}

.language-modal.app-language-modal .image-list-area {
  grid-area: image-panel;
  border-radius: 10px;
  background: #f1f6fd;
}

.language-modal.app-language-modal .language-panel {
  grid-area: language-panel;
}

.language-modal.app-language-modal .empty-visual {
  flex: 0 0 auto;
  margin: 8px auto 18px;
}

.language-modal.app-language-modal .modal-notice {
  margin-top: 14px;
}

.language-modal.app-language-modal,
.language-modal.app-language-modal button {
  font-weight: 400;
}

.language-modal.app-language-modal .modal-header h1,
.language-modal.app-language-modal .modal-area-title,
.language-modal.app-language-modal .language-panel h2,
.language-modal.app-language-modal .radio-item,
.language-modal.app-language-modal .modal-notice,
.language-modal.app-language-modal .field-segment button {
  font-weight: 500;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
}

.modal-header h1 {
  margin: 0;
  color: #1a202c;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
}

.close-button {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  transition: background-color 0.15s ease;
}

.close-button:hover {
  background: #e2e8f0;
}

.close-button::before,
.close-button::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  margin-top: -7px;
  border-radius: 2px;
  background: #64748b;
  content: "";
}

.close-button::before {
  transform: rotate(45deg);
}

.close-button::after {
  transform: rotate(-45deg);
}

.modal-type-selector {
  margin: 14px 0 0;
}

.modal-type-selector .type-option {
  min-height: 44px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.modal-type-selector .type-option::before {
  top: 13px;
}

.modal-type-selector .type-copy {
  font-size: 11px;
  line-height: 14px;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(700px, 1fr) 390px;
  gap: 16px;
  margin-top: 14px;
}

.modal-upload-area {
  position: relative;
  min-height: calc(100vh - 172px);
  border-radius: 10px;
  background: #f1f6fd;
}

.modal-area-title {
  position: absolute;
  left: 24px;
  top: 18px;
  color: #101827;
  font-size: 16px;
  line-height: 22px;
  font-weight: 900;
}

.empty-visual {
  position: relative;
  width: 126px;
  height: 110px;
  margin: 167px auto 23px;
}

.image-stack {
  position: absolute;
  background: #fff;
  box-shadow: 0 4px 14px rgba(73, 98, 130, 0.05);
}

.image-stack.back {
  left: 13px;
  top: 0;
  width: 70px;
  height: 94px;
}

.image-stack.front {
  left: 28px;
  top: 25px;
  width: 97px;
  height: 82px;
  border: 7px solid #fff;
}

.image-stack.front::before {
  position: absolute;
  inset: 0;
  background: #dce4ed;
  content: "";
}

.image-stack.front i::before,
.image-stack.front i::after {
  position: absolute;
  z-index: 1;
  bottom: 12px;
  content: "";
}

.image-stack.front i::before {
  left: 12px;
  width: 42px;
  height: 36px;
  border-radius: 10px 10px 0 0;
  background: #fff;
  clip-path: polygon(0 100%, 34% 18%, 58% 58%, 78% 31%, 100% 100%);
}

.image-stack.front i::after {
  right: 4px;
  width: 54px;
  height: 39px;
  border-radius: 12px 12px 0 0;
  background: #fff;
  clip-path: polygon(0 100%, 36% 20%, 57% 56%, 82% 28%, 100% 100%);
}

.image-stack.front::after {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.upload-disc {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f7f9fc;
  box-shadow: 0 5px 13px rgba(64, 89, 120, 0.08);
}

.upload-disc::before {
  position: absolute;
  left: 25px;
  top: 22px;
  width: 8px;
  height: 22px;
  border-radius: 4px;
  background: #dce4ed;
  content: "";
}

.upload-disc::after {
  position: absolute;
  left: 18px;
  top: 16px;
  width: 21px;
  height: 21px;
  background: #dce4ed;
  clip-path: polygon(50% 0, 100% 52%, 68% 52%, 68% 100%, 32% 100%, 32% 52%, 0 52%);
  content: "";
}

.empty-text {
  margin: 0 0 29px;
  color: #5e6672;
  text-align: center;
  font-size: 15px;
  line-height: 23px;
  font-weight: 500;
}

.modal-upload-button {
  display: flex;
  width: 120px;
  height: 40px;
  margin: 0 auto;
  font-size: 16px;
}

.modal-notice {
  width: min(492px, calc(100% - 160px));
  margin: 9px auto 0;
  padding: 20px 16px 18px;
  border-radius: 10px;
  background: #fff;
  color: #5b6470;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 700;
}

.modal-notice .notice-title {
  margin-bottom: 8px;
  font-size: 15px;
}

.language-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 20px 16px;
  border-radius: 12px;
  background: #f1f7ff;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.language-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.language-panel h2 {
  margin: 0 0 10px;
  color: #4a5568;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.language-panel h2 span {
  color: #ff5e52;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 4px;
  row-gap: 6px;
}

.radio-item {
  position: relative;
  min-width: 0;
  border: 0;
  min-height: 18px;
  padding: 4px 2px 4px 18px;
  color: #2d3748;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  text-align: left;
  white-space: normal;
  word-break: keep-all;
  transition: background-color 0.15s ease;
}

.radio-item:hover {
  background: rgba(40, 120, 255, 0.06);
}

.radio-item::before {
  position: absolute;
  left: 1px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 1.5px solid #cbd5e0;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: border-color 0.15s ease;
}

.radio-item.checked::before {
  border-color: #2878ff;
  border-width: 3px;
}

.radio-item.checked {
  color: #2878ff;
  font-weight: 600;
}


.target-section {
  margin-top: 14px;
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.translate-options-section {
  margin-top: 14px;
  margin-bottom: 18px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.translate-options-section h2 {
  margin-bottom: 8px;
}

.translate-option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #2d3748;
  cursor: pointer;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.translate-option-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2878ff;
  cursor: pointer;
}

.field-section {
  margin-top: 12px;
}

.field-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 10px;
  background: #e8f1ff;
}

.field-segment button {
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: #5f6d81;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.field-segment button.checked {
  color: #fff;
  background: #2878ff;
  box-shadow: 0 2px 8px rgba(40, 120, 255, 0.3);
}

.provider-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.language-panel > .provider-section:first-child {
  margin-top: 0;
  margin-bottom: 14px;
  padding-top: 0;
  padding-bottom: 12px;
  border-top: 0;
  border-bottom: 1px solid #e2e8f0;
}

.translate-button {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  margin-top: auto;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -12px 20px rgba(241, 247, 255, 0.9);
}

.filled-state {
  grid-template-columns: minmax(700px, 1fr) 390px;
}

.image-list-area {
  position: relative;
  min-height: calc(100vh - 172px);
}

.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 178px));
  align-content: start;
  align-items: start;
  gap: 12px;
  padding-top: 10px;
}

.image-list-area[data-image-mode="collect"] .image-list {
  grid-template-columns: minmax(0, 1fr);
}

.image-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.image-list-top h2 {
  margin: 0;
  color: #101827;
  font-size: 16px;
  line-height: 22px;
}

.selection-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #1f2937;
  cursor: pointer;
  font-size: 14px;
}

.selection-toggle span {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid #d8e1ee;
  border-radius: 4px;
  background: #fff;
}

.selection-toggle.checked span,
.selection-toggle.partial span {
  border-color: #2878ff;
  background: #2878ff;
}

.selection-toggle.checked span::after,
.selection-toggle.partial span::after {
  position: absolute;
  left: 5px;
  top: 2px;
  width: 7px;
  height: 11px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  content: "";
}

.selection-toggle em {
  color: #9aa4b5;
  font-style: normal;
}

.image-category {
  display: grid;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.image-category-header {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.image-check-button,
.image-card-check {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid #d8e1ee;
  border-radius: 4px;
  background: #fff;
}

.image-check-button.checked,
.image-check-button.partial,
.image-select-card.selected .image-card-check {
  border-color: #2878ff;
  background: #2878ff;
}

.image-check-button.checked::after,
.image-check-button.partial::after,
.image-select-card.selected .image-card-check::after {
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  content: "";
}

.image-delete-btn {
  display: none;
}

.image-category-title {
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.image-category-divider {
  height: 1px;
  border-top: 1px dashed #d4e0ee;
}

.image-category-toggle {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.image-category-toggle::before {
  display: block;
  width: 10px;
  height: 10px;
  margin: 8px auto;
  border-right: 2px solid #8792a1;
  border-bottom: 2px solid #8792a1;
  transform: rotate(45deg);
  content: "";
}

.image-category-toggle.collapsed::before {
  margin-top: 11px;
  transform: rotate(-45deg);
}

.image-card-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.image-add-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 178px;
  height: 178px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f1f6fd;
  color: #222933;
  cursor: pointer;
  font-size: 18px;
}

.image-add-tile span {
  color: #5f6770;
  font-size: 28px;
  line-height: 26px;
}

.image-add-tile strong,
.image-add-tile em {
  font-weight: 400;
  font-style: normal;
}

.image-select-card {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.image-select-card .image-card-check {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
}

.image-select-card .product-thumb {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.add-tile,
.product-thumb {
  width: 178px;
  height: 178px;
  border-radius: 9px;
}

.add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #222933;
  background: #f1f6fd;
  font-size: 17px;
  line-height: 27px;
  font-weight: 400;
}

.add-plus {
  height: 25px;
  color: #5f6770;
  font-size: 25px;
  line-height: 25px;
  font-weight: 300;
}

.add-tile b {
  font-weight: 400;
}

.product-thumb {
  display: block;
  object-fit: cover;
}

@media (max-height: 760px) {
  .modal-notice {
    margin-top: 38px;
  }

  .empty-visual {
    margin-top: 140px;
  }
}

/* Yinghuo image editor */
html {
  overflow-x: hidden;
}

body.editor-page {
  overflow: hidden;
  overflow-x: hidden;
  width: 100vw;
  max-width: 100vw;
  color: #1f2933;
  background: #f2f4f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-weight: 400;
}

body.editor-page textarea[data-fabric-hiddentextarea] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: -999 !important;
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  max-height: 1px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: none !important;
}

.editor-page * {
  scrollbar-width: thin;
  scrollbar-color: #cfd7e3 transparent;
}

.editor-page *::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.editor-page *::-webkit-scrollbar-track {
  background: transparent;
}

.editor-page *::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #cfd7e3;
  background-clip: content-box;
}

.editor-page *::-webkit-scrollbar-thumb:hover {
  background: #b8c2d0;
  background-clip: content-box;
}

.xme-app {
  display: grid;
  grid-template-rows: 58px 1fr;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
}

.xme-topbar {
  display: grid;
  grid-template-columns: 170px minmax(350px, auto) 1fr 88px minmax(330px, auto);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #e7ebf0;
}

.xme-brandbar,
.xme-top-actions,
.xme-file-actions {
  display: flex;
  align-items: center;
}

.xme-brandbar {
  gap: 16px;
}

.xme-top-actions,
.xme-file-actions {
  gap: 10px;
}

.xme-file-actions {
  justify-content: flex-end;
}

.xme-back {
  color: #111827;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
}

.xme-menu-button,
.xme-icon-button,
.xme-secondary-button,
.xme-primary-button,
.xme-danger-button,
.xme-compare-button {
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
}

.xme-menu-button {
  width: 28px;
  height: 28px;
  color: #6b7280;
  background: transparent;
  font-size: 20px;
  line-height: 28px;
}

.xme-project-title {
  min-width: 0;
  overflow: hidden;
  color: #5e6673;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

.xme-save-status {
  justify-self: center;
  min-width: 54px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #8a95a3;
  background: #f4f6f9;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
}

.xme-save-status[data-state="已保存"] {
  color: #15a05e;
  background: #eaf8f1;
}

.xme-icon-button,
.xme-secondary-button,
.xme-primary-button,
.xme-danger-button,
.xme-compare-button {
  height: 38px;
  border-radius: 8px;
  font-size: 13px;
}

.xme-icon-button {
  width: 34px;
  color: #7a8491;
  background: transparent;
}

.xme-secondary-button {
  padding: 0 14px;
  color: #2f3947;
  background: #f5f8fc;
  border-color: #e0e6ee;
}

.xme-primary-button {
  padding: 0 18px;
  color: #fff;
  background: #2878ff;
}

.xme-danger-button {
  padding: 0 14px;
  color: #b42318;
  background: #fff5f4;
  border-color: #ffd3cf;
}

.xme-compare-button {
  min-width: 82px;
  padding: 0 12px;
  color: #425066;
  background: #f5f8fc;
  border-color: #e0e6ee;
}

.xme-compare-button.active {
  color: #fff;
  background: #2878ff;
  border-color: #2878ff;
}

.xme-compare-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.xme-shell {
  position: relative;
  display: grid;
  grid-template-columns: 76px 320px minmax(480px, 1fr) 204px;
  height: calc(100vh - 58px);
  min-height: 0;
  transition: grid-template-columns 160ms ease;
}

.xme-app.tool-panel-collapsed .xme-shell,
.xme-shell.tool-panel-collapsed {
  grid-template-columns: 76px 0 minmax(480px, 1fr) 204px;
}

.xme-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 12px 6px;
  background: #fff;
  border-right: 1px solid #edf0f4;
  scrollbar-width: none;
}

.xme-toolbar::-webkit-scrollbar {
  display: none;
}

.xme-toolbar button {
  display: grid;
  grid-template-rows: 22px 17px;
  place-items: center;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #475569;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.xme-toolbar button b {
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xme-toolbar button span {
  font-size: 18px;
  line-height: 20px;
}

.xme-toolbar button.active {
  color: #2878ff;
  background: #eef5ff;
}

.xme-tool-panel {
  overflow: auto;
  padding: 18px 16px;
  background: #fff;
  border-right: 1px solid #edf0f4;
  transition: opacity 140ms ease, padding 160ms ease;
}

.xme-app.tool-panel-collapsed .xme-tool-panel {
  overflow: hidden;
  width: 0;
  min-width: 0;
  max-width: 0;
  padding-right: 0;
  padding-left: 0;
  opacity: 0;
  pointer-events: none;
}

.xme-panel-collapse {
  position: absolute;
  left: calc(76px + 320px - 1px);
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 34px;
  height: 90px;
  padding: 0;
  border: 1px solid #e9edf3;
  border-left: 0;
  border-radius: 0 18px 18px 0;
  color: #8792a1;
  background: #fff;
  box-shadow: 8px 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-50%);
  transition: left 160ms ease, color 140ms ease, background 140ms ease;
}

.xme-panel-collapse:hover {
  color: #2878ff;
  background: #f8fbff;
}

.xme-panel-collapse span {
  font-size: 28px;
  line-height: 1;
}

.xme-app.tool-panel-collapsed .xme-panel-collapse {
  left: calc(76px - 1px);
}

.xme-app.tool-panel-collapsed .xme-panel-collapse span {
  transform: rotate(180deg);
}

.tool-section {
  margin-bottom: 18px;
}

.tool-section h3 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
}

.tool-section label,
.tool-grid label {
  display: grid;
  gap: 7px;
  color: #526071;
  font-size: 12px;
  font-weight: 500;
}

.tool-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-grid.two {
  grid-template-columns: 1fr 1fr;
}

.tool-grid.three,
.tool-button-row,
.align-row {
  grid-template-columns: repeat(3, 1fr);
}

.tool-button-row,
.align-row {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-inline-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #526071;
  font-size: 12px;
  font-weight: 500;
}

.tool-inline-check input {
  width: 16px;
  height: 16px;
  accent-color: #2878ff;
}

.tool-textarea,
.tool-section input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
.tool-section select,
.tool-grid input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
.tool-grid select {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tool-textarea {
  resize: vertical;
  padding: 8px;
  line-height: 18px;
}

.tool-section input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
.tool-section select,
.tool-grid input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
.tool-grid select {
  height: 40px;
  padding: 0 12px;
}

.tool-textarea:focus,
.tool-section input:not([type="checkbox"]):not([type="range"]):not([type="color"]):focus,
.tool-section select:focus,
.tool-grid input:not([type="checkbox"]):not([type="range"]):not([type="color"]):focus,
.tool-grid select:focus {
  border-color: #2878ff;
  box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.1);
}

.tool-section input[type="range"],
.tool-grid input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 0;
  accent-color: #2878ff;
}

.tool-section input[type="color"],
.tool-grid input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 6px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.tool-section input[type="color"]::-webkit-color-swatch-wrapper,
.tool-grid input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.tool-section input[type="color"]::-webkit-color-swatch,
.tool-grid input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}

.tool-primary,
.tool-secondary,
.tool-danger,
.tool-toggle,
.align-row button,
.reserved-tool-list button {
  appearance: none;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.tool-grid .tool-primary,
.tool-grid .tool-secondary,
.tool-grid .tool-danger,
.tool-grid .tool-toggle,
.tool-button-row .tool-primary,
.tool-button-row .tool-secondary,
.tool-button-row .tool-danger,
.tool-button-row .tool-toggle,
.align-row button {
  height: 42px;
}

.tool-primary:hover,
.tool-secondary:hover,
.tool-danger:hover,
.tool-toggle:hover,
.align-row button:hover,
.reserved-tool-list button:hover {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.tool-section > .tool-primary + .tool-secondary,
.tool-section > .tool-primary + .tool-danger,
.tool-section > .tool-secondary + .tool-secondary,
.tool-section > .tool-secondary + .tool-danger,
.tool-section > .tool-danger + .tool-secondary {
  margin-top: 10px;
}

.tool-primary {
  border-color: transparent;
  color: #fff;
  background: #2878ff;
}

.tool-secondary,
.reserved-tool-list button,
.tool-toggle,
.align-row button {
  border: 1px solid #e3e8ef;
  color: #2f3947;
  background: #fbfdff;
}

.tool-danger {
  margin-top: 12px;
  border: 1px solid #ffd3cf;
  color: #b42318;
  background: #fff5f4;
}

.tool-grid .tool-danger {
  align-self: stretch;
  margin-top: 0;
}

.reserved-tool-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-note,
.placeholder-panel p {
  color: #697586;
  font-size: 13px;
  line-height: 20px;
}

.tool-card-list {
  display: grid;
  gap: 12px;
}

.tool-card {
  display: grid;
  grid-template-columns: 40px 1fr 16px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  color: #202733;
  background: #eef2f7;
  text-align: left;
}

.tool-card span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #394758;
  background: #fff;
  font-size: 18px;
}

.tool-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  line-height: 19px;
  font-weight: 500;
}

.tool-card small,
.tool-card b {
  color: #687485;
  font-size: 12px;
  line-height: 18px;
}

.xme-stage {
  position: relative;
  min-width: 0;
  overflow: auto;
  padding: 38px;
  background: #f3f5f8;
}

.xme-stage.compare-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 32px;
  align-items: start;
  justify-content: stretch;
  width: 100%;
  min-width: 0;
  padding-inline: 28px;
}

.xme-compare-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: auto;
  padding-right: 0;
  border-right: 0;
  background: transparent;
}

.xme-compare-pane[hidden] {
  display: none;
}

.xme-compare-frame {
  overflow: hidden;
  background: #fff;
  border-radius: 2px;
  outline: 1px solid rgba(203, 213, 225, 0.72);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
}

.xme-compare-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.xme-compare-label,
.xme-canvas-label {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: none;
  width: max-content;
  margin: 0 auto;
  padding: 5px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(25, 35, 52, 0.86);
  font-size: 12px;
  line-height: 18px;
  pointer-events: none;
}

.xme-compare-label {
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.xme-stage.compare-mode .xme-canvas-label {
  display: block;
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
}

.xme-canvas-viewport {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: visible;
}

.xme-stage.compare-mode .xme-canvas-viewport {
  overflow: visible;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
  align-self: start;
  justify-self: center;
}

.xme-stage.compare-mode .xme-compare-frame,
.xme-stage.compare-mode .canvas-container {
  flex: 0 0 auto;
}

.xme-stage.compare-mode .canvas-container {
  position: relative !important;
  top: auto;
  left: auto;
}

.canvas-container {
  position: relative;
  border-radius: 2px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}

.xme-rightbar {
  min-width: 0;
  overflow: hidden;
  padding: 20px 14px;
  background: #fff;
  border-left: 1px solid #edf0f4;
}

.xme-side-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.xme-side-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: #eef2f7;
}

.xme-side-tabs button {
  appearance: none;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
}

.xme-side-tabs button.active {
  color: #fff;
  background: #2878ff;
}

.xme-side-panel {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.xme-side-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.xme-side-head h2 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
}

.xme-side-head p,
.xme-side-head strong,
.editor-page-thumb small {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.xme-page-list,
.xme-layer-list,
.xme-record-list,
.xme-right-actions {
  display: grid;
  gap: 8px;
}

.editor-page-thumb {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  grid-template-rows: 1fr auto auto;
  gap: 3px 10px;
  min-height: 88px;
  padding: 8px;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  color: #1f2a3d;
  background: #fff;
  text-align: left;
}

.editor-page-thumb.active {
  border-color: #2878ff;
  box-shadow: 0 0 0 2px rgba(40, 120, 255, 0.16);
}

.editor-page-thumb img {
  grid-row: 1 / 4;
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 7px;
}

.editor-page-thumb span {
  align-self: end;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.editor-page-thumb em {
  width: max-content;
  padding: 2px 7px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
}

.editor-page-thumb em.edited {
  color: #137333;
  background: #e8f7ee;
}

.xme-right-actions {
  margin-top: 12px;
}

.xme-right-actions button {
  width: 100%;
}

.xme-layer-item,
.xme-record-item,
.xme-empty-side {
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #fff;
}

.xme-layer-item {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.xme-layer-item.active {
  border-color: #2878ff;
}

.xme-layer-main {
  display: grid;
  gap: 4px;
}

.xme-layer-main input {
  min-width: 0;
  border: 0;
  color: #1f2a3d;
  font-weight: 500;
}

.xme-layer-main small {
  color: #778397;
  font-size: 12px;
}

.xme-layer-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.xme-layer-actions button {
  min-height: 26px;
  border: 1px solid #e1e8f2;
  border-radius: 6px;
  color: #425066;
  background: #f7faff;
  font-size: 12px;
  font-weight: 500;
}

.xme-record-item {
  display: grid;
  gap: 2px;
  padding: 10px;
}

.xme-record-item strong {
  color: #1f2a3d;
  font-size: 13px;
  font-weight: 500;
}

.xme-record-item span,
.xme-empty-side {
  color: #778397;
  font-size: 12px;
}

.xme-empty-side {
  padding: 16px;
  text-align: center;
}

.hidden-file-input {
  display: none;
}

.editor-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  z-index: 50;
  padding: 13px 18px;
  border-radius: 10px;
  color: #fff;
  background: rgba(17, 24, 39, 0.92);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
  transform: translateX(-50%);
  font-weight: 500;
}

.editor-fallback {
  max-width: 420px;
  margin: 80px auto;
  padding: 28px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.editor-page button,
.editor-page input,
.editor-page select,
.editor-page textarea,
.editor-page label,
.editor-page small,
.editor-page strong,
.editor-page b {
  font-weight: 400;
}

.editor-page .xme-back,
.editor-page .xme-project-title,
.editor-page .xme-save-status,
.editor-page .xme-toolbar button,
.editor-page .tool-section h3,
.editor-page .tool-card strong,
.editor-page .xme-side-head h2,
.editor-page .editor-page-thumb span,
.editor-page .xme-layer-main input,
.editor-page .xme-layer-actions button,
.editor-page .xme-record-item strong,
.editor-page .editor-toast {
  font-weight: 400;
}
