:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 13px;
  color: #282730;
  background: #f5f5f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button,
summary,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #aa9de3;
  outline-offset: 3px;
}
button {
  color: inherit;
}
svg {
  flex: none;
  vertical-align: middle;
}
input,
select,
textarea {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  max-width: 100%;
  padding: 9px 11px;
  outline: none;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}
textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.65;
  min-height: 84px;
}
textarea:focus,
input:focus,
select:focus {
  border-color: var(--accent);
}
input[type="number"] {
  width: 100%;
}
input[type="range"] {
  padding: 0;
  width: 100%;
  height: 20px;
  min-height: 20px;
  border: none;
  accent-color: var(--accent);
  cursor: pointer;
  background: transparent;
}
input[type="checkbox"] {
  min-height: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  margin: 0;
}
input[type="color"] {
  cursor: pointer;
}
button,
summary {
  touch-action: manipulation;
}
h1,
h2,
p {
  margin: 0;
}
h2 {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}
a {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
.app,
.ui-theme {
  --surface: #fff;
  --surface-subtle: #fafafa;
  --canvas: #f1f1f4;
  --text: #282730;
  --muted: #8b8994;
  --secondary: #6f6c78;
  --line: #eeedf1;
  --border-strong: #d7d4de;
  --accent: #7160cd;
  --on-accent: #ffffff;
  --accent-hover: #6350c0;
  --accent-soft: #f1edfb;
  --shadow: 0 8px 32px #2520380c;
  color: var(--text);
  background: var(--surface);
}
.app {
  height: 100dvh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}
.app.dark,
.ui-theme.dark {
  --surface: #24232b;
  --surface-subtle: #2b2a34;
  --canvas: #19181f;
  --text: #eeecf5;
  --muted: #aaa5b8;
  --secondary: #c0bacd;
  --line: #36343f;
  --border-strong: #5f596e;
  --accent: #a899f2;
  --on-accent: #1b152d;
  --accent-hover: #b6a9fa;
  --accent-soft: #373146;
  --shadow: 0 8px 32px #0002;
  color-scheme: dark;
}
.button {
  gap: 6px;
  min-height: 34px;
  font-size: 12px;
  line-height: 1;
  border-radius: 7px;
  border: 1px solid var(--line);
}
.button > svg {
  width: 17px;
  height: 17px;
}
.button:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.dark .button.primary {
  color: #1b152d;
}
.button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.button.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--secondary);
}
.button.selected,
.button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  flex: none;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}
.full-width {
  width: 100%;
  margin: 4px 0;
}
.app-header {
  height: 70px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 0 25px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
  background: var(--surface);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 20px;
  letter-spacing: 2px;
  white-space: nowrap;
  line-height: 1.15;
}
.brand-mark {
  height: 36px;
  width: 36px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.7px;
  font-weight: 500;
  margin-top: 6px;
  color: var(--muted);
}
.privacy-badge {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--secondary);
  font-size: 11px;
}
.privacy-badge svg {
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}
.history-actions {
  display: flex;
  padding-right: 10px;
  margin-right: 3px;
  border-right: 1px solid var(--line);
}
.download-group {
  display: flex;
  margin-left: 12px;
}
.download-group .button {
  height: 37px;
  border-radius: 8px 0 0 8px;
}
.download-group .icon-button {
  border-radius: 0 8px 8px 0;
  border-left: 1px solid #ffffff35;
  width: 29px;
  padding: 6px;
}
.workspace {
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
}
.inspector {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.tool-tabs button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 39px;
  color: var(--secondary);
  font-size: 12px;
}
.tool-tabs button:hover {
  background: var(--surface-subtle);
}
.tool-tabs button.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.panel-scroll {
  overflow: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  min-width: 0;
}
.section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.panel-intro {
  color: var(--secondary);
  font-size: 12px;
  margin-bottom: 14px;
}
.watermark-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.add-marks {
  display: flex;
  gap: 8px;
}
.add-marks .button {
  padding: 9px;
  width: 44px;
  height: 40px;
  border-color: var(--line);
  background: var(--surface-subtle);
}
.add-marks .button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.add-marks svg {
  width: 20px;
  height: 20px;
}
.text-style-actions {
  margin-bottom: 20px;
}
.text-style-actions .button,
.template-transfer .button {
  border-color: var(--line);
}
.template-transfer {
  margin-top: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 20px;
  min-width: 0;
}
.field:last-child {
  margin-bottom: 0;
}
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  font-size: 12px;
  color: var(--secondary);
  font-weight: 500;
}
.field-label output {
  font-size: 11px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 5px;
  min-width: 43px;
  padding: 3px 6px;
  text-align: center;
}
.subtle,
.hex-value {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.hex-value {
  letter-spacing: 0.5px;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.select-wrap {
  position: relative;
  display: flex;
}
.select-wrap select {
  width: 100%;
  appearance: none;
  padding-right: 28px;
}
.select-wrap > svg {
  position: absolute;
  right: 11px;
  top: 13px;
  pointer-events: none;
  color: var(--muted);
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 12px 0;
  color: var(--secondary);
}
.inline-checks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.swatch {
  border: 1px solid #00000015;
  background: var(--swatch);
  width: 23px;
  height: 23px;
  border-radius: 50%;
  padding: 0;
  flex: none;
  position: relative;
}
.swatch.selected:after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.custom-color {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: conic-gradient(
    #d9757f,
    #dfc98c,
    #9ebda5,
    #7c9cc6,
    #af91c6,
    #d9757f
  );
  position: relative;
  overflow: hidden;
  display: block;
}
.custom-color input {
  opacity: 0;
  position: absolute;
  inset: -6px;
  width: 35px;
  height: 35px;
  padding: 0;
}
.segmented {
  display: flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}
.segmented button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 11px;
  color: var(--secondary);
}
.segmented .selected {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 5px #1e173612;
  font-weight: 600;
}
.disclosure {
  border-bottom: 1px solid var(--line);
}
.disclosure-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
}
.disclosure-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}
.disclosure-trigger > svg:first-child {
  color: var(--muted);
}
.disclosure-trigger:hover {
  color: var(--accent);
}
.disclosure-aside {
  display: flex;
  align-items: center;
  flex: none;
}
.disclosure .chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 150ms;
}
.disclosure[data-state="open"] .chevron {
  transform: rotate(180deg);
}
.disclosure-body {
  padding: 0 18px 16px;
}
.disclosure-body > .button {
  margin-bottom: 15px;
}
.disclosure-body > .button:last-child {
  margin-bottom: 0;
}
.panel-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  gap: 8px;
}
.panel-bottom .button {
  border: 0;
  padding: 0;
  color: var(--secondary);
  font-size: 11px;
}
.panel-bottom .hint {
  font-size: 10px;
}
.inspector-footer {
  padding: 13px 22px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.inspector-footer > span:last-child {
  margin-left: auto;
}
.scope-control {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}
.scope-control > span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
}
.text-button {
  background: none;
  border: 0;
  padding: 10px 0 0;
  color: var(--accent);
  font-size: 10px;
  text-align: left;
  line-height: 1.6;
}
.position-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 112px;
  gap: 5px;
}
.position-grid button {
  height: 30px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  border-radius: 5px;
  display: grid;
  place-items: center;
}
.position-grid button i {
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 50%;
}
.position-grid .selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.position-grid .selected i {
  background: var(--accent);
}
.inline-actions,
.split-actions,
.transform-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.split-actions {
  margin-bottom: 16px;
}
.split-actions .button:not(.icon-button) {
  flex: 1;
}
.transform-actions {
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  margin: 15px 0 20px;
}
.layers-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: left;
  font-size: 12px;
}
.layer-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layer-item.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.asset-preview {
  height: 95px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  margin-bottom: 12px;
  background-color: #eee;
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%),
    linear-gradient(-45deg, #fff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #fff 75%),
    linear-gradient(-45deg, transparent 75%, #fff 75%);
  background-size: 14px 14px;
  background-position:
    0 0,
    0 7px,
    7px -7px,
    -7px 0;
}
.asset-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.asset-preview + .button {
  margin-bottom: 20px;
}
.editor {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  position: relative;
  overflow: hidden;
}
.editor-toolbar {
  height: 62px;
  flex: none;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.editor-toolbar .button {
  min-height: 33px;
  font-size: 11px;
}
.photo-count {
  color: var(--muted);
  font-size: 11px;
  margin-left: 8px;
}
.active-filename {
  font-size: 11px;
  color: var(--muted);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-stage {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px 20px;
  text-align: center;
  background: radial-gradient(
    ellipse at 50% 33%,
    var(--surface) 0%,
    transparent 67%
  );
}
.empty-art {
  position: relative;
  width: 180px;
  height: 134px;
  margin-bottom: 24px;
}
.art-card {
  position: absolute;
  width: 117px;
  height: 108px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow);
  top: 6px;
  left: 22px;
}
.art-card.back {
  transform: rotate(-13deg);
  background: var(--accent-soft);
  left: 11px;
  top: 12px;
  border-color: transparent;
}
.art-card.front {
  transform: rotate(7deg);
  left: 43px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #afa7be;
}
.art-card.front span {
  font-size: 10px;
  font-family: Georgia, serif;
  color: var(--muted);
  font-style: italic;
}
.art-pen {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 47px;
  height: 47px;
  border-radius: 15px;
  border: 5px solid var(--canvas);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  transform: rotate(-9deg);
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 13px;
}
.empty-stage h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.4;
}
.empty-stage > p {
  margin: 14px 0 27px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.9;
}
.empty-stage > .primary {
  padding: 11px 29px;
  min-height: 42px;
  box-shadow: 0 5px 14px #7160cd18;
}
.drop-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 8px;
}
.empty-stage > .quiet {
  font-size: 11px;
  min-height: 28px;
}
.format-hint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 32px;
  letter-spacing: 0.25px;
}
.format-hint span {
  display: block;
  margin-top: 3px;
}
.import-formats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 460px;
  margin-top: 18px;
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.8;
}
.import-formats p {
  margin: 0;
}
.import-formats .help-tip {
  flex-shrink: 0;
}
.preview-stage {
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: auto;
  display: flex;
  padding: 32px;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(
    var(--border-strong) 0.6px,
    transparent 0.6px
  );
  background-size: 16px 16px;
}
.preview-stage.zoomed {
  display: block;
}
.canvas-wrap {
  position: relative;
  flex: none;
  box-shadow: 0 12px 40px #25203614;
  touch-action: none;
  background-color: #e4e4e7;
  background-image:
    linear-gradient(45deg, #f9f9fa 25%, transparent 25%),
    linear-gradient(-45deg, #f9f9fa 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f9f9fa 75%),
    linear-gradient(-45deg, transparent 75%, #f9f9fa 75%);
  background-size: 16px 16px;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
}
.canvas-wrap canvas {
  display: block;
}
.selection {
  position: absolute;
  border: 1px solid #8070d5;
  cursor: move;
  touch-action: none;
}
.selection-corner {
  width: 6px;
  height: 6px;
  background: white;
  border: 1px solid #8070d5;
  position: absolute;
}
.selection-corner.tl {
  left: -3px;
  top: -3px;
}
.selection-corner.tr {
  right: -3px;
  top: -3px;
}
.selection-corner.bl {
  left: -3px;
  bottom: -3px;
}
.selection-handle {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid #8070d5;
  background: #fff;
  color: #7160cd;
  z-index: 2;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  box-shadow: 0 2px 4px #0001;
}
.selection-handle.resize {
  right: -10px;
  bottom: -10px;
  cursor: nwse-resize;
}
.selection-handle.rotate {
  left: calc(50% - 10px);
  top: -32px;
  cursor: grab;
}
.selection-handle.rotate:after {
  content: "";
  height: 11px;
  width: 1px;
  background: #8070d5;
  position: absolute;
  top: 20px;
}
.guide {
  position: absolute;
  background: #a18cf0;
  pointer-events: none;
}
.guide.vertical {
  top: 0;
  bottom: 0;
  width: 1px;
}
.guide.horizontal {
  left: 0;
  right: 0;
  height: 1px;
}
.cropping {
  cursor: crosshair;
  overflow: hidden;
}
.crop-box {
  position: absolute;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 9999px #15131c66;
  pointer-events: none;
}
.crop-box i {
  position: absolute;
  background: #ffffff60;
}
.crop-box i:nth-child(1),
.crop-box i:nth-child(2) {
  height: 100%;
  width: 1px;
  left: 33.3%;
}
.crop-box i:nth-child(2) {
  left: 66.6%;
}
.crop-box i:nth-child(3),
.crop-box i:nth-child(4) {
  width: 100%;
  height: 1px;
  top: 33.3%;
}
.crop-box i:nth-child(4) {
  top: 66.6%;
}
.preview-status {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 24px;
  min-height: 43px;
  color: var(--muted);
  font-size: 10px;
  flex: none;
}
.preview-status > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.preview-status > span:nth-child(2) {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.preview-status .button {
  border: 0;
  background: transparent;
  color: var(--secondary);
  min-height: 26px;
  padding: 4px 0;
  font-size: 10px;
}
.preview-error {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  z-index: 5;
  background: #fff2f2;
  color: #a94040;
  border: 1px solid #e9cccc;
  border-radius: 8px;
  padding: 12px;
}
.photo-tray {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 22px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  height: 100px;
  flex: none;
}
.tray-list {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  overflow: auto;
  padding: 4px;
  scrollbar-width: thin;
}
.photo-tile {
  position: relative;
  flex: none;
}
.photo-select {
  position: relative;
  display: block;
  width: 80px;
  height: 60px;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 7px;
  background: var(--surface-subtle);
}
.photo-select img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  border-radius: 3px;
}
.photo-select span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  border-radius: 3px;
  background: #24202b80;
  color: white;
  font-size: 8px;
  min-width: 13px;
  padding: 1px 3px;
}
.photo-select i {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.photo-tile.active .photo-select {
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.remove-photo {
  position: absolute;
  right: -4px;
  top: -4px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--secondary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  opacity: 0;
  padding: 0;
}
.photo-tile:hover .remove-photo,
.remove-photo:focus-visible {
  opacity: 1;
}
.tray-add {
  flex: none;
  display: grid;
  place-items: center;
  width: 60px;
  height: 58px;
  border: 1px dashed var(--border-strong);
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}
.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.preset-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 0 11px;
  background: var(--surface);
  overflow: hidden;
  text-align: left;
}
.preset-card > div {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ece8e3;
  color: #746653;
  font-size: 10px;
  letter-spacing: 0.5px;
  margin-bottom: 11px;
  padding: 5px;
}
.preset-card strong,
.preset-card small {
  display: block;
  padding: 0 11px;
  font-size: 11px;
  font-weight: 500;
}
.preset-card small {
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
}
.preset-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.preset-identity > div {
  background: repeating-linear-gradient(
    -30deg,
    #f0edf6,
    #f0edf6 12px,
    #e9e4f1 13px,
    #f0edf6 14px
  );
  color: #83788e;
  font-size: 8px;
}
.preset-signature > div {
  font-family: Georgia, cursive;
  font-style: italic;
  font-size: 21px;
  background: #e7e5ec;
  color: #5e566b;
}
.preset-draft > div {
  background: #eddfd9;
  color: #ac7a6b;
  letter-spacing: 3px;
}
.preset-shop > div {
  background: #ece7dd;
  letter-spacing: 1.5px;
  color: #8b806a;
}
.preset-social > div {
  margin: 8px 8px 11px;
  height: 64px;
  background: #e1e4e9;
  font-size: 9px;
  letter-spacing: 2px;
  color: #6e7586;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding-left: 10px;
  border-radius: 7px;
  color: var(--muted);
  margin-bottom: 15px;
}
.search-field input {
  border: 0;
  min-width: 0;
  width: 100%;
  padding-left: 0;
}
.template-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0;
  overflow: hidden;
}
.template-name {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 0;
  background: var(--surface);
  text-align: left;
}
.template-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.template-name small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.template-actions {
  display: flex;
  border-top: 1px solid var(--line);
  padding: 2px;
  background: var(--surface-subtle);
}
.template-actions .button {
  flex: 1;
}
.empty-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  padding: 15px 0 22px;
}
.modal {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  box-shadow: 0 32px 100px #1b142b35;
  overflow: auto;
}
.modal-overlay {
  background: #24213255;
  backdrop-filter: blur(3px);
  z-index: 100;
}
.modal {
  display: block;
  gap: 0;
  max-width: none;
  z-index: 101;
  outline: none;
}
.modal-heading {
  padding: 24px 25px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.modal-heading h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.5;
}
.modal-heading p {
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.8;
  margin-top: 8px;
}
.modal-heading > .button {
  margin: -3px -7px 0 0;
}
.modal-content {
  padding: 0 25px 24px;
}
.modal-content > input {
  width: 100%;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 17px 25px;
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
}
.dialog-text {
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 15px;
}
.help-content {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.9;
}
.help-content ul {
  padding-left: 18px;
}
.help-content li {
  margin-bottom: 10px;
}
.signature-modal {
  width: min(820px, calc(100vw - 32px));
}
.signature-modal .modal-heading {
  padding: 26px 28px 22px;
}
.signature-modal .modal-content {
  padding: 0 28px 22px;
}
.ink-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.ink-widths {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--surface-subtle);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ink-widths button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--secondary);
  padding: 8px 11px;
  border-radius: 5px;
}
.ink-widths button i {
  width: 15px;
  background: currentColor;
  border-radius: 9px;
}
.ink-widths button.selected {
  background: var(--surface);
  box-shadow: 0 1px 5px #0001;
  color: var(--accent);
}
.signature-paper {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  overflow: hidden;
  background-color: #fafafa;
  background-image:
    linear-gradient(45deg, #f0f0f2 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f0f2 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f2 75%);
  background-size: 20px 20px;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
}
.signature-paper canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 900/400;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.signature-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  color: #a4a0ad;
}
.signature-placeholder span {
  font-size: 15px;
  color: #8a8495;
}
.signature-placeholder small {
  font-size: 10px;
  letter-spacing: 1px;
}
.signature-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-top: 22px;
}
.signature-bottom .field {
  margin: 0;
  min-width: 243px;
}
.signature-bottom > .hint {
  font-size: 10px;
  white-space: nowrap;
}
.local-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 10px 8px 18px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 40px #25203820;
  font-size: 12px;
  max-width: calc(100vw - 32px);
}
.toast.error {
  color: #b14b51;
  border-color: #d2a3a9;
}
.toast .button {
  color: inherit;
}
.progress-panel {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 210;
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: calc(100vw - 32px);
  width: 430px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.progress-panel > div {
  flex: 1;
  min-width: 0;
}
.progress-panel strong {
  font-weight: 500;
  font-size: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-panel progress {
  height: 4px;
  accent-color: var(--accent);
  width: 100%;
  display: block;
  margin-top: 12px;
}
.drop-overlay {
  position: fixed;
  inset: 12px;
  z-index: 250;
  border: 2px dashed var(--accent);
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  pointer-events: none;
}
.drop-overlay strong {
  font-size: 20px;
  font-weight: 500;
}
.import-messages {
  position: absolute;
  right: 20px;
  bottom: 118px;
  background: var(--surface);
  max-width: min(450px, calc(100% - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--secondary);
  z-index: 5;
  box-shadow: var(--shadow);
}
.import-messages summary {
  cursor: pointer;
  color: #aa7253;
}
.import-messages ul {
  max-height: 160px;
  overflow: auto;
  padding-left: 16px;
  line-height: 1.8;
}
.mobile-panel-heading {
  display: none;
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 336px minmax(0, 1fr);
  }
  .section,
  .disclosure-heading,
  .scope-control {
    padding-left: 26px;
    padding-right: 26px;
  }
  .disclosure-body {
    padding-left: 26px;
    padding-right: 26px;
  }
  .empty-stage h1 {
    font-size: 30px;
  }
}
@media (max-width: 1050px) {
  .privacy-badge {
    display: none;
  }
  .active-filename {
    display: none;
  }
  .photo-count {
    display: none;
  }
  .editor-toolbar {
    padding: 0 16px;
  }
  .workspace {
    grid-template-columns: 296px minmax(0, 1fr);
  }
  .section,
  .disclosure-heading {
    padding-left: 18px;
    padding-right: 18px;
  }
  .disclosure-body {
    padding-left: 18px;
    padding-right: 18px;
  }
  .preview-status > span:first-child {
    display: none;
  }
}
@media (max-width: 700px) {
  .app {
    min-height: 400px;
  }
  .app-header {
    height: 59px;
    padding: 0 12px;
    gap: 8px;
  }
  .brand {
    font-size: 17px;
    gap: 7px;
  }
  .brand small {
    display: none;
  }
  .brand-mark {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }
  .brand-mark svg {
    width: 20px;
  }
  .header-actions {
    gap: 0;
  }
  .header-actions > .icon-button {
    display: none;
  }
  .history-actions {
    border: 0;
    padding: 0;
    margin: 0;
  }
  .history-actions .button {
    width: 29px;
  }
  .download-group {
    margin-left: 8px;
  }
  .download-group .button {
    height: 33px;
    min-height: 33px;
    font-size: 11px;
    padding: 7px 9px;
  }
  .download-group .icon-button {
    width: 24px;
    padding: 4px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    padding-bottom: 62px;
    position: relative;
  }
  .editor {
    flex: 1;
  }
  .inspector {
    display: contents;
  }
  .tool-tabs {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: var(--surface);
    z-index: 20;
    padding: 7px 14px;
    gap: 12px;
  }
  .tool-tabs button {
    height: 46px;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
  }
  .panel-scroll {
    display: none;
  }
  .mobile-panel-heading,
  .scope-control,
  .inspector-footer {
    display: none;
  }
  .panel-open .panel-scroll {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 62px;
    height: min(58dvh, 570px);
    z-index: 25;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px #21193015;
    padding-top: 49px;
    border-radius: 15px 15px 0 0;
  }
  .panel-open .mobile-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(62px + min(58dvh, 570px) - 49px);
    height: 49px;
    background: var(--surface);
    z-index: 26;
    border-bottom: 1px solid var(--line);
    padding: 0 20px;
    border-radius: 15px 15px 0 0;
  }
  .panel-open .mobile-panel-heading strong {
    font-size: 13px;
  }
  .mobile-panel-heading .button {
    border: 0;
    color: var(--accent);
    padding-right: 0;
  }
  .panel-open .scope-control {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(62px + min(58dvh, 570px));
    z-index: 24;
    background: var(--surface);
    padding: 10px 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
  }
  .scope-control > span {
    display: none;
  }
  .scope-control .text-button {
    font-size: 10px;
  }
  .scope-control:has(.text-button) {
    padding-bottom: 6px;
  }
  .editor-toolbar {
    height: 52px;
    padding: 0 12px;
  }
  .editor-toolbar .inline-actions {
    gap: 3px;
  }
  .editor-toolbar .button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .editor-toolbar .icon-button {
    padding: 6px;
    width: 28px;
  }
  .empty-stage {
    padding: 22px 16px;
    justify-content: center;
  }
  .empty-art {
    transform: scale(0.85);
    margin-bottom: 6px;
    height: 126px;
  }
  .eyebrow {
    font-size: 8px;
    margin-bottom: 10px;
  }
  .empty-stage h1 {
    font-size: 23px;
  }
  .empty-stage > p {
    font-size: 11px;
    max-width: 245px;
    margin: 13px 0 22px;
  }
  .empty-stage > .primary {
    min-height: 40px;
    font-size: 12px;
  }
  .format-hint {
    font-size: 9px;
    margin-top: 20px;
  }
  .drop-hint {
    font-size: 10px;
    margin-top: 12px;
  }
  .preview-stage {
    padding: 22px;
  }
  .preview-status {
    padding: 5px 14px;
    gap: 12px;
    min-height: 31px;
  }
  .preview-status > span:nth-child(2) {
    margin-left: 0;
    margin-right: auto;
  }
  .photo-tray {
    height: 85px;
    padding: 9px 12px;
    gap: 6px;
  }
  .photo-select {
    width: 65px;
    height: 52px;
  }
  .tray-add {
    width: 48px;
    height: 50px;
  }
  .remove-photo {
    opacity: 1;
  }
  .selection-handle {
    width: 25px;
    height: 25px;
  }
  .selection-handle.rotate {
    top: -35px;
    left: calc(50% - 12px);
  }
  .selection-handle.resize {
    right: -12px;
    bottom: -12px;
  }
  .section {
    padding: 18px 22px;
  }
  .disclosure-heading {
    padding: 16px 22px;
  }
  .panel-bottom {
    padding-bottom: 25px;
  }
  .add-marks .button {
    height: 40px;
  }
  .modal {
    border-radius: 13px;
  }
  .modal-heading {
    padding: 20px;
  }
  .modal-heading h2 {
    font-size: 18px;
  }
  .modal-content {
    padding: 0 20px 20px;
  }
  .modal-footer {
    padding: 14px 18px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .signature-modal .modal-heading {
    padding: 21px 19px 18px;
  }
  .signature-modal .modal-heading p {
    font-size: 11px;
  }
  .signature-modal .modal-content {
    padding: 0 18px 19px;
  }
  .signature-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 17px;
  }
  .signature-bottom > .hint {
    font-size: 10px;
  }
  .signature-modal .modal-footer .local-note {
    display: none;
  }
  .ink-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .ink-widths button {
    padding: 8px;
    font-size: 10px;
    gap: 5px;
  }
  .ink-widths button i {
    width: 13px;
  }
  .ink-toolbar .inline-actions {
    gap: 0;
  }
  .ink-toolbar .icon-button {
    width: 28px;
  }
  .ink-toolbar .button:not(.icon-button) {
    font-size: 10px;
    padding: 6px;
    border: 0;
  }
  .signature-placeholder {
    gap: 8px;
  }
  .signature-placeholder svg {
    width: 23px;
  }
  .signature-placeholder span {
    font-size: 13px;
  }
  .signature-placeholder small {
    font-size: 9px;
  }
  .toast {
    bottom: 76px;
    max-width: calc(100vw - 24px);
    width: max-content;
    font-size: 11px;
    padding-left: 12px;
  }
  .import-messages {
    bottom: 96px;
    right: 12px;
  }
  .progress-panel {
    bottom: 76px;
  }
  .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.signature-paper.light-ink {
  background-color: #b9b6c2;
  background-image: none;
}
.history-list {
  padding-left: 17px;
  color: var(--secondary);
  font-size: 11px;
  line-height: 2.1;
}

/* Actions stay with their object; edit controls follow the selected tool. */
/* Compact rows keep every action beside its watermark. */
.layer-cards {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 224px;
  overflow: auto;
  padding: 2px;
  scrollbar-width: thin;
}
.layer-card {
  display: flex;
  align-items: center;
  flex: none;
  min-height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.layer-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.layer-card.is-hidden .layer-pick {
  opacity: 0.45;
}
.layer-pick {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 3px;
  text-align: left;
}
.layer-thumbnail {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  background: #eeeaf3;
  color: #756c8d;
  border: 1px solid #d8d3e1;
  border-radius: 4px;
  padding: 3px;
}
.layer-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.layer-description {
  flex: 1;
  min-width: 0;
}
.layer-description strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.layer-row-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0;
}
.layer-row-actions .button {
  width: 24px;
  min-height: 30px;
  padding: 4px;
  border-radius: 4px;
  background: transparent;
}
.layer-row-actions .button svg {
  width: 14px;
  height: 14px;
}
.layer-row-actions .button:last-child:hover {
  color: #b24b59;
  background: #b24b5910;
}
.image-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.image-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: var(--surface-subtle);
  border-radius: 8px;
  width: 100%;
  height: 36px;
  padding: 8px;
  font-size: 11px;
  color: var(--secondary);
}
.image-tools button.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.section-reset {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--secondary);
  font-size: 10px;
}
.section-reset:hover {
  color: var(--accent);
}
.ratio-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.ratio-choices button {
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  border-radius: 6px;
  padding: 10px 3px;
  font-size: 11px;
  color: var(--secondary);
}
.ratio-choices button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.rotation-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 19px;
}
.rotation-choices .button {
  width: 100%;
  min-height: 40px;
  border-color: var(--line);
  justify-content: center;
}
.crop-instructions {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.7;
  margin: 0 0 16px;
}
.crop-instructions svg {
  color: var(--accent);
  margin-top: 2px;
}
.crop-instructions small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.crop-box {
  pointer-events: auto;
  cursor: move;
  touch-action: none;
}
.crop-box > i {
  pointer-events: none;
}
.crop-handle {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid white;
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 0 1px 4px #0005;
  z-index: 3;
  touch-action: none;
}
.crop-handle.nw {
  left: -8px;
  top: -8px;
  cursor: nwse-resize;
}
.crop-handle.ne {
  right: -8px;
  top: -8px;
  cursor: nesw-resize;
}
.crop-handle.sw {
  left: -8px;
  bottom: -8px;
  cursor: nesw-resize;
}
.crop-handle.se {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}
.crop-size {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  pointer-events: none;
  background: #23202b90;
  color: white;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.cropping {
  overflow: visible;
}
.mobile-crop-ratio {
  display: none;
}
.filter-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px 6px;
  margin-bottom: 20px;
}
.filter-choices button {
  padding: 2px 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
  font-size: 10px;
  color: var(--secondary);
}
.filter-choices img,
.filter-placeholder {
  display: block;
  width: 100%;
  height: 44px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--canvas);
  margin-bottom: 7px;
}
.filter-choices button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.auto-adjust {
  margin: 0 0 20px;
}
.size-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.size-choices button {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 13px 10px;
}
.size-choices strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.size-choices small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
}
.size-choices button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.lock-ratio {
  margin: 0 0 20px;
  color: var(--secondary);
  font-size: 11px;
}
.output-dimensions {
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  padding: 13px 14px;
  margin-top: 22px;
}
.output-dimensions > span,
.output-dimensions > small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.output-dimensions strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 8px 0;
}
.output-dimensions strong small {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .layer-cards {
    max-height: 240px;
  }
  .layer-row-actions .button {
    width: 29px;
    min-height: 34px;
  }
  .layer-thumbnail {
    width: 28px;
    height: 28px;
  }
  .layer-description strong {
    font-size: 12px;
  }
  .image-tools {
    padding: 13px 20px;
  }
  .rotation-choices .button {
    justify-content: center;
  }
  .mobile-crop-ratio {
    display: block;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 5px 10px;
  }
  .mobile-crop-ratio label {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 11px;
    color: var(--secondary);
  }
  .mobile-crop-ratio select {
    min-height: 30px;
    font-size: 11px;
    padding: 4px 8px;
  }
  .crop-handle {
    width: 23px;
    height: 23px;
    border-radius: 6px;
  }
  .crop-handle.nw,
  .crop-handle.sw {
    left: -12px;
  }
  .crop-handle.ne,
  .crop-handle.se {
    right: -12px;
  }
  .crop-handle.nw,
  .crop-handle.ne {
    top: -12px;
  }
  .crop-handle.sw,
  .crop-handle.se {
    bottom: -12px;
  }
}
.layer-manager {
  padding: 15px 18px;
}
.layer-manager .section-heading {
  margin-bottom: 11px;
}

.section-heading h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.font-picker-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: left;
}
.font-picker-trigger > span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-picker-trigger:hover {
  border-color: var(--accent);
}
.font-picker-badge {
  font-size: 10px;
  color: var(--accent);
}
.font-dialog {
  width: min(640px, calc(100vw - 32px));
}
.art-font-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.art-font-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 12px 10px;
  text-align: left;
  min-width: 0;
}
.art-font-card:hover,
.art-font-card.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.art-font-sample {
  display: block;
  height: 54px;
  line-height: 1.6;
  white-space: nowrap;
  font-size: 27px;
  overflow: hidden;
  color: var(--text);
  font-weight: 400;
}
.art-font-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.art-font-meta small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.art-font-meta svg {
  color: var(--accent);
  flex: none;
}
.font-language-hint {
  margin: 12px 0 18px;
}
.font-licenses {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 11px;
  color: var(--secondary);
}
.font-licenses summary {
  cursor: pointer;
  padding: 4px 0;
}
.font-licenses p {
  line-height: 1.8;
}
.font-licenses a {
  color: var(--accent);
}
.font-licenses pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.5;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  background: var(--surface-subtle);
}
@media (max-width: 700px) {
  .font-dialog .modal-content {
    padding: 14px;
  }
  .art-font-grid {
    gap: 8px;
  }
  .art-font-card {
    padding: 12px 8px 9px;
  }
  .art-font-sample {
    font-size: 19px;
    height: 44px;
  }
}

/* Quiet controls: guidance appears on hover/focus, or by tapping an info button. */
.ui-tooltip {
  margin: 0;
  border: 0;
  width: max-content;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 11px;
  border-radius: 7px;
  background: #292731;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
  box-shadow: 0 3px 12px #0002;
  z-index: 10000;
  overflow-wrap: anywhere;
}
.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  padding: 3px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
}
.help-tip:hover,
.help-tip:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
}
.field-label .help-tip {
  margin-left: 4px;
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.font-filter {
  margin-bottom: 16px;
}
.art-font-grid {
  margin-bottom: 20px;
}
.art-font-sample {
  height: 49px;
}
.inspector-footer .help-tip {
  width: 17px;
  height: 17px;
  padding: 0;
}
.preview-status > span:first-child {
  display: flex;
  align-items: center;
  gap: 3px;
}
.output-dimensions > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
@media (max-width: 700px) {
  .preview-status > span:first-child {
    display: flex;
  }
  .help-tip {
    min-width: 24px;
    min-height: 24px;
  }
}

/* Shared shadcn/ui controls and compact contextual actions. */
.section-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.section-actions .icon-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
}
.image-tool-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.image-tools {
  flex: 1;
  padding: 0 10px 0 0;
  gap: 5px;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}
.image-tools button {
  min-height: 36px;
}
.reset-edits {
  color: var(--secondary);
}
.preset-grid {
  gap: 8px;
}
.preset-card {
  padding-bottom: 8px;
}
.preset-card > div {
  height: 48px;
  margin-bottom: 8px;
}
.preset-card:last-child {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  padding: 8px;
  gap: 10px;
}
.preset-card:last-child > div {
  width: 72px;
  height: 36px;
  margin: 0;
  flex: none;
}
.preset-card:last-child strong {
  padding: 0;
}
.template-library .section-heading {
  margin-bottom: 8px;
}
.template-library .empty-note {
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 7px;
  text-align: center;
}
.template-library .search-field {
  margin-bottom: 8px;
}
.template-row:last-child {
  margin-bottom: 0;
}
.select-trigger {
  color: var(--text);
  background: var(--surface);
  min-height: 36px;
  font-size: 12px;
}
.select-content {
  min-width: var(--radix-select-trigger-width);
  max-height: min(320px, var(--radix-select-content-available-height));
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 200;
  translate: none;
}
.select-option {
  min-height: 32px;
  font-size: 12px;
}
.slider-root {
  min-height: 24px;
}
.slider-root[data-disabled] {
  opacity: 0.42;
  pointer-events: none;
}
.slider-root [role="slider"] {
  width: 15px;
  height: 15px;
  border-width: 2px;
}
.checkbox-control {
  width: 16px;
  height: 16px;
  padding: 0;
}
.checkbox-control svg {
  width: 12px;
  height: 12px;
}
.check label {
  cursor: pointer;
}
.help-popover {
  width: max-content;
  max-width: min(280px, calc(100vw - 16px));
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  font-size: 11px;
  line-height: 1.7;
  z-index: 210;
}
.help-tip {
  min-width: 24px;
  max-width: 24px;
  min-height: 24px;
  max-height: 24px;
  padding: 0;
}
.help-tip[data-state="open"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.button:focus-visible,
.help-tip:focus-visible,
.disclosure-trigger:focus-visible,
.select-trigger:focus-visible,
[role="slider"]:focus-visible,
.checkbox-control:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: none;
}
.segmented button {
  height: 30px;
  padding: 0 7px;
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
