/* Floating instruments share a charcoal shell and double-ring controls. */
.lab-spread[data-mode="floating"] .lab-workspace {
  min-height: 660px;
}
.lab-tool {
  --float-ink: #f1f0f4;
  --float-muted: #b3b3b8;
  --float-purple: #7948ea;
  --float-teal: #00a596;
  background: #181819;
  color: var(--float-ink);
  border: 2px solid #0b0b0c;
  border-radius: 17px;
  box-shadow:
    inset 0 0 0 2px #3b3b3e,
    0 2px 0 #626264,
    0 14px 30px #0005;
  padding: 7px;
  backdrop-filter: none;
}
.lab-tool button {
  font-family: inherit;
}
.lab-tool button:focus-visible {
  outline: 2px solid #c1a6ff;
  outline-offset: 3px;
}
.lab-tool .lab-drag-handle {
  padding: 0;
  border: 0;
  gap: 5px;
  height: 36px;
}
.float-title-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  height: 36px;
  padding-right: 7px;
  position: relative;
  overflow: hidden;
  border: 2px solid #080809;
  border-radius: 22px;
  background: linear-gradient(100deg, #252527, #3c3c3e);
  box-shadow:
    inset 0 0 0 1px #555558,
    0 1px 0 #49494b;
}
.float-title-pill strong {
  font-size: 12px;
  white-space: nowrap;
  z-index: 1;
}
.float-title-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid #090909;
  border-radius: 50%;
  background: linear-gradient(135deg, #49494b, #252526);
  box-shadow:
    inset 0 0 0 1px #666669,
    1px 0 1px #090909;
  color: #dfdce6;
}
.float-title-icon svg {
  width: 18px;
  height: 18px;
}
/* InfHeartOS title texture: vertical seamless scroll, one tile per 4.6s. */
.float-title-pattern {
  position: absolute;
  inset: 0 0 0 56%;
  pointer-events: none;
  background: url("../../assets/floating-pattern.png") repeat;
  background-size: 96px 96px;
  background-position: -9.6px 0;
  mask-image: linear-gradient(50deg, transparent 20%, #0000001a 30%, #000 70%);
  animation: float-title-scroll 4.6s linear infinite;
}
@keyframes float-title-scroll {
  to {
    background-position: -9.6px 96px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .float-title-pattern {
    animation: none;
  }
}
.float-title-pill .lab-grip {
  margin-left: auto;
  color: #aaa9af;
  font-size: 14px;
  z-index: 1;
}
.lab-tool .lab-drag-handle button {
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  border: 3px solid #101012;
  border-radius: 50%;
  color: #fff;
  background: #d63e70;
  box-shadow:
    0 0 0 1px #505054,
    inset 0 1px 1px #ffadc366;
  display: grid;
  place-items: center;
  padding: 0;
}
.lab-tool .lab-drag-handle button svg {
  display: block;
  width: 17px;
  height: 17px;
  pointer-events: none;
}
.float-tool-launcher {
  position: absolute;
  top: 12px;
  left: 62px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid #535357;
  border-radius: 9px;
  background: #202022;
  box-shadow:
    0 0 0 2px #101012,
    0 3px 8px #0004;
  color: #bcbac5;
  font-size: 10px;
}
.float-tool-launcher > span {
  padding: 0 4px;
}
.float-tool-launcher button {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #57555e;
  border-radius: 5px;
  padding: 4px 8px;
  background: #37343e;
  color: #efebf7;
  font: inherit;
  cursor: pointer;
}
.float-tool-launcher button span {
  color: #bda0ff;
}
.float-tool-launcher button:hover {
  background: #59427d;
}
.float-tool-launcher button:focus-visible {
  outline: 2px solid #c1a6ff;
  outline-offset: 2px;
}
.lab-tool .lab-drag-handle button:hover {
  background: #f05285;
}
.lab-tool.float-forms {
  left: 62px;
  top: 65px;
  width: 238px;
}
.float-form-body {
  padding: 11px 3px 2px;
}
.float-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 10px;
  color: var(--float-muted);
  font-size: 10px;
}
.float-section-label > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.float-section-label > span::before {
  content: "";
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: var(--float-teal);
}
.float-section-label small {
  font-size: 9px;
  color: #a6a4ad;
}
.float-form-list {
  display: grid;
  gap: 7px;
  padding: 5px;
  border: 2px solid #080809;
  border-radius: 12px;
  background: #222224;
  box-shadow: 0 0 0 1px #48484a;
}
.float-form-list button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  border: 2px solid #515154;
  border-radius: 9px;
  background: linear-gradient(#353537, #2a2a2c);
  padding: 6px;
  color: #d7d7dc;
  box-shadow:
    0 1px 2px #0008,
    inset 0 1px 0 #ffffff0d;
  cursor: grab;
  text-align: left;
}
.float-form-list button:hover {
  border-color: #8a789f;
  background: #3d3847;
}
.float-form-list button[aria-pressed="true"] {
  color: #fff;
  border-color: #aa87fc;
  background: linear-gradient(115deg, #7948ea, #6536ce);
  box-shadow:
    inset 0 1px 0 #ffffff26,
    0 2px 3px #0005;
}
.float-form-art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid #111114;
  border-radius: 8px;
  background: linear-gradient(135deg, #29282e, #17171c);
  box-shadow: inset 0 1px 0 #ffffff15;
}
.float-form-list svg {
  width: 43px;
  height: 43px;
  color: #c1b0ef;
  pointer-events: none;
  filter: drop-shadow(0 2px 1px #0007);
}
.float-form-list button:nth-child(2) svg {
  color: #72cdbd;
}
.float-form-list button:nth-child(3) svg {
  color: #e9bd6b;
}
.float-form-copy {
  min-width: 0;
}
.float-form-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}
.float-form-copy small {
  display: block;
  font-size: 9px;
  color: #bcbac4;
  white-space: nowrap;
  margin-top: 4px;
}
.float-form-list button[aria-pressed="true"] small {
  color: #ece2ff;
}
.float-form-number {
  position: absolute;
  right: 7px;
  top: 5px;
  color: #bbb7c8;
  font-size: 8px;
}
.float-form-check {
  margin-left: auto;
  padding-right: 2px;
  color: #fff;
  visibility: hidden;
}
.float-form-list button[aria-pressed="true"] .float-form-check {
  visibility: visible;
}
.float-hint {
  color: var(--float-muted);
  font-size: 9px;
  margin: 11px 2px 3px;
}
.float-hint span {
  display: inline-block;
  color: #6bd3c5;
  margin-right: 4px;
}
.lab-tool.float-sculpt {
  left: auto;
  right: 76px;
  top: 55px;
  width: 218px;
}
.float-sculpt-shell {
  padding: 18px 4px 7px;
}
.float-dial-bezel {
  width: 184px;
  height: 184px;
  padding: 9px;
  margin: 0 auto;
  border: 2px solid #09090a;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    #77777c 0deg 1deg,
    #28282b 1deg 15deg
  );
  box-shadow:
    0 0 0 1px #545457,
    inset 0 0 0 4px #242426;
}
.float-pad {
  width: 162px;
  height: 162px;
  position: relative;
  border: 2px solid #111113;
  border-radius: 50%;
  background: radial-gradient(circle, #39373f, #27272b);
  box-shadow:
    inset 0 3px 10px #0007,
    0 0 0 1px #55535b;
  cursor: crosshair;
  touch-action: none;
  outline-offset: 4px;
  overflow: hidden;
}
.float-pad-rings {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid #62606866;
  pointer-events: none;
}
.float-pad-rings::before {
  content: "";
  position: absolute;
  inset: 25%;
  border: 1px solid #62606888;
  border-radius: 50%;
}
.float-pad-rings::after {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    linear-gradient(
      90deg,
      transparent calc(50% - 0.5px),
      #77717f44 50%,
      transparent calc(50% + 0.5px)
    ),
    linear-gradient(
      transparent calc(50% - 0.5px),
      #77717f44 50%,
      transparent calc(50% + 0.5px)
    );
}
.float-pad > span:not(.float-pad-point) {
  position: absolute;
  font-size: 9px;
  color: #c3c1ca;
  pointer-events: none;
}
.float-pad-top {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.float-pad-bottom {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}
.float-pad-left {
  left: 10px;
  top: 46%;
}
.float-pad-right {
  right: 10px;
  top: 46%;
}
.float-pad-point {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #ded0ff, #956bea 45%, #6632c5);
  border: 3px solid #27232f;
  box-shadow:
    0 0 0 1px #c2a5ff,
    0 3px 6px #0009;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.float-values {
  display: flex;
  gap: 6px;
  margin-top: 21px;
  padding: 4px;
  border: 1px solid #070708;
  border-radius: 8px;
  background: #131315;
  box-shadow: 0 0 0 1px #3b3b3e;
}
.float-values > span {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  background: #2c2c2f;
  border-radius: 5px;
  font-size: 9px;
  color: var(--float-muted);
}
.float-values output {
  color: #efebf7;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.float-reset {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 6px;
  border: 1px solid #565659;
  border-radius: 7px;
  background: linear-gradient(#3a3a3d, #2b2b2e);
  box-shadow: 0 0 0 1px #09090b;
  color: #e2e1e7;
  font-size: 10px;
  cursor: pointer;
}
.float-reset span {
  color: #66d3c3;
  margin-right: 4px;
}
.float-reset:hover {
  background: #444048;
}
.float-sculpt-caption {
  text-align: center;
  color: var(--float-muted);
  font-size: 9px;
  margin: 9px 0 4px;
}
.lab-tool.float-finish {
  left: calc(50% - 174px);
  top: auto;
  bottom: 24px;
  width: 348px;
  border-radius: 17px;
}
.float-finish-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 3px 8px;
}
.float-swatches {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 2px solid #09090b;
  border-radius: 10px;
  background: #242427;
  box-shadow: 0 0 0 1px #48484a;
}
.float-swatches button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 4px;
  border: 1px solid #555559;
  border-radius: 7px;
  background: linear-gradient(#363639, #232326);
  box-shadow:
    inset 0 1px 1px #ffffff12,
    0 1px 2px #0009;
  cursor: grab;
}
.float-swatch-orb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #ffffff75, transparent 45%),
    var(--swatch);
  box-shadow:
    inset 0 -3px 4px #0005,
    0 2px 3px #0009;
  pointer-events: none;
}
.float-swatches button[aria-pressed="true"] {
  border-color: #c3a9ff;
  background: #7948ea;
  box-shadow: inset 0 0 0 1px #a881ff;
}
.float-swatches button:hover {
  border-color: #c3a9ff;
}
.float-finish-divider {
  height: 30px;
  width: 1px;
  background: #464649;
}
.float-grid {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #555559;
  border-radius: 7px;
  background: #303033;
  box-shadow: 0 0 0 1px #09090a;
  color: #c8c8ce;
  font-size: 10px;
  padding: 7px 5px;
  white-space: nowrap;
  cursor: pointer;
}
.float-grid svg {
  width: 16px;
  height: 16px;
}
.float-grid[aria-pressed="true"] {
  color: #fff;
  background: #008e82;
  border-color: #3bc2b4;
}
.float-grid span {
  font-size: 9px;
}
.lab-floating-launcher {
  display: grid;
  gap: 6px;
}
.lab-floating-launcher button {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--bl-border);
  border-radius: 4px;
  background: var(--bl-control);
  color: var(--bl-text);
  font-size: 11px;
}
.lab-floating-launcher [data-float-layout] {
  background: transparent;
  justify-content: center;
  color: var(--bl-muted);
  margin-top: 5px;
  font-size: 10px;
}
.float-drop-label {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  padding: 9px 18px;
  background: var(--raised);
  border: 1px solid var(--accent);
  color: var(--ink);
  border-radius: 30px;
  z-index: 8;
  pointer-events: none;
  font-size: 12px;
  box-shadow: 0 8px 25px var(--tool-shadow);
}
.float-drop-ready::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
}

/* Scene and material tools use the same chrome and control palette. */
.lab-tool.scene-tool,
.lab-tool.material-tool {
  width: 258px;
}
.lab-tool.scene-tool {
  left: 48px;
  top: 60px;
}
.lab-tool.material-tool {
  top: 16px;
}
.lab-spread[data-mode="material"] .lab-workspace {
  min-height: 580px;
}
.lab-tool .lab-tool-body {
  padding: 14px 7px;
}
.lab-tool .lab-tool-eyebrow,
.lab-tool .lab-range {
  color: var(--float-muted);
}
.lab-tool .lab-range output {
  color: var(--float-ink);
  background: #29292c;
  border: 1px solid #4c4c50;
  border-radius: 5px;
  padding: 3px 7px;
}
.lab-tool .lab-range input {
  accent-color: var(--float-purple);
}
.lab-tool .lab-object-list,
.lab-tool .lab-geometry,
.lab-tool .lab-textures {
  padding: 4px;
  border: 2px solid #080809;
  border-radius: 10px;
  background: #222224;
  box-shadow: 0 0 0 1px #48484a;
}
.lab-tool .lab-object-list button,
.lab-tool .lab-geometry button,
.lab-tool .lab-textures button,
.lab-tool .lab-compare {
  background: linear-gradient(#39393c, #2b2b2e);
  color: #dedce5;
  border: 1px solid #5a585f;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 #ffffff12;
}
.lab-tool .lab-object-list button[aria-pressed="true"],
.lab-tool .lab-geometry button[aria-pressed="true"],
.lab-tool .lab-textures button[aria-pressed="true"],
.lab-tool .lab-compare[aria-pressed="true"] {
  background: var(--float-purple);
  border-color: #b493fc;
  color: #fff;
}
.lab-tool .lab-apply {
  background: #008e82;
  color: #fff;
  border: 1px solid #3bc2b4;
  border-radius: 7px;
  box-shadow: 0 0 0 1px #09090a;
}
.lab-tool .lab-colors button {
  width: 27px;
  height: 27px;
  border: 3px solid #303033;
  background:
    radial-gradient(circle at 30% 25%, #ffffff75, transparent 45%),
    var(--swatch);
  box-shadow:
    0 0 0 1px #656169,
    inset 0 -3px 4px #0005;
}
.lab-tool .lab-colors button[aria-pressed="true"] {
  outline-color: #b493fc;
}
.lab-tool .lab-tool-footer {
  color: var(--float-muted);
  border-color: #454348;
}

.lab-tool .lab-apply:hover {
  color: #fff;
  background: #00a596;
}
.lab-tool .lab-compare:hover {
  color: #fff;
}
