@font-face {
  font-family: "FS Joey Pro";
  src: url("./assets/fonts/FS_JoeyPro.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FS Joey Pro";
  src: url("./assets/fonts/FS_JoeyPro-MediumRegular.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FS Joey Pro";
  src: url("./assets/fonts/FS_JoeyPro-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #eef0f3;
  --panel: rgba(249, 250, 251, 0.9);
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(146, 154, 165, 0.2);
  --line-strong: rgba(116, 124, 136, 0.3);
  --text: #241b16;
  --muted: #69717c;
  --accent: #e75a29;
  --accent-soft: rgba(109, 118, 128, 0.1);
  --accent-strong: #bf451b;
  --shadow: 0 8px 18px rgba(88, 94, 104, 0.16);
  --radius: 20px;
  --sidebar-width: 308px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(226, 231, 237, 0.85), transparent 32%),
    linear-gradient(180deg, #f8f9fb 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 10px 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 18px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 247, 250, 0.88) 100%);
  backdrop-filter: blur(18px);
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid rgba(160, 168, 178, 0.18);
}

.sidebar-resizer {
  position: relative;
  height: 100vh;
  cursor: col-resize;
  background: transparent;
  border-left: 1px solid rgba(160, 168, 178, 0.16);
  border-right: 1px solid rgba(160, 168, 178, 0.16);
}

.sidebar-resizer::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 52px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(150, 157, 167, 0.36);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.menu-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.brand-title,
.brand-subtitle,
.eyebrow,
.section-copy,
.field-hint,
.badge,
.detail-label,
.detail-value,
.summary-card,
.status-card {
  margin: 0;
}

.brand-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.05em;
  font-family: "FS Joey Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.panel-section {
  display: grid;
  gap: 12px;
  min-height: 0;
}

#catalog-panel,
#editor-panel {
  min-height: 0;
}

#catalog-panel {
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 20px;
  align-content: start;
}

#catalog-panel .section-heading {
  gap: 10px;
}

#catalog-panel h1 {
  font-size: 0.98rem;
  line-height: 1.12;
}

#catalog-panel .section-copy {
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 28ch;
}

#catalog-panel .filter-group {
  gap: 8px;
}

#catalog-panel .input-control {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 0.82rem;
}

#catalog-panel .editor-card {
  gap: 10px;
  padding: 16px 14px;
}

#catalog-panel .field-row {
  gap: 8px;
}

#catalog-panel .secondary-button {
  min-height: 34px;
}

.editor-sidebar-scroll {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 20px;
}

.section-heading {
  display: grid;
  gap: 7px;
}

.editor-card > .section-heading {
  position: relative;
  cursor: pointer;
  padding-right: 28px;
  padding-left: 26px;
}

.editor-card > .section-heading::after {
  content: "+";
  position: absolute;
  top: 2px;
  right: 0;
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}

.editor-card.is-expanded > .section-heading::after {
  content: "-";
}

.editor-card-handle {
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  cursor: grab;
}

.editor-card.is-dragging {
  opacity: 0.62;
}

.editor-card.drop-before {
  box-shadow:
    0 -2px 0 0 var(--accent),
    0 8px 18px rgba(88, 94, 104, 0.08);
}

.editor-card.drop-after {
  box-shadow:
    0 2px 0 0 var(--accent),
    0 8px 18px rgba(88, 94, 104, 0.08);
}

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
  font-family: "FS Joey Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.03em;
  font-weight: 700;
  font-family: "FS Joey Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

h1 {
  font-size: 1.12rem;
  line-height: 1.05;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.1;
}

.section-copy {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.84rem;
  max-width: 34ch;
}

.filter-group,
.field-block {
  display: grid;
  gap: 6px;
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 700;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-label-row .field-label {
  margin: 0;
}

.range-number {
  width: 68px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.1;
  text-align: right;
}

.range-number:focus {
  outline: none;
  border-color: rgba(231, 90, 41, 0.42);
  box-shadow: 0 0 0 3px rgba(231, 90, 41, 0.12);
}

.field-hint {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.field-hint.is-active {
  color: var(--accent);
}

.input-control {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-textarea {
  resize: vertical;
  min-height: 84px;
}

.input-control:focus,
.range-control:focus,
.color-control:focus,
.preset-button:focus,
.secondary-button:focus,
.top-action-button:focus,
.top-render-button:focus,
.layer-icon-button:focus,
.menu-button:focus {
  outline: none;
  border-color: rgba(231, 90, 41, 0.42);
  box-shadow: 0 0 0 3px rgba(231, 90, 41, 0.12);
}

.summary-card,
.status-card {
  padding: 10px 0 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  line-height: 1.5;
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-grid {
  display: grid;
  gap: 10px;
}

.editor-option-list {
  border-top: 1px solid var(--line);
}

.editor-option-list.compact .option-row {
  padding-left: 0;
  padding-right: 0;
}

.option-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 10px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.static-row {
  cursor: default;
}

.option-copy {
  display: grid;
  gap: 5px;
}

.option-label,
.option-value,
.option-arrow {
  display: block;
}

.option-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.option-value {
  color: var(--text);
  font-size: 0.98rem;
}

.option-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
}

.sidebar-primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: auto;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
  cursor: pointer;
}

.sidebar-primary-icon {
  font-size: 1rem;
  line-height: 1;
}

.editor-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 247, 250, 0.9) 100%);
  box-shadow: 0 8px 18px rgba(88, 94, 104, 0.08);
}

.editor-card:not(.is-expanded) > :not(.section-heading) {
  display: none;
}

.object-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.object-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.object-tree {
  position: relative;
  flex: 0 0 auto;
  width: calc(var(--object-depth, 0) * 14px);
  align-self: stretch;
}

.object-tree-branch {
  position: absolute;
  left: calc(100% - 10px);
  top: 0;
  bottom: 50%;
  width: 10px;
  border-left: 1px solid rgba(146, 154, 165, 0.45);
  border-bottom: 1px solid rgba(146, 154, 165, 0.45);
  border-bottom-left-radius: 8px;
}

.object-item-main {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.25;
}

.object-item.active .object-item-main {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.object-item-delete {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.object-item-visibility {
  min-width: 42px;
  height: 28px;
  padding: 0 8px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.object-item-visibility.is-off {
  color: var(--muted);
  background: rgba(241, 243, 246, 0.92);
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preset-row-four {
  grid-template-columns: repeat(4, 1fr);
}

.preset-button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.2;
}

.preset-button:hover,
.object-item-main:hover,
.object-item-delete:hover,
.object-item-visibility:hover {
  background: #f2f4f7;
}

.range-control {
  width: 100%;
  accent-color: var(--accent);
}

.color-control {
  width: 100%;
  min-height: 36px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.color-control-swatch {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 2px;
  border-radius: 10px;
}

.background-color-stack {
  display: grid;
  gap: 10px;
}

.field-divider {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.field-group-title {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.field-row-wrap {
  flex-wrap: wrap;
}

.layer-stack-list {
  display: grid;
  gap: 10px;
}

.layer-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(249, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.layer-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.layer-card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.layer-card-meta {
  margin: 2px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.layer-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layer-icon-button {
  width: 24px;
  height: 24px;
  border: 1px solid #dde4ec;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
}

.layer-icon-button:hover {
  background: #f2f4f7;
}

.layer-inline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.layer-inline-grid .field-label {
  font-size: 0.8rem;
}

.light-list {
  display: grid;
  gap: 10px;
}

.light-card {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.camera-list {
  display: grid;
  gap: 0;
}

.light-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.light-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.light-card-head {
  flex: 1 1 auto;
  min-width: 0;
}

.light-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.light-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.light-card-toggle {
  min-width: 52px;
  height: 24px;
  padding: 0 12px;
  border: 1px solid #dde4ec;
  border-radius: 999px;
  background: #fff;
  color: #8b97a6;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

.light-card-toggle:hover {
  background: #f2f4f7;
}

.light-card-toggle.is-on {
  border-color: rgba(231, 90, 41, 0.24);
  background: rgba(231, 90, 41, 0.12);
  color: var(--accent);
}

.light-card-remove {
  width: 24px;
  height: 24px;
  border: 1px solid #dde4ec;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.light-card-remove:hover {
  background: #f2f4f7;
  color: var(--text);
}

.light-card-grid {
  display: grid;
  gap: 8px;
}

.light-card-subgroup {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(240, 98, 43, 0.18);
  border-radius: 12px;
  background: rgba(240, 98, 43, 0.04);
}

.light-card-subgroup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.light-card-subgroup-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.light-card:not(.is-expanded) .light-card-grid {
  display: none;
}

.field-inline-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-inline-color .field-label {
  margin: 0;
}

.light-inline-color {
  width: 42px;
  min-width: 42px;
  min-height: 28px;
  padding: 2px;
  border-radius: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-label {
  color: var(--muted);
  font-size: 0.84rem;
}

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.primary-button,
.secondary-button,
.card-button {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.primary-button,
.secondary-button {
  padding: 5px 8px;
  font-size: 0.8rem;
  line-height: 1.2;
}

.input-control[type="file"] {
  padding: 6px 8px;
  font-size: 0.8rem;
}

.input-control[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.1;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid var(--line);
}

.primary-button:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent);
}

.secondary-button:hover,
.card-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.main-stage {
  padding: 12px 12px 12px 8px;
  height: 100vh;
  overflow: hidden;
}

.catalog-view,
.editor-view {
  display: grid;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.catalog-view {
  grid-template-rows: auto auto 1fr auto;
}

.editor-view {
  grid-template-rows: auto auto 1fr;
}

.toolbar,
.stage-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 8px 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 286px));
  gap: 14px;
  align-content: start;
  padding: 0 8px 8px;
  overflow-y: auto;
  min-height: 0;
}

.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 8px 8px;
}

.catalog-pagination-button,
.catalog-pagination-label {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.78rem;
}

.catalog-pagination-button {
  cursor: pointer;
}

.catalog-pagination-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.catalog-pagination-button.is-active {
  border-color: rgba(231, 90, 41, 0.28);
  color: var(--accent);
}

.model-card {
  display: grid;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.model-preview {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 18px rgba(88, 94, 104, 0.1);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.model-preview:hover {
  transform: translateY(-1px);
  border-color: rgba(231, 90, 41, 0.28);
  box-shadow: 0 10px 20px rgba(88, 94, 104, 0.14);
}

.model-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-meta {
  display: grid;
  gap: 6px;
}

.card-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.model-title {
  margin: 0;
  font-size: 1rem;
}

.model-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
}

.chip-link {
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.chip-link:hover {
  border-color: rgba(231, 90, 41, 0.28);
  background: #f2f4f7;
  color: var(--accent);
}

.card-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent);
  font-weight: 700;
  border: 1px solid rgba(231, 90, 41, 0.24);
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(88, 94, 104, 0.08);
}

.card-delete-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.96);
  color: #b23c20;
  font-weight: 700;
  border: 1px solid rgba(178, 60, 32, 0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(88, 94, 104, 0.06);
  cursor: pointer;
}

.empty-state {
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  color: var(--muted);
}

.viewer-shell {
  position: relative;
  min-height: calc(100vh - 88px);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(241, 244, 247, 0.96)),
    linear-gradient(180deg, #ffffff 0%, #eef2f6 100%);
  border: 1px solid rgba(160, 168, 178, 0.26);
  box-shadow: 0 12px 26px rgba(88, 94, 104, 0.14);
  overflow: hidden;
}

#viewer-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  z-index: 3;
}

.loading-card {
  width: min(380px, calc(100% - 48px));
  padding: 24px 24px 22px;
  border: 1px solid #dde4ec;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.loading-label,
.loading-title,
.loading-text {
  margin: 0;
}

.loading-label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loading-title {
  margin-top: 8px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.loading-track {
  margin-top: 18px;
  height: 10px;
  border-radius: 999px;
  background: #e1e5ea;
  overflow: hidden;
}

.loading-bar {
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e75a29 0%, #ff8b5e 100%);
  transition: width 0.22s ease;
}

.loading-text {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.viewer-overlay {
  position: absolute;
  inset: 16px 14px 14px 14px;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  pointer-events: none;
}

.standalone-build-version {
  font-size: 0.78rem;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.standalone-build-version-toolbar {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 2px;
}

.object-context-menu {
  position: absolute;
  min-width: 152px;
  max-width: 196px;
  padding: 9px;
  border: 1px solid rgba(160, 168, 178, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(88, 94, 104, 0.14);
  z-index: 6;
}

.object-context-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.object-context-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.object-context-close {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.object-context-actions {
  display: grid;
  gap: 5px;
}

.object-context-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 10px;
  background: rgba(247, 248, 250, 0.92);
  color: var(--text);
  font-size: 0.73rem;
}

.object-context-color {
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.object-context-color:disabled {
  opacity: 0.46;
  cursor: default;
}

.object-context-groups {
  display: grid;
  gap: 8px;
}

.object-context-group {
  display: grid;
  gap: 4px;
}

.object-context-group + .object-context-group {
  padding-top: 8px;
  border-top: 1px solid rgba(160, 168, 178, 0.16);
}

.object-context-action {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 10px;
  background: rgba(247, 248, 250, 0.92);
  color: var(--text);
  text-align: left;
  font-size: 0.73rem;
  cursor: pointer;
}

.object-context-action:hover,
.object-context-close:hover {
  background: #f2f4f7;
}

.object-context-action:disabled {
  opacity: 0.46;
  cursor: default;
}

.object-context-action-danger {
  color: #b23c20;
}

.control-dock {
  display: grid;
  gap: 0;
  align-self: center;
  justify-items: center;
  transform: translateX(-20px);
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(160, 168, 178, 0.22);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.dock-button {
  width: 34px;
  height: 30px;
  border: 0;
  border-bottom: 1px solid rgba(160, 168, 178, 0.18);
  background: transparent;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.dock-button:hover,
.dock-arrow:hover,
.dock-center:hover,
.top-action-button:hover {
  background: #f2f4f7;
}

.dock-button.is-active {
  background: rgba(231, 90, 41, 0.12);
  color: var(--accent);
}

.dock-compass {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 0 8px;
}

.dock-middle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dock-arrow,
.dock-center {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem;
  cursor: pointer;
}

.dock-center {
  color: #9eb0c8;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-module-slot {
  display: contents;
}

.user-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-log-button {
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(160, 168, 178, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
}

.module-panel-slot {
  display: grid;
}

.admin-file-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}

.user-shell {
  position: relative;
}

.user-shell-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 196px;
  min-height: 44px;
  padding: 6px 10px 6px 8px;
  border: 1px solid rgba(160, 168, 178, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(114, 120, 130, 0.1);
}

.user-shell-button:focus {
  outline: none;
  border-color: rgba(231, 90, 41, 0.42);
  box-shadow: 0 0 0 3px rgba(231, 90, 41, 0.12);
}

.user-shell-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(231, 90, 41, 0.16) 0%, rgba(231, 90, 41, 0.28) 100%);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.user-shell-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
  flex: 1;
}

.user-shell-name {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-shell-role {
  font-size: 0.69rem;
  line-height: 1.1;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.user-shell-caret {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
}

.user-shell-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, 86vw);
  padding: 14px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 26px rgba(88, 94, 104, 0.18);
  display: grid;
  gap: 12px;
  z-index: 12;
}

.user-shell-menu.hidden {
  display: none !important;
}

.user-shell-card {
  display: grid;
  gap: 3px;
}

.user-shell-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
}

.user-shell-company,
.user-shell-email,
.user-shell-plan {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.35;
}

.user-shell-fullname {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
}

.user-shell-actions {
  display: grid;
  gap: 8px;
}

.user-shell-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 12px;
  background: rgba(247, 248, 250, 0.96);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
}

.user-shell-action::after {
  content: "Soon";
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.user-shell-note {
  margin: 0;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.user-log-modal-card {
  width: min(860px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.user-log-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.user-log-entry {
  padding: 12px 14px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 14px;
  background: rgba(247, 248, 250, 0.96);
}

.user-log-entry + .user-log-entry {
  margin-top: 12px;
}

.user-log-entry-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.user-log-entry-level,
.user-log-entry-time {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.user-log-entry-message {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}

.user-log-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.top-action-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(160, 168, 178, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  font-size: 1.2rem;
  cursor: pointer;
}

.top-utility-button {
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(160, 168, 178, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.top-action-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.top-render-button {
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(135deg, #e75a29 0%, #f57a3b 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(114, 120, 130, 0.18);
  font-size: 0.88rem;
}

.top-utility-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.top-render-button:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent);
  box-shadow: none;
}

.stage-status {
  margin: 0 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(61, 67, 76, 0.22);
  z-index: 20;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: min(560px, 100%);
  padding: 28px 34px 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(88, 94, 104, 0.18);
}

.admin-model-modal-card {
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px 40px;
}

.admin-file-picker-card {
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.admin-file-picker-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.admin-file-picker-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.admin-file-picker-item.is-active {
  border-color: rgba(231, 90, 41, 0.28);
  color: var(--accent);
}

.admin-tag-picker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-tag-picker-item {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
}

.admin-tag-picker-item.is-active {
  border-color: rgba(231, 90, 41, 0.28);
  color: var(--accent);
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-actions-admin {
  justify-content: flex-end;
}

.modal-action-button {
  min-height: 46px;
  min-width: 112px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}

.modal-title,
.modal-section-title {
  margin: 0;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.modal-section {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.radio-option {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  cursor: pointer;
}

.radio-option input {
  grid-row: span 2;
  width: 20px;
  height: 20px;
  margin: 0;
}

.radio-option span {
  font-weight: 600;
}

.radio-option small {
  color: var(--muted);
  font-size: 0.82rem;
}

.radio-option-static input {
  pointer-events: none;
}

.checkbox-option-list {
  display: grid;
  gap: 10px;
}

.checkbox-option {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  cursor: pointer;
}

.checkbox-option input {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkbox-option span {
  font-weight: 600;
}

.checkbox-option small {
  color: var(--muted);
  font-size: 0.82rem;
}

.render-pass-option {
  position: relative;
  padding-right: 34px;
}

.render-pass-option.is-rendered::after {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}

#render-modal .modal-card {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 20px 24px 22px;
}

#render-modal .modal-header,
#render-modal .modal-actions {
  gap: 12px;
}

#render-modal .modal-title {
  font-size: 0.98rem;
}

#render-modal .modal-section {
  gap: 10px;
  margin-top: 18px;
}

#render-modal .modal-section-title {
  font-size: 0.88rem;
}

#render-modal .radio-option,
#render-modal .checkbox-option {
  column-gap: 10px;
}

#render-modal .radio-option span,
#render-modal .checkbox-option span {
  font-size: 0.92rem;
}

#render-modal .radio-option small,
#render-modal .checkbox-option small {
  font-size: 0.76rem;
  line-height: 1.35;
}

#render-modal .checkbox-option-list {
  gap: 8px;
}

#render-modal .render-option-grid {
  display: grid;
  gap: 8px 14px;
}

#render-modal .render-option-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#render-modal .modal-actions {
  margin-top: 20px;
}

@media (max-width: 640px) {
  #render-modal .render-option-grid-two {
    grid-template-columns: 1fr;
  }
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 30px;
}

.landing-page {
  overflow: auto;
  background: linear-gradient(180deg, #f5f6f8 0%, #eceff3 100%);
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 48px 28px;
}

.landing-hero,
.landing-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(160, 168, 178, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(88, 94, 104, 0.12);
}

.landing-title {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 12ch;
}

.landing-copy {
  max-width: 56ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.landing-actions {
  margin-top: 20px;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  text-decoration: none;
}

.converter-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.converter-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.converter-viewer-shell {
  min-height: calc(100vh - 148px);
}

.converter-stat-card {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 88px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.converter-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-details {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.role-chooser-card {
  width: min(520px, calc(100vw - 48px));
}

.standalone-welcome-card {
  width: min(980px, calc(100vw - 48px));
}

.standalone-welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.standalone-welcome-copy-column .section-copy {
  max-width: none;
  margin: 0;
}

.standalone-welcome-captcha-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.standalone-welcome-captcha-column .field-block {
  margin: 0;
}

.standalone-welcome-captcha-block {
  margin-top: 10px;
}

.standalone-welcome-actions {
  margin-top: auto;
  justify-content: flex-end;
}

.captcha-status-box {
  min-height: 22px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(38, 44, 54, 0.14);
  border-radius: 10px;
  background: rgba(244, 246, 249, 0.92);
  color: #4d5562;
}

.editor-device-gate-card {
  width: min(520px, calc(100vw - 48px));
}

.role-chooser-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #dde4ec;
  }

  .viewer-shell {
    min-height: 560px;
  }

  .standalone-welcome-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sidebar,
  .main-stage {
    padding: 0;
  }

  .field-row,
  .toolbar,
  .stage-toolbar {
    flex-direction: column;
  }

  .viewer-shell {
    min-height: 420px;
  }

  .viewer-overlay {
    inset: 16px;
    justify-content: flex-end;
    align-items: flex-end;
  }

  .reset-fab {
    transform: none;
    top: auto;
    bottom: 200px;
    right: 12px;
  }
}
