:root {
  color-scheme: dark;
  --ink: #eaf1f3;
  --muted: #8fa1a8;
  --muted-2: #62757d;
  --shell: #0b1216;
  --panel: #121c21;
  --panel-raised: #18252b;
  --canvas: #071015;
  --line: rgba(177, 205, 214, 0.13);
  --line-strong: rgba(177, 205, 214, 0.24);
  --blue: #4d7dff;
  --blue-soft: rgba(77, 125, 255, 0.15);
  --coral: #ff6a45;
  --coral-bright: #ff815f;
  --mint: #65d6ad;
  --danger: #ff7d72;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --display: "Bahnschrift", "Arial Narrow", "Microsoft YaHei UI", sans-serif;
  --body: "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--shell);
  font-family: var(--body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

select {
  color-scheme: dark;
}

select option {
  color: #eaf3f6;
  background: #101c22;
}

select option:checked {
  color: #071318;
  background: #8cc5ff;
}

select option:disabled {
  color: #82959c;
  background: #101c22;
}

select:disabled {
  color: #91a3aa;
  opacity: 0.78;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--coral-bright);
  outline-offset: 2px;
}

.app-shell {
  height: 100vh;
  min-height: 640px;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  background:
    radial-gradient(circle at 72% 18%, rgba(77, 125, 255, 0.08), transparent 30%),
    var(--shell);
}

.app-bar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 220px minmax(240px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 18, 22, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-fit-mark {
  position: relative;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(141, 180, 198, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(112deg, transparent 12%, rgba(255, 255, 255, 0.22) 37%, transparent 53%),
    linear-gradient(135deg, #14232b, #233b47 53%, #0d171c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.24);
  transform: rotate(-7deg);
}

.brand-fit-mark::before,
.brand-fit-mark::after {
  content: "";
  position: absolute;
}

.brand-fit-mark::before {
  inset: 6px 5px 5px 7px;
  border: 2px solid var(--coral);
  border-left-width: 4px;
  border-radius: 45% 18% 20% 45% / 50% 28% 28% 50%;
  transform: skewY(-5deg);
}

.brand-fit-mark::after {
  width: 8px;
  height: 22px;
  right: 5px;
  top: 5px;
  border: 1px solid rgba(234, 241, 243, 0.34);
  border-radius: 50%;
  transform: rotate(4deg);
}

.brand-fit-mark i {
  position: absolute;
  z-index: 3;
  width: 5px;
  height: 5px;
  left: 13px;
  top: 14px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 106, 69, 0.14);
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--coral-bright);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.16em;
}

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

.project-state-label {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-state strong {
  overflow: hidden;
  color: #c8d4d8;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-actions button,
.app-actions .button {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.document-action-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.icon-only-button {
  width: 34px;
  min-width: 34px;
  min-height: 32px;
  padding: 0;
}

.icon-only-button.document-action-button {
  width: auto;
  min-width: 0;
  gap: 6px;
  padding-inline: 9px;
}

.document-action-label {
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.document-action-group .icon-only-button {
  border-color: transparent;
  background: transparent;
}

.document-action-group .document-action-button:hover:not(:disabled),
.document-action-group .document-action-button:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.document-action-group .document-action-close:hover:not(:disabled),
.document-action-group .document-action-close:focus-visible {
  color: #ff9b88;
  border-color: rgba(255, 112, 87, 0.38);
  background: rgba(255, 112, 87, 0.09);
}

.icon-only-button.is-confirmed {
  color: var(--mint);
  background: rgba(101, 214, 173, 0.1);
}

.language-switcher {
  position: relative;
  min-height: 36px;
  min-width: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: #c7d4d9;
  background: rgba(19, 31, 37, 0.72);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.language-switcher:hover,
.language-switcher:focus-within {
  border-color: rgba(101, 214, 173, 0.45);
  background: rgba(24, 40, 47, 0.9);
}

.language-switcher select {
  width: 34px;
  padding: 0 13px 0 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.header-export-utility,
.header-export-secondary,
.header-export-primary {
  min-height: 36px;
  white-space: nowrap;
}

.header-export-primary {
  min-width: 92px;
}

.header-export-utility.active {
  border-color: rgba(255, 185, 112, 0.45);
  color: #ffd3a6;
}

.task-entry-action.button-subtle {
  color: #dce8ec;
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 6px;
  color: var(--muted-2);
  font-size: 11px;
}

.privacy-note i,
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(101, 214, 173, 0.1);
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.button-subtle,
.button-outline {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.button-subtle:hover:not(:disabled),
.button-outline:hover:not(:disabled) {
  border-color: rgba(234, 241, 243, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.button-accent {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 7px 22px rgba(255, 106, 69, 0.2);
}

.button-accent:hover:not(:disabled) {
  background: var(--coral-bright);
}

.button-export {
  border-color: rgba(101, 214, 173, 0.34);
  color: #b8f4dd;
  background: rgba(101, 214, 173, 0.1);
}

.button-export:hover:not(:disabled) {
  border-color: rgba(101, 214, 173, 0.62);
  background: rgba(101, 214, 173, 0.17);
}

.button-layer {
  border-color: rgba(123, 167, 255, 0.32);
  color: #c9d9ff;
  background: rgba(87, 128, 222, 0.09);
}

.button-layer:hover:not(:disabled) {
  border-color: rgba(123, 167, 255, 0.58);
  background: rgba(87, 128, 222, 0.16);
}

.button-directory {
  max-width: 154px;
  border-color: rgba(255, 184, 110, 0.28);
  color: #ffd5ad;
  background: rgba(255, 147, 72, 0.07);
}

.button-directory:hover:not(:disabled),
.button-directory.active {
  border-color: rgba(255, 184, 110, 0.58);
  background: rgba(255, 147, 72, 0.14);
}

.button-directory.needs-authorization {
  border-color: rgba(255, 107, 82, 0.78);
  color: #ffb09d;
  background: rgba(255, 82, 61, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 82, 61, 0.12);
}

.button-directory span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-glyph {
  position: relative;
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
}

.document-action-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layer-glyph {
  border: 1px solid currentColor;
  border-radius: 3px;
  background:
    linear-gradient(45deg, currentColor 25%, transparent 25%) 0 0 / 6px 6px,
    linear-gradient(45deg, transparent 75%, currentColor 75%) 0 0 / 6px 6px;
  opacity: 0.82;
}

.directory-glyph {
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 2px;
  transform: translateY(1px);
}

.directory-glyph::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -4px;
  width: 7px;
  height: 4px;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.export-glyph {
  border: 1px solid currentColor;
  border-radius: 3px;
}

.export-glyph::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.export-glyph::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 7px;
  background: currentColor;
  transform: translateY(-2px);
}

.image-glyph {
  border: 1px solid currentColor;
  border-radius: 3px;
}

.image-glyph::before {
  content: "";
  width: 3px;
  height: 3px;
  position: absolute;
  top: 3px;
  right: 3px;
  border-radius: 50%;
  background: currentColor;
}

.image-glyph::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 5px;
  background: currentColor;
  clip-path: polygon(0 100%, 35% 25%, 55% 65%, 76% 35%, 100% 100%);
}

.save-glyph {
  border: 1px solid currentColor;
  border-radius: 2px;
}

.save-glyph::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 0;
  height: 5px;
  border: 1px solid currentColor;
  border-top: 0;
}

.save-glyph::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 4px;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.close-glyph::before,
.close-glyph::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 7px;
  height: 1px;
  background: currentColor;
}

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

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

.logo-glyph {
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 9px;
}

.studio {
  --inspector-width: 348px;
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) var(--inspector-width);
}

.tool-rail {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 10px 18px;
  border-right: 1px solid var(--line);
  background: #0d171c;
}

.rail-group {
  display: grid;
  gap: 8px;
}

.rail-label {
  margin-bottom: 6px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.rail-button {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  transition: 160ms ease;
}

.rail-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
}

.rail-button.active {
  border-color: rgba(77, 125, 255, 0.38);
  color: #fff;
  background: var(--blue-soft);
}

.rail-icon {
  position: relative;
  width: 22px;
  height: 22px;
}

.target-icon {
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.target-icon::before,
.target-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.layers-icon::before,
.layers-icon::after,
.layers-icon {
  border: 1px solid currentColor;
  border-radius: 4px;
}

.layers-icon {
  width: 20px;
  height: 14px;
  transform: translateY(-2px);
}

.layers-icon::before,
.layers-icon::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 12px;
  left: 2px;
  background: #0d171c;
}

.layers-icon::before {
  top: 3px;
}

.layers-icon::after {
  top: 7px;
}

.target-icon::before {
  width: 28px;
  height: 1px;
  left: -4px;
  top: 9px;
}

.target-icon::after {
  width: 1px;
  height: 28px;
  top: -4px;
  left: 9px;
}

.hand-icon::before {
  content: "✣";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 300;
}

.rail-help {
  display: grid;
  gap: 4px;
  color: var(--muted-2);
  text-align: center;
}

.rail-help span {
  color: var(--coral-bright);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.rail-help small {
  font-size: 9px;
}

.stage-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: var(--canvas);
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #101a1f;
}

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

.stage-title div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.stage-title strong {
  font-size: 12px;
  font-weight: 650;
}

.stage-title span:last-child {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-badges {
  display: flex;
  align-items: center;
  gap: 7px;
}

.badge {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.badge-lock {
  border-color: rgba(101, 214, 173, 0.2);
  color: var(--mint);
  background: rgba(101, 214, 173, 0.06);
}

.badge-button {
  appearance: none;
  background: rgba(8, 20, 26, 0.76);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.badge-button:hover,
.badge-button:focus-visible,
.badge-button.is-active {
  border-color: rgba(101, 214, 173, 0.4);
  color: var(--mint);
  background: rgba(101, 214, 173, 0.1);
}

.badge-button:focus-visible {
  outline: 2px solid rgba(101, 214, 173, 0.36);
  outline-offset: 2px;
}

.canvas-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(137, 173, 184, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 173, 184, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, #11232b, #071015 72%);
  background-size: 32px 32px, 32px 32px, auto;
  touch-action: none;
}

.canvas-wrap::after {
  content: "";
  position: absolute;
  z-index: 9;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.26);
}

.canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.elements-panel {
  position: absolute;
  z-index: 12;
  top: 16px;
  left: 16px;
  width: min(310px, calc(100% - 32px));
  overflow: hidden;
  border: 1px solid rgba(112, 165, 190, 0.3);
  border-radius: 14px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(20, 39, 48, 0.97), rgba(7, 18, 24, 0.98));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.elements-panel[hidden] {
  display: none;
}

.elements-panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(112, 165, 190, 0.18);
}

.elements-panel-head > div {
  display: grid;
  gap: 3px;
}

.elements-panel-head span {
  color: var(--coral-bright);
  font: 700 7px/1 var(--mono);
  letter-spacing: 0.16em;
}

.elements-panel-head strong {
  font-size: 14px;
}

.panel-close,
.layer-icon-button {
  border: 1px solid rgba(128, 168, 187, 0.25);
  color: #b8c9d0;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.panel-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
}

.layer-stack {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.layer-row,
.logo-instance-tab {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 28px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(116, 168, 194, 0.18);
  border-radius: 9px;
  color: #afc1c8;
  background: rgba(7, 18, 24, 0.76);
}

.logo-instance-tab.is-locked {
  border-color: rgba(146, 165, 176, 0.28);
  background: rgba(7, 18, 24, 0.58);
}

.layer-visibility {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #70ddb9;
  background: rgba(64, 201, 158, 0.09);
  cursor: pointer;
  font-size: 11px;
}

.layer-visibility.is-hidden {
  color: #637983;
  background: rgba(255, 255, 255, 0.025);
}

.layer-visibility.is-locked {
  cursor: default;
}

.layer-thumbnail {
  width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(150, 186, 202, 0.2);
  border-radius: 7px;
}

.layer-thumbnail-photo {
  background:
    linear-gradient(145deg, rgba(255, 127, 89, 0.36), transparent 52%),
    linear-gradient(35deg, #243f4d, #101e26);
}

.layer-thumbnail-model {
  color: #78b6ff;
  background: radial-gradient(ellipse at 50% 45%, #2e5b7b 0 32%, #102631 34% 100%);
  font: 700 9px/1 var(--mono);
}

.layer-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
}

.layer-copy strong,
.layer-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-copy strong {
  color: #e9f3f6;
  font-size: 11px;
}

.layer-copy small,
.layer-lock {
  color: #6f8994;
  font-size: 9px;
}

.logo-instance-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.layer-lock-button {
  width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 165, 190, 0.24);
  border-radius: 7px;
  color: #7d929b;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 10px;
}

.layer-lock-button.is-locked {
  color: #ffd9a3;
  border-color: rgba(251, 165, 82, 0.52);
  background: rgba(251, 165, 82, 0.12);
  box-shadow: 0 0 0 1px rgba(251, 165, 82, 0.08) inset;
}

.elements-panel-hint {
  margin: 0;
  padding: 0 14px 13px;
  color: #647d88;
  font-size: 9px;
  line-height: 1.55;
}

#photoCanvas {
  z-index: 1;
}

#threeCanvas {
  z-index: 2;
  cursor: crosshair;
}

#hudCanvas {
  z-index: 3;
  pointer-events: none;
}

.canvas-wrap[data-tool="pan"] #threeCanvas,
.canvas-wrap.space-pan #threeCanvas {
  cursor: grab;
}

.canvas-wrap.is-panning #threeCanvas {
  cursor: grabbing;
}

.empty-state {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(230px, 310px);
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 6vw, 88px);
  padding: 48px;
  background:
    radial-gradient(circle at 33% 48%, rgba(77, 125, 255, 0.13), transparent 31%),
    rgba(7, 16, 21, 0.84);
  transition: opacity 220ms ease;
}

.empty-state.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.empty-visual {
  position: relative;
  width: min(480px, 100%);
  aspect-ratio: 12 / 7;
}

.surface-demo {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(148, 180, 195, 0.18);
  border-radius: 24px;
  background: #050b18;
  box-shadow:
    0 32px 70px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

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

.surface-demo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 62%, rgba(3, 9, 17, 0.54) 100%),
    linear-gradient(90deg, rgba(4, 10, 22, 0.2), transparent 38%);
}

.surface-demo-caption {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(241, 247, 249, 0.9);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72);
}

.surface-demo-caption::before {
  width: 14px;
  height: 2px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--coral-bright);
  box-shadow: 0 0 10px rgba(255, 101, 71, 0.42);
  content: "";
}

.empty-copy {
  display: grid;
  justify-items: start;
}

.eyebrow {
  color: var(--coral-bright);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.empty-copy h2,
.inspector-head h1 {
  margin: 10px 0 0;
  font-family: var(--display);
  font-weight: 620;
  letter-spacing: -0.025em;
}

.empty-copy h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.empty-copy p {
  max-width: 280px;
  margin: 13px 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.drop-hint {
  position: absolute;
  z-index: 15;
  inset: 16px;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 1px dashed var(--coral-bright);
  border-radius: 14px;
  color: #fff;
  text-align: center;
  background: rgba(9, 18, 23, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.drop-hint.visible {
  opacity: 1;
}

.drop-hint strong {
  font-size: 18px;
}

.drop-hint span {
  color: var(--muted);
  font-size: 12px;
}

.instruction-float,
.view-dock,
.canvas-shortcuts {
  position: absolute;
  z-index: 8;
}

.instruction-float {
  left: 18px;
  bottom: 18px;
  max-width: min(560px, calc(100% - 300px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  background: rgba(9, 18, 23, 0.82);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.instruction-count {
  color: var(--coral-bright);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.instruction-float div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.instruction-float strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instruction-float div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-dock {
  right: 18px;
  bottom: 18px;
  height: 42px;
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(9, 18, 23, 0.82);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.view-dock button {
  height: 32px;
  min-width: 32px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.view-dock button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.view-dock span {
  min-width: 48px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.view-dock #zoomSpeed {
  min-width: 34px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
}

.view-dock .fit-button {
  min-width: 68px;
  margin-left: 3px;
  border-left: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
  font-size: 10px;
}

.canvas-shortcuts {
  right: 18px;
  top: 14px;
  display: flex;
  gap: 12px;
  color: rgba(203, 217, 222, 0.42);
  font-size: 9px;
}

kbd {
  color: rgba(234, 241, 243, 0.72);
  font-family: var(--mono);
  font-size: 8px;
}

.inspector {
  position: relative;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #10191e;
  scrollbar-color: rgba(143, 161, 168, 0.28) transparent;
  scrollbar-width: thin;
}

.inspector-resizer {
  position: absolute;
  z-index: 24;
  top: 0;
  right: calc(var(--inspector-width) - 6px);
  bottom: 0;
  width: 12px;
  display: grid;
  place-items: center;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}

.inspector-resizer::before {
  content: "";
  position: absolute;
  inset: 0 5px;
  background: transparent;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.inspector-resizer > span {
  position: relative;
  width: 3px;
  height: 32px;
  border-radius: 999px;
  opacity: 0;
  background:
    radial-gradient(circle, #8cc5ff 1px, transparent 1.4px)
    center / 3px 7px repeat-y;
  transform: scaleY(0.7);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.inspector-resizer:hover::before,
.inspector-resizer:focus-visible::before,
.studio.is-resizing-inspector .inspector-resizer::before {
  background: rgba(140, 197, 255, 0.22);
  box-shadow: 0 0 18px rgba(77, 125, 255, 0.2);
}

.inspector-resizer:hover > span,
.inspector-resizer:focus-visible > span,
.studio.is-resizing-inspector .inspector-resizer > span {
  opacity: 1;
  transform: scaleY(1);
}

.studio.is-resizing-inspector,
.studio.is-resizing-inspector * {
  cursor: col-resize !important;
  user-select: none !important;
}

.inspector-head {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.inspector-head h1 {
  font-size: 23px;
}

.version-tag {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.section-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head strong {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 620;
}

.section-index {
  width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #a7bbff;
  background: var(--blue-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.accent-index {
  color: #ffc1b2;
  background: rgba(255, 106, 69, 0.14);
}

.model-index {
  color: #9ce9ff;
  background: rgba(73, 198, 236, 0.12);
}

.output-index {
  color: #b8f4dd;
  background: rgba(101, 214, 173, 0.12);
}

.output-section {
  background:
    linear-gradient(180deg, rgba(101, 214, 173, 0.025), transparent 42%),
    transparent;
}

.output-section.ready .section-status {
  color: var(--mint);
}

.current-output-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(101, 214, 173, 0.18);
  border-radius: 11px;
  background: rgba(7, 17, 21, 0.56);
}

.output-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.output-card-head > div {
  display: grid;
  gap: 3px;
}

.output-card-head strong {
  color: #e2eee9;
  font-size: 11px;
  font-weight: 650;
}

.output-card-head > span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.current-output-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

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

.output-actions .button {
  min-width: 0;
  padding-inline: 8px;
  font-size: 9px;
}

#batchMount:empty {
  display: none;
}

#batchMount .batch-card {
  margin-top: 10px;
}

.section-status {
  max-width: 160px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-section {
  display: none;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(55, 181, 224, 0.035), transparent 45%),
    transparent;
}

.model-section.visible {
  display: grid;
  animation: lock-in 220ms ease both;
}

.surface-picker strong {
  color: #d9e9ee;
  font-size: 10px;
  font-weight: 620;
}

.surface-picker span {
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
}

.compact-select-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.compact-select-field > span {
  color: #cbd9de;
  font-size: 10px;
  font-weight: 620;
}

.compact-select-field select,
.profile-segment-picker select {
  min-width: 0;
  height: 34px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #d9e8ed;
  background: #101c22;
  cursor: pointer;
  font-size: 10px;
}

.cylinder-model-controls {
  display: grid;
  gap: 7px;
}

.model-control-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(114, 214, 255, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.model-control-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.model-control-row strong {
  color: #d8e8ed;
  font-size: 10px;
  font-weight: 640;
}

.model-control-row div > span {
  overflow: hidden;
  color: #68828b;
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-control-row select,
.side-point-options select {
  height: 30px;
  padding: 0 28px 0 9px;
  border: 1px solid rgba(114, 214, 255, 0.22);
  border-radius: 7px;
  color: #dff5fb;
  background: #0f2028;
  font: 8px var(--mono);
  cursor: pointer;
}

.fixed-model-control {
  border-color: rgba(101, 214, 173, 0.18);
  background: rgba(101, 214, 173, 0.035);
}

.model-point-count {
  color: var(--mint);
  font: 8px var(--mono);
  white-space: nowrap;
}

.compact-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7f979f;
  cursor: pointer;
  font: 8px var(--mono);
}

.compact-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compact-switch > span {
  position: relative;
  width: 30px;
  height: 17px;
  border: 1px solid #36505a;
  border-radius: 999px;
  background: #0a1419;
  transition: 160ms ease;
}

.compact-switch > span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #71858d;
  transition: 160ms ease;
}

.compact-switch input:checked + span {
  border-color: rgba(101, 214, 173, 0.55);
  background: rgba(101, 214, 173, 0.18);
}

.compact-switch input:checked + span::after {
  transform: translateX(13px);
  background: var(--mint);
}

.compact-switch em {
  color: inherit;
  font-style: normal;
}

.compact-switch input:checked ~ em {
  color: var(--mint);
}

.side-point-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.side-point-options[hidden],
.compact-profile-editor[hidden],
.cylinder-model-controls[hidden],
.plane-model-hint[hidden] {
  display: none !important;
}

.side-point-options label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #8fa5ad;
  font-size: 8px;
}

.side-point-options button {
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #a7b8be;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 8px;
}

.compact-profile-editor .profile-editor {
  height: 104px;
}

.profile-editor-head > output {
  color: #72d6ff;
  font: 8px var(--mono);
  white-space: nowrap;
}

.plane-model-hint {
  padding: 10px 11px;
  border: 1px solid rgba(114, 214, 255, 0.15);
  border-radius: 9px;
  color: #7e99a3;
  background: rgba(114, 214, 255, 0.035);
  font-size: 8px;
  line-height: 1.65;
}

.inspector-disclosure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.inspector-disclosure > summary {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 11px;
  color: #cad7dc;
  cursor: pointer;
  font-size: 10px;
  font-weight: 620;
  list-style: none;
}

.inspector-disclosure > summary::-webkit-details-marker {
  display: none;
}

.inspector-disclosure > summary::after {
  content: "＋";
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 11px;
}

.inspector-disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
  color: #edf4f6;
}

.inspector-disclosure[open] > summary::after {
  content: "－";
  color: var(--coral-bright);
}

.inspector-disclosure > summary small {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
}

.inspector-disclosure .profile-editor-shell {
  border: 0;
  border-radius: 0;
}

.disclosure-content {
  display: grid;
  gap: 11px;
  padding: 11px;
}

.logo-disclosure .integration-card {
  border: 0;
  border-radius: 0;
}

.task-disclosure {
  border-color: rgba(101, 214, 173, 0.17);
}

.task-disclosure > summary::after {
  color: var(--mint);
}

.model-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.model-preset-grid button,
.surface-segments button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #9eb0b7;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 9px;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.model-preset-grid button:hover,
.surface-segments button:hover {
  border-color: rgba(114, 214, 255, 0.36);
  color: #dff7ff;
  transform: translateY(-1px);
}

.model-preset-grid button.active,
.surface-segments button.active {
  border-color: rgba(114, 214, 255, 0.58);
  color: #dff9ff;
  background:
    linear-gradient(135deg, rgba(60, 183, 228, 0.18), transparent),
    rgba(18, 42, 52, 0.7);
  box-shadow: inset 3px 0 0 #72d6ff;
}

.profile-editor-shell {
  overflow: hidden;
  border: 1px solid rgba(114, 214, 255, 0.17);
  border-radius: 11px;
  background:
    linear-gradient(rgba(114, 214, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 214, 255, 0.035) 1px, transparent 1px),
    #0a151b;
  background-size: 16px 16px;
}

.profile-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px 0;
}

.profile-editor-head > div {
  display: grid;
  gap: 3px;
}

.profile-editor-head > div > span {
  color: #b9d5df;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-editor-head > div > small {
  color: #5f7b85;
  font-size: 8px;
}

.profile-segment-picker {
  display: grid;
  grid-template-columns: auto 62px;
  align-items: center;
  gap: 3px 6px;
  color: #6f8a94;
  font-size: 7px;
}

.profile-segment-picker span {
  letter-spacing: 0;
  text-transform: none;
}

.profile-segment-picker select {
  min-width: 62px;
  height: 25px;
  padding: 0 20px 0 7px;
  border: 1px solid rgba(114, 214, 255, 0.23);
  border-radius: 6px;
  color: #d9f5ff;
  background: #10212a;
  font: 8px var(--mono);
  cursor: pointer;
}

.profile-segment-picker output {
  grid-column: 1 / -1;
  color: #72d6ff;
  font: 7px var(--mono);
  text-align: right;
}

.profile-editor {
  width: 100%;
  height: 142px;
  display: block;
  cursor: ns-resize;
  touch-action: none;
}

.profile-stations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(114, 214, 255, 0.12);
  background: rgba(114, 214, 255, 0.08);
}

.profile-stations label {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 7px 5px 8px;
  background: #0d1a20;
  text-align: center;
}

.profile-stations span {
  color: #607983;
  font-size: 7px;
}

.profile-stations input {
  width: 100%;
  height: 3px;
  accent-color: #72d6ff;
}

.profile-stations output {
  color: #93dff6;
  font-family: var(--mono);
  font-size: 7px;
}

.profile-stations label:first-child output {
  color: #ff9a83;
}

.surface-picker {
  display: grid;
  gap: 9px;
  padding-top: 2px;
}

.surface-picker > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.surface-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.step-list {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: var(--line);
}

.step {
  position: relative;
  z-index: 1;
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  transition: 160ms ease;
}

.step-index {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: #10191e;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.step > strong {
  min-width: 0;
  color: #cbd6da;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.35;
}

.step i {
  width: 6px;
  height: 6px;
  border: 1px solid var(--muted-2);
  border-radius: 50%;
}

.step.active {
  border-color: rgba(77, 125, 255, 0.35);
  background: var(--blue-soft);
}

.step.active .step-index {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(77, 125, 255, 0.1);
}

.step.active i {
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 106, 69, 0.1);
}

.step.done .step-index {
  border-color: rgba(101, 214, 173, 0.46);
  color: var(--mint);
  background: rgba(101, 214, 173, 0.08);
}

.step.done i {
  border-color: var(--mint);
  background: var(--mint);
}

.calibration-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.calibration-complete-action {
  grid-column: 1 / -1;
  border-color: rgba(101, 214, 173, 0.38);
  color: var(--mint);
  background: rgba(101, 214, 173, 0.08);
}

.calibration-complete-action:hover:not(:disabled) {
  border-color: rgba(101, 214, 173, 0.7);
  background: rgba(101, 214, 173, 0.14);
}

.calibration-complete-action.is-confirmed {
  border-color: rgba(106, 164, 255, 0.44);
  color: #b8d2ff;
  background: rgba(79, 143, 255, 0.1);
}

.text-button {
  border: 0;
  padding: 7px 3px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.text-button:hover:not(:disabled) {
  color: var(--ink);
}

.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.text-button.danger {
  color: var(--danger);
}

.lock-card {
  display: none;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(101, 214, 173, 0.24);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(101, 214, 173, 0.09), transparent),
    rgba(11, 27, 25, 0.65);
}

.lock-card.visible {
  display: block;
  animation: lock-in 260ms ease both;
}

.perspective-card {
  display: grid;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(112, 185, 255, 0.22);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(75, 126, 255, 0.09), transparent 65%),
    rgba(10, 18, 26, 0.68);
}

.progressive-panel {
  display: grid;
  gap: 11px;
}

.progressive-panel[hidden] {
  display: none !important;
}

.manual-calibration-panel {
  padding: 10px;
  border: 1px solid rgba(123, 167, 255, 0.13);
  border-radius: 8px;
  background: rgba(5, 12, 18, 0.34);
}

.perspective-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.perspective-head > div {
  display: grid;
  gap: 3px;
}

.perspective-head strong {
  color: #e5edff;
  font-size: 11px;
}

.perspective-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.perspective-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.perspective-switch span {
  position: relative;
  width: 30px;
  height: 16px;
  border: 1px solid rgba(139, 158, 173, 0.38);
  border-radius: 999px;
  background: rgba(4, 11, 16, 0.85);
  transition: border-color 160ms ease, background 160ms ease;
}

.perspective-switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.perspective-switch input:checked + span {
  border-color: rgba(101, 214, 173, 0.55);
  background: rgba(101, 214, 173, 0.13);
}

.perspective-switch input:checked + span::after {
  transform: translateX(14px);
  background: var(--mint);
}

.perspective-switch input:focus-visible + span {
  outline: 2px solid rgba(123, 167, 255, 0.8);
  outline-offset: 2px;
}

.perspective-switch b {
  min-width: 20px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
}

.perspective-strength-row {
  gap: 6px;
}

.perspective-strength-row.disabled {
  opacity: 0.38;
}

.manual-perspective-head {
  padding-top: 10px;
  border-top: 1px solid rgba(123, 167, 255, 0.13);
}

.perspective-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(123, 167, 255, 0.13);
}

.perspective-metrics div {
  display: grid;
  gap: 4px;
}

.perspective-metrics dt {
  color: var(--muted-2);
  font-size: 7px;
}

.perspective-metrics dd {
  margin: 0;
  color: #dfe8ff;
  font-family: var(--mono);
  font-size: 9px;
}

.batch-card {
  display: none;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(123, 167, 255, 0.18);
  border-radius: 11px;
  background: rgba(10, 18, 26, 0.62);
}

.batch-card.visible {
  display: grid;
  gap: 10px;
  animation: lock-in 240ms ease both;
}

.batch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.batch-head > div {
  display: grid;
  gap: 3px;
}

.batch-head strong {
  color: #e2eaf0;
  font-size: 11px;
  font-weight: 650;
}

.batch-head > span,
.batch-card > small {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.batch-kicker {
  color: #88aaff;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.batch-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.button-replace {
  border-color: rgba(123, 167, 255, 0.4);
  color: #e0e9ff;
  background: rgba(87, 128, 222, 0.14);
}

.button-replace:hover:not(:disabled) {
  border-color: rgba(123, 167, 255, 0.68);
  background: rgba(87, 128, 222, 0.22);
}

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

.preset-actions .button {
  min-height: 34px;
  padding-inline: 8px;
  font-size: 9px;
}

.preset-actions .button.is-confirmed {
  border-color: rgba(101, 214, 173, 0.5);
  background: rgba(101, 214, 173, 0.12);
  color: #b8f3dc;
  box-shadow: inset 0 0 0 1px rgba(101, 214, 173, 0.05);
}

.preset-actions .button.is-confirmed:hover:not(:disabled) {
  border-color: rgba(101, 214, 173, 0.68);
  background: rgba(101, 214, 173, 0.16);
}

.preset-library,
.preset-select-field {
  display: grid;
  gap: 6px;
}

.preset-select-field > span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preset-select-field select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #dce9ed;
  background: #101c22;
  cursor: pointer;
  font-size: 10px;
}

.preset-select-field select:disabled {
  color: #61767e;
  cursor: not-allowed;
}

.preset-actions-three {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(58px, 0.65fr);
}

.task-name-field {
  display: grid;
  gap: 5px;
}

.task-name-field span,
.task-image-summary span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.task-name-field input,
.task-image-manager select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: #e8eff4;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
}

.task-name-field input {
  padding: 0 10px;
}

.task-name-field input:focus,
.task-image-manager select:focus {
  border-color: rgba(123, 167, 255, 0.56);
}

.task-save-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.task-save-actions .button {
  min-height: 34px;
  padding-inline: 8px;
  font-size: 9px;
}

.button-task-primary {
  border-color: rgba(101, 214, 173, 0.38);
  color: #b8f4dd;
  background: rgba(101, 214, 173, 0.1);
}

.task-image-manager {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(123, 167, 255, 0.14);
  border-radius: 9px;
  background: rgba(3, 10, 15, 0.32);
}

.task-image-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-image-summary > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.task-image-summary strong {
  color: #dbe6ef;
  font-size: 9px;
}

.task-image-manager select {
  padding: 0 8px;
}

.button-task-add {
  min-height: 36px;
  justify-content: flex-start;
  gap: 9px;
  padding-inline: 10px;
  border-color: rgba(123, 167, 255, 0.34);
  color: #c7d6ff;
  background: rgba(72, 112, 214, 0.1);
  font-size: 9px;
}

.button-task-add:hover:not(:disabled) {
  border-color: rgba(123, 167, 255, 0.58);
  background: rgba(72, 112, 214, 0.17);
}

.task-add-mark {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex: 0 0 20px;
  border: 1px solid rgba(123, 167, 255, 0.45);
  border-radius: 50%;
  color: #dce5ff;
  font: 13px/1 var(--mono);
}

.task-add-hint {
  color: var(--muted-2);
  font-size: 7px;
  line-height: 1.55;
}

.task-group-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 2px;
}

.task-group-actions .button {
  min-height: 32px;
  padding-inline: 7px;
  font-size: 8px;
}

.button-danger-subtle {
  border-color: rgba(255, 116, 91, 0.28);
  color: #ffc2b7;
  background: rgba(255, 93, 69, 0.055);
}

.button-danger-subtle:hover:not(:disabled) {
  border-color: rgba(255, 116, 91, 0.52);
  background: rgba(255, 93, 69, 0.11);
}

.placement-apply-feedback {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(101, 214, 173, 0.34);
  border-radius: 9px;
  background: rgba(101, 214, 173, 0.09);
  color: var(--mint);
  font-size: 8px;
  line-height: 1.45;
  animation: placement-feedback-in 180ms ease-out both;
}

.placement-apply-feedback[hidden] {
  display: none;
}

.placement-apply-feedback > span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  color: #071310;
  font: 700 10px/1 var(--mono);
}

.placement-apply-feedback strong {
  color: #b8f3dc;
  font-weight: 600;
}

.button-replace.is-confirmed {
  border-color: rgba(101, 214, 173, 0.46);
  background: rgba(101, 214, 173, 0.12);
  color: #b8f3dc;
}

@keyframes placement-feedback-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .placement-apply-feedback {
    animation: none;
  }
}

.batch-progress {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(101, 214, 173, 0.22);
  border-radius: 9px;
  background: rgba(101, 214, 173, 0.06);
}

.batch-progress[hidden] {
  display: none;
}

.batch-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 8px;
}

.batch-progress strong {
  color: var(--mint);
  font-family: var(--mono);
}

.batch-progress progress {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--mint);
}

.batch-export-hint {
  display: block;
  margin-top: -5px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
  text-align: center;
}

.task-history-dialog {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 6, 9, 0.76);
  backdrop-filter: blur(10px);
}

.task-history-dialog[hidden] {
  display: none;
}

.task-history-panel {
  width: min(560px, 100%);
  max-height: min(680px, calc(100dvh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(123, 167, 255, 0.22);
  border-radius: 16px;
  background: #101a21;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.task-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-history-head h2 {
  margin: 5px 0 0;
  color: #eef4f7;
  font-family: var(--display);
  font-size: 22px;
}

.task-history-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 20px;
}

.task-history-panel > p {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 10px;
}

.task-history-list {
  display: grid;
  gap: 9px;
}

.task-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.task-history-item-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.task-history-item-copy strong {
  overflow: hidden;
  color: #e8eef2;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-history-item-copy span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.task-history-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-history-item-actions .button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 8px;
}

.task-history-empty {
  padding: 28px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted-2);
  text-align: center;
  font-size: 10px;
  line-height: 1.7;
}

.close-document-panel {
  width: min(460px, 100%);
  max-height: none;
  overflow: visible;
  text-align: center;
}

.close-document-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 1px solid rgba(255, 107, 76, 0.32);
  border-radius: 14px;
  color: #ff9a82;
  background: rgba(255, 107, 76, 0.1);
}

.close-document-icon .button-glyph {
  width: 18px;
  height: 18px;
}

.close-document-panel h2 {
  margin: 7px 0 8px;
  color: #edf5f7;
  font-size: 20px;
}

.close-document-panel > p {
  max-width: 340px;
  margin: 0 auto;
}

.close-document-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.15fr 1.15fr;
  gap: 8px;
  margin-top: 18px;
}

.lock-title {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.lock-symbol {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
}

.lock-symbol::after {
  content: "✓";
  color: #082019;
  font-size: 13px;
  font-weight: 900;
}

.lock-title div {
  display: grid;
  gap: 2px;
}

.lock-title strong {
  color: var(--mint);
  font-size: 11px;
}

.lock-title span {
  color: rgba(143, 190, 173, 0.7);
  font-size: 8px;
}

.lock-title b {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 11px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid rgba(101, 214, 173, 0.14);
}

.metrics div {
  display: grid;
  gap: 4px;
}

.metrics dt {
  color: rgba(143, 190, 173, 0.58);
  font-size: 8px;
}

.metrics dd {
  margin: 0;
  color: #d8eee6;
  font-family: var(--mono);
  font-size: 10px;
}

.logo-empty {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed rgba(255, 106, 69, 0.35);
  border-radius: 11px;
  background: rgba(255, 106, 69, 0.035);
}

.logo-empty.hidden {
  display: none;
}

.logo-drop-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 106, 69, 0.5);
  border-radius: 50%;
  color: var(--coral-bright);
  font-family: var(--display);
  font-size: 18px;
}

.logo-empty > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.logo-empty strong {
  font-size: 11px;
}

.logo-empty span {
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
}

.logo-empty .button {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
}

.logo-empty:has(.button:disabled) {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.logo-empty:has(.button:disabled) .logo-drop-mark {
  border-color: var(--line-strong);
  color: var(--muted-2);
}

.logo-controls {
  display: none;
}

.logo-controls.visible {
  display: grid;
  gap: 15px;
  animation: lock-in 220ms ease both;
}

.logo-file-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.plane-logo-actions {
  display: flex;
  justify-content: flex-end;
}

.plane-logo-actions[hidden] {
  display: none;
}

.plane-logo-center-button {
  min-height: 30px;
  padding: 0 12px;
  border-color: rgba(101, 214, 173, 0.38);
  color: #b8f4dd;
  font-size: 10px;
}

.plane-logo-center-button:hover:not(:disabled) {
  border-color: rgba(101, 214, 173, 0.68);
  background: rgba(101, 214, 173, 0.1);
}

.logo-instance-manager {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.logo-instance-heading,
.logo-instance-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.logo-instance-heading > div {
  display: grid;
  gap: 2px;
}

.logo-instance-heading strong {
  color: #eef8fb;
  font-size: 12px;
}

.logo-instance-heading span,
.logo-instance-count {
  color: #78929e;
  font-size: 10px;
}

.layer-icon-button {
  width: 32px;
  height: 30px;
  border-radius: 8px;
  color: #79e1bd;
  font-size: 17px;
}

.logo-instance-tabs {
  display: grid;
  gap: 6px;
}

.logo-instance-empty {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 1px dashed rgba(116, 168, 194, 0.2);
  border-radius: 9px;
  color: #78929e;
  font-size: 11px;
}

.logo-instance-tab {
  cursor: pointer;
}

.logo-instance-tab[aria-selected="true"] {
  border-color: rgba(111, 181, 255, 0.68);
  color: #eaf5ff;
  background: linear-gradient(
    135deg,
    rgba(58, 108, 211, 0.24),
    rgba(55, 197, 157, 0.09)
  );
}

.logo-instance-tab[aria-selected="true"] .layer-thumbnail-model {
  box-shadow: 0 0 0 1px rgba(111, 181, 255, 0.72);
}

.logo-instance-actions .button {
  flex: 1 1 auto;
  min-height: 32px;
  font-size: 11px;
}

.logo-instance-create-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.logo-instance-create-actions .button {
  min-height: 32px;
  font-size: 11px;
}

.object-transform-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(111, 181, 255, 0.18);
  border-radius: 10px;
  background: rgba(8, 23, 31, 0.58);
}

.object-transform-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #edf7fa;
  font-size: 11px;
}

.object-transform-heading span {
  color: #78929e;
  font-size: 9px;
}

.object-transform-row {
  display: grid;
  grid-template-columns: 44px minmax(70px, 1fr) 58px;
  align-items: center;
  gap: 8px;
}

.object-transform-row label {
  color: #a9bec7;
  font-size: 10px;
}

.object-transform-row input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgba(116, 168, 194, 0.25);
  border-radius: 7px;
  color: #ff8d70;
  background: rgba(4, 16, 22, 0.72);
  font: 10px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}

.logo-instance-actions .button-delete-object {
  flex: 0 0 auto;
  border-color: rgba(255, 115, 95, 0.38);
  color: #ff907e;
  background: rgba(103, 34, 30, 0.14);
}

.button-delete-object svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.button-delete-object:not(:disabled):hover {
  border-color: rgba(255, 115, 95, 0.72);
  background: rgba(133, 42, 35, 0.24);
}

.canvas-wrap[data-instance-move="true"] canvas {
  cursor: move;
}

.logo-effects {
  padding: 10px;
}

.effect-row {
  overflow: hidden;
  border: 1px solid rgba(116, 168, 194, 0.16);
  border-radius: 9px;
  background: rgba(7, 20, 27, 0.62);
}

.effect-toggle {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  cursor: pointer;
}

.effect-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.effect-switch {
  position: relative;
  width: 30px;
  height: 17px;
  border: 1px solid rgba(126, 158, 172, 0.35);
  border-radius: 999px;
  background: #14252d;
}

.effect-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #78909a;
  transition: 160ms ease;
}

.effect-toggle input:checked + .effect-switch {
  border-color: rgba(83, 221, 174, 0.58);
  background: rgba(44, 177, 133, 0.24);
}

.effect-toggle input:checked + .effect-switch::after {
  left: 15px;
  background: #73e2bd;
}

.effect-toggle > span:last-child {
  display: grid;
  gap: 3px;
}

.effect-toggle strong {
  color: #dce9ed;
  font-size: 10px;
}

.effect-toggle small {
  color: #708892;
  font-size: 8px;
}

.effect-control {
  margin: 0 10px 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(116, 168, 194, 0.13);
}

.effect-control[hidden] {
  display: none;
}

.logo-alignment-guide {
  overflow: hidden;
  border: 1px solid rgba(94, 210, 177, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(52, 184, 145, 0.08), transparent 58%),
    rgba(7, 20, 27, 0.56);
}

.logo-alignment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px 7px;
  border-bottom: 1px solid rgba(116, 168, 194, 0.12);
}

.logo-alignment-heading > span:first-child {
  display: grid;
  gap: 2px;
}

.logo-alignment-heading strong {
  color: #dff8ef;
  font-size: 10px;
}

.logo-alignment-heading small,
.compact-effect-toggle small {
  color: #708892;
  font-size: 8px;
}

.alignment-badge {
  padding: 3px 6px;
  border: 1px solid rgba(83, 221, 174, 0.32);
  border-radius: 999px;
  color: #73e2bd;
  font: 700 7px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.08em;
}

.compact-effect-toggle {
  min-height: 46px;
}

.logo-preview-wrap {
  width: 60px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background:
    linear-gradient(45deg, #263238 25%, transparent 25%),
    linear-gradient(-45deg, #263238 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #263238 75%),
    linear-gradient(-45deg, transparent 75%, #263238 75%),
    #1d282e;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  background-size: 10px 10px;
}

.logo-preview-wrap img {
  display: block;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 180ms ease;
}

.logo-file-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.logo-file-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo-file-copy strong {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-row {
  display: grid;
  gap: 8px;
}

.control-row > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-row strong {
  color: #cbd6da;
  font-size: 10px;
  font-weight: 560;
}

.control-row output {
  min-width: 38px;
  color: var(--coral-bright);
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
}

.control-value-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.manual-value-input {
  min-width: 66px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--coral-bright);
  background: rgba(255, 255, 255, 0.035);
}

.manual-value-input:focus-within {
  border-color: var(--coral-bright);
  box-shadow: 0 0 0 2px rgba(255, 129, 95, 0.12);
}

.manual-value-input input {
  width: 45px;
  height: 100%;
  padding: 0 3px 0 7px;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.manual-value-input > span {
  min-width: 15px;
  padding-right: 7px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
}

.control-row > small {
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.55;
}

.integration-card {
  display: grid;
  gap: 14px;
  padding: 13px;
  border: 1px solid rgba(101, 214, 173, 0.2);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(101, 214, 173, 0.075), transparent 68%),
    rgba(8, 22, 22, 0.52);
}

.integration-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.integration-title > div {
  display: grid;
  gap: 3px;
}

.integration-title strong {
  color: #dff8ee;
  font-size: 10px;
}

.integration-title span:not(.integration-badge) {
  color: var(--muted-2);
  font-size: 8px;
}

.integration-badge {
  padding: 4px 6px;
  border: 1px solid rgba(101, 214, 173, 0.25);
  border-radius: 5px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.angle-input {
  height: 30px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--coral-bright);
  background: rgba(255, 255, 255, 0.035);
}

.angle-input:focus-within {
  border-color: var(--coral-bright);
  box-shadow: 0 0 0 2px rgba(255, 129, 95, 0.12);
}

.angle-input input {
  width: 58px;
  height: 100%;
  padding: 0 4px 0 9px;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.angle-input > span {
  padding-right: 9px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
}

.rotation-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.button-rotation {
  min-height: 32px;
  padding: 0 7px;
  border-color: var(--line);
  color: #b9c7cc;
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 560;
}

.button-rotation:hover:not(:disabled) {
  border-color: rgba(255, 129, 95, 0.5);
  color: var(--coral-bright);
  background: rgba(255, 106, 69, 0.08);
}

input[type="range"] {
  width: 100%;
  height: 3px;
  margin: 5px 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, var(--blue), rgba(143, 161, 168, 0.22));
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  border: 3px solid #10191e;
  border-radius: 50%;
  appearance: none;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 3px solid #10191e;
  border-radius: 50%;
  background: #fff;
}

.full-button {
  width: 100%;
}

.button-toggle {
  border-color: var(--line-strong);
  color: #cbd6da;
  background: rgba(255, 255, 255, 0.03);
}

.logo-transform-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(123, 167, 255, 0.2);
  border-radius: 11px;
  background: rgba(17, 29, 35, 0.62);
}

.logo-transform-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.logo-transform-title strong {
  color: #e7eef1;
  font-size: 9px;
}

.logo-transform-title span {
  color: var(--muted-2);
  font-size: 7px;
}

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

.logo-toggle-grid .button-toggle {
  min-height: 42px;
  min-width: 0;
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 9px;
}

.logo-toggle-grid .button-toggle:last-child {
  grid-column: 1 / -1;
}

.toggle-symbol {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 24px;
  border: 1px solid rgba(123, 167, 255, 0.24);
  border-radius: 7px;
  color: #9eb9ff;
  font: 14px/1 var(--mono);
  background: rgba(72, 112, 214, 0.08);
}

.toggle-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.toggle-copy strong,
.toggle-copy small {
  white-space: nowrap;
}

.toggle-copy strong {
  color: inherit;
  font-size: 9px;
  font-weight: 650;
}

.button-toggle small {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.button-toggle.active {
  border-color: rgba(255, 106, 69, 0.5);
  color: #fff;
  background: rgba(255, 106, 69, 0.11);
}

.button-toggle.active small {
  color: var(--coral-bright);
}

.button-toggle.active .toggle-symbol {
  border-color: rgba(255, 106, 69, 0.5);
  color: var(--coral-bright);
  background: rgba(255, 106, 69, 0.1);
}

/* Readability scale: keep the dense editor compact without using sub-10px UI copy. */
.stage-title strong {
  font-size: 13px;
}

.stage-title span:last-child,
.instruction-float div span {
  font-size: 11px;
}

.badge,
.canvas-shortcuts,
.canvas-shortcuts kbd,
.instruction-count,
.view-dock span,
.view-dock .fit-button {
  font-size: 10px;
}

.instruction-float strong {
  font-size: 13px;
}

.rail-label,
.rail-help small {
  font-size: 10px;
}

.rail-button,
.rail-help span {
  font-size: 11px;
}

.version-tag,
.section-index,
.section-status,
.batch-kicker,
.perspective-switch b,
.lock-title span,
.metrics dt,
.perspective-metrics dt {
  font-size: 10px;
}

.section-head strong {
  font-size: 15px;
}

.step-index {
  font-size: 10px;
}

.step > strong,
.lock-title strong,
.lock-title b,
.perspective-head strong,
.batch-head strong {
  font-size: 12px;
}

.metrics dd,
.perspective-metrics dd,
.text-button,
.inspector .button,
.inspector select,
.inspector input:not([type="range"]),
.model-control-row strong,
.compact-select-field > span,
.surface-picker strong,
.logo-empty strong,
.control-row strong,
.control-row output,
.integration-title strong,
.logo-transform-title strong,
.toggle-copy strong,
.button-toggle small,
.effect-toggle strong,
.logo-alignment-heading strong,
.logo-file-copy strong,
.output-card-head strong,
.task-image-summary strong {
  font-size: 11px;
}

.inspector small,
.inspector p,
.model-control-row div > span,
.surface-picker span,
.logo-empty span,
.control-row > small,
.integration-title span:not(.integration-badge),
.logo-transform-title span,
.effect-toggle small,
.logo-alignment-heading small,
.compact-effect-toggle small,
.output-card-head > span,
.current-output-card p,
.task-name-field span,
.task-image-summary span,
.task-add-hint,
.placement-apply-feedback {
  font-size: 10px;
}

.alignment-badge,
.integration-badge {
  font-size: 9px;
}

@keyframes lock-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .app-bar {
    grid-template-columns: 190px minmax(140px, 1fr) auto;
    gap: 14px;
    padding: 0 14px;
  }

  .privacy-note,
  .stage-title span:last-child,
  .badge:first-child {
    display: none;
  }

  .studio {
    --inspector-width: 310px;
    grid-template-columns: 62px minmax(0, 1fr) var(--inspector-width);
  }

  .tool-rail {
    padding-inline: 6px;
  }

  .inspector-section,
  .inspector-head {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto;
  }

  .app-bar {
    min-height: 66px;
    grid-template-columns: 1fr auto;
  }

  .project-state {
    display: none;
  }

  .button-subtle {
    display: none;
  }

  .document-action-group .icon-only-button,
  #chooseImage.icon-only-button {
    display: inline-flex;
  }

  .studio {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: minmax(620px, 76vh) auto;
  }

  .inspector-resizer {
    display: none;
  }

  .tool-rail {
    grid-row: 1;
  }

  .stage-panel {
    grid-row: 1;
    border-right: 0;
  }

  .inspector {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .empty-state {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .empty-visual {
    width: min(420px, 92%);
    height: 210px;
    margin: auto;
  }

  .empty-copy {
    justify-items: center;
  }

  .instruction-float {
    max-width: calc(100% - 36px);
    bottom: 66px;
  }

  .canvas-shortcuts {
    display: none;
  }

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

  .inspector-head {
    grid-column: 1 / -1;
  }

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

@media (max-width: 620px) {
  .brand-copy small {
    display: none;
  }

  .app-actions .button {
    padding-inline: 11px;
  }

  .app-actions .button span:not(.button-glyph) {
    display: none;
  }

  .icon-only-button.document-action-button {
    width: 34px;
    min-width: 34px;
    padding-inline: 0;
  }

  .close-document-actions,
  .preset-actions-three {
    grid-template-columns: 1fr;
  }

  .language-switcher {
    min-width: 46px;
    padding-inline: 6px;
  }

  .language-switcher select {
    width: 32px;
  }

  .studio {
    grid-template-columns: 1fr;
    grid-template-rows: 58px minmax(560px, 72vh) auto;
  }

  .tool-rail {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    align-items: center;
    padding: 6px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-group {
    display: flex;
    gap: 6px;
  }

  .rail-label,
  .rail-help {
    display: none;
  }

  .rail-button {
    min-height: 42px;
    min-width: 70px;
    grid-template-columns: 20px auto;
    gap: 7px;
  }

  .rail-icon {
    width: 18px;
    height: 18px;
  }

  .target-icon::before {
    width: 24px;
    left: -4px;
    top: 7px;
  }

  .target-icon::after {
    height: 24px;
    top: -4px;
    left: 7px;
  }

  .stage-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .stage-head {
    padding-inline: 12px;
  }

  .stage-badges > span {
    display: none;
  }

  .empty-state {
    padding: 26px 18px;
  }

  .empty-visual {
    display: none;
  }

  .inspector {
    grid-column: 1;
    grid-row: 3;
    display: block;
  }

  .calibration-section {
    border-right: 0;
  }

  .view-dock {
    right: 10px;
    bottom: 12px;
  }

  .instruction-float {
    left: 10px;
    right: 10px;
    bottom: 62px;
    max-width: none;
  }
}

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