:root {
  color-scheme: dark;
  --bg: #1a1a1e;
  --panel: #232328;
  --panel-2: #2a2a30;
  --panel-3: #303038;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f0f0f0;
  --muted: #9a9aa0;
  --brand-lime: #c8e636;
  --brand-green: #6ee67a;
  --brand-lime-rgb: 200, 230, 54;
  --brand-green-rgb: 110, 230, 122;
  --accent: var(--brand-lime);
  --accent-2: var(--brand-green);
  --accent-ink: #171a10;
  --tech-accent: #74c7f1;
  --danger: #ff6b7a;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.studio-shell {
  --material-rail-width: 156px;
  --control-panel-width: 390px;
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(132px, var(--material-rail-width)) minmax(420px, 1fr)
    minmax(360px, var(--control-panel-width));
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.panel-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 7;
  width: 9px;
  cursor: col-resize;
  touch-action: none;
}

.panel-resizer::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 4px;
  width: 1px;
  border-radius: 999px;
  background: rgba(var(--brand-lime-rgb), 0.12);
  opacity: 0;
  transition:
    opacity 0.16s ease,
    background 0.16s ease;
}

.panel-resizer:hover::before,
.panel-resizer:focus-visible::before,
body.resizing-panels .panel-resizer::before {
  background: rgba(var(--brand-lime-rgb), 0.55);
  opacity: 1;
}

.panel-resizer:focus-visible {
  outline: 0;
}

.panel-resizer-left {
  left: calc(var(--material-rail-width) - 4px);
}

.panel-resizer-right {
  right: calc(var(--control-panel-width) - 5px);
}

body.resizing-panels {
  cursor: col-resize;
  user-select: none;
}

.viewport {
  position: relative;
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  background: #121820;
}

.viewport.background-off {
  background-color: #07090d;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
}

#viewerCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.view-gizmo {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  width: 98px;
  height: 98px;
  opacity: 0.82;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.view-gizmo:hover,
.view-gizmo:focus-within {
  opacity: 1;
}

.view-gizmo-action,
.view-cube-face {
  appearance: none;
  cursor: pointer;
  pointer-events: auto;
}

.view-cube-face {
  border: 1px solid rgba(225, 234, 244, 0.22);
  color: rgba(244, 248, 252, 0.86);
  background: rgba(12, 16, 21, 0.48);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.view-gizmo-action {
  position: absolute;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(232, 242, 246, 0.24);
  border-radius: 999px;
  color: rgba(245, 251, 255, 0.9);
  background: rgba(10, 16, 18, 0.2);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.view-gizmo-action:hover {
  border-color: rgba(var(--brand-lime-rgb), 0.5);
  color: #f9ffe7;
  background: rgba(10, 18, 20, 0.36);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.16),
    0 0 16px rgba(var(--brand-lime-rgb), 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.view-cube-face:hover {
  border-color: rgba(108, 211, 255, 0.58);
  color: #ffffff;
  background: rgba(38, 64, 82, 0.62);
}

.view-gizmo-action:focus-visible,
.view-cube-face:focus-visible {
  outline: 2px solid rgba(108, 211, 255, 0.76);
  outline-offset: 2px;
}

.view-gizmo-fit {
  top: 4px;
  right: 7px;
}

.view-gizmo-rotate-left {
  left: 4px;
  top: 58px;
}

.view-gizmo-rotate-right {
  right: 4px;
  top: 58px;
}

.view-gizmo-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
  opacity: 0.96;
}

.view-gizmo-icon path {
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
}

.view-cube-wrap {
  position: absolute;
  left: 28px;
  top: 30px;
  width: 48px;
  height: 48px;
  perspective: 220px;
  pointer-events: none;
}

.view-cube {
  --gizmo-yaw: -40deg;
  --gizmo-pitch: -26deg;
  position: relative;
  width: 46px;
  height: 46px;
  transform: rotateX(var(--gizmo-pitch)) rotateY(var(--gizmo-yaw));
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
  pointer-events: auto;
}

.view-cube-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 2px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  backface-visibility: hidden;
}

.view-cube-front {
  background: rgba(42, 48, 55, 0.78);
  transform: translateZ(23px);
}

.view-cube-back {
  background: rgba(28, 33, 39, 0.78);
  transform: rotateY(180deg) translateZ(23px);
}

.view-cube-left {
  background: rgba(34, 39, 46, 0.82);
  transform: rotateY(-90deg) translateZ(23px);
}

.view-cube-right {
  background: rgba(34, 39, 46, 0.82);
  transform: rotateY(90deg) translateZ(23px);
}

.view-cube-top {
  background: rgba(78, 86, 94, 0.82);
  transform: rotateX(90deg) translateZ(23px);
}

.view-cube-bottom {
  background: rgba(24, 28, 34, 0.82);
  transform: rotateX(-90deg) translateZ(23px);
}

.export-format-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 3;
  display: flex;
  max-width: calc(100% - 32px);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px;
  border: 1px solid rgba(139, 159, 179, 0.22);
  border-radius: 7px;
  background: rgba(8, 12, 16, 0.58);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.export-format-bar::-webkit-scrollbar {
  display: none;
}

.export-format-bar button {
  min-height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c7d2dd;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
}

.export-format-bar button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.export-format-bar button.active {
  background: rgba(var(--brand-lime-rgb), 0.16);
  color: #f9ffe2;
  box-shadow: inset 0 0 0 1px rgba(var(--brand-lime-rgb), 0.22);
}

.export-divider {
  width: 1px;
  margin: 4px 4px;
  background: rgba(139, 159, 179, 0.24);
  flex: 0 0 auto;
}

.output-size-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px 0 2px;
  color: #9eb0bf;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
}

.output-size-controls input {
  width: 58px;
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(139, 159, 179, 0.24);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #e7eef5;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.output-size-controls input:disabled,
.export-png-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.export-format-bar .export-png-button {
  color: #eef7d8;
  box-shadow: inset 0 0 0 1px rgba(var(--brand-lime-rgb), 0.18);
}

.viewport-stats {
  position: absolute;
  top: 17px;
  right: 16px;
  z-index: 5;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.viewport-stats-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(154, 174, 191, 0.28);
  border-radius: 999px;
  background: rgba(8, 12, 16, 0.62);
  color: #d7e2ea;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.viewport-stats-button:hover,
.viewport-stats-button[aria-expanded="true"] {
  border-color: rgba(var(--brand-lime-rgb), 0.52);
  background: rgba(18, 25, 20, 0.8);
  color: var(--brand-lime);
}

.viewport-stats-button:focus-visible {
  outline: 2px solid rgba(var(--brand-lime-rgb), 0.7);
  outline-offset: 2px;
}

.viewport-stats-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.viewport-stats-panel {
  width: 174px;
  padding: 10px 11px;
  border: 1px solid rgba(154, 174, 191, 0.24);
  border-radius: 7px;
  background: rgba(8, 12, 16, 0.9);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.viewport-stats-panel.hidden {
  display: none;
}

.viewport-stats-heading {
  margin-bottom: 7px;
  color: #eaf2f7;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewport-stats-panel dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.viewport-stats-panel dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.viewport-stats-panel dt {
  color: #8293a0;
  font-size: 10px;
}

.viewport-stats-panel dd {
  margin: 0;
  color: #eff6f9;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

.safe-frame-overlay {
  --frame-left: 10%;
  --frame-top: 10%;
  --frame-width: 80%;
  --frame-height: 80%;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.safe-frame-overlay.hidden {
  display: none;
}

.social-guide-hud {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  width: min(560px, calc(100% - 36px));
  padding: 8px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.32);
  border-radius: 8px;
  background: rgba(8, 12, 16, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.social-guide-hud.hidden {
  display: none;
}

.social-guide-hud-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.social-guide-hud-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.social-guide-hud-copy strong {
  overflow: hidden;
  color: #f2fbff;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-guide-hud-copy span:last-child {
  overflow: hidden;
  color: #9eb0bf;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-guide-hud button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.social-guide-step-pill {
  min-width: 54px;
  border-color: rgba(var(--brand-lime-rgb), 0.28);
  background: rgba(var(--brand-lime-rgb), 0.12);
  color: #f2ffd6;
  cursor: default;
}

.social-guide-primary {
  min-width: 74px;
  border-color: rgba(var(--brand-green-rgb), 0.4);
  background: rgba(var(--brand-green-rgb), 0.16);
  color: #e5fff0;
}

.social-guide-close {
  min-width: 32px;
  border-color: rgba(255, 107, 122, 0.32);
  background: rgba(255, 107, 122, 0.1);
  color: #ffdfe3;
}

.safe-mask {
  position: absolute;
  background: rgba(3, 6, 9, 0.34);
}

.safe-mask-top {
  top: 0;
  left: 0;
  width: 100%;
  height: var(--frame-top);
}

.safe-mask-right {
  top: var(--frame-top);
  right: 0;
  width: calc(100% - var(--frame-left) - var(--frame-width));
  height: var(--frame-height);
}

.safe-mask-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(100% - var(--frame-top) - var(--frame-height));
}

.safe-mask-left {
  top: var(--frame-top);
  left: 0;
  width: var(--frame-left);
  height: var(--frame-height);
}

.safe-frame-box {
  position: absolute;
  left: var(--frame-left);
  top: var(--frame-top);
  width: var(--frame-width);
  height: var(--frame-height);
  border: 1px solid rgba(230, 241, 250, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(6, 10, 14, 0.34),
    0 0 0 1px rgba(6, 10, 14, 0.22);
}

.safe-frame-box::before,
.safe-frame-box::after {
  content: "";
  position: absolute;
  opacity: 0.32;
}

.safe-frame-box::before {
  left: 33.333%;
  top: 0;
  width: 33.333%;
  height: 100%;
  border-left: 1px solid rgba(230, 241, 250, 0.38);
  border-right: 1px solid rgba(230, 241, 250, 0.38);
}

.safe-frame-box::after {
  left: 0;
  top: 33.333%;
  width: 100%;
  height: 33.333%;
  border-top: 1px solid rgba(230, 241, 250, 0.38);
  border-bottom: 1px solid rgba(230, 241, 250, 0.38);
}

.drop-hint {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 3px;
  width: min(280px, calc(100% - 36px));
  padding: 10px 34px 10px 12px;
  border: 1px solid rgba(101, 216, 255, 0.2);
  border-radius: 5px;
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
}

.onboarding-card {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100% - 36px));
  padding: 18px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.22);
  border-radius: 8px;
  background: rgba(8, 12, 16, 0.7);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.onboarding-card.hidden {
  display: none;
}

.onboarding-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.onboarding-card strong {
  max-width: 360px;
  color: #f7fbff;
  font-size: 22px;
  line-height: 1.08;
}

.onboarding-card p {
  margin: 0;
  color: #aebac6;
  font-size: 12px;
  line-height: 1.45;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.onboarding-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #92a1ae;
}

.onboarding-close:hover {
  color: #f5fbff;
  background: rgba(255, 255, 255, 0.06);
}

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

.drop-hint span {
  font-size: 12px;
  line-height: 1.3;
}

.drop-hint span,
.hint {
  color: var(--muted);
}

.hint-close {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 20px;
  min-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.hint-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.drop-hint.hidden {
  display: none;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 9, 13, 0.56);
  backdrop-filter: blur(3px);
  z-index: 4;
}

.loading-overlay.hidden {
  display: none;
}

.loader-card {
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 32, 0.94);
  text-align: center;
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 4px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #26313e;
}

.progress-bar {
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 180ms ease;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100vh;
  min-width: 360px;
  min-height: 0;
  padding: 18px;
  border-left: 1px solid #252c34;
  background: linear-gradient(180deg, #11151a, #0d1116);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.material-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100vh;
  min-width: 132px;
  min-height: 0;
  padding: 14px 10px;
  border-right: 1px solid #252c34;
  background: linear-gradient(180deg, #101418, #0b0f14);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.smooth-facets-controls {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.smooth-facets-controls.is-disabled .field {
  opacity: 0.48;
}

.file-menu {
  position: relative;
  z-index: 5;
}

.file-menu-button {
  width: 100%;
  min-height: 28px;
  justify-content: flex-start;
  padding: 0 10px;
  border-color: #2b333d;
  background: #151a20;
  color: #e6edf4;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.file-menu-button::after {
  content: "";
  float: right;
  width: 0;
  height: 0;
  margin-top: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9eb0bf;
}

.file-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  padding: 6px;
  border: 1px solid #303943;
  border-radius: 6px;
  background: rgba(13, 17, 22, 0.97);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

.file-menu-panel.hidden {
  display: none;
}

.turnaround-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.turnaround-tools button {
  min-height: 28px;
  justify-content: center;
  padding: 0 10px;
  border-color: #2b333d;
  background: #151a20;
  color: #d7e0e8;
  font-size: 12px;
  font-weight: 700;
}

.turnaround-tools button[aria-pressed="true"] {
  border-color: rgba(var(--brand-lime-rgb), 0.52);
  background: rgba(var(--brand-lime-rgb), 0.14);
  color: #f8ffe6;
}

.turnaround-tools button:disabled {
  cursor: default;
  opacity: 0.58;
}

.turnaround-download {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border: 1px solid rgba(var(--brand-green-rgb), 0.34);
  border-radius: 4px;
  background: rgba(var(--brand-green-rgb), 0.1);
  color: #d9ffe9;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.turnaround-download.hidden {
  display: none;
}

.social-export-panel {
  gap: 9px;
}

.social-export-presets {
  display: grid;
  gap: 6px;
}

.social-preset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid #2b333d;
  border-radius: 6px;
  background: rgba(18, 23, 29, 0.72);
  cursor: pointer;
}

.social-preset-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  cursor: pointer;
}

.social-preset-main input {
  margin: 0;
}

.social-preset-main span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.social-preset strong {
  color: #edf4fb;
  font-size: 12px;
}

.social-preset small {
  color: #91a0ad;
  font-size: 11px;
}

.social-preset-count {
  width: 100%;
  min-width: 0;
  padding: 4px 5px;
  text-align: center;
}

.social-guide-status {
  min-height: 34px;
  padding: 8px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.2);
  border-radius: 6px;
  background: rgba(var(--brand-lime-rgb), 0.055);
  color: #c8d6e2;
  font-size: 11px;
  line-height: 1.35;
}

.social-guide-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.social-guide-actions button {
  min-width: 0;
  min-height: 28px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 750;
}

.cinematic-panel {
  gap: 9px;
}

.cinematic-ease-title {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.mini-toggle-button {
  min-height: 20px;
  padding: 0 7px;
  border-color: rgba(var(--brand-lime-rgb), 0.28);
  border-radius: 999px;
  background: rgba(var(--brand-lime-rgb), 0.1);
  color: #f2ffd6;
  font-size: 10px;
  font-weight: 850;
}

.mini-toggle-button[aria-pressed="false"] {
  border-color: rgba(var(--brand-green-rgb), 0.32);
  background: rgba(var(--brand-green-rgb), 0.1);
  color: #e2ffed;
}

.cinematic-ease-advanced {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.18);
  border-radius: 6px;
  background: rgba(var(--brand-lime-rgb), 0.045);
}

.cinematic-ease-advanced.hidden,
.cinematic-ease-linked.hidden {
  display: none;
}

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

.cinematic-toolbar button {
  min-width: 0;
  min-height: 28px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 750;
}

.cinematic-dof-drawer {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.18);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(var(--brand-lime-rgb), 0.07), rgba(var(--brand-lime-rgb), 0.03)),
    rgba(12, 16, 21, 0.62);
}

.cinematic-dof-drawer summary {
  cursor: pointer;
  color: #e9f5ff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cinematic-dof-drawer[open] {
  display: grid;
  gap: 8px;
}

.compact-toggle {
  min-height: 22px;
  font-size: 11px;
}

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

.cinematic-focus-actions button {
  min-width: 0;
  min-height: 26px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 760;
}

.cinematic-focus-actions button[aria-pressed="true"] {
  border-color: rgba(var(--brand-lime-rgb), 0.55);
  background: rgba(var(--brand-lime-rgb), 0.14);
  color: #f8ffe6;
}

.wide-button {
  width: 100%;
  margin-top: 4px;
}

.compact-field {
  gap: 5px;
  font-size: 11px;
}

.cinematic-shot-list {
  display: grid;
  gap: 6px;
}

.cinematic-shot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid #2b333d;
  border-radius: 6px;
  background: rgba(18, 23, 29, 0.78);
}

.cinematic-shot.active {
  border-color: rgba(var(--brand-lime-rgb), 0.5);
  background: rgba(var(--brand-lime-rgb), 0.085);
}

.cinematic-shot-main {
  min-width: 0;
}

.cinematic-shot-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #eef5fb;
  font-size: 12px;
  font-weight: 800;
}

.cinematic-shot-meta {
  margin-top: 3px;
  color: #91a0ad;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.cinematic-shot-actions {
  display: flex;
  gap: 4px;
}

.cinematic-shot-actions button {
  min-width: 28px;
  min-height: 26px;
  padding: 0 7px;
  font-size: 11px;
}

.cinematic-empty {
  padding: 8px;
  border: 1px dashed #34404a;
  border-radius: 6px;
  color: #8997a4;
  font-size: 11px;
  text-align: center;
}

.file-menu-panel button,
.file-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #d7e0e8;
  font-size: 12px;
  text-align: left;
}

.file-menu-panel button:hover,
.file-menu-item:hover {
  background: rgba(var(--brand-lime-rgb), 0.1);
  color: #f8ffe6;
}

.autosave-status {
  margin: 4px 4px 2px;
  padding: 6px 8px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  color: #8794a1;
  font-size: 10px;
  line-height: 1.35;
}

.file-menu-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--line-soft);
}

.file-menu-heading {
  padding: 2px 8px 5px;
  color: #7f8c99;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recent-scenes {
  display: grid;
  gap: 2px;
}

.recent-scenes span {
  padding: 5px 8px;
  color: #7f8c99;
  font-size: 11px;
}

.recent-scenes button {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wax-controls {
  display: grid;
  gap: 9px;
  margin-top: 2px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}

.wax-controls input[type="color"] {
  width: 100%;
  height: 24px;
}

.rail-field input[type="color"] {
  width: 100%;
  height: 24px;
  padding: 1px;
}

.light-field .field-header {
  align-items: center;
}

.light-field input[type="color"] {
  width: 28px;
  height: 22px;
}

.rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  color: #f5f7fa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.material-popover.hidden {
  display: none;
}

.material-popover {
  position: absolute;
  left: 12px;
  top: 96px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(6, 82px);
  gap: 6px;
  max-width: min(560px, calc(100vw - var(--control-panel-width) - 32px));
  padding: 9px;
  border: 1px solid #2f3943;
  border-radius: 5px;
  background: rgba(18, 20, 23, 0.96);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.material-preset-custom {
  border-style: dashed;
}

.current-material {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 132px;
  padding: 12px 8px;
  color: #f2f7fb;
  font-size: 12px;
  font-weight: 800;
}

.material-orb {
  width: 78px;
  height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 32% 22%,
      rgba(255, 255, 255, 0.78),
      transparent 0 18%,
      rgba(255, 255, 255, 0.08) 42%,
      transparent 64%
    ),
    var(--swatch);
  box-shadow:
    inset 0 -22px 30px rgba(0, 0, 0, 0.3),
    0 12px 24px rgba(0, 0, 0, 0.22);
}

.material-preset {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 72px;
  padding: 7px 5px;
  text-align: center;
  color: #c7d1dc;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

.material-preset.active,
.material-preset[aria-pressed="true"] {
  border-color: rgba(var(--brand-lime-rgb), 0.68);
  background: rgba(var(--brand-lime-rgb), 0.09);
  color: #f8ffe6;
}

.popover-orb {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 32% 25%,
      rgba(255, 255, 255, 0.72),
      transparent 0 22%,
      rgba(255, 255, 255, 0.08) 42%,
      transparent 62%
    ),
    var(--swatch);
  box-shadow: inset 0 -10px 15px rgba(0, 0, 0, 0.28);
}

.material-orb-textured {
  background:
    radial-gradient(
      circle at 32% 25%,
      rgba(255, 255, 255, 0.72),
      transparent 0 22%,
      rgba(255, 255, 255, 0.08) 42%,
      transparent 62%
    ),
    repeating-linear-gradient(35deg, rgba(255, 255, 255, 0.12) 0 2px, rgba(0, 0, 0, 0.1) 2px 5px), var(--swatch);
}

.rail-field {
  gap: 5px;
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}

.brand {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.brand-link {
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}

.brand-link:hover .brand-logo,
.brand-link:focus-visible .brand-logo {
  box-shadow:
    0 0 0 1px rgba(var(--brand-lime-rgb), 0.34),
    0 0 24px rgba(var(--brand-lime-rgb), 0.28);
}

.brand-link:focus-visible {
  outline: 2px solid rgba(var(--brand-lime-rgb), 0.55);
  outline-offset: 4px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(var(--brand-lime-rgb), 0.16);
}

.brand span {
  background: linear-gradient(135deg, var(--brand-lime), var(--brand-green));
  background-clip: text;
  color: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand h1 {
  margin: 6px 0 8px;
  font-size: 23px;
  line-height: 1;
}

.control-panel-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.studio-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px;
  border: 1px solid rgba(120, 136, 148, 0.14);
  border-radius: 4px;
  background: rgba(10, 14, 18, 0.32);
  color: #73818d;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-decoration: none;
  text-transform: uppercase;
}

.studio-version span {
  background: none;
  color: #66727d;
  font-size: 8px;
  letter-spacing: 0;
  text-transform: none;
}

.studio-version:hover {
  border-color: rgba(var(--brand-lime-rgb), 0.22);
  background: rgba(var(--brand-lime-rgb), 0.04);
  color: #9fb0bd;
}

.account-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.18);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(var(--brand-lime-rgb), 0.055), rgba(var(--brand-green-rgb), 0.035)),
    rgba(8, 12, 16, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.account-card.is-unavailable {
  border-color: rgba(120, 136, 148, 0.18);
  background: rgba(8, 12, 16, 0.62);
}

.account-card-top,
.account-plan-row,
.account-plan-actions,
.account-signin-row {
  display: grid;
  gap: 8px;
}

.account-card-top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.account-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #edf7ff;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-upgrade {
  min-height: 24px;
  padding: 0 8px;
  border-color: rgba(var(--brand-green-rgb), 0.36);
  background: rgba(var(--brand-green-rgb), 0.09);
  color: #e9ffe9;
  font-size: 10px;
}

.account-plan-row {
  grid-template-columns: 1fr auto;
  color: #aab8c5;
  font-size: 10px;
}

.account-help {
  margin: -2px 0 0;
  color: #97a7b4;
  font-size: 10px;
  line-height: 1.35;
}

.account-plan-row span:first-child {
  color: #f4ffd9;
  font-weight: 800;
}

.account-plan-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.account-plan-actions button {
  min-height: 26px;
  padding: 0 6px;
  border-color: rgba(124, 146, 162, 0.32);
  background: rgba(16, 24, 32, 0.86);
  color: #cad7e1;
  font-size: 9px;
  white-space: nowrap;
}

.account-plan-actions button:hover {
  border-color: rgba(var(--brand-lime-rgb), 0.4);
  color: #f2ffd8;
}

.account-card.is-checkout-paused .account-plan-actions button,
.account-plan-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.account-card.is-checkout-paused .account-plan-actions button:hover,
.account-plan-actions button:disabled:hover {
  border-color: rgba(124, 146, 162, 0.32);
  color: #cad7e1;
}

.account-plan-actions button[data-checkout-plan="pro_yearly"] {
  border-color: rgba(var(--brand-lime-rgb), 0.42);
  background: rgba(var(--brand-lime-rgb), 0.08);
  color: #f5ffd7;
}

.account-card[data-plan="pro"] .account-plan-actions,
.account-card[data-plan="lifetime"] .account-plan-actions {
  display: none;
}

.account-plan-actions.hidden {
  display: none;
}

.account-signin-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.account-signin-row input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #303943;
  border-radius: 4px;
  background: #0d1218;
  color: #e9f2fb;
  font: inherit;
  font-size: 11px;
}

.account-signin-row input:focus {
  border-color: rgba(var(--brand-lime-rgb), 0.58);
  outline: 0;
}

.account-signin-row button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 10px;
}

.account-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.account-auth-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.account-auth-links.hidden {
  display: none;
}

.account-auth-links a {
  min-height: 28px;
  padding: 0 8px;
  font-size: 10px;
  text-decoration: none;
}

.account-card.is-signed-in .account-signin-row {
  grid-template-columns: 1fr;
}

.account-card.is-signed-in #accountEmail,
.account-card.is-signed-in #accountPassword,
.account-card.is-signed-in .account-auth-actions,
.account-card.is-signed-in .account-auth-links {
  display: none;
}

.account-card.is-signed-in .account-help {
  display: none;
}

.account-message {
  margin: 0;
  color: #9cafbd;
  font-size: 10px;
  line-height: 1.35;
}

.account-message.hidden,
.account-signin-row .hidden {
  display: none;
}

.brand p,
.hint {
  margin: 0;
  line-height: 1.45;
}

.action-stack,
.panel,
.field {
  display: grid;
  gap: 10px;
}

.panel {
  position: relative;
}

.primary-button,
.secondary-button,
button,
select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid #303943;
  border-radius: 4px;
  background: #1a2027;
  color: #e5edf4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.primary-button {
  border-color: rgba(var(--brand-lime-rgb), 0.62);
  background: linear-gradient(135deg, var(--brand-lime), var(--brand-green));
  color: var(--accent-ink);
  font-weight: 700;
  min-height: 34px;
  box-shadow: 0 8px 24px rgba(var(--brand-lime-rgb), 0.12);
}

.accent-button {
  border-color: rgba(var(--brand-green-rgb), 0.5);
  background: linear-gradient(180deg, rgba(55, 126, 68, 0.96), rgba(30, 78, 54, 0.96));
  color: #f6ffe4;
}

.accent-button:hover {
  border-color: rgba(var(--brand-lime-rgb), 0.72);
  background: linear-gradient(180deg, rgba(77, 148, 72, 0.98), rgba(38, 103, 61, 0.98));
}

.secondary-button {
  color: #d8e4c2;
  background: #151a20;
}

button:hover,
.secondary-button:hover,
select:hover {
  border-color: #557084;
  background: #202832;
}

button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--brand-lime-rgb), 0.08);
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.is-pro-locked {
  position: relative;
}

button.is-pro-locked::after,
.secondary-button.is-pro-locked::after,
.primary-button.is-pro-locked::after {
  content: attr(data-pro-badge);
  margin-left: 6px;
  color: var(--brand-lime);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel.is-pro-locked,
.social-export-panel.is-pro-locked,
.unwrap-panel.is-pro-locked {
  border-color: rgba(var(--brand-lime-rgb), 0.22);
}

.panel.is-pro-locked::before,
.social-export-panel.is-pro-locked::before,
.unwrap-panel.is-pro-locked::before {
  content: "Pro";
  position: absolute;
  top: 9px;
  right: 10px;
  color: var(--brand-lime);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid #252d35;
  border-radius: 5px;
  background: rgba(4, 7, 11, 0.28);
}

.settings-tabs button {
  min-height: 27px;
  padding: 0 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #8f9daa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-tabs button:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #dbe5ee;
}

.settings-tabs button.active,
.settings-tabs button[aria-pressed="true"] {
  background: #1a2027;
  color: #f8ffe3;
  box-shadow: inset 0 0 0 1px rgba(var(--brand-lime-rgb), 0.2);
}

.settings-tab-panel {
  display: none;
  gap: 10px;
}

.settings-tab-panel.active {
  display: grid;
}

.panel {
  padding: 12px;
  border: 1px solid #28313a;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-title h2 {
  margin: 0;
  color: #f5f7fa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-title {
  margin-top: 4px;
}

.ghost-button {
  min-height: 24px;
  padding: 0 8px;
  color: #b4c1cc;
  background: #171d24;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.look-preset-grid button {
  min-height: 28px;
  padding: 0 8px;
  justify-content: flex-start;
  color: #d9e3ec;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), #151b22;
  font-size: 11px;
  font-weight: 750;
}

.look-preset-grid button:hover {
  border-color: rgba(var(--brand-lime-rgb), 0.44);
  background: rgba(var(--brand-lime-rgb), 0.08);
}

.look-preset-grid button.active,
.look-preset-grid button[aria-pressed="true"] {
  color: #faffea;
  border-color: rgba(var(--brand-lime-rgb), 0.58);
  background: rgba(var(--brand-lime-rgb), 0.14);
}

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

.custom-look-section.hidden {
  display: none;
}

.mini-section-title {
  color: #8f9daa;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-look-grid button {
  border-style: dashed;
  color: #c8d4dd;
}

.preset-edit-row {
  display: grid;
  margin-top: 8px;
}

.preset-edit-row .secondary-button {
  min-height: 28px;
  font-size: 11px;
}

.library-panel {
  gap: 12px;
}

.library-status,
.library-empty {
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

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

.library-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.library-section-title h3 {
  margin: 0;
  color: #f4f7fb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.library-section-title span {
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.18);
  border-radius: 999px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

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

.library-item {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #28313a;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.008)), #11171e;
}

.library-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: #0b1016;
}

.library-item-title {
  overflow: hidden;
  color: #eef4f8;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

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

.library-actions button {
  min-height: 26px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 800;
}

.field {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.field-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.field-header span:last-child {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.numeric-value {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.numeric-value input {
  width: 46px;
  min-height: 20px;
  padding: 0 4px;
  border: 1px solid rgba(var(--brand-lime-rgb), 0.18);
  border-radius: 3px;
  background: rgba(12, 16, 21, 0.62);
  color: var(--accent);
  font: inherit;
  text-align: right;
  appearance: textfield;
}

.numeric-value input:focus {
  outline: none;
  border-color: rgba(var(--brand-lime-rgb), 0.62);
  background: rgba(var(--brand-lime-rgb), 0.08);
}

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

.toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 16px;
}

input[type="color"] {
  width: 34px;
  height: 26px;
  padding: 2px;
  border: 1px solid #303943;
  border-radius: 4px;
  background: #151a20;
  cursor: pointer;
}

.color-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
}

.color-row span {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid #28313a;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  color: #c2ccd6;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

select {
  width: 100%;
  padding: 0 12px;
  color: var(--text);
  background: #1b2027;
}

.status-pill,
.model-info {
  padding: 11px;
  border: 1px solid #28313a;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.viewport.pick-focus {
  cursor: crosshair;
}

.viewport.pick-focus .drop-hint {
  border-color: var(--accent);
}

.transform-drawer {
  display: block;
}

.transform-drawer summary {
  cursor: pointer;
  color: #f5f7fa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.transform-drawer[open] {
  display: grid;
  gap: 12px;
}

.transform-stack {
  display: grid;
  gap: 7px;
}

.axis-row {
  display: grid;
  gap: 5px;
  align-items: center;
  font-size: 13px;
}

.rotate-row {
  grid-template-columns: 16px 24px minmax(44px, 1fr) 24px 36px 36px;
}

.move-row {
  grid-template-columns: 16px 26px minmax(0, 1fr) 26px;
}

.axis {
  font-weight: 800;
  text-align: center;
}

.x-axis {
  color: #ff6b7a;
}

.y-axis {
  color: #34df74;
}

.z-axis {
  color: #6c8dff;
}

.axis-row button,
.scale-row button {
  min-height: 23px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 11px;
  background: #171d24;
}

.axis-row input,
.scale-row input {
  width: 100%;
  min-height: 23px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #20262d;
  color: var(--text);
  font-size: 11px;
  text-align: center;
}

.transform-drawer .control-row {
  gap: 8px;
  margin-top: 2px;
}

.transform-drawer .control-row button {
  min-height: 28px;
  font-size: 12px;
}

.scale-row {
  display: grid;
  grid-template-columns: 36px 58px minmax(44px, 1fr) 58px;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.scale-row span {
  color: var(--muted);
}

.model-info {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.035);
  overflow-wrap: anywhere;
}

.info-muted {
  color: var(--muted);
}

.info-warning {
  color: #ffd28a;
}

@media (max-width: 1120px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(390px, 72svh) auto auto;
    height: auto;
    overflow: visible;
  }

  .panel-resizer {
    display: none;
  }

  .viewport {
    order: 1;
    height: 72svh;
    min-height: 390px;
    max-height: 760px;
  }

  .material-rail {
    order: 2;
    height: auto;
    min-width: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .material-popover {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 86px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .view-gizmo {
    top: 62px;
    left: 12px;
    transform: scale(0.86);
    transform-origin: top left;
  }

  .onboarding-card {
    top: 54%;
    padding: 14px;
    gap: 8px;
  }

  .onboarding-card strong {
    font-size: 18px;
  }

  .onboarding-actions {
    grid-template-columns: 1fr;
  }

  .export-format-bar {
    top: 10px;
    max-width: calc(100% - 20px);
  }

  .social-guide-hud {
    bottom: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% - 20px);
  }

  .social-guide-hud-copy {
    grid-column: 1 / -1;
  }

  .social-guide-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-panel {
    order: 3;
    height: auto;
    min-width: 0;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ===================== UV Unwrap feature ===================== */
.unwrap-panel .uw-auto {
  width: 100%;
  margin: 4px 0 8px;
  cursor: pointer;
}
.unwrap-panel .uw-auto:disabled {
  opacity: 0.55;
  cursor: default;
}

.uw-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 8px;
  margin: 4px 0 8px;
}

.uw-action-row .uw-auto {
  margin: 0;
}

.uw-cancel:disabled {
  opacity: 0.42;
  cursor: default;
}

.uw-busy {
  font-size: 11px;
  color: #7cf6ff;
  letter-spacing: 0.04em;
}

.uw-stats {
  font-size: 12px;
  line-height: 1.45;
  color: #aebaccc0;
  background: rgba(124, 246, 255, 0.06);
  border: 1px solid rgba(124, 246, 255, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.uw-tool-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ea0b6;
  margin: 2px 0 6px;
}

.uw-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.uw-tool {
  font-size: 12px;
  padding: 7px 4px;
  border-radius: 8px;
  border: 1px solid rgba(150, 168, 190, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: #d6deea;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.uw-tool:hover {
  border-color: rgba(150, 168, 190, 0.55);
}
.uw-tool.active {
  border-color: #7cf6ff;
  box-shadow: 0 0 0 1px #7cf6ff inset;
  background: rgba(124, 246, 255, 0.12);
}
.uw-tool.uw-blue {
  border-color: rgba(60, 120, 255, 0.5);
}
.uw-tool.uw-blue-hard {
  border-color: rgba(40, 90, 255, 0.85);
  color: #aac3ff;
}
.uw-tool.uw-red {
  border-color: rgba(255, 90, 70, 0.5);
}
.uw-tool.uw-red-hard {
  border-color: rgba(255, 60, 40, 0.85);
  color: #ffb3a8;
}

/* 2D atlas overlay */
.uw-atlas-wrap {
  position: absolute;
  right: 14px;
  bottom: 64px;
  width: 320px;
  min-width: 220px;
  max-width: min(720px, calc(100vw - var(--control-panel-width) - 64px));
  min-height: 260px;
  max-height: min(760px, calc(100vh - 130px));
  overflow: auto;
  resize: both;
  background: rgba(8, 12, 18, 0.86);
  border: 1px solid rgba(124, 246, 255, 0.22);
  border-radius: 12px;
  padding: 8px;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 6;
}
.uw-atlas-wrap.hidden {
  display: none;
}
.uw-atlas-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7cf6ff;
  margin: 2px 4px 6px;
}

.uw-atlas-title button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 4px;
  color: #a8b5c2;
  font-size: 13px;
}

.uw-atlas-title button:hover {
  color: #f4fbff;
  background: rgba(255, 255, 255, 0.08);
}

#uwAtlas {
  width: 100%;
  height: calc(100% - 34px);
  min-height: 190px;
  display: block;
  border-radius: 8px;
  image-rendering: auto;
}

/* UV Unwrap: mode line, stronger active tool, progress meta */
.uw-tool.active {
  background: rgba(124, 246, 255, 0.22);
  box-shadow: 0 0 0 2px #7cf6ff inset;
  color: #eafdff;
  font-weight: 600;
}
.uw-mode {
  font-size: 11.5px;
  color: #8ea0b6;
  margin: -2px 0 10px;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(150, 168, 190, 0.18);
}
.uw-mode-paint {
  color: #d6e6ff;
  background: rgba(124, 246, 255, 0.12);
  border-color: rgba(124, 246, 255, 0.4);
}
.uw-progress-meta {
  font-size: 12px;
  color: #7cf6ff;
  letter-spacing: 0.03em;
}

/* UV Unwrap: undo/redo row */
.uw-history-row button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* UV Unwrap: Paint master toggle */
.uw-paint-toggle {
  width: 100%;
  margin: 2px 0 10px;
  padding: 9px 4px;
  border-radius: 9px;
  border: 1px solid rgba(150, 168, 190, 0.32);
  background: rgba(255, 255, 255, 0.04);
  color: #d6deea;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s,
    color 0.15s;
}
.uw-paint-toggle:hover {
  border-color: rgba(150, 168, 190, 0.6);
}
.uw-paint-toggle.active {
  border-color: #6ef0a6;
  color: #0c1117;
  background: linear-gradient(180deg, #8af3b8, #57e29a);
  box-shadow:
    0 0 0 1px #6ef0a6 inset,
    0 4px 16px rgba(87, 226, 154, 0.25);
}

/* UV Unwrap: the studio has no generic .hidden rule, so scope it for the
   inline "calculating" badge (it was always visible otherwise). */
.uw-busy.hidden {
  display: none;
}
