:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --line: #d9e2ec;
  --accent: #0b6e4f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, #ffffff 0%, var(--bg) 45%, #e7edf2 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
  height: 100vh;
  overflow: hidden;
}

.app {
  width: min(1700px, 100vw);
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 16px;
  height: 100vh;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.accordion-section {
  padding: 0;
  overflow: visible;
  border: 1px solid #cbd5df;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(31, 41, 51, 0.06);
}

.accordion-section + .accordion-section {
  margin-top: 12px;
}

.accordion-header {
  padding: 9px 12px;
  background: #edf2f7;
  border-bottom: 1px solid #cbd5df;
  border-radius: 10px 10px 0 0;
  color: #243b53;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  text-transform: uppercase;
}

.accordion-content {
  padding: 12px;
  background: #ffffff;
  overflow: visible;
}

h1,
h2 {
  margin: 0 0 8px;
}

h1 {
  font-size: 1.2rem;
}

h2 {
  font-size: 1rem;
}

.subtitle {
  margin: 0 0 12px;
  color: #6b7c8f;
  font-size: 0.84rem;
  line-height: 1.35;
}

.section-label {
  margin: 14px 0 8px;
  color: #1f2933;
  font-size: 0.86rem;
  font-weight: 700;
}

.file-input {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.input-block {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fbfdff;
}

.input-block + .input-block {
  margin-top: 10px;
}

.input-block-title {
  color: #243b53;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-file-action,
.secondary-file-action {
  width: 100%;
  margin: 0;
}

.primary-file-action span,
.secondary-file-action span {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
}

.primary-file-action span {
  padding: 10px 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.secondary-file-action span {
  padding: 8px 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: #ffffff;
  font-weight: 700;
}

.input-status-card,
.scale-readout {
  border: 1px solid #e4ecf3;
  border-radius: 8px;
  background: #ffffff;
}

.input-status-card {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}

.input-status-label {
  color: #6b7c8f;
  font-size: 0.72rem;
}

.input-status-card strong {
  color: #243b53;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scale-readout {
  padding: 7px 9px;
  color: #52606d;
  font-size: 0.82rem;
}

.scale-readout strong {
  color: #102a43;
}

.input-native-control {
  display: none;
}

.input-stepper {
  display: grid;
  gap: 7px;
}

.input-stepper-label {
  color: #52606d;
  font-size: 0.76rem;
  font-weight: 800;
}

.input-stepper-row {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 6px;
}

.input-stepper-row button {
  min-height: 36px;
  padding: 0;
}

.input-stepper-row span,
.input-stepper-row .numeric-readout-input {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #ffffff;
  color: #102a43;
  font-size: 0.88rem;
  font-weight: 800;
}

.input-stepper-row .numeric-readout-input,
.sculpt-stepper-row .numeric-readout-input,
.inline-numeric-input {
  width: 100%;
  text-align: center;
  font: inherit;
  appearance: textfield;
}

.input-stepper-row .numeric-readout-input:focus,
.inline-numeric-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.12);
  outline: none;
}

.numeric-readout-input::-webkit-outer-spin-button,
.numeric-readout-input::-webkit-inner-spin-button,
.inline-numeric-input::-webkit-outer-spin-button,
.inline-numeric-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.inline-numeric-input {
  min-height: 34px;
  margin-top: 6px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #ffffff;
  color: #102a43;
  font-size: 0.88rem;
  font-weight: 800;
}

.input-project-actions {
  grid-template-columns: 1fr 1fr;
  align-items: end;
}

.input-project-actions .input-block-title {
  grid-column: 1 / -1;
}

.left-column {
  position: sticky;
  top: 0;
  height: calc(100vh - 32px);
  overflow-y: auto;
  padding-right: 6px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.right-column {
  min-width: 0;
  height: calc(100vh - 32px);
}

.relief-quality-indicator {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #f8fafc;
  color: #1f2937;
}

.relief-quality-indicator.is-good {
  border-color: #16a34a;
  color: #166534;
  background: #f0fdf4;
}

.relief-quality-indicator.is-warning {
  border-color: #d97706;
  color: #92400e;
  background: #fffbeb;
}

.relief-quality-indicator.is-weak {
  border-color: #dc2626;
  color: #991b1b;
  background: #fef2f2;
}

.relief-volume-inspector.is-collapsed {
  display: none;
}

.preview-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.preview-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 10px;
  max-width: 100%;
}

.preview-header h2 {
  margin: 0;
  flex: 0 0 auto;
}

.preview-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.preview-toolbar {
  padding: 4px;
  border: 1px solid rgba(188, 204, 220, 0.55);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.05);
}

.preview-toolbar span {
  padding: 0 4px;
}

.preview-help-links {
  display: flex;
  gap: 10px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.preview-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #2c3e50;
  background: #18222d;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.preview-help-btn:hover {
  background: #223140;
}

.mesh-material-control {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 126px;
}

.mesh-material-control select {
  min-width: 126px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #bcccdc;
  background: #f8fafc;
  color: #243b53;
  padding: 0 8px;
}

.preview-toggle {
  display: inline-flex;
  gap: 6px;
}

.preview-native-control {
  display: none;
}

.preview-toolbar {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 6px;
}

.preview-toolbar span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.preview-toolbar button {
  border-color: #bcccdc;
  background: #f7fafc;
  color: #334e68;
}

.preview-toolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.relief-volume-inspector {
  display: grid;
  grid-template-columns: repeat(3, auto);
  flex: 0 1 auto;
  gap: 2px 6px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #bcccdc;
  border-radius: 8px;
  background: #f8fafc;
  color: #334e68;
  font-size: 0.62rem;
  line-height: 1.15;
  max-width: 100%;
  min-width: 0;
}

.relief-volume-inspector strong {
  grid-column: 1 / -1;
  color: #102a43;
  font-size: 0.7rem;
}

.relief-volume-inspector b {
  color: #102a43;
  font-weight: 700;
}

.preview-mode-btn {
  background: #f7fafc;
  color: #334e68;
  border: 1px solid #bcccdc;
}

.preview-mode-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

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

.circular-grid {
  margin-top: 4px;
}

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

.text-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 8px 0 10px;
  padding: 4px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f7fafc;
}

.text-tab {
  min-height: 34px;
  padding: 6px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #52606d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.text-tab.is-active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(16, 42, 67, 0.08);
}

.text-tab-panel {
  display: none;
}

.text-tab-panel.is-active {
  display: grid;
  gap: 8px;
}

.text-block {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fbfdff;
}

.text-block + .text-block,
#text-controls .text-block + .text-block {
  margin-top: 10px;
}

#text-controls {
  display: grid;
  gap: 8px;
}

.text-mode-select {
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  color: #102a43;
  font-weight: 700;
}

.text-shape-toggle,
.text-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.text-mode-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.text-shape-toggle button,
.text-mode-row button {
  min-height: 34px;
  padding: 6px;
  border-color: #bcccdc;
  background: #f7fafc;
  color: #334e68;
  font-size: 0.78rem;
}

.text-shape-toggle button.active,
.text-mode-row button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.text-layout-native-controls {
  display: none;
}

.position-size-controls,
.position-control {
  display: grid;
  gap: 10px;
}

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

.position-button-row button {
  min-height: 34px;
  padding: 6px;
  border-color: #bcccdc;
  background: #f7fafc;
  color: #334e68;
  font-size: 0.78rem;
}

.position-button-row button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.text-advanced {
  display: none;
  gap: 8px;
  padding: 9px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fbfdff;
}

.text-advanced.is-active {
  display: grid;
}

.circular-native-controls {
  display: none;
}

.circular-ux-controls {
  display: grid;
  gap: 10px;
}

.circular-control {
  display: grid;
  gap: 7px;
}

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

.circular-button-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.circular-button-row button {
  min-height: 34px;
  padding: 6px;
  border-color: #bcccdc;
  background: #f7fafc;
  color: #334e68;
  font-size: 0.78rem;
}

.circular-button-row button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.text-native-effect-control {
  display: none;
}

.text-effect-stepper {
  display: grid;
  gap: 7px;
}

#text-op-buttons {
  margin-top: 10px;
}

#text-op-buttons button {
  min-height: 40px;
  font-weight: 700;
}

#add-text-op {
  box-shadow: 0 6px 14px rgba(11, 110, 79, 0.16);
}

.asset-tools {
  display: grid;
  gap: 10px;
}

.asset-tools label {
  display: block;
  margin-bottom: 6px;
}

.asset-block {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fbfdff;
}

.asset-file-action {
  width: 100%;
  margin: 0;
}

.asset-file-action span {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.asset-native-control {
  display: none !important;
}

.asset-library-clean {
  display: grid;
  gap: 7px;
}

.asset-library-clean select {
  min-height: 36px;
  border: 1px solid #bcccdc;
  border-radius: 8px;
  background: #ffffff;
  color: #243b53;
  padding: 0 8px;
}

.asset-position-control {
  display: grid;
  gap: 7px;
}

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

.asset-mode-row button {
  min-height: 34px;
  padding: 6px;
  border-color: #bcccdc;
  background: #f7fafc;
  color: #334e68;
}

.asset-mode-row button.active,
.asset-mode-row button:disabled.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.asset-mode-row button:disabled {
  opacity: 0.45;
}

#asset-auto-match-toggle {
  min-height: 36px;
  border-color: #bcccdc;
  background: #f7fafc;
  color: #334e68;
  font-weight: 700;
}

#asset-auto-match-toggle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

#insert-border-library-op {
  min-height: 40px;
  font-weight: 700;
}

.asset-check {
  justify-content: center;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}

input[type="text"],
select,
input[type="range"] {
  width: 100%;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.stack-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.stack-item.selected {
  border-color: var(--accent);
  background: #edf7f3;
}

.preview-viewport {
  position: relative;
  flex: 1;
  min-height: 420px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0f1720;

  display: flex;
  align-items: center;
  justify-content: center;
}

#preview-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  background: #0f1720;
  object-fit: contain;
}

.mesh-preview-host {
  position: absolute;
  inset: 0;
  background: #080c12;
  overflow: hidden;
}

.sculpt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.perceptual-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0.7;
  z-index: 4;
}

.sculpt-brush-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
  border: 1.5px solid rgba(96, 214, 255, 0.95);
  background: rgba(96, 214, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(6, 15, 24, 0.35) inset,
    0 0 12px rgba(96, 214, 255, 0.18);
}

.sculpt-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 180px;
  background: rgba(15, 20, 30, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 220, 255, 0.2);
  border-radius: 10px;
  padding: 10px;
  color: #fff;
  pointer-events: all;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sculpt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.sculpt-panel label {
  font-size: 0.75rem;
}
.mesh-preview-host canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.mesh-preview-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  pointer-events: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: #f8fbff;
  backdrop-filter: blur(3px);
  background: rgba(10, 13, 18, 0.62);
  border: 1px solid rgba(190, 204, 220, 0.45);
}

.mesh-preview-overlay.is-refining {
  background: rgba(11, 110, 79, 0.3);
  border-color: rgba(121, 233, 194, 0.55);
}

.mesh-preview-overlay.is-warning {
  background: rgba(140, 79, 7, 0.3);
  border-color: rgba(249, 185, 104, 0.58);
}

.mesh-preview-message {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #d9e2ec;
  background: linear-gradient(180deg, #0b0f16 0%, #111a27 100%);
  font-size: 0.95rem;
}

#status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.app.sculpt-mode {
  grid-template-columns: minmax(0, 1fr) 300px;
  width: 100vw;
  padding: 0;
  background: #070b10;
}

.app.sculpt-mode .left-column {
  display: none;
}

.app.sculpt-mode .right-column {
  height: 100vh;
  grid-column: 1 / -1;
}

.app.sculpt-mode .preview-panel {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #070b10;
  overflow: hidden;
}

.app.sculpt-mode .preview-header {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
  right: 314px;
  min-height: 54px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(180, 200, 220, 0.28);
  border-radius: 12px;
  background: rgba(9, 13, 19, 0.78);
  backdrop-filter: blur(8px);
  color: #f8fbff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.app.sculpt-mode .preview-header h2 {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.app.sculpt-mode .preview-controls {
  gap: 8px;
}

.app.sculpt-mode .preview-controls label,
.app.sculpt-mode .mesh-material-control {
  color: #d9e2ec;
}

.app.sculpt-mode .preview-controls select,
.app.sculpt-mode .mesh-material-control select {
  border-color: rgba(190, 204, 220, 0.38);
  background: rgba(248, 250, 252, 0.12);
  color: #f8fbff;
}

.app.sculpt-mode .preview-mode-btn {
  border-color: rgba(190, 204, 220, 0.38);
  background: rgba(248, 250, 252, 0.12);
  color: #f8fbff;
}

.app.sculpt-mode .preview-mode-btn.is-active,
.app.sculpt-mode .preview-toolbar button.active,
.app.sculpt-mode #toggle-sculpt-mode {
  background: #19a77b;
  border-color: #19a77b;
  color: #ffffff;
}

.app.sculpt-mode .preview-toolbar span {
  color: #d9e2ec;
}

.app.sculpt-mode .preview-toolbar button {
  border-color: rgba(190, 204, 220, 0.38);
  background: rgba(248, 250, 252, 0.12);
  color: #f8fbff;
}

.app.sculpt-mode #preview-canvas,
.app.sculpt-mode .mesh-preview-host {
  width: calc(100vw - 300px);
  height: calc(100vh - 78px);
  min-height: calc(100vh - 78px);
  margin: 78px 0 0;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle at 50% 35%, #172232 0%, #0a0f17 58%, #05070a 100%);
}

.app.sculpt-mode .sculpt-overlay {
  z-index: 5;
}

.app.sculpt-mode .sculpt-panel {
  top: 0;
  right: 0;
  bottom: auto;
  width: 300px;
  height: 100vh;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 18px 14px 14px;
  border-radius: 0;
  background: rgba(10, 14, 20, 0.88);
  border-width: 0 0 0 1px;
  border-color: rgba(190, 204, 220, 0.3);
  overflow-y: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.app.sculpt-mode .sculpt-header {
  align-self: stretch;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.app.sculpt-mode .sculpt-header strong {
  color: #f8fbff;
  font-size: 0.95rem;
}

.app.sculpt-mode .sculpt-panel label {
  min-width: 0;
}

.app.sculpt-mode .sculpt-native-control {
  display: none;
}

.sculpt-toolbar,
.sculpt-nav-mode,
.sculpt-stepper,
.sculpt-presets {
  display: grid;
  gap: 7px;
}

.sculpt-nav-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app.sculpt-mode .nav-gizmo,
.app.sculpt-mode .zoom-controls {
  display: none !important;
}

.sculpt-stepper-label {
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 700;
}

.sculpt-stepper-row,
.sculpt-tool-row,
.sculpt-preset-row {
  display: grid;
  gap: 6px;
}

.sculpt-stepper-row {
  grid-template-columns: 38px 1fr 38px;
}

.sculpt-preset-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sculpt-tool-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sculpt-stepper-row span,
.sculpt-stepper-row .numeric-readout-input {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(190, 204, 220, 0.28);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.08);
  color: #f8fbff;
  font-size: 0.88rem;
  font-weight: 700;
}

.sculpt-stepper-row .numeric-readout-input:focus {
  border-color: rgba(125, 211, 252, 0.75);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
  outline: none;
}

.app.sculpt-mode .sculpt-preset-row button.is-active,
.app.sculpt-mode .sculpt-tool-row button.active,
.app.sculpt-mode .sculpt-nav-mode button.active {
  background: #19a77b;
  border-color: #19a77b;
  color: #ffffff;
}

.app.sculpt-mode .sculpt-panel select,
.app.sculpt-mode .sculpt-panel input[type="range"] {
  accent-color: #19a77b;
}

.app.sculpt-mode .sculpt-panel button {
  min-height: 36px;
  border-color: rgba(190, 204, 220, 0.38);
  background: rgba(248, 250, 252, 0.1);
  color: #f8fbff;
}

.app.sculpt-mode .sculpt-header button {
  width: 100%;
  background: rgba(231, 76, 60, 0.18);
  border-color: rgba(255, 135, 120, 0.48);
}

.app.sculpt-mode .nav-gizmo,
.app.sculpt-mode .zoom-controls {
  margin: 0;
}

.app.sculpt-mode .nav-pad {
  height: 62px;
}


.nav-pad {
  width: 100%;
  height: 90px;
  margin-top: 6px;
  border-radius: 10px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.22) 0 8px, transparent 9px),
    linear-gradient(90deg, transparent 48%, rgba(255,255,255,0.25) 49%, rgba(255,255,255,0.25) 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(255,255,255,0.25) 49%, rgba(255,255,255,0.25) 51%, transparent 52%),
    rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  cursor: grab;
  touch-action: none;
}

.zoom-controls {
  margin-top: 10px;
}

.zoom-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.zoom-buttons button {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 0;
}

/* =========================================================
   Web Preview locked Local-Pro features
   ========================================================= */

.web-preview-locked,
button.web-preview-locked,
select.web-preview-locked,
input.web-preview-locked {
  opacity: 0.42;
  filter: grayscale(1);
  cursor: not-allowed;
}

button.web-preview-locked,
.sculpt-toolbar button.web-preview-locked,
.sculpt-presets button.web-preview-locked,
.sculpt-stepper button.web-preview-locked {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.06);
}

button.web-preview-locked:hover,
select.web-preview-locked:hover,
input.web-preview-locked:hover {
  opacity: 0.55;
}

.web-preview-sculpt-note {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 193, 7, 0.45);
  border-radius: 10px;
  background: rgba(255, 193, 7, 0.08);
  color: #f3d27a;
  font-size: 0.82rem;
  line-height: 1.35;
}

.web-preview-export-note {
  padding: 10px 12px;
  border: 1px solid rgba(25, 167, 123, 0.42);
  border-radius: 10px;
  background: rgba(25, 167, 123, 0.1);
  color: #c9f7e8;
  font-size: 0.82rem;
  line-height: 1.35;
}

.sculpt-panel #protected-export-btn:not(:disabled) {
  opacity: 1;
  filter: none;
  cursor: pointer;
  background: rgba(248, 250, 252, 0.12);
  border-color: rgba(190, 204, 220, 0.5);
  color: #f8fbff;
}

.sculpt-panel #export-btn:not(:disabled) {
  opacity: 1;
  filter: none;
  cursor: pointer;
  background: #1927a7;
  border-color: #1938a7;
  color: #ffffff;
}

/* =========================================================
   Unlock clean export modal
   ========================================================= */

.unlock-flow-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.unlock-flow-overlay.hidden {
  display: none;
}

.unlock-flow-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.unlock-flow-card h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.unlock-flow-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.unlock-flow-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1rem;
}

.unlock-flow-action,
.unlock-flow-close {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border-radius: 10px;
  font-weight: 800;
}

.unlock-flow-action {
  border: 1px solid #19a77b;
  background: #19a77b;
  color: #ffffff;
}

.unlock-flow-close {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
}

.unlock-flow-status {
  min-height: 20px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.06);
}

.unlock-flow-status:empty {
  display: none;
}

.unlock-flow-status[data-state="loading"] {
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(37, 99, 235, 0.14);
}

.unlock-flow-status[data-state="error"] {
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(185, 28, 28, 0.16);
}

.unlock-flow-status[data-state="success"] {
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(22, 101, 52, 0.18);
}

.unlock-flow-action:disabled {
  opacity: 0.72;
  cursor: wait;
}

/* Active protected export button override */
.app.sculpt-mode .sculpt-panel #protected-export-btn:not(:disabled) {
  opacity: 1 !important;
  filter: none !important;
  cursor: pointer;
  background: #334e68 !important;
  border-color: #7b8794 !important;
  color: #ffffff !important;
}
