:root {
  color-scheme: light;
  --accent: #ff3941;
  --accent-soft: #fff0f1;
  --ink: #17181a;
  --muted: #72767d;
  --line: #e5e7eb;
  --line-strong: #d8dbe0;
  --canvas-bg: #f4f5f7;
  --surface: #ffffff;
  --focus: rgba(255, 57, 65, 0.24);
  --selection: #3478f6;
  --selection-soft: #eef5ff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.activation-gate {
  display: grid;
  width: 100%;
  min-width: 680px;
  min-height: 100dvh;
  place-items: center;
  overflow: auto;
  padding: 48px 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 57, 65, 0.09), transparent 32%),
    #f4f5f7;
}

.activation-card {
  width: min(100%, 660px);
  padding: 34px 38px 26px;
  border: 1px solid rgba(23, 24, 26, 0.09);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 24, 26, 0.11);
}

.activation-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activation-brand img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(23, 24, 26, 0.08);
}

.activation-brand div {
  display: grid;
  gap: 2px;
}

.activation-brand strong {
  font-size: 16px;
  font-weight: 730;
}

.activation-brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.04em;
}

.activation-heading {
  margin: 30px 0 28px;
}

.activation-heading h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.activation-heading p {
  max-width: 550px;
  margin: 10px 0 0;
  color: #686c73;
  font-size: 13px;
  line-height: 1.75;
}

.activation-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
}

.activation-step-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}

.activation-step-body {
  display: grid;
  gap: 9px;
}

.activation-step-body label {
  font-size: 13px;
  font-weight: 700;
}

.activation-step-body textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fafafa;
  color: #33363b;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  padding: 11px 12px;
}

.activation-step-body textarea[readonly] {
  resize: none;
  color: #5e6268;
}

.activation-step-body small {
  color: #898d93;
  font-size: 10px;
  line-height: 1.5;
}

.activation-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
}

.activation-primary-button,
.activation-secondary-button {
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.activation-primary-button {
  min-height: 42px;
  margin-top: 2px;
  background: var(--accent);
  box-shadow: 0 7px 18px rgba(255, 57, 65, 0.22);
  color: #fff;
}

.activation-secondary-button {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.activation-primary-button:hover:not(:disabled) {
  background: #eb2932;
}

.activation-secondary-button:hover {
  border-color: #bfc2c7;
  background: #f7f7f8;
}

.activation-primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.activation-connector {
  width: 1px;
  height: 22px;
  margin: 4px 0 4px 15px;
  background: #d8dade;
}

.activation-message {
  min-height: 18px;
  margin: 0;
  color: #c22c33;
  font-size: 11px;
  font-weight: 600;
}

.activation-message:empty {
  min-height: 0;
}

.activation-message[data-type="success"] {
  color: #248247;
}

.activation-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #eceef0;
  color: #96999e;
  font-size: 9px;
  font-weight: 560;
}

.app-shell {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  min-width: 720px;
  background: var(--surface);
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 225px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(23, 24, 26, 0.08);
  object-fit: cover;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  font-weight: 710;
  letter-spacing: -0.02em;
}

.brand p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
  letter-spacing: 0.08em;
}

.mode-switch {
  position: absolute;
  left: 50%;
  display: flex;
  padding: 3px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f5f6f7;
}

.mode-choice {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #73777e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 630;
}

.mode-choice span {
  margin-left: 4px;
  color: #a1a4aa;
  font-size: 9px;
  font-weight: 560;
}

.mode-choice.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(22, 24, 28, 0.1);
  color: var(--ink);
}

.mode-choice.is-active span {
  color: var(--accent);
}

.tool-button.collage-tool {
  display: none;
}

.toolrail.is-collage .tool-button:not(.collage-tool) {
  display: none;
}

.toolrail.is-collage .collage-tool {
  display: flex;
}

.free-collage-controls {
  display: grid;
  gap: 9px;
  padding: 12px 10px;
  border: 1px solid #ffd6d8;
  border-radius: 10px;
  background: #fff8f8;
}

.free-collage-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 5px;
}

.free-collage-fields label {
  display: grid;
  gap: 5px;
  color: #6d7178;
  font-size: 10px;
  font-weight: 650;
  text-align: center;
}

.free-collage-fields input {
  width: 100%;
  height: 34px;
  border: 1px solid #d8dade;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.free-collage-fields > span {
  padding-bottom: 8px;
  color: #9b9fa6;
  font-size: 12px;
}

.free-collage-controls small {
  color: var(--accent);
  font-size: 9px;
  font-weight: 650;
  text-align: center;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.command-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3d4046;
  cursor: pointer;
  font-size: 13px;
  font-weight: 560;
  transition: background 140ms ease, color 140ms ease;
}

.command-button svg {
  width: 18px;
  height: 18px;
}

.command-button kbd {
  color: #a1a4aa;
  font-size: 10px;
  font-weight: 500;
}

.command-button:hover:not(:disabled) {
  background: #f3f4f6;
  color: var(--ink);
}

.command-button.danger-on-hover:hover:not(:disabled) {
  background: var(--accent-soft);
  color: #d6232b;
}

.command-button:disabled {
  color: #c4c7cc;
  cursor: not-allowed;
}

.command-button:disabled kbd {
  color: #d5d7da;
}

.command-divider {
  width: 1px;
  height: 22px;
  margin: 0 6px;
  background: var(--line);
}

.workspace {
  display: grid;
  min-height: 0;
  grid-template-columns: 154px minmax(360px, 1fr) 306px;
}

.toolrail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow-y: auto;
}

.annotation-text-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #62666d;
  font-size: 10px;
  font-weight: 630;
}

.annotation-text-field textarea {
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: 12px/1.5 inherit;
  outline: none;
}

.annotation-text-field textarea:focus {
  border-color: rgba(255, 57, 65, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 57, 65, 0.08);
}

.text-style-control {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

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

.text-style-choice {
  display: grid;
  min-width: 0;
  min-height: 66px;
  place-items: center;
  gap: 5px;
  padding: 8px 3px 7px;
  border: 1px solid #dfe1e5;
  border-radius: 7px;
  background: #fff;
  color: #62666d;
  cursor: pointer;
  font-size: 9px;
  font-weight: 630;
}

.text-style-choice:hover {
  border-color: #bfc3c9;
  color: var(--ink);
}

.text-style-choice.is-active {
  border-color: color-mix(in srgb, var(--highlight-color, var(--accent)) 52%, #fff);
  background: color-mix(in srgb, var(--highlight-color, var(--accent)) 8%, #fff);
  color: var(--highlight-color, var(--accent));
}

.text-style-sample {
  display: grid;
  min-width: 29px;
  min-height: 27px;
  place-items: center;
  border-radius: 6px;
  color: var(--highlight-color, var(--accent));
  font-size: 18px;
  font-style: normal;
  font-weight: 760;
  line-height: 1;
}

.text-style-choice[data-text-style="background"] .text-style-sample {
  padding: 0 4px;
  background: var(--highlight-color, var(--accent));
  color: #fff;
}

.text-style-choice[data-text-style="outline"] .text-style-sample {
  -webkit-text-stroke: 2.5px #fff;
  filter: drop-shadow(0 0 1px #969aa1);
  paint-order: stroke fill;
}

.note-step {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f3f4f6;
  color: #666a71;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.note-step.is-targeted {
  border-color: color-mix(in srgb, var(--highlight-color, var(--accent)) 28%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}

.note-step[data-phase="input"] {
  background: var(--highlight-color, var(--accent));
  color: #fff;
}

.tool-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #555960;
  cursor: pointer;
  font-size: 13px;
  font-weight: 570;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.tool-button:hover:not(:disabled) {
  background: #f7f7f8;
  color: var(--ink);
}

.tool-button.is-active {
  border-color: #ffd6d8;
  background: var(--accent-soft);
  color: var(--accent);
}

.tool-button:disabled:not(#chooseTool) {
  color: #b7bac0;
  cursor: not-allowed;
}

.tool-button kbd {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #a5a8ae;
  font-size: 10px;
  font-weight: 600;
}

.tool-button.is-active kbd {
  color: rgba(255, 57, 65, 0.58);
}

.tool-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
}

.tool-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.7;
}

.tool-icon rect {
  rx: 0;
}

.canvas-pane {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) 52px;
  background: var(--canvas-bg);
}

.canvas-pane.has-batch {
  grid-template-rows: 116px minmax(0, 1fr) 52px;
}

.batch-tray {
  position: relative;
  z-index: 4;
  display: grid;
  min-width: 0;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.batch-tray-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
}

.batch-tray-heading > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.batch-tray-heading strong {
  font-size: 13px;
  font-weight: 700;
}

.batch-tray-heading span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 680;
}

.batch-order-tip {
  color: #8a8e95;
  font-size: 9px;
  font-weight: 560;
  line-height: 1.35;
  white-space: nowrap;
}

.batch-tray-heading button {
  min-height: 31px;
  border: 1px solid #dcdfe3;
  border-radius: 7px;
  background: #fff;
  color: #4d5158;
  cursor: pointer;
  font-size: 11px;
  font-weight: 630;
}

.batch-tray-heading button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.batch-tray-heading button:disabled {
  color: #b4b7bd;
  cursor: not-allowed;
}

.batch-thumbnails {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 5px;
}

.batch-item {
  position: relative;
  display: grid;
  width: 86px;
  height: 82px;
  flex: 0 0 86px;
  place-items: center;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #eceef1;
  cursor: grab;
  user-select: none;
}

.batch-item:active {
  cursor: grabbing;
}

.batch-item.is-dragging {
  opacity: 0.42;
}

.batch-item.is-drop-before {
  box-shadow: -5px 0 0 -2px var(--accent);
}

.batch-item.is-drop-after {
  box-shadow: 5px 0 0 -2px var(--accent);
}

.batch-item:hover {
  border-color: #c9ccd1;
}

.batch-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 57, 65, 0.1);
}

.batch-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-item-number,
.batch-item-status {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: rgba(25, 27, 31, 0.82);
  color: #fff;
  font-size: 9px;
  font-weight: 720;
}

.batch-item-number {
  top: 5px;
  left: 5px;
}

.batch-item-status {
  right: 5px;
  bottom: 5px;
  padding: 0 5px;
  background: rgba(90, 95, 103, 0.9);
}

.batch-item-status.is-done {
  background: #22a95a;
  box-shadow: 0 1px 4px rgba(18, 116, 59, 0.24);
}

.batch-remove {
  position: absolute;
  z-index: 3;
  top: 4px;
  right: 4px;
  display: none;
  width: 21px;
  height: 21px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 24, 28, 0.86);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.batch-item:hover .batch-remove,
.batch-remove:focus-visible {
  display: grid;
}

.canvas-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background-color: var(--canvas-bg);
  background-image: radial-gradient(circle, rgba(44, 47, 53, 0.09) 0.8px, transparent 0.9px);
  background-size: 18px 18px;
}

.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: min(420px, calc(100% - 56px));
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 32px;
  transform: translate(-50%, -50%);
  border: 1px dashed #c9cdd3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.empty-visual {
  display: grid;
  width: 68px;
  height: 68px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 17px;
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-visual svg {
  width: 38px;
  height: 38px;
  stroke-width: 2;
}

.empty-state h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin: 9px 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.secondary-button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #34363a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 620;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.secondary-button:active,
.primary-button:active {
  transform: translateY(1px);
}

.canvas-stage {
  position: relative;
  display: flex;
  min-width: 100%;
  min-height: 100%;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
}

.inline-text-editor {
  position: absolute;
  z-index: 7;
  box-sizing: border-box;
  width: 250px;
  min-height: 1.8em;
  overflow: hidden;
  resize: none;
  border: 1px dashed var(--inline-color, var(--accent));
  border-radius: 5px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--inline-color, var(--accent));
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-weight: 600;
  line-height: 1.28;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.48);
  transform-origin: top left;
}

.inline-text-editor.is-background,
.inline-text-editor.is-note {
  border-style: solid;
  border-color: var(--inline-color, var(--accent));
  border-radius: 8px;
  background: var(--inline-color, var(--accent));
  color: #fff;
  box-shadow: 0 2px 8px rgba(24, 27, 32, 0.16);
}

.inline-text-editor.is-background::placeholder,
.inline-text-editor.is-note::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.inline-text-editor.is-outline {
  background: rgba(255, 255, 255, 0.68);
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff;
}

#editorCanvas,
#collageCanvas {
  display: block;
  flex: 0 0 auto;
  max-width: none;
  background: #fff;
  box-shadow: 0 2px 18px rgba(24, 27, 32, 0.13);
  cursor: crosshair;
  image-rendering: auto;
  touch-action: none;
  user-select: none;
}

#collageCanvas {
  cursor: default;
}

.collage-empty-state .empty-visual svg rect {
  fill: rgba(255, 57, 65, 0.08);
}

#editorCanvas[data-tool="blur"][data-privacy-mode="brush"] {
  cursor: none;
}

#editorCanvas[data-tool="blur"][data-privacy-mode="rect"] {
  cursor: crosshair;
}

#editorCanvas[data-tool="note"][data-note-phase="box"] {
  cursor: text;
}

#editorCanvas[data-tool="crop"] {
  cursor: crosshair;
}

#editorCanvas[data-tool="select"] {
  cursor: default;
}

.move-scope-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 9px;
  background: var(--selection-soft);
  color: #275cad;
}

.move-scope-card > span:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.move-scope-card strong {
  color: #174a9d;
  font-size: 11px;
  font-weight: 700;
}

.move-scope-card small {
  color: #5274a8;
  font-size: 9px;
  line-height: 1.5;
}

.move-scope-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: var(--selection);
  box-shadow: 0 1px 3px rgba(32, 84, 170, 0.12);
}

.move-scope-icon svg {
  width: 20px;
  height: 20px;
}

.drop-overlay {
  position: absolute;
  z-index: 8;
  inset: 16px;
  display: none;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
}

.drop-overlay.is-visible {
  display: grid;
}

.drop-overlay > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

.drop-overlay svg {
  width: 38px;
  height: 38px;
}

.drop-overlay strong {
  font-size: 15px;
  font-weight: 650;
}

.zoom-bar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: #676b72;
  font-size: 11px;
}

.file-status,
.zoom-controls {
  display: flex;
  align-items: center;
}

.file-status {
  min-width: 0;
  gap: 8px;
}

#fileStatus {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #bdc0c6;
}

.status-dot.is-ready {
  background: #22a06b;
}

.zoom-controls {
  gap: 2px;
}

.zoom-controls button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #555960;
  cursor: pointer;
}

.zoom-controls button:hover:not(:disabled) {
  background: #f0f1f3;
  color: var(--ink);
}

.zoom-controls button:disabled {
  color: #c5c8cd;
  cursor: not-allowed;
}

.zoom-controls svg {
  width: 19px;
  height: 19px;
}

.zoom-controls .zoom-value {
  width: 58px;
  font-size: 12px;
  font-weight: 620;
}

.annotation-status {
  justify-self: end;
  white-space: nowrap;
}

.inspector {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.inspector-scroll {
  min-height: 0;
  overflow-y: auto;
}

.inspector-section {
  padding: 24px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2,
.section-heading p,
.inspector-section h3,
.tool-help {
  margin: 0;
}

.section-heading h2 {
  font-size: 16px;
  font-weight: 690;
  letter-spacing: -0.01em;
}

.section-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.standard-list {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
}

.standard-list > div {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #f0f1f2;
}

.standard-list > div:first-child {
  border-top: 0;
}

.standard-list dt,
.standard-list dd {
  margin: 0;
  font-size: 12px;
}

.standard-list dt {
  color: var(--muted);
}

.standard-list dd {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #36383d;
  font-weight: 610;
  white-space: nowrap;
}

.standard-list > .mask-standard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  padding: 10px 0 14px;
}

.mask-value-control {
  justify-self: end;
}

.mask-number-field {
  display: flex;
  height: 30px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #d8dbe0;
  background: #fff;
  color: #36383d;
  font-variant-numeric: tabular-nums;
}

.mask-number-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 57, 65, 0.1);
}

.mask-number-field input {
  width: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: right;
  appearance: textfield;
}

.mask-number-field input::-webkit-inner-spin-button,
.mask-number-field input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.mask-slider-control {
  grid-column: 1 / -1;
  width: 100%;
}

.value-rule {
  width: 18px;
  height: 8px;
  background: #000;
  opacity: 0.3;
}

.color-swatch {
  width: 12px;
  height: 12px;
  background: var(--accent);
}

.inspector-section h3 {
  font-size: 13px;
  font-weight: 690;
}

.tool-help {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.privacy-control-group {
  margin-top: 17px;
}

.privacy-control-label {
  display: block;
  margin-bottom: 8px;
  color: #555960;
  font-size: 11px;
  font-weight: 620;
}

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

.privacy-choice {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid #dfe1e5;
  border-radius: 7px;
  background: #fff;
  color: #5f636a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 630;
}

.privacy-choice:hover {
  border-color: #bfc3c9;
  color: var(--ink);
}

.privacy-choice.is-active {
  border-color: rgba(255, 57, 65, 0.48);
  background: var(--accent-soft);
  color: var(--accent);
}

.privacy-effect-choice {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  overflow: hidden;
}

.privacy-effect-choice img {
  display: block;
  width: 52px;
  height: 52px;
  aspect-ratio: 1;
  border-radius: 5px;
  object-fit: cover;
}

.privacy-effect-choice span {
  font-size: 9px;
  line-height: 1;
}

.highlight-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 18px;
}

.highlight-control-group {
  margin-top: 18px;
}

.highlight-control-label {
  display: block;
  margin-bottom: 10px;
  color: #62666d;
  font-size: 10px;
  font-weight: 630;
}

.highlight-color-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.highlight-color-choice {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--choice-color);
  box-shadow: 0 0 0 1px #d9dce0;
  cursor: pointer;
}

.highlight-color-choice:hover {
  transform: scale(1.08);
}

.highlight-color-choice.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--choice-color);
}

.highlight-color-choice.is-active::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: translate(-50%, -64%) rotate(-45deg);
}

.arrow-preview {
  display: grid;
  height: 76px;
  margin-top: 18px;
  place-items: center;
  background: #f6f6f7;
}

.arrow-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.arrow-style-choice {
  display: grid;
  min-height: 66px;
  place-items: center;
  gap: 4px;
  padding: 8px 3px 6px;
  border: 1px solid #dfe1e5;
  border-radius: 7px;
  background: #fff;
  color: #696d74;
  cursor: pointer;
  font-size: 9px;
  font-weight: 610;
}

.arrow-style-choice:hover {
  border-color: #ffadb1;
  color: var(--highlight-color, var(--accent));
}

.arrow-style-choice.is-active {
  border-color: var(--highlight-color, var(--accent));
  background: color-mix(in srgb, var(--highlight-color, var(--accent)) 7%, white);
  color: var(--highlight-color, var(--accent));
}

.arrow-style-choice svg {
  width: 74px;
  max-width: 100%;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4.5;
}

.arrow-style-choice[data-arrow-style="bold"] svg {
  stroke-width: 6.5;
}

.arrow-style-choice[data-arrow-style="slim"] svg {
  stroke-width: 2;
}

.arrow-style-choice .is-filled,
.arrow-preview .is-filled {
  fill: currentColor;
  stroke: none;
}

.arrow-preview svg {
  width: 180px;
  height: 72px;
  color: var(--highlight-color, var(--accent));
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
}

.arrow-preview [data-arrow-preview] {
  display: none;
}

.arrow-preview[data-arrow-style="solid"] [data-arrow-preview="solid"],
.arrow-preview[data-arrow-style="bold"] [data-arrow-preview="bold"],
.arrow-preview[data-arrow-style="slim"] [data-arrow-preview="slim"] {
  display: block;
}

.arrow-preview [data-arrow-preview="bold"] {
  stroke-width: 11;
}

.arrow-preview [data-arrow-preview="solid"] {
  stroke-width: 8;
}

.arrow-preview [data-arrow-preview="slim"] {
  stroke-width: 3;
}

.arrow-straighten-button {
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
  border: 1px solid #dfe1e5;
  border-radius: 7px;
  background: #fff;
  color: #5f636a;
  cursor: pointer;
  font-size: 10px;
  font-weight: 620;
}

.arrow-straighten-button:hover:not(:disabled) {
  border-color: var(--highlight-color, var(--accent));
  color: var(--highlight-color, var(--accent));
}

.arrow-straighten-button:disabled {
  background: #f5f6f7;
  color: #b2b5ba;
  cursor: not-allowed;
}

.highlight-style-choice {
  display: grid;
  min-height: 64px;
  place-items: center;
  gap: 5px;
  padding: 8px 4px 7px;
  border: 1px solid #dfe1e5;
  border-radius: 7px;
  background: #fff;
  color: #62666d;
  cursor: pointer;
  font-size: 10px;
  font-weight: 630;
}

.highlight-style-choice:hover {
  border-color: #bfc3c9;
  color: var(--ink);
}

.highlight-style-choice.is-active {
  border-color: rgba(255, 57, 65, 0.48);
  background: var(--accent-soft);
  color: var(--accent);
}

.highlight-style-choice i {
  position: relative;
  display: block;
  width: 32px;
  height: 22px;
  color: var(--highlight-color, var(--accent));
}

.highlight-style-choice .style-line::after,
.highlight-style-choice .style-dashed::after {
  position: absolute;
  right: 1px;
  bottom: 3px;
  left: 1px;
  border-bottom: 3px solid currentColor;
  content: "";
}

.highlight-style-choice .style-dashed::after {
  border-bottom-style: dashed;
}

.highlight-style-choice .style-rect,
.highlight-style-choice .style-rounded,
.highlight-style-choice .style-circle {
  box-sizing: border-box;
  border: 3px solid currentColor;
}

.highlight-style-choice .style-rounded {
  border-radius: 6px;
}

.highlight-style-choice .style-circle {
  width: 23px;
  border-radius: 50%;
}

.range-field {
  display: block;
  margin-top: 19px;
}

.mobile-mask-opacity-field {
  display: none;
}

.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
  font-size: 11px;
}

.range-field b {
  font-weight: 590;
}

.range-field output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.range-field.is-editing-selection output {
  color: var(--accent);
  font-weight: 650;
}

.range-field input,
.mask-opacity-range {
  width: 100%;
  height: 4px;
  margin: 0;
  appearance: none;
  border-radius: 0;
  background: linear-gradient(to right, var(--accent) var(--range-progress, 50%), #d9dce0 var(--range-progress, 50%));
  cursor: pointer;
}

.range-field input::-webkit-slider-thumb,
.mask-opacity-range::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 57, 65, 0.2);
}

.crop-readout {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 0 13px 0 16px;
  overflow: hidden;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.crop-readout::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  content: "";
}

.crop-readout output {
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 670;
}

.crop-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.crop-preset {
  min-height: 32px;
  padding: 0 7px;
  border: 1px solid #dfe1e5;
  border-radius: 6px;
  background: #fff;
  color: #5f636a;
  cursor: pointer;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
}

.crop-preset:hover {
  border-color: #bfc3c9;
  color: var(--ink);
}

.crop-preset.is-active {
  border-color: rgba(255, 57, 65, 0.48);
  background: var(--accent-soft);
  color: var(--accent);
}

.crop-reset-button {
  width: 100%;
  min-height: 34px;
  margin-top: 9px;
  border: 0;
  background: transparent;
  color: #666a71;
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-decoration-color: #c8cbd0;
  text-underline-offset: 3px;
}

.crop-reset-button:hover {
  color: var(--accent);
  text-decoration-color: rgba(255, 57, 65, 0.45);
}

.crop-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-top: 8px;
}

.crop-cancel-button,
.crop-apply-button {
  min-height: 40px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.crop-cancel-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #555960;
}

.crop-cancel-button:hover {
  border-color: #bfc3c9;
  color: var(--ink);
}

.crop-apply-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.crop-apply-button:hover {
  border-color: #e92f37;
  background: #e92f37;
}

.shortcut-section ul {
  display: grid;
  gap: 11px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.shortcut-section li {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.shortcut-section li span {
  margin-right: auto;
}

kbd {
  font-family: inherit;
}

.shortcut-section kbd {
  min-width: 24px;
  margin-left: 4px;
  padding: 3px 5px;
  border: 1px solid #dbdde1;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fafafa;
  color: #5b5f66;
  text-align: center;
  font-size: 9px;
  line-height: 1;
}

.export-area {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.inspector.is-collage .inspector-scroll,
.inspector.is-collage .export-area {
  display: none;
}

.inspector.is-collage {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.collage-actions {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.collage-actions p {
  margin: 0 0 10px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.continue-edit-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  border: 1px solid #ffd0d3;
  border-radius: 8px;
  background: #fff5f5;
  color: #df2e36;
  cursor: pointer;
  font-size: 13px;
  font-weight: 670;
}

.back-collage-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  border: 1px solid #d8dade;
  border-radius: 8px;
  background: #fff;
  color: #555960;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.back-collage-button svg,
.continue-edit-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.back-collage-button:hover {
  border-color: #bfc3c9;
  background: #f7f7f8;
  color: var(--ink);
}

.continue-edit-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.export-area p {
  margin: 0 0 10px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.copy-image-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  border: 1px solid #d8dade;
  border-radius: 8px;
  background: #fff;
  color: #292c31;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.copy-image-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #df2e36;
}

.copy-image-button:disabled {
  border-color: var(--line);
  background: #f5f6f7;
  color: #acb0b6;
  cursor: not-allowed;
}

.copy-image-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 670;
  letter-spacing: 0.01em;
  transition: background 140ms ease, transform 140ms ease;
}

.primary-button:hover:not(:disabled) {
  background: #e92f37;
}

.primary-button:disabled {
  background: #e3e5e8;
  color: #9da1a8;
  cursor: not-allowed;
}

.primary-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.batch-export-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  border: 1px solid #ffd0d3;
  border-radius: 8px;
  background: #fff5f5;
  color: #df2e36;
  cursor: pointer;
  font-size: 12px;
  font-weight: 670;
}

.batch-export-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.batch-export-button:disabled {
  border-color: var(--line);
  background: #f5f6f7;
  color: #acb0b6;
  cursor: not-allowed;
}

.batch-export-button svg {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: 72px;
  left: 50%;
  max-width: min(420px, calc(100% - 40px));
  padding: 11px 16px;
  transform: translate(-50%, 16px);
  border-radius: 8px;
  background: #202226;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.brush-cursor {
  position: fixed;
  z-index: 15;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(23, 24, 26, 0.72);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.brush-cursor.is-visible {
  display: block;
}

@media (max-width: 1100px) {
  .mode-choice span {
    display: none;
  }

  .workspace {
    grid-template-columns: 112px minmax(320px, 1fr) 276px;
  }

  .toolrail {
    padding-inline: 11px;
  }

  .inspector-section,
  .export-area {
    padding-right: 19px;
    padding-left: 19px;
  }

  .command-button kbd {
    display: none;
  }
}

@media (max-width: 840px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100dvh;
  }

  .topbar {
    height: 64px;
    padding-inline: 18px;
  }

  .brand p,
  .command-button span,
  .command-divider {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .mode-switch {
    position: static;
    margin-left: auto;
    transform: none;
  }

  .mode-choice {
    padding-inline: 9px;
  }

  .command-button {
    min-width: 38px;
    justify-content: center;
    padding: 0;
  }

  .workspace {
    display: flex;
    min-height: calc(100dvh - 64px);
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .toolrail {
    flex: 0 0 74px;
    flex-direction: row;
    padding: 8px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tool-button {
    min-height: 58px;
    flex: 1;
    flex-direction: row;
    gap: 6px;
  }

  .tool-button kbd {
    display: none;
  }

  .tool-icon,
  .tool-icon svg {
    width: 22px;
    height: 22px;
  }

  .canvas-pane {
    min-height: 560px;
    flex: 0 0 max(560px, calc(100dvh - 138px));
  }

  .canvas-pane.has-batch {
    grid-template-rows: 108px minmax(0, 1fr) 52px;
  }

  .batch-tray {
    grid-template-columns: 104px minmax(0, 1fr);
    padding-inline: 12px;
  }

  .inspector {
    min-height: 360px;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) 250px;
    grid-template-rows: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .inspector-scroll {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .inspector-section {
    border-right: 1px solid var(--line);
  }

  .shortcut-section {
    display: none;
  }

  .export-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
