.editor-page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) 32px;
  background: #e8e8e5;
  color: #111111;
}

.editor-page-shell :focus-visible {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}

.editor-skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border: 2px solid #111111;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  transform: translateY(-160%);
}
.editor-skip-link:focus { transform: translateY(0); }

.editor-toolbar {
  display: grid;
  grid-template-columns: 40px minmax(160px, 1fr) auto minmax(128px, 160px) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 0 16px;
  border-bottom: 1px solid #111111;
  background: #ffffff;
}

.editor-toolbar-controls { display: contents; }

.editor-toolbar button,
.editor-back,
.editor-inspector button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #111111;
  border-radius: 0;
  color: #111111;
  background: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.editor-toolbar button:disabled,
.editor-inspector button:disabled {
  border-color: #b9b9b3;
  color: #62625d;
  background: #e8e8e5;
  cursor: not-allowed;
}

.editor-back {
  display: grid;
  width: 40px;
  place-items: center;
  padding: 0;
  font-size: 20px;
}

.editor-title {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
}

.editor-title h1 {
  margin: 0;
  overflow: hidden;
  font-size: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-title span,
.editor-statusbar,
.editor-inspector header p,
.editor-confirm p:first-child {
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0;
}

.editor-history-actions {
  display: flex;
  gap: 4px;
}

.editor-history-actions button {
  width: 36px;
  padding: 0;
  font-size: 20px;
}

.editor-save-status {
  display: inline-flex;
  min-width: 128px;
  min-height: 36px;
  align-items: center;
  padding: 0 10px;
  border-left: 3px solid #16794b;
  background: #f7f7f5;
  font-size: 12px;
  font-weight: 700;
}

.editor-save-status.dirty,
.editor-save-status.saving { border-color: #1769aa; }
.editor-save-status.failed,
.editor-save-status.conflicted { border-color: #c92a24; color: #8f1d14; }

.editor-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  min-height: 0;
}

.editor-assets-panel,
.editor-inspector {
  min-width: 0;
  overflow: auto;
  background: #f7f7f5;
}

.editor-assets-panel { border-right: 1px solid #b9b9b3; }
.editor-inspector { border-left: 1px solid #b9b9b3; padding: 20px; }

.editor-asset-tabs {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-bottom: 1px solid #b9b9b3;
}

.editor-asset-tabs button {
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-left: 3px solid transparent;
  color: #111111;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.editor-asset-tabs button[aria-current="page"] { border-left-color: #111111; background: #ffffff; }
.editor-asset-tabs button:disabled { color: #62625d; cursor: not-allowed; }

.editor-assets-panel section { padding: 18px 16px; border-bottom: 1px solid #b9b9b3; }
.editor-assets-panel h2 { margin: 0 0 10px; font-size: 16px; }

.editor-source {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #b9b9b3;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  text-align: left;
}

.editor-source + .editor-source { margin-top: 8px; }
.editor-source.active { border: 2px solid #111111; padding: 7px; }
.editor-thumb { width: 52px; height: 68px; flex: 0 0 auto; border: 1px solid #b9b9b3; background: #e8e8e5 center / cover no-repeat; }
.editor-muted { color: #62625d; font-size: 12px; }

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

.editor-sticker-virtual-list {
  height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.editor-sticker-count { margin: 0 0 8px; color: #62625d; font-size: 12px; }

.editor-sticker-grid button {
  display: grid;
  min-width: 0;
  min-height: 132px;
  place-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid #85857f;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
}

.editor-sticker-grid button:disabled { color: #62625d; background: #e8e8e5; cursor: not-allowed; }
.editor-sticker-grid button > span:last-child { overflow-wrap: anywhere; font-size: 11px; }
.editor-sticker-preview { display: block; width: 58px; height: 58px; object-fit: contain; border: 1px solid #b9b9b3; background: #30343b; }
.editor-limit { margin: 12px 0 0; padding: 8px; border-left: 3px solid #c92a24; background: #ffffff; color: #8f1d14; font-size: 12px; }

.editor-workspace {
  position: relative;
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 16px 32px 32px;
  background: #e8e8e5;
  overflow: auto;
}

.editor-canvas-tools {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 4px;
  align-self: start;
}

.editor-canvas-tools button {
  min-width: 76px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #85857f;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.editor-canvas-tools button.active { border-color: #005fcc; background: #ffffff; box-shadow: inset 0 -3px #005fcc; }
.editor-canvas-tools button:disabled { color: #62625d; background: #d8d8d3; cursor: not-allowed; }

.editor-canvas-frame {
  position: relative;
  display: grid;
  width: min(100%, 720px);
  max-height: calc(100vh - 168px);
  place-items: center;
  border: 1px solid #62625d;
  background: #ffffff;
  box-shadow: 8px 8px 0 #b9b9b3;
}

.editor-canvas { display: block; width: 100%; height: 100%; outline: none; }
.editor-canvas:focus-visible { outline: 2px solid #005fcc; outline-offset: 2px; }

.editor-candidates {
  position: absolute;
  z-index: 3;
  display: grid;
  width: min(260px, 80%);
  max-height: 200px;
  overflow: auto;
  border: 2px solid #111111;
  background: #ffffff;
  box-shadow: 6px 6px 0 #111111;
  transform: translate(10px, 10px);
}

.editor-candidates button {
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid #b9b9b3;
  background: #ffffff;
  color: #111111;
  text-align: left;
  font: inherit;
  font-size: 12px;
}

.editor-snap-status {
  position: absolute;
  align-self: end;
  margin-bottom: 8px;
  padding: 5px 9px;
  border: 1px solid #005fcc;
  background: #ffffff;
  color: #005fcc;
  font-size: 11px;
  font-weight: 700;
}

.editor-inspector header { padding-bottom: 16px; border-bottom: 1px solid #b9b9b3; }
.editor-inspector header p { margin: 0 0 4px; }
.editor-inspector h2 { margin: 0; font-size: 20px; }
.editor-object-id { margin: 12px 0 0; font-family: Consolas, monospace; font-size: 12px; }
.editor-inspector > label { display: grid; gap: 6px; margin-top: 18px; font-size: 13px; font-weight: 700; }
.editor-inspector select,
.editor-inspector input[type="range"] { width: 100%; }
.editor-inspector select { min-height: 40px; padding: 7px 8px; border: 1px solid #85857f; border-radius: 0; background: #ffffff; font: inherit; }
.editor-range > span { display: flex; justify-content: space-between; }
.editor-range output { font-family: Consolas, monospace; }
.editor-inspector-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.editor-primary { background: #f2f400 !important; }

.editor-object-moves,
.editor-object-tools,
.editor-layer-tools,
.editor-object-actions {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.editor-object-moves { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.editor-object-tools,
.editor-layer-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor-object-actions { grid-template-columns: 1fr 1fr; padding-top: 18px; border-top: 1px solid #b9b9b3; }
.editor-object-moves button,
.editor-object-tools button,
.editor-layer-tools button,
.editor-object-actions button,
.editor-wide-command {
  min-height: 36px;
  padding: 6px;
  border: 1px solid #85857f;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.editor-wide-command { width: 100%; margin-top: 18px; }
.editor-danger { border-color: #c92a24 !important; color: #8f1d14 !important; }

.editor-text-assets { min-width: 0; }
.editor-template-search {
  width: 100%;
  min-height: 40px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #85857f;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font: inherit;
}
.editor-template-categories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin-bottom: 12px; }
.editor-template-categories button {
  min-width: 0;
  min-height: 32px;
  padding: 4px 2px;
  border: 1px solid #85857f;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 11px;
}
.editor-template-categories button.active { border-color: #005fcc; box-shadow: inset 0 -3px #005fcc; font-weight: 700; }
.editor-template-retry { width: 100%; min-height: 36px; margin-bottom: 10px; border: 1px solid #8f1d14; border-radius: 0; background: #ffffff; color: #8f1d14; font: inherit; font-weight: 700; }
.editor-template-recent { margin-bottom: 12px; padding: 10px 0; border-block: 1px solid #b9b9b3; }
.editor-template-recent h3 { margin: 0 0 8px; font-size: 12px; }
.editor-template-recent > div { display: flex; gap: 6px; overflow-x: auto; }
.editor-template-recent span { display: grid; flex: 0 0 116px; min-height: 48px; align-content: center; padding: 5px 7px; border-left: 4px solid #f2f400; background: #ffffff; font-size: 10px; }
.editor-template-recent strong { font-family: Consolas, monospace; font-size: 10px; }
.editor-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.editor-template-grid button {
  display: grid;
  min-width: 0;
  min-height: 116px;
  grid-template-rows: 48px 16px minmax(18px, auto) 16px;
  align-items: center;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #85857f;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 10px;
  text-align: left;
}
.editor-template-grid button:disabled { border-style: dashed; background: #e8e8e5; color: #62625d; cursor: not-allowed; }
.editor-template-grid strong { overflow: hidden; font-family: Consolas, monospace; font-size: 10px; text-overflow: ellipsis; }
.editor-template-grid small { color: #8f1d14; font-size: 9px; }
.editor-template-mark { display: grid; width: 100%; height: 44px; place-items: center; border: 1px solid #111111; background: #f2f400; font-size: 18px; font-weight: 800; }
.editor-template-mark.title { background: #111111; color: #ffffff; }
.editor-template-mark.tag { background: #dbeafe; }
.editor-template-mark.simple { background: #ffffff; }

.editor-provider-panel > header { display: flex; align-items: center; justify-content: space-between; }
.editor-provider-panel > header h2 { margin: 0; }
.editor-info-button { width: 28px; height: 28px; border: 1px solid #111111; border-radius: 50%; background: #ffffff; font: 700 13px Georgia, serif; }
.editor-provider-note { margin: 8px 0 12px; color: #62625d; font-size: 11px; }
.editor-provider-groups { display: grid; gap: 18px; }
.editor-provider-groups section { display: grid; gap: 8px; }
.editor-provider-groups h3 { margin: 0; font-size: 12px; }
.editor-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.editor-provider-grid button {
  display: grid;
  min-width: 0;
  min-height: 112px;
  grid-template-rows: 48px 16px minmax(18px, auto) auto;
  align-items: center;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #85857f;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 10px;
  text-align: left;
}
.editor-provider-grid button:disabled { background: #e8e8e5; color: #62625d; cursor: not-allowed; }
.editor-provider-grid strong { font-family: Consolas, monospace; font-size: 10px; }
.editor-provider-grid small { color: #8f1d14; font-size: 9px; }
.editor-color-card-preview { display: flex; width: 100%; height: 42px; align-items: stretch; border: 1px solid #111111; background: #ffffff; }
.editor-color-card-preview i { flex: 1; }
.editor-color-card-preview.style_01,
.editor-color-card-preview.style_02 { width: 30px; height: 48px; flex-direction: column; justify-self: center; }
.editor-dynamic-preview { display: grid; width: 100%; height: 44px; place-items: center; border: 1px solid #111111; background: #ffffff; font-size: 15px; font-weight: 800; }
.editor-dynamic-preview.location { border-left: 6px solid #1769aa; }
.editor-dynamic-preview.time { background: #FFE62C; }
.editor-dynamic-preview.identity { background: #1769aa; color: #ffffff; }
.editor-dynamic-preview.dyn012 { position: relative; display: flex; gap: 7px; justify-content: center; border-color: #111111; background: #30343b; color: #ffffff; font-family: Dada_FONT081, sans-serif; font-size: 17px; font-weight: 400; }
.editor-dynamic-preview.dyn012 i { width: 2px; height: 15px; background: #ffffff; }
.editor-dynamic-preview.dyn012 small { position: absolute; top: 3px; right: 6px; color: #ffffff; font-size: 6px; }
.editor-source-preview-canvas { display: block; width: 100%; height: 72px; background: #30343b; }

.editor-text-inspector { display: grid; gap: 14px; margin-top: 14px; padding-block: 14px; border-block: 1px solid #b9b9b3; }
.editor-text-inspector label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.editor-text-inspector textarea,
.editor-text-inspector input[type="number"],
.editor-text-inspector select { width: 100%; min-height: 40px; padding: 7px 8px; border: 1px solid #85857f; border-radius: 0; background: #ffffff; color: #111111; font: inherit; }
.editor-text-inspector textarea { min-height: 96px; resize: vertical; }
.editor-text-number { grid-template-columns: minmax(0, 1fr) 68px; }
.editor-text-number > span { grid-column: 1 / -1; }
.editor-text-number input[type="range"] { align-self: center; }
.editor-text-number input[type="number"] { min-width: 0; }
.editor-color-fields { display: grid; gap: 8px; margin: 0; padding: 10px; border: 1px solid #b9b9b3; }
.editor-color-fields legend { padding-inline: 4px; font-size: 12px; font-weight: 700; }
.editor-text-inspector input[type="color"] { width: 100%; height: 40px; padding: 2px; border: 1px solid #85857f; border-radius: 0; background: #ffffff; }
.editor-color-swatches { display: flex; gap: 6px; }
.editor-color-swatches button { width: 32px; height: 32px; border: 1px solid #111111; border-radius: 0; }
.editor-check { display: flex !important; grid-template-columns: 18px 1fr; align-items: center; }
.editor-check input { width: 18px; height: 18px; margin: 0; }
.editor-dynamic-inspector { display: grid; gap: 10px; margin-top: 14px; padding-block: 14px; border-block: 1px solid #b9b9b3; }
.editor-dynamic-inspector label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.editor-dynamic-inspector textarea { min-height: 82px; padding: 7px 8px; border: 1px solid #85857f; border-radius: 0; resize: vertical; font: inherit; }
.editor-dynamic-inspector .editor-wide-command { margin-top: 0; }
.editor-font-substitution { margin: 0; padding: 8px; border-left: 3px solid #c92a24; background: #ffffff; color: #8f1d14; font-size: 11px; }

.editor-statusbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 16px;
  border-top: 1px solid #111111;
  background: #ffffff;
  color: #62625d;
}

.editor-notice {
  position: fixed;
  z-index: 4;
  top: 68px;
  left: 50%;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #1769aa;
  background: #ffffff;
  transform: translateX(-50%);
  font-size: 12px;
}

.editor-dialog-backdrop { position: fixed; z-index: 5; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(17 17 17 / 60%); }
.editor-confirm { width: min(480px, 100%); padding: 24px; border: 2px solid #111111; background: #ffffff; box-shadow: 8px 8px 0 #111111; }
.editor-confirm h2 { margin: 4px 0 12px; font-size: 22px; }
.editor-confirm p { margin: 0; }
.editor-confirm > div { display: flex; gap: 8px; margin-top: 24px; }
.editor-confirm button { min-height: 40px; padding: 8px 14px; border: 1px solid #111111; border-radius: 0; background: #ffffff; font: inherit; font-weight: 700; }
.editor-location-consent label { display: grid; gap: 6px; margin-top: 18px; font-size: 12px; font-weight: 700; }
.editor-location-consent input { min-height: 40px; padding: 7px 9px; border: 1px solid #85857f; border-radius: 0; font: inherit; }
.editor-location-actions { display: grid !important; grid-template-columns: 1fr; }

.editor-export-dialog {
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 2px solid #111111;
  background: #ffffff;
  box-shadow: 8px 8px 0 #111111;
}
.editor-export-dialog > header { display: flex; min-height: 82px; align-items: center; padding: 18px 22px; border-bottom: 1px solid #b9b9b3; }
.editor-export-dialog > header p { margin: 0 0 3px; color: #62625d; font-size: 10px; font-weight: 800; }
.editor-export-dialog > header h2 { margin: 0; font-size: 22px; }
.editor-export-section { padding: 18px 22px; border-bottom: 1px solid #b9b9b3; }
.editor-export-section h3 { margin: 0 0 10px; font-size: 13px; }
.editor-export-segments { display: grid; grid-template-columns: 1fr 1fr; }
.editor-export-segments button { min-height: 42px; border: 1px solid #111111; border-radius: 0; background: #ffffff; font: inherit; font-weight: 800; }
.editor-export-segments button + button { border-left: 0; }
.editor-export-segments button[aria-pressed="true"] { background: #111111; color: #ffffff; }
.editor-export-label { display: flex; align-items: center; justify-content: space-between; }
.editor-export-label h3 { margin: 0; }
.editor-export-label output { min-width: 36px; font-weight: 800; text-align: right; }
.editor-export-quality { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 14px; align-items: center; margin-top: 10px; }
.editor-export-quality input[type="number"] { min-width: 0; height: 38px; padding: 5px 7px; border: 1px solid #85857f; border-radius: 0; font: inherit; }
.editor-export-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; padding: 18px 22px; border-bottom: 1px solid #b9b9b3; font-size: 12px; }
.editor-export-summary span { color: #62625d; }
.editor-export-summary strong { text-align: right; }
.editor-export-pending { display: grid; gap: 10px; margin: 18px 22px 0; padding: 14px; border-left: 4px solid #c92a24; background: #f7f7f4; font-size: 12px; }
.editor-export-pending span { display: flex; gap: 9px; align-items: center; }
.editor-export-pending input { width: 18px; height: 18px; margin: 0; }
.editor-export-dialog > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 20px 22px; }
.editor-export-dialog > footer button,
.editor-export-result button { min-height: 42px; padding: 8px 16px; border: 1px solid #111111; border-radius: 0; background: #ffffff; font: inherit; font-weight: 800; }
.editor-export-result { display: grid; gap: 12px; padding: 28px 22px 22px; }
.editor-export-result > p { margin: 0; padding: 14px; border-left: 4px solid #12805c; background: #effaf5; font-weight: 800; }
.editor-export-result.failed > p { border-left-color: #c92a24; background: #fff2f0; color: #8f1d14; }
.editor-export-result small { color: #62625d; }
.editor-export-result > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.editor-loading { display: grid; min-height: 100vh; place-items: center; background: #e8e8e5; }

@media (max-width: 1100px) {
  .editor-layout { grid-template-columns: 220px minmax(0, 1fr) 280px; }
  .editor-workspace { padding: 20px; }
  .editor-toolbar { grid-template-columns: 40px minmax(120px, 1fr) auto minmax(110px, 128px) auto auto; gap: 8px; padding: 0 10px; }
}

@media (max-width: 760px) {
  .editor-page-shell { grid-template-rows: auto minmax(0, 1fr) auto; }
  .editor-toolbar { display: flex; min-height: 56px; flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .editor-title { min-width: 0; flex: 1 1 calc(100% - 56px); }
  .editor-history-actions { order: 3; }
  .editor-save-status { order: 4; flex: 1 1 128px; }
  .editor-toolbar-controls > button { display: block; order: 5; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-assets-panel, .editor-inspector { border: 0; }
  .editor-assets-panel { order: 2; }
  .editor-inspector { order: 3; }
  .editor-workspace { min-height: 55vh; order: 1; padding: 16px; }
  .editor-canvas-frame { width: min(100%, 480px); }
  .editor-statusbar { flex-wrap: wrap; min-height: 32px; gap: 8px 16px; padding: 8px 12px; }
}
