:root {
  color-scheme: dark;
  --ink: #e8eee8;
  --muted: #95a39f;
  --faint: #71807e;
  --panel: #17212a;
  --panel-deep: #131d25;
  --line: rgba(215, 230, 219, .085);
  --lime: #bfd775;
  --lime-dark: #91a94d;
  --amber: #eab969;
  --font: "DM Sans", sans-serif;
  --display: "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  min-width: 760px;
  overflow: hidden;
  background: #111a22;
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
.app-shell { display: flex; flex-direction: column; min-height: 100vh; height: 100vh; }

.topbar {
  height: 68px;
  flex: 0 0 68px;
  display: flex;
  align-items: center;
  padding: 0 23px;
  gap: 29px;
  border-bottom: 1px solid var(--line);
  background: #141e27;
  z-index: 4;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 35px; height: 35px; display: grid; place-items: center;
  background: #d3e48b; color: #202c29; border-radius: 10px 10px 10px 3px;
  font: 800 12px var(--display); letter-spacing: -.5px; transform: rotate(-3deg);
  box-shadow: 0 3px 14px #c5d87426;
}
.brand-copy { display: flex; flex-direction: column; gap: 2px; min-width: 116px; }
.brand-copy strong { font: 700 12px var(--display); letter-spacing: 1.05px; }
.brand-copy small { color: #91a09c; font-size: 8px; letter-spacing: 2.2px; font-weight: 700; }
.project-name { display: flex; align-items: center; gap: 9px; color: #d5ded8; font-weight: 600; white-space: nowrap; }
.status-dot, .live-dot, .footer-led { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #acd578; box-shadow: 0 0 9px #acd57872; }
.autosave-label { font-size: 8px; letter-spacing: 1px; color: #8a9b91; font-weight: 700; margin-left: 1px; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tool-button {
  height: 34px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 7px; color: #c8d2ce; background: transparent;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: background .15s, border .15s, color .15s;
}
.tool-button:hover:not(:disabled) { background: #25343c; border-color: #3a4b4d; color: white; }
.tool-button:disabled { opacity: .33; cursor: default; }
.tool-icon { color: var(--lime); font-size: 16px; line-height: 1; }
.icon-only { width: 33px; padding: 0; font-size: 20px; color: #b7c5bf; }
.toolbar-divider { height: 20px; width: 1px; background: #dbe8dd16; margin: 0 5px; }

.studio-layout {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: 252px minmax(390px, 1fr) 292px;
  gap: 1px; background: #111a22;
}
.side-panel { min-width: 0; display: flex; flex-direction: column; background: var(--panel); overflow: hidden; }
.library-panel { padding: 22px 15px 13px; }
.inspector-panel { padding: 22px 17px 13px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; min-height: 39px; margin: 0 1px 18px; }
.eyebrow { color: #93a69c; font-size: 8px; line-height: 1.2; letter-spacing: 1.55px; font-weight: 800; margin: 0 0 5px; }
.panel-heading h1, .panel-heading h2 { font: 600 18px/1.1 var(--display); letter-spacing: -.55px; margin: 0; color: #eef2e9; }
.count-pill { display: inline-flex; height: 17px; min-width: 19px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 5px; color: #c7d88e; background: #bdcf7230; font: 700 9px var(--font); vertical-align: 3px; margin-left: 4px; }
.small-icon-button {
  width: 26px; height: 26px; border: 1px solid var(--line); background: #1b2830; border-radius: 6px;
  color: #a9b6ae; font-size: 17px; cursor: pointer;
}
.small-icon-button:hover { background: #2a393e; color: white; }
.search-box {
  height: 35px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  border: 1px solid #d5e5da16; border-radius: 7px; background: #101a21; color: #91a19e; margin-bottom: 15px;
}
.search-box > span { font-size: 22px; line-height: 1; transform: rotate(-15deg); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #e4ece5; font-size: 11px; }
.search-box input::placeholder { color: #73827f; }
.category-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 14px; }
.category-button {
  height: 31px; min-width: 0; padding: 0 7px; display: flex; align-items: center; gap: 6px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: #a5b1aa;
  font-size: 10px; font-weight: 600; text-align: left; cursor: pointer;
}
.category-button:hover { color: #e5eee5; background: #ffffff08; }
.category-button.selected { background: #c2d88318; border-color: #c2d88335; color: #d5e7a0; }
.category-button > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-icon { min-width: 15px; color: #aabc72; text-align: center; font-size: 13px; }
.category-button small { margin-left: auto; color: #98a595; font-size: 9px; }
.library-caption { height: 27px; padding: 0 3px; display: flex; justify-content: space-between; align-items: center; color: #82938c; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.drag-symbol { color: #c3d979; font-size: 13px; }
.component-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -7px; padding: 0 6px 6px 5px; scrollbar-color: #37464a transparent; scrollbar-width: thin; }
.component-category { margin: 0 0 5px; }
.component-category-heading { height: 24px; padding: 0 6px; display: flex; align-items: center; gap: 6px; color: #9eada1; font-size: 8px; font-weight: 800; letter-spacing: .9px; list-style: none; text-transform: uppercase; cursor: pointer; }
.component-category-heading::-webkit-details-marker { display: none; }
.component-category-heading:before { content: "⌄"; color: #c1d47e; font-size: 11px; transition: transform .12s; }
.component-category:not([open]) .component-category-heading:before { transform: rotate(-90deg); }
.component-category-heading span { margin-left: auto; color: #71817a; font-size: 8px; }
.component-category-items { display: flex; flex-direction: column; }
.component-card {
  width: 100%; min-height: 57px; display: flex; align-items: center; gap: 10px; padding: 6px 7px;
  text-align: left; border: 1px solid transparent; border-radius: 8px; background: transparent;
  cursor: grab; transition: background .14s, border .14s, transform .14s;
}
.component-card:hover { background: #ffffff08; border-color: #e3eee91a; transform: translateX(2px); }
.component-card:active { cursor: grabbing; }
.component-card.is-locked { cursor: not-allowed; opacity: .64; }
.component-card.is-locked:hover { transform: none; background: transparent; border-color: transparent; }
.component-card.is-locked:active { cursor: not-allowed; }
.locked-part-badge { flex: 0 0 auto; padding: 4px 5px; border: 1px solid #e8ba6133; border-radius: 5px; color: #e8c77c; background: #dbab3020; font-size: 7px; font-weight: 900; letter-spacing: .35px; }
.part-thumbnail {
  position: relative; flex: 0 0 40px; width: 40px; height: 40px; overflow: hidden;
  display: grid; place-items: center; border-radius: 7px; color: #c6d490;
  background: linear-gradient(145deg, #293a3d, #202e34);
}
.part-thumbnail:before { content: ""; position: absolute; width: 26px; height: 8px; left: 7px; bottom: 10px; border-radius: 3px; background: #748454; transform: skewY(-8deg); box-shadow: 0 3px 0 #3f4a3e; }
.part-thumbnail:after { content: ""; position: absolute; width: 16px; height: 6px; left: 12px; top: 11px; border-radius: 3px; background: #88955b; transform: skewY(-8deg); }
.part-thumbnail strong { position: relative; z-index: 1; color: #e4c477; font-size: 11px; text-shadow: 0 1px 5px #101a21; }
.part-thumbnail.shape-wheel:before, .part-thumbnail.shape-roller:before { height: 14px; width: 24px; bottom: 12px; border-radius: 9px; background: #586263; box-shadow: inset 0 0 0 3px #353f42; }
.part-thumbnail.shape-wheel:after, .part-thumbnail.shape-roller:after { width: 6px; height: 6px; left: 17px; top: 16px; background: #c4a962; border-radius: 50%; }
.part-thumbnail.shape-cannon:before, .part-thumbnail.shape-gun:before { width: 25px; height: 5px; left: 7px; bottom: 16px; background: #778277; transform: rotate(-25deg); }
.part-thumbnail.shape-cannon:after, .part-thumbnail.shape-gun:after { width: 8px; height: 8px; left: 8px; top: 19px; background: #66794b; }
.part-thumbnail.chassis-preview:before { width: 29px; height: 12px; left: 5px; bottom: 9px; border-radius: 2px; background: #687851; transform: skewY(-9deg); box-shadow: inset 0 -3px #34413d; }
.part-thumbnail.chassis-preview:after { width: 18px; height: 7px; left: 11px; top: 11px; border-radius: 2px; background: #9da978; transform: skewY(-5deg); }
.part-thumbnail.chassis-light:before { width: 27px; clip-path: polygon(0 38%, 21% 0, 100% 0, 100% 100%, 0 100%); background: #78875a; }
.part-thumbnail.chassis-medium:before { background: #70804b; }
.part-thumbnail.chassis-heavy:before { width: 31px; height: 15px; left: 4px; background: #59664a; box-shadow: inset 0 -4px #313b36; }
.part-thumbnail.chassis-super-heavy:before { width: 32px; height: 17px; left: 4px; bottom: 7px; background: #4c5a45; box-shadow: inset 0 -5px #293532; }
.part-thumbnail.chassis-apc:before { width: 30px; height: 12px; left: 5px; background: #8c8868; }
.part-thumbnail.chassis-apc:after { width: 21px; height: 10px; left: 9px; top: 8px; background: #b0a982; }
.part-thumbnail.chassis-futuristic:before { width: 30px; clip-path: polygon(0 60%, 20% 0, 100% 0, 84% 100%, 0 100%); background: #526d6a; }
.part-thumbnail.chassis-compact:before { width: 24px; height: 13px; left: 8px; background: #7b8058; }
.part-thumbnail.chassis-wide-heavy:before { width: 32px; height: 14px; left: 4px; background: #4e5947; box-shadow: inset 0 -4px #2e3834; }
.part-thumbnail.chassis-heavy:after, .part-thumbnail.chassis-super-heavy:after, .part-thumbnail.chassis-wide-heavy:after { height: 8px; background: #78856a; }
.part-thumbnail.movement-preview:before { width: 28px; height: 13px; left: 6px; bottom: 10px; border: 3px solid #535f5b; border-radius: 9px; background: transparent; transform: none; box-shadow: inset 0 0 0 2px #313a3b; }
.part-thumbnail.movement-preview:after { width: 14px; height: 4px; left: 13px; top: 17px; border-radius: 2px; background: #b0aa83; transform: none; }
.part-thumbnail.movement-preview.shape-movement-wheel:before { width: 25px; height: 25px; left: 7px; bottom: 5px; border: 3px solid #596460; border-radius: 50%; background: #30393c; box-shadow: inset 0 0 0 3px #46514e; }
.part-thumbnail.movement-preview.shape-movement-wheel:after { width: 8px; height: 8px; left: 16px; top: 16px; border-radius: 50%; background: #b9aa78; }
.part-thumbnail.movement-preview.shape-suspension:before { width: 8px; height: 25px; left: 15px; top: 8px; border: 0; border-radius: 4px; background: #859080; transform: rotate(28deg); box-shadow: 7px 4px 0 -2px #495653; }
.part-thumbnail.movement-preview.shape-suspension:after { width: 12px; height: 12px; left: 13px; top: 13px; border: 2px solid #c0aa71; border-radius: 50%; background: transparent; }
.part-thumbnail.movement-preview.shape-track-segment:before { width: 28px; height: 13px; left: 6px; bottom: 11px; border: 1px solid #78827a; border-radius: 2px; background: #414a48; transform: skewY(-9deg); box-shadow: inset 0 3px #7f887c; }
.part-thumbnail.movement-preview.shape-track-segment:after { width: 20px; height: 4px; left: 10px; top: 14px; background: #c0ab73; }
.part-thumbnail.movement-preview.shape-hover-unit:before { width: 27px; height: 14px; left: 6px; bottom: 8px; border: 2px solid #6ccbc7; border-radius: 6px; background: #344a4c; transform: skewY(-8deg); box-shadow: 0 4px 0 #203437; }
.part-thumbnail.movement-preview.shape-hover-unit:after { width: 18px; height: 5px; left: 11px; top: 17px; border-radius: 50%; background: #74dfd4; }
.part-thumbnail.movement-preview.shape-compact-wheel-assembly:before { width: 29px; height: 18px; left: 5px; bottom: 8px; border: 0; border-radius: 5px; background: #4a544c; transform: none; box-shadow: inset 0 3px #82907c; }
.part-thumbnail.movement-preview.shape-compact-wheel-assembly:after { width: 22px; height: 6px; left: 9px; top: 18px; border-radius: 5px; background: #b6a878; box-shadow: 0 0 0 2px #3c4748; }
.part-thumbnail.movement-heavy-track:before, .part-thumbnail.movement-wide-heavy-track:before, .part-thumbnail.movement-armoured-track:before { border-width: 4px; border-color: #454f4f; }
.part-thumbnail.movement-reinforced-track:after { width: 22px; left: 9px; background: #b8b8a2; box-shadow: 0 0 0 1px #5a635b; }
.part-thumbnail.movement-futuristic-track:before { border-color: #386e72; box-shadow: inset 0 0 0 2px #61b7b2; }
.part-thumbnail.movement-oversized-offroad-wheel:before { width: 28px; height: 28px; left: 5px; bottom: 4px; border-width: 4px; border-color: #657160; }
.part-thumbnail.movement-futuristic-hover:before { border-color: #56b9b8; }
.part-thumbnail.turret-preview:before { width: 28px; height: 14px; left: 6px; bottom: 8px; border-radius: 4px; background: #63754d; transform: skewY(-7deg); box-shadow: inset 0 -3px #3a473b, 0 2px 0 #343e3b; }
.part-thumbnail.turret-preview:after { width: 20px; height: 8px; left: 10px; top: 10px; border-radius: 4px 4px 2px 2px; background: #849463; transform: skewY(-5deg); }
.part-thumbnail.turret-scout:before { clip-path: polygon(0 60%, 20% 0, 100% 0, 100% 100%, 0 100%); background: #788961; }
.part-thumbnail.turret-reconnaissance:after, .part-thumbnail.turret-command:after { width: 11px; height: 11px; left: 14px; top: 7px; border-radius: 50%; background: #798d6e; box-shadow: 0 0 0 3px #4c5d4d; }
.part-thumbnail.turret-armoured-medium:before, .part-thumbnail.turret-heavy-battle:before, .part-thumbnail.turret-reinforced-heavy:before, .part-thumbnail.turret-super-heavy:before, .part-thumbnail.turret-heavy-futuristic:before { width: 31px; height: 17px; left: 4px; bottom: 6px; background: #4a5945; box-shadow: inset 0 -4px #2b3833; }
.part-thumbnail.turret-twin-medium:after, .part-thumbnail.turret-dual-cannon:after { width: 25px; left: 7px; background: #859169; box-shadow: -6px 0 0 -2px #cbb875, 6px 0 0 -2px #cbb875; }
.part-thumbnail.turret-futuristic-combat:before, .part-thumbnail.turret-advanced-energy:before, .part-thumbnail.turret-heavy-futuristic:before { background: #3f6865; box-shadow: inset 0 -3px #25454a, 0 0 7px #54b7af55; }
.part-thumbnail.turret-futuristic-combat:after, .part-thumbnail.turret-advanced-energy:after, .part-thumbnail.turret-heavy-futuristic:after { background: #58a69e; }
.part-thumbnail.turret-stealth:before { width: 31px; height: 11px; left: 4px; bottom: 10px; background: #34434a; clip-path: polygon(0 68%, 18% 0, 82% 0, 100% 62%, 86% 100%, 12% 100%); }
.part-thumbnail.turret-stealth:after { width: 22px; left: 9px; top: 12px; background: #52646a; clip-path: polygon(0 0, 100% 0, 75% 100%, 20% 100%); }
.part-thumbnail.turret-mount-preview:before { width: 27px; height: 11px; left: 6px; bottom: 11px; border: 3px solid #87937a; border-radius: 50%; background: #384642; transform: none; box-shadow: inset 0 0 0 2px #485650; }
.part-thumbnail.turret-mount-preview:after { width: 15px; height: 4px; left: 12px; top: 17px; border-radius: 50%; background: #c6b477; transform: none; }
.part-thumbnail.mount-reinforced-platform:before, .part-thumbnail.mount-futuristic-platform:before { width: 30px; height: 14px; left: 5px; bottom: 8px; border: 0; border-radius: 4px; background: #536457; transform: skewY(-8deg); box-shadow: inset 0 -3px #303e3a; }
.part-thumbnail.mount-futuristic-platform:after { background: #58aaa2; }
.part-thumbnail.turret-accessory-preview:before { width: 18px; height: 12px; left: 11px; bottom: 10px; border-radius: 3px; background: #64734f; transform: none; box-shadow: 0 3px 0 #39453d; }
.part-thumbnail.turret-accessory-preview:after { width: 8px; height: 8px; left: 16px; top: 10px; border-radius: 50%; background: #a5b382; transform: none; }
.part-thumbnail.accessory-periscope:before, .part-thumbnail.accessory-turret-antenna:before { width: 4px; height: 27px; left: 18px; top: 6px; border-radius: 2px; background: #9da782; transform: rotate(7deg); box-shadow: 0 0 0 2px #394942; }
.part-thumbnail.accessory-radar-dome:after { width: 17px; height: 12px; left: 11px; top: 7px; border-radius: 12px 12px 3px 3px; background: #8db9ad; }
.part-thumbnail.accessory-side-storage-modules:before { width: 30px; height: 16px; left: 5px; bottom: 9px; border-radius: 3px; background: #806d4d; box-shadow: inset 0 3px #a28c62, 0 2px 0 #424a3e; }
.part-thumbnail.weapon-preview:before { width: 26px; height: 6px; left: 9px; top: 17px; bottom: auto; border-radius: 3px; background: #75817b; transform: none; box-shadow: 0 0 0 2px #394744; }
.part-thumbnail.weapon-preview:after { width: 13px; height: 13px; left: 7px; top: 13px; border-radius: 3px; background: #687851; transform: skewY(-8deg); box-shadow: inset 0 -3px #39443d; }
.part-thumbnail.weapon-heavy-cannon:after, .part-thumbnail.weapon-super-heavy-cannon:after, .part-thumbnail.weapon-reinforced-cannon:after { width: 17px; height: 17px; left: 5px; top: 11px; background: #4c5b47; }
.part-thumbnail.weapon-long-cannon:before { width: 31px; left: 5px; background: #87918a; }
.part-thumbnail.weapon-short-cannon:before { width: 18px; left: 14px; height: 8px; }
.part-thumbnail.weapon-dual-cannon:before, .part-thumbnail.weapon-triple-cannon:before, .part-thumbnail.weapon-dual-machine-gun:before { box-shadow: 0 -4px 0 -1px #8a948e, 0 4px 0 -1px #8a948e, 0 0 0 2px #394744; }
.part-thumbnail.weapon-triple-cannon:before { box-shadow: 0 -5px 0 -1px #9ca39e, 0 5px 0 -1px #9ca39e, 0 0 0 2px #394744; }
.part-thumbnail.weapon-single-missile-launcher:before, .part-thumbnail.weapon-dual-missile-launcher:before, .part-thumbnail.weapon-heavy-missile-launcher:before, .part-thumbnail.weapon-four-tube-rocket:before, .part-thumbnail.weapon-six-tube-rocket:before { width: 24px; height: 17px; left: 9px; top: 11px; bottom: auto; border-radius: 4px; background: #65744e; transform: none; box-shadow: inset 0 0 0 3px #414e43; }
.part-thumbnail.weapon-four-tube-rocket:before { background: #77845d; box-shadow: inset 0 0 0 2px #424f45, inset 7px 0 #354445; }
.part-thumbnail.weapon-six-tube-rocket:before { width: 29px; left: 5px; background: #5a684d; box-shadow: inset 0 0 0 2px #414e43, inset 8px 0 #354445, inset -8px 0 #354445; }
.part-thumbnail.weapon-plasma-cannon:before, .part-thumbnail.weapon-laser-cannon:before, .part-thumbnail.weapon-experimental-energy:before, .part-thumbnail.weapon-heavy-futuristic-cannon:before, .part-thumbnail.weapon-futuristic-energy-cannon:before { background: #67cfc5; box-shadow: 0 0 6px #65ded477; }
.part-thumbnail.weapon-accessory-preview:before { width: 23px; height: 9px; left: 9px; bottom: 12px; border-radius: 3px; background: #687851; transform: rotate(-12deg); box-shadow: inset 0 -2px #3d4941; }
.part-thumbnail.weapon-accessory-preview:after { width: 8px; height: 8px; left: 16px; top: 11px; border-radius: 2px; background: #c3ae75; transform: none; }
.part-thumbnail.weapon-accessory-muzzle-brake:before { width: 25px; height: 8px; left: 8px; bottom: auto; top: 16px; background: #69756e; transform: none; }
.part-thumbnail.weapon-accessory-weapon-sight:after { width: 12px; height: 10px; left: 14px; top: 8px; border-radius: 3px; background: #76b9ac; }
.part-thumbnail.studio-accessory-preview:before { width: 25px; height: 17px; left: 7px; bottom: 8px; border-radius: 3px; background: #718354; transform: skewY(-6deg); box-shadow: inset 0 -3px #465241, 0 2px 0 #34403b; }
.part-thumbnail.studio-accessory-preview:after { width: 17px; height: 7px; left: 12px; top: 12px; border-radius: 2px; background: #d0b66f; transform: none; }
.part-thumbnail.studio-armour-plate:before, .part-thumbnail.studio-rear-panels:before { clip-path: polygon(0 20%, 18% 0, 100% 12%, 100% 100%, 0 100%); background: #718354; }
.part-thumbnail.studio-front-bumper:before { width: 30px; height: 12px; left: 5px; bottom: 12px; background: #596b50; transform: none; }
.part-thumbnail.studio-front-bumper:after { width: 31px; height: 5px; left: 4px; top: 19px; border-radius: 4px; background: #d3b86e; transform: none; }
.part-thumbnail.studio-side-panels:before { width: 13px; height: 23px; left: 7px; bottom: 8px; background: #768655; transform: skewY(-8deg); box-shadow: 13px -2px 0 #4d5a43, 0 2px 0 #34403b; }
.part-thumbnail.studio-protective-cage:before { width: 28px; height: 25px; left: 6px; bottom: 6px; border: 3px solid #69775b; border-radius: 3px; background: transparent; transform: none; box-shadow: inset 0 6px #434f48; }
.part-thumbnail.studio-protective-cage:after { width: 3px; height: 22px; left: 18px; top: 8px; background: #d0b56d; transform: none; }
.part-thumbnail.studio-small-shield:before, .part-thumbnail.studio-large-shield:before { width: 23px; height: 27px; left: 9px; bottom: 5px; clip-path: polygon(50% 0, 100% 16%, 91% 67%, 50% 100%, 9% 67%, 0 16%); background: #4e8d85; transform: none; box-shadow: none; }
.part-thumbnail.studio-small-shield:after, .part-thumbnail.studio-large-shield:after { width: 9px; height: 9px; left: 16px; top: 15px; border-radius: 50%; background: #efd276; }
.part-thumbnail.studio-decorative-spikes:before { width: 28px; height: 11px; left: 6px; bottom: 9px; background: #77845d; transform: none; }
.part-thumbnail.studio-decorative-spikes:after { width: 5px; height: 16px; left: 10px; top: 9px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #e0bd70; box-shadow: 7px 2px 0 #e0bd70, 14px 0 #e0bd70, 21px 2px #e0bd70; }
.part-thumbnail.studio-storage-crate:before { width: 27px; height: 22px; left: 6px; bottom: 8px; background: #8c7049; transform: none; box-shadow: inset 0 4px #dbbd75, inset 7px 0 #66573e; }
.part-thumbnail.studio-fuel-tank:before { width: 17px; height: 26px; left: 11px; bottom: 6px; border-radius: 8px; background: #6d8057; transform: none; box-shadow: inset 0 4px #d5b96e, inset 0 -4px #4b5c48; }
.part-thumbnail.studio-radar-dish:before { width: 25px; height: 20px; left: 7px; bottom: 10px; border: 4px solid #697d76; border-radius: 50%; background: #405b59; transform: skewY(-12deg); box-shadow: 0 3px 0 #354744; }
.part-thumbnail.studio-radar-dish:after { width: 4px; height: 15px; left: 18px; top: 20px; background: #8ce0d4; transform: none; }
.part-thumbnail.studio-antenna-mast:before { width: 4px; height: 29px; left: 18px; top: 5px; border-radius: 2px; background: #65756a; transform: none; box-shadow: 0 7px 0 -1px #e1c66e, 0 16px 0 -1px #e1c66e; }
.part-thumbnail.studio-antenna-mast:after { width: 8px; height: 8px; left: 16px; top: 4px; border-radius: 50%; background: #e1c66e; }
.part-thumbnail.studio-pipe-loop:before { width: 19px; height: 25px; left: 10px; bottom: 6px; border: 4px solid #66716d; border-bottom-color: transparent; border-radius: 10px 10px 3px 3px; background: transparent; transform: none; box-shadow: 9px 0 0 -2px #d0b66e; }
.part-thumbnail.studio-exhaust-stacks:before { width: 6px; height: 24px; left: 10px; top: 7px; border-radius: 3px; background: #59645e; transform: none; box-shadow: 12px 0 #3b4745, 24px 0 #59645e; }
.part-thumbnail.studio-exhaust-stacks:after { width: 10px; height: 5px; left: 8px; top: 7px; border-radius: 4px; background: #c5a96c; box-shadow: 12px 0 #c5a96c, 24px 0 #c5a96c; }
.part-thumbnail.studio-headlights:before { width: 28px; height: 13px; left: 6px; bottom: 10px; border-radius: 4px; background: #4b5a56; transform: none; }
.part-thumbnail.studio-headlights:after { width: 8px; height: 8px; left: 9px; top: 17px; border-radius: 50%; background: #ffe38a; box-shadow: 14px 0 #ffe38a; }
.part-thumbnail.studio-warning-beacons:before { width: 30px; height: 8px; left: 5px; bottom: 9px; border-radius: 3px; background: #4e5e58; transform: none; }
.part-thumbnail.studio-warning-beacons:after { width: 8px; height: 11px; left: 7px; top: 12px; border-radius: 5px 5px 2px 2px; background: #ffd16e; box-shadow: 10px -2px #e98566, 20px 0 #8ce0d4; }
.part-thumbnail.studio-siren:before { width: 21px; height: 12px; left: 10px; bottom: 9px; border-radius: 4px; background: #58675b; transform: none; }
.part-thumbnail.studio-siren:after { width: 15px; height: 15px; left: 13px; top: 8px; border-radius: 50% 50% 5px 5px; background: #f07a61; }
.part-thumbnail.studio-flag:before { width: 4px; height: 29px; left: 10px; top: 6px; border-radius: 2px; background: #68785a; transform: none; }
.part-thumbnail.studio-flag:after { width: 19px; height: 13px; left: 13px; top: 7px; clip-path: polygon(0 0, 100% 10%, 78% 55%, 0 100%); background: #f3a767; }
.part-thumbnail.studio-star-badge:before { width: 27px; height: 27px; left: 6px; bottom: 6px; clip-path: polygon(50% 0, 62% 34%, 100% 36%, 70% 58%, 82% 96%, 50% 73%, 18% 96%, 30% 58%, 0 36%, 38% 34%); background: #ffe07b; transform: none; box-shadow: none; }
.part-thumbnail.studio-lucky-duck:before { width: 24px; height: 19px; left: 7px; bottom: 7px; border-radius: 50%; background: #f2c84b; transform: none; box-shadow: 12px -8px 0 -3px #f2c84b; }
.part-thumbnail.studio-lucky-duck:after { width: 9px; height: 5px; left: 25px; top: 17px; clip-path: polygon(0 0, 100% 50%, 0 100%); background: #e49a42; }
.component-card.has-dimensions { min-height: 66px; }
.component-card-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.component-card-copy strong { overflow: hidden; color: #dce5dc; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.component-card-copy small { overflow: hidden; color: #82918b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.component-card-copy .component-card-dimensions { color: #aaba83; font-size: 8px; font-weight: 700; letter-spacing: .15px; }
.drag-handle { color: #677773; font-size: 13px; }
.library-tip { display: flex; gap: 8px; align-items: flex-start; padding: 10px 9px; margin-top: 9px; border: 1px solid #d8e9951b; border-radius: 7px; color: #91a097; background: #d6e99709; font-size: 9px; line-height: 1.5; }
.library-tip strong { color: #d2e195; font-weight: 700; }
.tip-spark { color: #e8c66a; font-size: 13px; padding-top: 1px; }
.no-results { padding: 30px 8px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #abb9b0; text-align: center; }
.no-results > span { color: #aecb6e; font-size: 28px; }
.no-results small { color: #80918a; }

.workbench { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #18242a; position: relative; overflow: hidden; }
.workbench-bar { height: 49px; flex: 0 0 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 17px; background: #19252c; border-bottom: 1px solid #e4f0e70c; z-index: 2; }
.workspace-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 10px; white-space: nowrap; }
.workspace-title strong { color: #d9e2d9; font-size: 9px; letter-spacing: 1px; }
.workspace-title .live-dot { width: 6px; height: 6px; }
.bar-slash { color: #62726e; }
#selection-label { overflow: hidden; max-width: 155px; color: #9dac9f; text-overflow: ellipsis; }
.workspace-tools { display: flex; align-items: center; gap: 5px; }
.chip-button { height: 28px; padding: 0 8px; display: flex; gap: 5px; align-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #96a59e; font-size: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip-button select, select.chip-button { appearance: none; }
.camera-select { width: 61px; justify-content: center; padding: 0 5px; border-color: #e2eee115; outline: 0; color: #cbd6c9; }
.precision-select { width: 57px; justify-content: center; padding: 0 4px; border-color: #e2eee115; outline: 0; }
.chip-button option { background: #19252c; color: #e1e9df; }
.compact-tool { width: 27px; padding: 0; justify-content: center; font-size: 14px; }
.chip-button:hover { background: #ffffff0a; color: #e4ede3; }
.chip-button.active { background: #bdcf7220; border-color: #c7d78531; color: #d8e79b; }
.chip-button > span { font-size: 12px; }
.workspace-tools .toolbar-divider { height: 16px; margin: 0 2px; }
.viewport { flex: 1; min-height: 0; position: relative; overflow: hidden; background: linear-gradient(145deg, #b9c9c8, #8da49e); }
.three-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; touch-action: none; }
.three-canvas:active { cursor: grabbing; }
.viewport.drag-ready:after { position: absolute; content: ""; pointer-events: none; inset: 13px; z-index: 1; border: 2px dashed #edf5b4aa; border-radius: 11px; box-shadow: inset 0 0 50px #dce99f26; }
.viewport.placement-invalid:after { border-color: #ff8e83; box-shadow: inset 0 0 50px #e34d4d22; }
.bay-stamp { position: absolute; top: 21px; left: 22px; z-index: 1; display: flex; flex-direction: column; color: #344844; opacity: .7; pointer-events: none; }
.stamp-top { font-size: 8px; font-weight: 800; letter-spacing: 1.5px; }
.bay-stamp strong { margin-top: 5px; font: 700 23px/.88 var(--display); letter-spacing: -1px; }
.stamp-bottom { margin-top: 7px; font-size: 7px; font-weight: 800; letter-spacing: 1.6px; }
.viewport-hint { position: absolute; z-index: 1; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #253a38aa; border-radius: 6px; background: #263b38cf; color: #dce7dc; font-size: 8px; white-space: nowrap; pointer-events: none; }
.hint-key { color: #d6e59b; font-size: 7px; font-weight: 800; letter-spacing: .75px; }
.hint-separator { color: #90a59c; }
.camera-controls { position: absolute; z-index: 1; right: 15px; bottom: 15px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #3347408c; border-radius: 7px; box-shadow: 0 3px 12px #24372d24; }
.camera-controls button { width: 31px; height: 29px; border: 0; background: #e2e8dbe8; color: #35463e; font-size: 19px; cursor: pointer; }
.camera-controls button + button { border-top: 1px solid #35463e22; }
.camera-controls button:hover { background: white; }
.axis-widget { position: absolute; z-index: 1; right: 17px; top: 18px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #536e645c; background: #d8e1d678; color: #43574e; font-size: 8px; font-weight: 800; pointer-events: none; }
.axis-widget i { position: absolute; width: 17px; height: 17px; left: 12px; top: 13px; border-left: 1px solid #758a7b; border-bottom: 1px solid #758a7b; transform: rotate(-45deg); }
.axis-y { position: absolute; top: 3px; left: 18px; color: #70864f; }
.axis-x { position: absolute; bottom: 8px; right: 4px; color: #bd765b; }
.axis-z { position: absolute; bottom: 8px; left: 4px; color: #657f9a; }
.placement-readout { position: absolute; z-index: 3; left: 50%; top: 17px; transform: translateX(-50%); display: none; padding: 6px 9px; border: 1px solid #263d39a3; border-radius: 5px; background: #263b38e8; color: #e2ecbb; font: 700 9px var(--font); font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.placement-readout.visible { display: block; }
.placement-readout.invalid { border-color: #a9473f; background: #5a2929e8; color: #ffe0d9; }
.viewport.drag-ready .placement-readout.visible { top: 51px; }
.drop-message { display: none; position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 19px; border-radius: 8px; background: #192829e8; color: #e5f0bc; font: 700 11px var(--display); letter-spacing: 1.1px; pointer-events: none; }
.viewport.drag-ready .drop-message { display: block; }
.viewport.placement-invalid .drop-message { background: #5a2929e8; color: #ffe0d9; }
.viewport-loading { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 9px; background: #aabdb9; color: #354844; font-weight: 700; }
.loading-spinner { width: 16px; height: 16px; border: 2px solid #546b6150; border-top-color: #506849; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.workbench-footer { height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; color: #8f9e99; background: #18242a; font-size: 8px; font-weight: 700; letter-spacing: .65px; }
.footer-led { width: 5px; height: 5px; margin-right: 5px; }
.footer-sep { color: #54635f; padding: 0 4px; }
.camera-note { color: #768681; font-size: 7px; letter-spacing: .8px; }

.inspector-heading { margin-bottom: 19px; }
.settings-mark { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #cfe18b27; border-radius: 7px; color: #c8dd83; font-size: 14px; }
.empty-inspector { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 20px 34px; text-align: center; }
.empty-illustration { position: relative; width: 94px; height: 92px; margin-bottom: 14px; display: grid; place-items: center; }
.empty-cube { color: #adc66c; font-size: 48px; transform: rotate(45deg); }
.empty-illustration i, .empty-illustration b { position: absolute; border: 1px solid #bdce762b; border-radius: 50%; transform: rotate(-21deg); }
.empty-illustration i { width: 83px; height: 39px; }
.empty-illustration b { width: 67px; height: 28px; transform: rotate(22deg); }
.empty-inspector strong { font: 600 13px var(--display); color: #d5ded5; }
.empty-inspector p { max-width: 200px; color: #899a93; font-size: 10px; line-height: 1.65; }
.hidden { display: none !important; }
.inspector-content { overflow-y: auto; flex: 1; min-height: 0; scrollbar-color: #37464a transparent; scrollbar-width: thin; margin: 0 -4px; padding: 0 3px; }
.selected-part-card { min-height: 56px; padding: 8px 8px; display: flex; align-items: center; gap: 10px; border: 1px solid #d5e5db16; border-radius: 8px; background: #111b22; }
.selected-part-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px; color: #d5df9a; background: linear-gradient(145deg, #364941, #283a3c); font-size: 18px; }
.selected-part-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.selected-part-info .eyebrow { font-size: 7px; margin: 0; }
.selected-part-info strong { overflow: hidden; color: #e1e9e0; font: 600 12px var(--display); text-overflow: ellipsis; white-space: nowrap; }
.placed-parts { flex: 0 0 auto; margin: -4px 0 12px; border: 1px solid #d8e7dc14; border-radius: 7px; background: #111b22; overflow: hidden; }
.placed-parts-heading { width: 100%; height: 29px; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; border: 0; background: #1b2830; color: #a7b5a8; font-size: 8px; font-weight: 800; letter-spacing: 1px; cursor: pointer; }
.placed-parts-heading .count-pill { margin-left: 3px; vertical-align: 0; }
.outliner-chevron { color: #a6b690; font-size: 13px; transition: transform .15s; }
.placed-parts.collapsed .outliner-chevron { transform: rotate(-90deg); }
.placed-parts.collapsed .placed-parts-list { display: none; }
.placed-parts-list { max-height: 122px; overflow-y: auto; padding: 3px; scrollbar-color: #37464a transparent; scrollbar-width: thin; }
.placed-part-row { min-height: 25px; display: flex; align-items: center; gap: 4px; padding: 2px 3px; border-radius: 4px; }
.placed-part-row.selected { background: #bed47c1c; }
.placed-part-select { flex: 1; min-width: 0; padding: 3px 4px; overflow: hidden; border: 0; border-radius: 3px; background: transparent; color: #c0cbc0; font-size: 9px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.placed-part-select:hover { color: #eef4df; }
.placed-part-order { width: 15px; color: #76877e; font-size: 8px; text-align: center; }
.visibility-toggle { width: 23px; height: 21px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #aec57d; font-size: 11px; cursor: pointer; }
.visibility-toggle:hover { background: #ffffff10; color: #ecf5cf; }
.visibility-toggle[aria-pressed="false"] { color: #6f7a77; }
.transform-mode-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px 0 2px; }
.transform-mode-controls button { height: 27px; border: 1px solid #d9e7dc17; border-radius: 5px; background: #1b2830; color: #9eada2; font-size: 10px; cursor: pointer; }
.transform-mode-controls button span { font-size: 8px; font-weight: 700; }
.transform-mode-controls button:hover { color: #e6eddb; background: #28383b; }
.transform-mode-controls button.selected { border-color: #c5d97c5c; background: #bdcf721c; color: #d3e598; }
.delete-button { width: 28px; height: 28px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #9b8580; font-size: 15px; cursor: pointer; }
.delete-button:hover { color: #ff9a89; background: #e2685120; border-color: #e2685130; }
.inspector-section { padding: 17px 2px 15px; border-bottom: 1px solid var(--line); }
.chassis-profile, .movement-profile { padding-top: 12px; padding-bottom: 12px; }
.turret-profile { padding-top: 12px; padding-bottom: 12px; }
.chassis-type-card, .chassis-stat-grid > div { min-width: 0; padding: 8px; border: 1px solid #d9e8dc14; border-radius: 6px; background: #111b22; }
.chassis-type-card { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.chassis-type-card small, .chassis-stat-grid small { color: #788a80; font-size: 7px; font-weight: 800; letter-spacing: .8px; }
.chassis-type-card strong, .chassis-stat-grid strong { color: #dbe4d7; font-size: 10px; font-weight: 700; }
.chassis-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.chassis-stat-grid > div { display: flex; flex-direction: column; gap: 4px; }
.chassis-stat-grid > div:last-child { grid-column: 1 / -1; }
.turret-parent-field { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; color: #9aa89f; font-size: 8px; }
.turret-parent-field select { width: 100%; height: 29px; padding: 0 7px; border: 1px solid #d9e8dc18; border-radius: 6px; outline: 0; background: #111b22; color: #dfe7dd; font-size: 9px; }
.turret-parent-field select:focus { border-color: #c4d97a88; }
.turret-parent-field select:disabled { opacity: .55; cursor: not-allowed; }
.turret-parent-hint { display: block; margin-top: 6px; color: #74857d; font-size: 7px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; color: #a5b3a9; font-size: 8px; font-weight: 800; letter-spacing: 1.1px; }
.unit-label { color: #73847d; font-size: 7px; letter-spacing: .7px; }
.field-grid { display: grid; gap: 7px; }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.number-field { display: flex; flex-direction: column; gap: 5px; color: #899991; font-size: 9px; font-weight: 600; }
.number-field > div { height: 32px; min-width: 0; display: flex; align-items: center; padding: 0 7px; border: 1px solid #d9e8dc18; border-radius: 6px; background: #111b22; }
.number-field:focus-within > div { border-color: #c4d97a88; box-shadow: 0 0 0 2px #c4d97a12; }
.number-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #dfe7dd; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.number-field input::-webkit-inner-spin-button { opacity: .55; }
.number-field small { color: #687972; font-size: 8px; font-weight: 700; }
.range-field { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; color: #9aa89f; font-size: 9px; font-weight: 600; }
.range-field > span { display: flex; justify-content: space-between; }
.range-field b { color: #c8dc86; font-size: 9px; }
input[type="range"] { width: 100%; height: 4px; margin: 3px 0; border-radius: 4px; accent-color: #c2d779; cursor: pointer; }
.rotation-field { margin-top: 13px; }
.nudge-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.nudge-controls > span { color: #7e8e87; font-size: 7px; font-weight: 800; letter-spacing: .8px; }
.nudge-controls > div { display: flex; gap: 4px; }
.nudge-controls button { width: 26px; height: 25px; border: 1px solid #d8e5dc1b; border-radius: 5px; background: #1d2b31; color: #bbca9c; cursor: pointer; }
.nudge-controls button:hover { border-color: #c8dc7d6b; background: #293a3b; color: #e2efb2; }
.colour-section { padding-top: 15px; padding-bottom: 13px; }
.custom-colour { position: relative; display: inline-flex; align-items: center; height: 21px; padding: 0 5px; border: 1px solid #d7e79835; border-radius: 5px; color: #c5da80; font-size: 7px; font-weight: 800; letter-spacing: .4px; cursor: pointer; }
.custom-colour input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chassis-colours { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.chassis-colours label { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #9aa89f; font-size: 8px; }
.chassis-colours input { width: 25px; height: 22px; padding: 2px; border: 1px solid #d9e8dc24; border-radius: 5px; background: #111b22; cursor: pointer; }
.movement-colours { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.movement-colours label { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #9aa89f; font-size: 8px; }
.movement-colours input { width: 25px; height: 22px; padding: 2px; border: 1px solid #d9e8dc24; border-radius: 5px; background: #111b22; cursor: pointer; }
.turret-colours { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.turret-colours label { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #9aa89f; font-size: 8px; }
.turret-colours input { width: 25px; height: 22px; padding: 2px; border: 1px solid #d9e8dc24; border-radius: 5px; background: #111b22; cursor: pointer; }
.weapon-profile { padding-top: 12px; padding-bottom: 12px; }
.weapon-elevation-limits, .weapon-colours { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.weapon-elevation-limits label, .weapon-colours label { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #9aa89f; font-size: 8px; }
.weapon-elevation-limits input { width: 48px; height: 24px; padding: 2px 5px; border: 1px solid #d9e8dc24; border-radius: 5px; outline: 0; color: #dce5dc; background: #111b22; font-size: 9px; }
.weapon-elevation-field { margin-top: 12px; }
.weapon-attachment-fields { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.weapon-attachment-fields > label { display: flex; flex-direction: column; gap: 5px; color: #9aa89f; font-size: 8px; }
.weapon-attachment-fields select { width: 100%; height: 28px; padding: 0 7px; border: 1px solid #d9e8dc24; border-radius: 5px; outline: 0; color: #dce5dc; background: #111b22; font-size: 9px; }
.weapon-attachment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.weapon-attachment-actions .secondary-action { justify-content: center; padding: 7px 5px; font-size: 8px; }
.weapon-colours { padding-top: 10px; border-top: 1px solid var(--line); }
.weapon-colours input { width: 25px; height: 22px; padding: 2px; border: 1px solid #d9e8dc24; border-radius: 5px; background: #111b22; cursor: pointer; }
.palette-list { display: flex; flex-direction: column; gap: 8px; }
.palette-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.palette-name { color: #899990; font-size: 8px; white-space: nowrap; }
.swatch-list { display: flex; gap: 5px; }
.colour-swatch { width: 16px; height: 16px; padding: 0; border: 2px solid #28363a; outline: 1px solid transparent; border-radius: 50%; background: var(--swatch); cursor: pointer; }
.colour-swatch:hover { transform: scale(1.13); }
.colour-swatch.active { outline-color: #e4edcc; }
.inspector-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 13px 0 6px; }
.secondary-action { height: 31px; padding: 0 9px; border: 1px solid #d9e6db1b; border-radius: 6px; background: #1e2b32; color: #c3cec4; font-size: 9px; font-weight: 600; cursor: pointer; }
.secondary-action:hover { background: #2a3a3e; border-color: #d9e6db39; color: white; }
.inspector-actions .secondary-action { display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.inspector-actions .secondary-action:disabled { opacity: .38; cursor: default; }
.inspector-bottom { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 12px 2px 0; color: #82918b; font-size: 8px; }
.keyboard-hint { padding: 3px 5px; border-radius: 4px; background: #c5d77620; color: #cfe18b; font-size: 7px; font-weight: 800; letter-spacing: .7px; }
kbd { padding: 2px 4px; border: 1px solid #ffffff19; border-radius: 3px; background: #ffffff08; color: #bac6bb; font: 8px var(--font); }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 42px; transform: translate(-50%, 12px); padding: 10px 16px; border: 1px solid #d6e6913b; border-radius: 7px; background: #1b2b2c; color: #e2edc3; box-shadow: 0 7px 25px #07101355; font-size: 11px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: #091117c9; backdrop-filter: blur(7px); }
.modal-card { width: min(475px, 100%); max-height: min(680px, calc(100vh - 40px)); display: flex; flex-direction: column; padding: 23px; border: 1px solid #dce9df20; border-radius: 13px; background: #1a262d; box-shadow: 0 25px 90px #070d10a8; overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-header h2 { margin: 0; font: 600 21px var(--display); letter-spacing: -.5px; color: #eef2e9; }
.modal-header .eyebrow { margin-bottom: 6px; }
.modal-close { width: 30px; height: 30px; border: 1px solid #ffffff17; border-radius: 7px; background: #ffffff08; color: #aeb9af; font-size: 19px; cursor: pointer; }
.modal-close:hover { background: #ffffff15; color: white; }
.modal-description { margin: 12px 0 18px; color: #9aa9a0; font-size: 11px; line-height: 1.6; }
.modal-label { margin-bottom: 7px; color: #a4b2a7; font-size: 8px; font-weight: 800; letter-spacing: 1.1px; }
.modal-input { height: 40px; padding: 0 11px; outline: 0; border: 1px solid #d9e6dc20; border-radius: 7px; background: #101a21; color: #e7eee6; font-size: 12px; }
.modal-input:focus { border-color: #c5da7d88; box-shadow: 0 0 0 3px #c5da7d16; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal-actions > button { height: 35px; padding: 0 13px; }
.primary-action, .danger-action { height: 32px; padding: 0 11px; border: 1px solid #d3e59062; border-radius: 6px; background: #bbd276; color: #202a26; font-size: 10px; font-weight: 800; cursor: pointer; }
.primary-action:hover { background: #d2e697; }
.danger-action { border-color: #ea8d7a50; background: #bd6658; color: #fff1ed; }
.danger-action:hover { background: #d17563; }
.saved-design-list { margin: 18px -3px 0; padding: 0 3px; overflow-y: auto; }
.saved-design { min-height: 67px; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #e2ede70e; }
.saved-thumb { position: relative; width: 45px; height: 43px; flex: 0 0 45px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: linear-gradient(145deg, #334a46, #27363a); color: #c8d987; }
.saved-thumb span { transform: skewY(-9deg); font-size: 25px; }
.saved-thumb i { position: absolute; left: 4px; bottom: 7px; color: #c7b277; font-style: normal; font-size: 15px; }
.saved-thumb b { position: absolute; right: 4px; top: 3px; color: #e0b766; font-size: 11px; }
.saved-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.saved-copy strong { overflow: hidden; color: #dce6db; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.saved-copy small { color: #88988f; font-size: 9px; }
.saved-actions { display: flex; gap: 4px; }
.saved-actions button, .saved-actions a { min-width: 27px; height: 27px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e1ebdf15; border-radius: 5px; background: #ffffff07; color: #a8b5a9; font-size: 10px; text-decoration: none; cursor: pointer; }
.saved-actions button:hover, .saved-actions a:hover { border-color: #c6d98256; background: #c6d98215; color: #e5efc2; }
.saved-actions .saved-load { color: #d1e398; font-weight: 700; }
.empty-saves { min-height: 130px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #a6b3a8; }
.empty-saves > span { color: #c1d57f; font-size: 27px; }
.empty-saves small { color: #85958c; font-size: 10px; }

.library-collapsed .studio-layout { grid-template-columns: 48px minmax(390px, 1fr) 292px; }
.library-collapsed .library-panel { padding-left: 10px; padding-right: 10px; }
.library-collapsed .library-panel > :not(.panel-heading), .library-collapsed .panel-heading > div { display: none; }
.library-collapsed .panel-heading { justify-content: center; margin: 0; }
.library-collapsed #collapse-library { transform: rotate(180deg); }

@media (max-width: 1150px) {
  .studio-layout { grid-template-columns: 225px minmax(350px, 1fr) 265px; }
  .library-panel { padding-left: 12px; padding-right: 12px; }
  .inspector-panel { padding-left: 13px; padding-right: 13px; }
  .topbar { gap: 16px; padding: 0 16px; }
  .workspace-tools .chip-button { padding: 0 6px; }
  .camera-note { display: none; }
}
@media (max-width: 930px) {
  body { min-width: 680px; }
  .studio-layout { grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.2fr) minmax(220px, .95fr); }
  .workbench-bar { padding: 0 10px; }
  .library-panel { padding-left: 10px; padding-right: 10px; }
  .topbar { gap: 12px; }
  .autosave-label { display: none; }
  .workspace-tools { gap: 2px; }
  .workspace-tools .chip-button { padding: 0 4px; font-size: 0; gap: 0; justify-content: center; width: 28px; }
  .workspace-tools .chip-button > span { font-size: 13px; }
  .workspace-tools .camera-select { width: 48px; font-size: 8px; }
  .workspace-tools .precision-select { width: 48px; font-size: 8px; }
  .workspace-tools .compact-tool { width: 24px; font-size: 13px; }
  .workspace-tools .toolbar-divider { display: none; }
  .inspector-bottom { font-size: 7px; }
  .library-collapsed .studio-layout { grid-template-columns: 48px minmax(280px, 1.2fr) minmax(220px, .95fr); }
}
@media (max-width: 720px) {
  body { min-width: 0; overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; }
  .topbar { height: 58px; flex-basis: 58px; padding: 0 10px; gap: 8px; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy small, .project-name { display: none; }
  .tool-button { padding: 0 7px; font-size: 10px; }
  .top-actions { gap: 1px; }
  .top-actions .toolbar-divider { margin: 0 2px; }
  .studio-layout, .library-collapsed .studio-layout { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: 245px minmax(460px, 1fr) minmax(410px, auto); }
  .library-panel { grid-row: 1; padding: 11px 12px 8px; }
  .library-panel .panel-heading { margin-bottom: 8px; }
  .library-panel .search-box { margin-bottom: 7px; }
  .category-list { display: flex; overflow-x: auto; margin-bottom: 4px; }
  .category-button { flex: 0 0 auto; }
  .library-caption, .library-tip { display: none; }
  .component-list { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 5px; overflow-x: auto; overflow-y: hidden; margin: 0 -5px; padding: 0 4px 5px; }
  .component-card { width: 144px; min-width: 144px; min-height: 63px; }
  .component-card-copy small { max-width: 90px; }
  .workbench { grid-row: 2; }
  .inspector-panel { display: flex; min-height: 410px; padding: 16px 13px 12px; }
  .workspace-tools .chip-button { font-size: 0; gap: 0; width: 27px; padding: 0; justify-content: center; }
  .workspace-tools .chip-button > span { font-size: 14px; }
  .workspace-tools .camera-select { width: 44px; font-size: 8px; }
  .workspace-tools .precision-select { width: 44px; font-size: 8px; }
  .workspace-tools .compact-tool { width: 23px; font-size: 12px; }
  .placed-parts-list { max-height: 105px; }
  .workspace-tools .toolbar-divider { display: none; }
  .bay-stamp { top: 12px; left: 13px; }
  .bay-stamp strong { font-size: 18px; }
  .viewport-hint { left: 10px; transform: none; gap: 5px; font-size: 7px; }
}

/* Child-friendly workshop shell. Advanced editor controls stay mounted and are
   revealed by the Advanced Mode switch rather than removed from the page. */
.simple-workshop {
  --ink: #263650;
  --muted: #64748b;
  --panel: #ffffff;
  --panel-deep: #f7f9ff;
  --line: rgba(57, 78, 118, .12);
  --lime: #39a98d;
  --lime-dark: #228b76;
  --amber: #ffb84d;
  font-family: "DM Sans", "Trebuchet MS", sans-serif;
  background: #eaf1ff;
}

body.workshop-body {
  min-width: 0;
  background: #eaf1ff;
  color: #263650;
}

.simple-workshop .topbar {
  height: 72px;
  flex-basis: 72px;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid #dfe7fb;
  background: #ffffff;
  box-shadow: 0 4px 18px #3c599111;
}

.simple-workshop .brand { gap: 11px; color: #263650; }
.simple-workshop .brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffcf5a, #ff9a54);
  color: #fff;
  font-size: 22px;
  transform: rotate(-4deg);
  box-shadow: 0 5px 13px #faab4650;
}
.simple-workshop .brand-copy { min-width: 145px; }
.simple-workshop .brand-copy strong { color: #2e456a; font-size: 14px; letter-spacing: .45px; }
.simple-workshop .brand-copy small { color: #7185a6; font-size: 9px; letter-spacing: 1.1px; }
.simple-workshop .project-name { color: #526785; font-size: 12px; }
.simple-workshop .status-dot, .simple-workshop .live-dot, .simple-workshop .footer-led {
  background: #45c69d;
  box-shadow: 0 0 9px #45c69d55;
}
.simple-workshop .autosave-label { color: #8a9ab2; }
.simple-workshop .top-actions { gap: 7px; }
.simple-workshop .tool-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #e0e8f7;
  border-radius: 12px;
  background: #f8faff;
  color: #405777;
  font-size: 12px;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.simple-workshop .tool-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #c9d8f4;
  background: #fff;
  color: #263c5c;
  box-shadow: 0 5px 13px #3d5d981a;
}
.simple-workshop .tool-button:disabled { opacity: .58; }
.simple-workshop .tool-icon { color: #f5a13c; font-size: 18px; }
.simple-workshop .history-button { width: 40px; padding: 0; font-size: 23px; }
.simple-workshop .save-button {
  border-color: #ffad46;
  background: linear-gradient(145deg, #ffc85c, #ffa843);
  color: #fff;
  box-shadow: 0 4px 12px #f6aa3a3b;
}
.simple-workshop .save-button .tool-icon { color: #fff; }
.simple-workshop .save-button:hover:not(:disabled) { background: linear-gradient(145deg, #ffd978, #ffb34e); color: #fff; }
.simple-workshop .tanks-button { background: #edf4ff; color: #4467aa; }
.simple-workshop .tanks-button .tool-icon { color: #648be0; }
.simple-workshop .test-drive-button {
  position: relative;
  gap: 7px;
  padding-right: 12px;
  border-color: #d7e2f5;
  background: #f2f5fb;
  color: #687b99;
  cursor: not-allowed;
}
.simple-workshop .test-drive-button small {
  padding: 3px 6px;
  border-radius: 7px;
  background: #ffe8ac;
  color: #8c6312;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.simple-workshop .play-icon { color: #7d8eaa; font-size: 11px; }
.simple-workshop .advanced-toggle { background: #f1efff; border-color: #e2defe; color: #705db0; }
.simple-workshop .advanced-icon { color: #806bd0; font-size: 16px; }
.simple-workshop.advanced-mode .advanced-toggle { background: #e2ddff; border-color: #c9befc; color: #554498; }

.simple-workshop .studio-layout { grid-template-columns: minmax(275px, 315px) minmax(0, 1fr); gap: 12px; padding: 12px; background: #eaf1ff; }
.simple-workshop.advanced-mode .studio-layout { grid-template-columns: minmax(260px, 290px) minmax(0, 1fr) minmax(290px, 330px); }
.simple-workshop .side-panel { border: 1px solid #e2e9f7; border-radius: 18px; background: #fff; box-shadow: 0 8px 26px #47649c12; }
.simple-workshop .library-panel { padding: 16px 14px 12px; }
.simple-workshop .inspector-panel { display: none; padding: 16px 15px 12px; }
.simple-workshop.advanced-mode .inspector-panel { display: flex; }
.simple-workshop .panel-heading { min-height: 42px; margin: 0 2px 12px; }
.simple-workshop .eyebrow { color: #7e94b5; font-size: 9px; letter-spacing: 1px; }
.simple-workshop .panel-heading h1, .simple-workshop .panel-heading h2 {
  color: #2b4267;
  font-size: 20px;
  letter-spacing: -.3px;
}
.simple-workshop .count-pill { color: #19886f; background: #dff8ef; font-size: 10px; }
.simple-workshop .small-icon-button { border-color: #e2e9f7; border-radius: 9px; background: #f5f8ff; color: #6780a2; }
.simple-workshop .search-box { height: 36px; margin-bottom: 8px; border-color: #e7edf8; border-radius: 11px; background: #fbfcff; color: #8a9bb5; }
.simple-workshop .search-box input { color: #344a6d; font-size: 12px; }
.simple-workshop .search-box input::placeholder { color: #94a5bf; }
.workshop-category-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 1px 0 8px; }
.workshop-category-tab {
  min-width: 0;
  min-height: 62px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: #f4f7ff;
  color: #647898;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.workshop-category-tab > span { font-size: 20px; line-height: 1; }
.workshop-category-tab strong { overflow: hidden; max-width: 100%; font-size: 7.5px; font-weight: 900; text-overflow: ellipsis; }
.workshop-category-tab:hover { transform: translateY(-2px); box-shadow: 0 4px 10px #536da320; }
.workshop-category-tab.selected { border-color: #77cdb3; background: #e7fbf3; color: #237b68; box-shadow: 0 3px 9px #43b9911e; }
.workshop-category-tab[data-workshop-category="TRACKS"] { background-color: #fff5dd; color: #a97924; }
.workshop-category-tab[data-workshop-category="TRACKS"].selected { border-color: #ffc968; background: #fff4d9; }
.workshop-category-tab[data-workshop-category="WEAPONS"] { background-color: #eaf1ff; color: #5578c2; }
.workshop-category-tab[data-workshop-category="WEAPONS"].selected { border-color: #9db8fa; background: #edf3ff; }
.workshop-category-tab[data-workshop-category="ARMOUR"] { background-color: #fff0ed; color: #be6d62; }
.workshop-category-tab[data-workshop-category="ARMOUR"].selected { border-color: #f3aaa0; background: #fff0ed; }
.workshop-category-tab[data-workshop-category="DECORATIONS"] { background-color: #f4efff; color: #8262ba; }
.workshop-category-tab[data-workshop-category="DECORATIONS"].selected { border-color: #c4a8f4; background: #f4efff; }
.simple-workshop #category-list { display: none; }
.simple-workshop.advanced-mode #category-list { display: grid; }
.simple-workshop.advanced-mode .workshop-category-nav { display: none; }
.simple-workshop .library-caption { color: #778eae; font-size: 9px; letter-spacing: .45px; }
.simple-workshop .component-list { margin: 0 -7px; padding: 0 6px 7px 5px; scrollbar-color: #c7d5eb transparent; }
.simple-workshop .component-category-heading { height: 30px; border-radius: 8px; color: #617895; font-size: 9px; }
.simple-workshop .component-category-heading:hover { background: #f4f7fd; }
.simple-workshop .component-category-heading span { color: #91a2bc; }
.simple-workshop .component-card {
  min-height: 78px;
  gap: 10px;
  padding: 9px;
  border-radius: 12px;
}
.simple-workshop .component-card:hover { border-color: #cbdcf4; background: #f8faff; box-shadow: 0 3px 10px #536da314; }
.simple-workshop .component-card.selected { border-color: #76cdb2; background: #e9faf3; box-shadow: 0 3px 10px #38a78320; }
.simple-workshop .component-card:focus-visible { outline: 3px solid #83cdb8; outline-offset: 1px; }
.simple-workshop .part-thumbnail { flex-basis: 50px; width: 50px; height: 50px; border-radius: 12px; }
.simple-workshop .component-card-copy strong { color: #344b70; font-size: 11px; }
.simple-workshop .component-card-copy small:not(.component-card-dimensions) {
  display: -webkit-box;
  overflow: hidden;
  color: #7588a5;
  font-size: 10px;
  line-height: 1.35;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.simple-workshop .component-card-copy .component-card-dimensions { color: #628a7f; font-size: 9px; }
.simple-workshop:not(.advanced-mode) .component-card-dimensions { display: none; }
.simple-workshop .drag-handle { color: #91a5c1; font-size: 16px; }
.simple-workshop .library-tip { border-color: #f3e7c1; border-radius: 11px; background: #fffaf0; color: #7d806e; font-size: 10px; }
.simple-workshop .library-tip strong { color: #a67524; }
.simple-workshop .tip-spark { color: #f3b644; }

.simple-workshop .workbench { border: 1px solid #dfe8f7; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px #47649c18; }
.simple-workshop .workbench-bar { min-height: 52px; height: 52px; flex-basis: 52px; padding: 0 17px; border-bottom-color: #e5ecf8; border-radius: 20px 20px 0 0; background: #fff; }
.simple-workshop .workspace-title { font-size: 12px; }
.simple-workshop .workspace-title strong { color: #557393; font-size: 10px; letter-spacing: .7px; }
.simple-workshop #selection-label { color: #627895; font-size: 11px; }
.simple-workshop .workspace-tools { gap: 5px; }
.simple-workshop:not(.advanced-mode) .workspace-tools > #camera-view,
.simple-workshop:not(.advanced-mode) .workspace-tools > #focus-selected,
.simple-workshop:not(.advanced-mode) .workspace-tools > #grid-toggle,
.simple-workshop:not(.advanced-mode) .workspace-tools > #snap-toggle,
.simple-workshop:not(.advanced-mode) .workspace-tools > #mount-points-toggle,
.simple-workshop:not(.advanced-mode) .workspace-tools > #move-precision,
.simple-workshop:not(.advanced-mode) .workspace-tools > .toolbar-divider,
.simple-workshop:not(.advanced-mode) .workspace-tools > #camera-reset { display: none; }
.mobile-panel-toggle { display: none; }
.simple-workshop .viewport { margin: 0; border-radius: 0 0 19px 19px; background: linear-gradient(145deg, #c8dff2, #a9d8d0); }
.simple-workshop .bay-stamp { opacity: .58; }
.simple-workshop .bay-stamp strong { color: #315d69; }
.simple-workshop .stamp-top, .simple-workshop .stamp-bottom { color: #47717a; }
.simple-workshop .viewport-hint { padding: 9px 13px; border-color: #ffffff8a; border-radius: 12px; background: #355b61d9; font-size: 10px; }
.simple-workshop .hint-key { font-size: 9px; }
.simple-workshop .camera-controls { right: 18px; bottom: 18px; border: 1px solid #ffffffa3; border-radius: 12px; }
.simple-workshop .camera-controls button { width: 40px; height: 38px; background: #ffffffed; color: #456a75; font-size: 22px; }
.simple-workshop .axis-widget { display: none; }
.simple-workshop .workbench-footer { height: 34px; flex-basis: 34px; border-radius: 0 0 18px 18px; background: #fff; color: #7e91ad; font-size: 9px; letter-spacing: .3px; }
.simple-workshop .camera-note { display: none; }

.simple-workshop .inspector-heading { margin-bottom: 12px; }
.simple-workshop .settings-mark { border-color: #e7e1fb; background: #f4f0ff; color: #7969b5; }
.simple-workshop .placed-parts { border-color: #e4ebf7; border-radius: 11px; background: #fff; }
.simple-workshop .placed-parts-heading { height: 36px; border-radius: 10px 10px 0 0; background: #f4f7fd; color: #597391; font-size: 9px; }
.simple-workshop .placed-parts-list { scrollbar-color: #c7d5eb transparent; }
.simple-workshop .placed-part-row.selected { background: #e8f8f0; }
.simple-workshop .placed-part-select { color: #465e7d; font-size: 10px; }
.simple-workshop .inspector-content { scrollbar-color: #c7d5eb transparent; }
.simple-workshop .selected-part-card, .simple-workshop .chassis-type-card, .simple-workshop .chassis-stat-grid > div { border-color: #e4ebf7; border-radius: 11px; background: #f7f9ff; }
.simple-workshop .selected-part-info strong, .simple-workshop .chassis-type-card strong, .simple-workshop .chassis-stat-grid strong { color: #354d70; }
.simple-workshop .transform-mode-controls button { height: 34px; border-color: #e4eaf5; border-radius: 9px; background: #f7f9ff; color: #607797; font-size: 11px; }
.simple-workshop .transform-mode-controls button.selected { border-color: #a8dcca; background: #e8f8f0; color: #267c68; }
.simple-workshop .number-field > div, .simple-workshop .turret-parent-field select,
.simple-workshop .weapon-attachment-fields select, .simple-workshop .weapon-elevation-limits input { border-color: #dfe7f3; border-radius: 8px; background: #f8faff; color: #344c70; }
.simple-workshop .number-field input { color: #344c70; }
.simple-workshop .secondary-action { min-height: 36px; border-color: #dfe7f3; border-radius: 9px; background: #f6f8fd; color: #4b6588; font-size: 10px; }
.simple-workshop .secondary-action:hover { border-color: #c8d7f0; background: #edf3ff; color: #344e75; }
.simple-workshop .colour-swatch { width: 22px; height: 22px; border-color: #fff; box-shadow: 0 1px 4px #455c7b30; }
.simple-workshop .modal-card { border: 1px solid #e1e9f7; border-radius: 18px; background: #fff; box-shadow: 0 25px 90px #28416b33; }
.simple-workshop .modal-header h2 { color: #2e456a; }
.simple-workshop .modal-close { border-color: #e2e9f5; background: #f6f8fd; color: #607795; }
.simple-workshop .modal-description, .simple-workshop .saved-copy strong { color: #536b8b; }
.simple-workshop .modal-label { color: #7186a4; }
.simple-workshop .modal-input { border-color: #dfe7f4; border-radius: 9px; background: #f8faff; color: #344b70; }
.simple-workshop .saved-design { border-top-color: #e7edf7; }
.simple-workshop .saved-thumb { border-radius: 11px; background: linear-gradient(145deg, #d9f4e9, #dce8ff); color: #51967e; }
.simple-workshop .saved-copy small { color: #8495ae; }
.simple-workshop .saved-actions button { border-color: #e2e9f5; border-radius: 8px; background: #f8faff; color: #5b7394; }
.simple-workshop .empty-saves { color: #627996; }
.simple-workshop .inspector-bottom { color: #7c8eaa; }
.simple-workshop .keyboard-hint { background: #e6f8ef; color: #2e9072; }
.simple-workshop .toast { border-color: #d4e5cf; border-radius: 12px; background: #fff; color: #38556c; box-shadow: 0 7px 25px #30445b30; }

@media (max-width: 1150px) {
  .simple-workshop .studio-layout { grid-template-columns: minmax(245px, 285px) minmax(0, 1fr); }
  .simple-workshop.advanced-mode .studio-layout { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(260px, 295px); }
  .simple-workshop .topbar { gap: 10px; padding: 0 13px; }
  .simple-workshop .brand-copy { min-width: 125px; }
  .simple-workshop .top-actions { gap: 4px; }
  .simple-workshop .tool-button { padding: 0 9px; }
}

@media (max-width: 850px) {
  body.workshop-body { min-width: 0; overflow: hidden; }
  .simple-workshop.app-shell { height: 100vh; height: 100dvh; min-height: 0; }
  .simple-workshop .topbar { min-height: 98px; height: auto; flex: 0 0 auto; flex-wrap: wrap; align-content: center; gap: 3px 10px; padding: 7px 12px; }
  .simple-workshop .brand { flex: 1 1 145px; }
  .simple-workshop .brand-mark { width: 38px; height: 38px; font-size: 19px; }
  .simple-workshop .brand-copy { min-width: 0; }
  .simple-workshop .brand-copy strong { font-size: 12px; }
  .simple-workshop .brand-copy small { display: block; font-size: 8px; }
  .simple-workshop .project-name { display: none; }
  .simple-workshop .top-actions { width: 100%; justify-content: space-between; gap: 4px; }
  .simple-workshop .tool-button { min-height: 35px; padding: 0 8px; border-radius: 10px; font-size: 10px; }
  .simple-workshop .history-button { width: 34px; }
  .simple-workshop .test-drive-button { gap: 4px; }
  .simple-workshop .test-drive-button small { font-size: 7px; }
  .simple-workshop .advanced-toggle { padding: 0 7px; }
  .simple-workshop .studio-layout,
  .simple-workshop.advanced-mode .studio-layout,
  .simple-workshop.library-collapsed .studio-layout {
    position: relative;
    display: block;
    min-height: 0;
    flex: 1 1 auto;
    padding: 8px;
    overflow: hidden;
  }
  .simple-workshop .workbench { position: absolute; inset: 8px; min-height: 0; }
  .simple-workshop .workbench-bar { gap: 7px; min-height: 48px; height: 48px; flex-basis: 48px; padding: 0 10px; }
  .simple-workshop .workspace-title { flex: 1; gap: 6px; font-size: 10px; }
  .simple-workshop .workspace-title strong { font-size: 9px; }
  .simple-workshop #selection-label { max-width: 125px; font-size: 10px; }
  .simple-workshop .mobile-panel-toggle {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #dce6f5;
    border-radius: 10px;
    background: #f2f6ff;
    color: #476996;
    font-size: 10px;
    font-weight: 800;
  }
  .simple-workshop .workspace-tools > :not(#zoom-in):not(#zoom-out) { display: none !important; }
  .simple-workshop .viewport-hint { left: 10px; bottom: 11px; transform: none; max-width: calc(100% - 74px); padding: 7px 9px; font-size: 9px; white-space: normal; }
  .simple-workshop .camera-controls { right: 10px; bottom: 10px; }
  .simple-workshop .bay-stamp { top: 10px; left: 11px; }
  .simple-workshop .bay-stamp strong { font-size: 18px; }
  .simple-workshop .workbench-footer { padding: 0 10px; }
  .simple-workshop .library-panel {
    position: absolute;
    z-index: 8;
    top: auto;
    bottom: 8px;
    left: 8px;
    width: calc(100% - 16px);
    height: min(56vh, 500px);
    padding: 14px 12px 10px;
    transform: translateY(calc(100% + 14px));
    transition: transform .2s ease;
  }
  .simple-workshop.mobile-parts-open .library-panel { transform: translateY(0); }
  .simple-workshop .library-panel .panel-heading { margin-bottom: 9px; }
  .simple-workshop .workshop-category-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .simple-workshop .workshop-category-tab { min-height: 58px; }
  .simple-workshop .component-list { display: block; overflow-y: auto; overflow-x: hidden; }
  .simple-workshop .component-card { width: 100%; min-height: 76px; }
  .simple-workshop .drag-handle {
    display: grid;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    touch-action: none;
  }
  .simple-workshop .library-tip { display: flex; }
  .simple-workshop.advanced-mode .inspector-panel {
    position: absolute;
    z-index: 9;
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: min(360px, calc(100% - 40px));
    padding: 13px 12px 10px;
    border-radius: 18px;
    transform: translateX(calc(100% + 14px));
    transition: transform .2s ease;
  }
  .simple-workshop.advanced-mode.mobile-inspector-open .inspector-panel { transform: translateX(0); }
  .simple-workshop .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 145px; overflow-y: auto; }
  .simple-workshop .category-button { min-width: 0; }
  .simple-workshop.library-collapsed .library-panel > :not(.panel-heading),
  .simple-workshop.library-collapsed .panel-heading > div { display: initial; }
  .simple-workshop.library-collapsed .library-panel { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 430px) {
  .simple-workshop .topbar { min-height: 104px; }
  .simple-workshop .top-actions { gap: 3px; }
  .simple-workshop .tool-button { padding: 0 6px; font-size: 9px; }
  .simple-workshop .tool-button > .tool-icon { font-size: 15px; }
  .simple-workshop #new-tank { width: 32px; padding: 0; font-size: 0; }
  .simple-workshop #new-tank .tool-icon { font-size: 17px; }
  .simple-workshop .history-button { width: 30px; font-size: 19px; }
  .simple-workshop #load-tank { width: 32px; padding: 0; }
  .simple-workshop #load-tank > span:last-child { display: none; }
  .simple-workshop .test-drive-button { flex-wrap: wrap; justify-content: center; gap: 2px 4px; padding: 3px 5px; }
  .simple-workshop .test-drive-button small { flex-basis: 100%; text-align: center; }
  .simple-workshop .test-drive-button > span:nth-child(2) { display: none; }
  .simple-workshop .advanced-toggle { max-width: 45px; flex-direction: column; gap: 0; line-height: 1; }
  .simple-workshop .advanced-toggle > span:last-child { overflow: hidden; width: 37px; font-size: 7px; text-overflow: ellipsis; }
  .simple-workshop .workshop-category-tab > span { font-size: 18px; }
  .simple-workshop .workshop-category-tab strong { font-size: 9px; }
  .simple-workshop .workspace-title strong { display: none; }
  .simple-workshop .workspace-title .bar-slash { display: none; }
  .simple-workshop #selection-label { max-width: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .simple-workshop *, .simple-workshop *::before, .simple-workshop *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.simple-workshop.has-selection:not(.advanced-mode) .studio-layout {
  grid-template-columns: minmax(245px, 285px) minmax(0, 1fr) minmax(245px, 275px);
}
.simple-workshop.has-selection:not(.advanced-mode) .inspector-panel {
  display: flex;
  min-width: 0;
  padding: 12px;
}
.simple-workshop.advanced-mode .simple-part-panel { display: none; }
.simple-workshop:not(.advanced-mode) .inspector-panel > :not(.simple-part-panel) { display: none; }
.simple-part-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 3px 4px 7px;
  scrollbar-color: #c7d5eb transparent;
}
.simple-part-heading { min-height: 48px; display: flex; align-items: center; gap: 10px; }
.simple-part-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid #d5efe5;
  border-radius: 14px;
  background: linear-gradient(145deg, #edfff7, #ddf5eb);
  color: #479477;
  font-size: 23px;
}
.simple-part-heading > div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.simple-part-eyebrow { color: #8b9bb3; font-size: 8px; font-weight: 900; letter-spacing: .9px; }
.simple-part-heading strong { overflow: hidden; color: #354d70; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.simple-part-close { display: none; }
.simple-part-hint { margin: -5px 0 0; color: #8292a9; font-size: 10px; line-height: 1.4; }
.simple-control-section { display: flex; flex-direction: column; gap: 7px; }
.simple-control-section h3 { margin: 0; color: #576e8f; font-size: 11px; font-weight: 900; }
.simple-control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.simple-control-grid button,
.simple-size-controls button,
.simple-part-actions button {
  min-width: 0;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #e3eaf5;
  border-radius: 10px;
  background: #f7f9ff;
  color: #506887;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.simple-control-grid button:hover,
.simple-size-controls button:hover,
.simple-part-actions button:hover { transform: translateY(-1px); border-color: #b8dccc; background: #effaf5; }
.simple-control-grid button > span { color: #4a9b80; font-size: 18px; font-weight: 800; line-height: 1; }
.simple-control-grid button small,
.simple-size-controls button small,
.simple-part-actions button small { color: #617895; font-size: 9px; font-weight: 800; }
.simple-size-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.simple-size-controls button { min-height: 39px; font-size: 17px; font-weight: 800; }
.simple-paint-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.simple-paint-swatches button {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #fff;
  border-radius: 10px;
  background: var(--simple-swatch);
  box-shadow: 0 0 0 1px #dce5f0;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.simple-paint-swatches button:hover { transform: scale(1.09); }
.simple-paint-swatches button.selected { box-shadow: 0 0 0 2px #4ba98b; }
.simple-custom-colour { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #647a97; font-size: 10px; font-weight: 800; }
.simple-custom-colour input { width: 40px; height: 30px; padding: 2px; border: 1px solid #dce5f0; border-radius: 8px; background: #fff; cursor: pointer; }
.simple-part-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding-top: 3px; border-top: 1px solid #edf1f7; }
.simple-part-actions button { min-height: 43px; flex-direction: column; gap: 1px; }
.simple-part-actions button > span { color: #557a9b; font-size: 17px; line-height: 1; }
.simple-part-actions button[data-simple-action="delete"] { background: #fff5f3; }
.simple-part-actions button[data-simple-action="delete"] > span { color: #dc7167; }
.simple-part-actions button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.simple-control-grid button:focus-visible,
.simple-size-controls button:focus-visible,
.simple-part-actions button:focus-visible,
.simple-paint-swatches button:focus-visible { outline: 3px solid #76cdb2; outline-offset: 2px; }

@media (max-width: 1150px) and (min-width: 851px) {
  .simple-workshop.has-selection:not(.advanced-mode) .studio-layout {
    grid-template-columns: minmax(215px, 245px) minmax(0, 1fr) minmax(225px, 245px);
  }
  .simple-workshop.has-selection:not(.advanced-mode) .inspector-panel { padding: 10px; }
  .simple-workshop.has-selection:not(.advanced-mode) .simple-part-panel { gap: 9px; }
}

@media (max-width: 850px) {
  .simple-workshop #simple-controls-toggle { display: none; }
  .simple-workshop.has-selection:not(.advanced-mode) #simple-controls-toggle { display: inline-flex; }
  .simple-workshop.has-selection:not(.advanced-mode) .inspector-panel {
    position: absolute;
    z-index: 10;
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: min(350px, calc(100% - 24px));
    padding: 13px 12px 10px;
    border-radius: 18px;
    transform: translateX(calc(100% + 14px));
    transition: transform .2s ease;
  }
  .simple-workshop.has-selection:not(.advanced-mode).mobile-simple-controls-open .inspector-panel { transform: translateX(0); }
  .simple-workshop.has-selection:not(.advanced-mode) .simple-part-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #e3eaf5;
    border-radius: 9px;
    background: #f7f9ff;
    color: #7185a0;
    font-size: 20px;
    line-height: 1;
  }
}

.simple-workshop .garage-modal {
  width: min(850px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  border-color: #dce8f7;
  border-radius: 22px;
  background: linear-gradient(160deg, #fff 0%, #f7faff 100%);
}
.simple-workshop .garage-modal .modal-header h2 { font-size: 24px; }
.simple-workshop .garage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 3px 4px 8px;
}
.simple-workshop .garage-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e1e9f6;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 16px #48679610;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.simple-workshop .garage-card:hover { transform: translateY(-2px); border-color: #b8dcca; box-shadow: 0 9px 22px #48679619; }
.simple-workshop .garage-card .garage-preview {
  width: 100%;
  height: 112px;
  flex: 0 0 112px;
  border: 1px solid #e6effc;
  border-radius: 13px;
  background: linear-gradient(145deg, #eff9ff, #e4f7ef 60%, #fff4d9);
}
.simple-workshop .garage-tank-art { width: 100%; height: 100%; display: block; }
.simple-workshop .garage-card-copy { gap: 6px; }
.simple-workshop .garage-card-copy strong { color: #344b70; font-size: 14px; }
.simple-workshop .garage-card-copy small { color: #8596af; font-size: 10px; }
.simple-workshop .garage-card-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-top: 3px;
}
.simple-workshop .garage-card-actions button, .simple-workshop .garage-card-actions a {
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  border: 1px solid #e1e9f5;
  border-radius: 9px;
  background: #f7f9ff;
  color: #597391;
  font-size: 9px;
  font-weight: 800;
}
.simple-workshop .garage-card-actions button:hover, .simple-workshop .garage-card-actions a:hover { border-color: #bbdccf; background: #effaf5; color: #317f69; }
.simple-workshop .garage-card-actions .garage-play { border-color: #b7dfc3; background: #eaf8ed; color: #32754a; }
.simple-workshop .garage-card-actions .saved-load { border-color: #d9e8fc; background: #eaf3ff; color: #4774b1; }
.simple-workshop .garage-card-actions [data-delete]:hover { border-color: #f1c2bb; background: #fff1ef; color: #ba625b; }
.simple-workshop .garage-modal .saved-design-list { min-height: 0; max-height: min(58vh, 500px); }
.simple-workshop .garage-modal .empty-saves {
  grid-column: 1 / -1;
  min-height: 300px;
  gap: 11px;
  padding: 20px;
  border: 1px dashed #d8e6f4;
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 40%, #effaf5, #f8faff 72%);
  text-align: center;
}
.simple-workshop .garage-empty-art { width: min(260px, 100%); height: 145px; }
.simple-workshop .garage-modal .empty-saves strong { color: #344b70; font-size: 20px; }
.simple-workshop .garage-modal .empty-saves small { color: #7d91ad; font-size: 12px; }
.simple-workshop .garage-modal .empty-saves .primary-action {
  min-height: 40px;
  margin-top: 5px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: #ffca64;
  color: #604d25;
  font-size: 12px;
  box-shadow: 0 4px 0 #e7ad45;
}
.simple-workshop .garage-modal .empty-saves .primary-action:hover { transform: translateY(-1px); background: #ffd47c; }
.simple-workshop .modal-actions { flex-wrap: wrap; }
.simple-workshop .primary-action { border-radius: 10px; background: #a7e1ca; color: #275b4b; }
.simple-workshop .primary-action:hover { background: #baf0d9; }
.simple-workshop .danger-action { border-radius: 10px; background: #e77c70; }
.simple-workshop .danger-action:hover { background: #f08e81; }
.simple-workshop .secondary-action { border-radius: 10px; }

@media (max-width: 600px) {
  .simple-workshop .garage-modal { padding: 16px; }
  .simple-workshop .garage-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .simple-workshop .garage-card {
    display: grid;
    grid-template-columns: minmax(82px, 110px) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 14px;
  }
  .simple-workshop .garage-card .garage-preview { height: 86px; flex-basis: 86px; }
  .simple-workshop .garage-card-copy { min-width: 0; }
  .simple-workshop .garage-card-copy strong { font-size: 12px; }
  .simple-workshop .garage-card-copy small { font-size: 9px; }
  .simple-workshop .garage-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .simple-workshop .garage-card-actions button, .simple-workshop .garage-card-actions a { min-height: 29px; font-size: 9px; }
  .simple-workshop .garage-modal .saved-design-list { max-height: min(58vh, 470px); }
  .simple-workshop .garage-modal .empty-saves { min-height: 270px; }
  .simple-workshop .garage-modal .modal-actions { gap: 6px; margin-top: 14px; }
}

.mobile-actions-toggle { display: none; }
.mobile-actions-menu { display: contents; }
.simple-workshop .inspector-close { display: none; }
.top-actions { position: relative; }
#new-tank { order: 1; }
#undo { order: 2; }
#redo { order: 3; }
#save-tank { order: 4; }
#load-tank { order: 5; }
#test-drive { order: 6; }
#advanced-mode-toggle { order: 7; }

@media (max-width: 850px) {
  .simple-workshop.app-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .simple-workshop .topbar {
    min-height: 64px;
    height: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px 12px;
  }
  .simple-workshop .brand { flex: 0 0 auto; min-height: 44px; }
  .simple-workshop .brand-mark { width: 34px; height: 34px; font-size: 17px; }
  .simple-workshop .brand-copy { min-width: 0; }
  .simple-workshop .project-name {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
    overflow: hidden;
    font-size: 11px;
  }
  .simple-workshop #project-title { overflow: hidden; text-overflow: ellipsis; }
  .simple-workshop .autosave-label { display: none; }
  .simple-workshop .top-actions {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
  }
  .simple-workshop .tool-button {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 11px;
  }
  .simple-workshop .mobile-actions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    padding: 0;
    font-size: 17px;
    letter-spacing: 1px;
  }
  .simple-workshop .mobile-actions-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: min(250px, calc(100vw - 16px));
    max-height: min(360px, calc(100dvh - 80px));
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #dfe8f7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px #30445b38;
  }
  .simple-workshop .mobile-actions-menu.is-open { display: grid; }
  .simple-workshop .mobile-actions-menu .tool-button {
    width: 100%;
    justify-content: flex-start;
    padding: 0 9px;
    border: 1px solid #e4ebf7;
    background: #f7f9ff;
    color: #4b6588;
  }
  .simple-workshop .mobile-actions-menu .history-button { justify-content: center; }
  .simple-workshop .mobile-actions-menu .test-drive-button {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 4px;
    padding: 2px 6px;
  }
  .simple-workshop .mobile-actions-menu .test-drive-button small {
    flex-basis: 100%;
    font-size: 8px;
    text-align: center;
  }
  .simple-workshop .mobile-actions-menu .advanced-toggle { gap: 6px; }
  .simple-workshop .studio-layout,
  .simple-workshop.advanced-mode .studio-layout,
  .simple-workshop.library-collapsed .studio-layout,
  .simple-workshop.has-selection:not(.advanced-mode) .studio-layout {
    position: relative;
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    padding: 6px;
    overflow: hidden;
    gap: 8px;
    grid-template-columns: minmax(200px, 30vw) minmax(0, 1fr);
  }
  .simple-workshop .workbench {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
  }
  .simple-workshop .workbench-bar { min-height: 48px; height: 48px; flex-basis: 48px; }
  .simple-workshop .library-panel {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    inset: auto;
    width: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 12px 10px 8px;
    transform: none;
  }
  .simple-workshop .inspector-panel {
    position: absolute;
    z-index: 10;
    min-height: 0;
    top: 50%;
    right: 8px;
    bottom: auto;
    width: min(360px, calc(100% - 24px));
    max-height: min(78dvh, 720px);
    padding: 12px;
    border-radius: 18px;
    transform: translateX(calc(100% + 16px)) translateY(-50%);
    transition: transform .2s ease;
  }
  .simple-workshop.has-selection:not(.advanced-mode) .inspector-panel,
  .simple-workshop.advanced-mode .inspector-panel {
    top: 50%;
    right: 8px;
    bottom: auto;
    left: auto;
    width: min(360px, calc(100% - 24px));
    height: auto;
    max-height: min(78dvh, 720px);
    padding: 12px;
    transform: translateX(calc(100% + 16px)) translateY(-50%);
  }
  .simple-workshop.advanced-mode.mobile-inspector-open .inspector-panel,
  .simple-workshop.has-selection:not(.advanced-mode).mobile-simple-controls-open .inspector-panel {
    transform: translateX(0) translateY(-50%);
  }
  .simple-workshop .inspector-heading { min-height: 44px; margin-bottom: 8px; }
  .simple-workshop .inspector-close {
    width: 44px;
    height: 44px;
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    border-color: #e3eaf5;
    border-radius: 10px;
    background: #f7f9ff;
    color: #7185a0;
    font-size: 24px;
  }
  .simple-workshop.has-selection:not(.advanced-mode) .simple-part-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 10px;
    font-size: 24px;
  }
  .simple-workshop #simple-controls-toggle { display: none; }
  .simple-workshop.has-selection:not(.advanced-mode) #simple-controls-toggle { display: inline-flex; }
  .simple-workshop .workspace-tools > :not(#zoom-in):not(#zoom-out) { display: none !important; }
  .simple-workshop .workbench-footer { min-height: 30px; height: 30px; flex-basis: 30px; }
}

@media (min-width: 651px) and (max-width: 850px) {
  .simple-workshop .topbar { padding-right: 16px; padding-left: 16px; }
  .simple-workshop .studio-layout,
  .simple-workshop.advanced-mode .studio-layout,
  .simple-workshop.library-collapsed .studio-layout,
  .simple-workshop.has-selection:not(.advanced-mode) .studio-layout {
    grid-template-columns: minmax(200px, 28vw) minmax(0, 1fr);
  }
  .simple-workshop #parts-panel-toggle { display: none; }
  .simple-workshop .library-panel { display: flex; }
  .simple-workshop .inspector-panel {
    width: min(360px, calc(100% - 32px));
    max-height: min(78dvh, 720px);
  }
  .simple-workshop .workbench-bar { padding-right: 10px; padding-left: 10px; }
}

@media (max-width: 650px) {
  .simple-workshop .topbar { min-height: 56px; padding: 4px 8px; gap: 6px; }
  .simple-workshop .brand { width: 36px; justify-content: center; }
  .simple-workshop .brand-copy { display: none; }
  .simple-workshop .project-name { gap: 5px; font-size: 10px; }
  .simple-workshop .status-dot { width: 6px; height: 6px; flex: 0 0 6px; }
  .simple-workshop .tool-button { padding: 0 8px; }
  .simple-workshop #save-tank,
  .simple-workshop #load-tank { width: 44px; padding: 0; }
  .simple-workshop #save-tank .tool-button-label,
  .simple-workshop #load-tank > span:last-child { display: none; }
  .simple-workshop .studio-layout,
  .simple-workshop.advanced-mode .studio-layout,
  .simple-workshop.library-collapsed .studio-layout,
  .simple-workshop.has-selection:not(.advanced-mode) .studio-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 0;
    gap: 0;
    padding: 4px;
  }
  .simple-workshop .workbench {
    grid-column: 1;
    grid-row: 1;
    border-radius: 14px;
    box-shadow: 0 5px 16px #47649c12;
  }
  .simple-workshop .workbench-bar {
    min-height: 44px;
    height: 44px;
    flex-basis: 44px;
    gap: 5px;
    padding: 0 6px;
  }
  .simple-workshop .mobile-panel-toggle {
    min-height: 44px;
    padding: 0 8px;
    gap: 4px;
    border-radius: 10px;
    font-size: 9px;
  }
  .simple-workshop .workspace-title { gap: 4px; }
  .simple-workshop #selection-label { max-width: 92px; font-size: 9px; }
  .simple-workshop .workspace-title strong,
  .simple-workshop .workspace-title .bar-slash { display: none; }
  .simple-workshop .viewport-hint { left: 8px; bottom: 8px; max-width: calc(100% - 66px); padding: 6px 7px; font-size: 8px; }
  .simple-workshop .camera-controls { right: 8px; bottom: 8px; }
  .simple-workshop .camera-controls button { width: 44px; height: 44px; }
  .simple-workshop .workbench-footer { min-height: 28px; height: 28px; flex-basis: 28px; padding: 0 8px; font-size: 8px; }
  .simple-workshop .library-panel {
    display: none;
    grid-column: 1;
    grid-row: 2;
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 6px 8px;
    border-radius: 14px;
    transform: none;
    transition: none;
  }
  .simple-workshop.mobile-parts-open .studio-layout,
  .simple-workshop.has-selection:not(.advanced-mode).mobile-parts-open .studio-layout {
    grid-template-rows: minmax(0, 1fr) minmax(0, min(38dvh, 250px));
    gap: 6px;
  }
  .simple-workshop.mobile-parts-open .library-panel { display: flex; }
  .simple-workshop .library-panel .panel-heading {
    min-height: 44px;
    margin: 0 1px 4px;
  }
  .simple-workshop .library-panel .panel-heading h1 { font-size: 16px; }
  .simple-workshop #collapse-library {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 24px;
  }
  .simple-workshop .workshop-category-nav { gap: 3px; margin: 0 0 4px; }
  .simple-workshop .workshop-category-tab { min-height: 44px; gap: 2px; padding: 0 2px; }
  .simple-workshop .workshop-category-tab > span { font-size: 15px; }
  .simple-workshop .workshop-category-tab strong { font-size: 8px; }
  .simple-workshop .search-box { height: 36px; flex: 0 0 36px; margin-bottom: 3px; }
  .simple-workshop .library-caption,
  .simple-workshop .library-tip { display: none; }
  .simple-workshop .component-list { display: block; min-height: 0; overflow-x: hidden; overflow-y: auto; }
  .simple-workshop .component-card { min-height: 58px; }
  .simple-workshop .component-card-copy small { max-width: 180px; }
  .simple-workshop .inspector-panel {
    display: none;
    min-height: 0;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    height: auto;
    max-height: none;
    padding: 6px 8px;
    border-radius: 14px;
    transform: none;
    transition: none;
  }
  .simple-workshop.has-selection:not(.advanced-mode) .inspector-panel,
  .simple-workshop.advanced-mode .inspector-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    max-height: none;
    padding: 6px 8px;
    transform: none;
  }
  .simple-workshop:not(.mobile-simple-controls-open):not(.mobile-inspector-open) .inspector-panel { display: none; }
  .simple-workshop.has-selection:not(.advanced-mode).mobile-simple-controls-open .studio-layout,
  .simple-workshop.advanced-mode.mobile-inspector-open .studio-layout {
    grid-template-rows: minmax(0, 1fr) minmax(0, min(42dvh, 300px));
    gap: 6px;
  }
  .simple-workshop.has-selection:not(.advanced-mode).mobile-simple-controls-open .inspector-panel,
  .simple-workshop.advanced-mode.mobile-inspector-open .inspector-panel {
    display: flex;
    position: relative;
    grid-column: 1;
    grid-row: 2;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    max-height: none;
    padding: 6px 8px;
    transform: none;
  }
  .simple-workshop .inspector-heading { margin-bottom: 4px; }
  .simple-workshop .simple-part-panel { gap: 7px; }
  .simple-workshop .simple-part-heading { min-height: 44px; }
  .simple-workshop .simple-part-hint { display: none; }
}
