:root {
  color-scheme: light;
  --ink: #241912;
  --muted: rgba(36, 25, 18, 0.68);
  --line: rgba(76, 49, 26, 0.16);
  --panel: rgba(255, 251, 246, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --accent: #ff6b1a;
  --danger: #cb5140;
  --shadow: 0 20px 55px rgba(73, 46, 22, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body,
#app,
.app-shell,
.canvas-root,
.scene-canvas {
  width: 100%;
  height: 100%;
}

html,
body {
  margin: 0;
  overflow: hidden;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: #ffffff;
}

.app-shell {
  position: relative;
}

.canvas-root {
  position: absolute;
  inset: 0;
}

.scene-canvas {
  position: absolute;
  inset: 0;
  display: block;
}

.selection-marquee {
  position: absolute;
  display: none;
  border: 2px solid rgba(61, 125, 240, 0.9);
  background: rgba(61, 125, 240, 0.12);
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
}

.point-drag-ghost {
  position: fixed;
  display: none;
  transform: translate(-50%, -50%);
  opacity: 0.4;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(36, 25, 18, 0.08);
  background: rgba(255, 251, 246, 0.94);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(36, 25, 18, 0.14);
  pointer-events: none;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.toolbar {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(360px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding-right: 4px;
}

.toolbar-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-card h1,
.section-title h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.subtle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.asset-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.point-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--ink);
}

.field input[type="range"] {
  padding: 0;
}

.field input[type="color"] {
  min-height: 48px;
  padding: 6px;
}

.rotation-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rotation-controls input[type="range"] {
  flex: 1;
}

.rotation-controls input[type="number"] {
  width: 84px;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

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

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

.button-row-compact .button {
  width: 100%;
  min-width: 0;
  padding: 11px 7px;
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
}

.button,
.point-chip {
  border: 1px solid transparent;
  padding: 11px 15px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.button {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 700;
}

.point-chip {
  padding: 7px 2px 8px;
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(66, 43, 25, 0.62);
  font-weight: 700;
  cursor: grab;
}

.button:hover,
.point-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 26, 0.28);
}

.button-primary,
.point-chip.active {
  background: linear-gradient(135deg, #ff8b4c, var(--accent));
  color: white;
}

.point-chip.active {
  background: transparent;
  color: var(--ink);
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.point-chip:hover {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  border-bottom-color: rgba(255, 107, 26, 0.35);
  transform: none;
}

.point-chip.dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.point-chip.drop-target {
  color: var(--ink);
  border-bottom-color: rgba(36, 25, 18, 0.8);
}

.button-icon {
  min-width: 38px;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1;
 }

.button-danger {
  background: rgba(255, 241, 239, 0.95);
  color: var(--danger);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 240, 229, 0.95);
  color: #9b4b14;
  font-size: 12px;
  font-weight: 800;
}

.point-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 4px;
}

.asset-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.asset-swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(76, 49, 26, 0.12);
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.asset-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 26, 0.18);
}

@media (max-width: 720px) {
  .toolbar {
    top: 12px;
    left: 12px;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
  }

  .toolbar-card {
    padding: 14px;
    border-radius: 20px;
  }
}


.button-row-stack {
  display: flex;
  flex-direction: column;
}

.auth-card.is-locked {
  border-color: rgba(255, 107, 26, 0.28);
}
