/* Builder identity + interaction refresh v10.2. Presentation only. */
:root {
  --font-sans: "Inter", "SF Pro Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "SF Pro Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --bg: #121b3d;
  --panel: #1b2a58;
  --panel2: #142044;
  --line: rgba(255, 255, 255, .1);
  --text: #e0e0e0;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --blue2: #60a5fa;
  --tech-cyan: #3b82f6;
  --tech-violet: #6366f1;
  --tech-gold: #ffd831;
  --tech-grid: rgba(59, 130, 246, .052);
  --tech-glow: rgba(59, 130, 246, .11);
  --primary-color: #3b82f6;
  --primary-hover-color: #4f8df9;
  --primary-light-color: #60a5fa;
  --primary-lighter-color: #93c5fd;
  --secondary-color: #6366f1;
  --secondary-hover-color: #7274f8;
  --primary-rgb: 59, 130, 246;
  --secondary-rgb: 99, 102, 241;
  --primary-light-rgb: 96, 165, 250;
  --surface-rgb: 15, 23, 42;
  --surface-darker-rgb: 11, 15, 28;
}

html {
  color-scheme: dark;
  background: #080c14;
}

html[data-accent="violet"] {
  --tech-cyan: #a98cff;
  --tech-violet: #d28cff;
  --tech-grid: rgba(169, 140, 255, .105);
  --tech-glow: rgba(132, 92, 255, .18);
  --blue: #8064ff;
  --blue2: #b59fff;
}

html[data-accent="cyan"] {
  --tech-cyan: #28d9e8;
  --tech-violet: #44a9ff;
  --tech-grid: rgba(40, 217, 232, .1);
  --tech-glow: rgba(28, 204, 224, .16);
  --blue: #19b8d0;
  --blue2: #66e4ef;
}

html[data-accent="rose"] {
  --tech-cyan: #ff719d;
  --tech-violet: #ff9dca;
  --tech-grid: rgba(255, 113, 157, .09);
  --tech-glow: rgba(255, 81, 139, .15);
  --blue: #f45d91;
  --blue2: #ff9cbe;
}

body {
  font-family: var(--font-sans);
  color: #e0e0e0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  /* Keep the source builder's deep navy base, with enough blue lift for
     panels and grid detail to remain legible on desktop displays. */
  background: #121b3d;
}

body::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 22% 28%, rgba(59, 130, 246, .075), transparent 35%),
    radial-gradient(ellipse at 76% 42%, rgba(99, 102, 241, .055), transparent 36%),
    radial-gradient(ellipse at 48% 82%, rgba(55, 101, 185, .03), transparent 34%);
  background-size: 112% 112%;
  opacity: .62;
  filter: blur(30px);
  animation: builder-mesh 14s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  right: -12%;
  bottom: -28%;
  z-index: 0;
  width: 72vw;
  height: 72vw;
  border-radius: 50%;
  background:
    radial-gradient(circle at 22% 24%, rgba(59, 130, 246, .12), transparent 58%),
    radial-gradient(circle at 78% 68%, rgba(99, 102, 241, .10), transparent 66%);
  filter: blur(28px);
  pointer-events: none;
  animation: builder-ambient-pulse 8s ease-in-out infinite alternate;
}

html[data-theme="grid"] body::before,
html[data-theme="hexagons"] body::before,
html[data-theme="pills"] body::before,
html[data-theme="particles"] body::before,
html[data-theme="neural"] body::before,
html[data-theme="rain"] body::before {
  opacity: .085;
  animation-duration: 22s;
}

html[data-mesh-under="off"]:not([data-theme="mesh"]) body::before {
  opacity: 0;
}

/* The grid is a product surface, not an optional canvas detail.  Keep a
   lightweight CSS fallback behind the animated canvas so it remains visible
   on browsers that disable 2D canvas animation or restore a reduced-motion
   preference. */
html[data-theme="grid"] body::before {
  background-image:
    linear-gradient(rgba(130, 167, 241, .27) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 167, 241, .27) 1px, transparent 1px),
    radial-gradient(ellipse at 22% 28%, rgba(59, 130, 246, .15), transparent 35%),
    radial-gradient(ellipse at 76% 42%, rgba(99, 102, 241, .12), transparent 36%);
  background-size: 20px 20px, 20px 20px, 112% 112%, 112% 112%;
  background-position: 0 0, 0 0, 0 0, 0 0;
  filter: none;
  opacity: .36 !important;
  animation: none;
}

/* The animated canvas owns the streaks. Do not add fixed CSS streaks here:
   the source page shows only occasional short signals, not four permanent
   bright trails. */
html[data-theme="grid"] .app-shell::before {
  content: none;
}

html[data-theme="grid"] .app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .34;
  background:
    linear-gradient(rgba(77, 114, 207, .42), rgba(77, 114, 207, .42)) 13% 25% / 20px 20px no-repeat,
    linear-gradient(rgba(77, 114, 207, .28), rgba(77, 114, 207, .28)) 70% 33% / 20px 20px no-repeat,
    linear-gradient(rgba(88, 132, 232, .36), rgba(88, 132, 232, .36)) 38% 61% / 20px 20px no-repeat,
    linear-gradient(rgba(77, 114, 207, .3), rgba(77, 114, 207, .3)) 82% 78% / 20px 20px no-repeat,
    linear-gradient(rgba(88, 132, 232, .24), rgba(88, 132, 232, .24)) 7% 84% / 20px 20px no-repeat;
  animation: builder-grid-sparks 2.8s ease-in-out infinite alternate;
}

@keyframes builder-grid-sparks {
  from { opacity: .18; }
  to { opacity: .5; }
}

/* Match the source builder's readable blue surface while retaining the
   existing compact layout and controls. */
.card,
.project-popover,
.account-popover,
.nav-drawer {
  background-color: rgba(22, 35, 82, .88);
}

.card {
  background-image: linear-gradient(145deg, rgba(37, 59, 125, .82), rgba(16, 28, 66, .88));
  box-shadow: 0 18px 55px rgba(2, 5, 20, .24);
}

@keyframes builder-css-meteor-drift {
  0% { transform: translate3d(-2%, -1%, 0); }
  50% { transform: translate3d(2%, 2%, 0); }
  100% { transform: translate3d(-2%, -1%, 0); }
}

@keyframes builder-ambient-pulse {
  from { opacity: .38; transform: translate3d(-3%, 1%, 0) scale(.94); }
  to { opacity: .72; transform: translate3d(5%, -3%, 0) scale(1.08); }
}

@keyframes builder-mesh {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.builder-effect-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
  opacity: .98;
  mix-blend-mode: screen;
}

.login-shell {
  background: transparent;
}

.login-shell::before {
  display: none;
}

.app-shell,
.login-shell {
  position: relative;
  z-index: 1;
}

.brand-emblem {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 17px rgba(91, 102, 255, .32));
  transition: transform .2s ease, filter .2s ease;
}

.brand-emblem img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-emblem:hover {
  transform: translateY(-1px) scale(1.055);
  filter: drop-shadow(0 9px 20px rgba(81, 163, 255, .44));
}

.brand-signature {
  display: flex;
  align-items: center;
  outline: none;
}

.brand-meta {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}

.brand-meta strong {
  color: #dce5f4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .025em;
}

.brand-meta small {
  color: #6f7e96;
  font-size: 8px;
  letter-spacing: .015em;
}

.version-chip.brand-signature {
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border-color: #22435a;
  background: rgba(8, 12, 22, .9);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .25);
  backdrop-filter: blur(12px);
}

.version-chip.brand-signature:hover,
.version-chip.brand-signature:focus-visible {
  border-color: #4d6594;
  background: rgba(12, 16, 29, .96);
}

.topbar {
  z-index: 100;
  border-bottom-color: rgba(255, 255, 255, .08);
  background: rgba(11, 15, 28, .88);
  box-shadow: 0 10px 30px rgba(2, 6, 23, .18);
  backdrop-filter: blur(16px) saturate(120%);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 2%, var(--tech-cyan) 24%, var(--tech-violet) 73%, transparent 98%);
  opacity: .28;
}

.desktop-nav .nav-tab,
.nav-drawer .nav-tab,
.picker-trigger,
.machine-choice,
.inline-device,
.ghost {
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.desktop-nav .nav-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(17, 48, 104, .22);
}

.desktop-nav .nav-tab.active {
  box-shadow: inset 0 -2px var(--tech-cyan), 0 0 20px var(--tech-glow);
}

.selector-strip {
  box-shadow: 0 13px 36px rgba(0, 0, 0, .18), 0 0 0 1px rgba(66, 127, 230, .025);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.selector-strip:focus-within {
  border-color: color-mix(in srgb, var(--tech-cyan) 52%, #263b5a);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .23), 0 0 24px var(--tech-glow);
}

.project-empty-prompt {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 310px;
  padding: 54px 24px 72px;
  color: #8090a8;
  text-align: center;
}

.project-empty-prompt h1 {
  margin: 0;
  color: #dfe8f7;
  font-size: clamp(20px, 2.1vw, 27px);
  letter-spacing: -.02em;
}

.project-empty-prompt p {
  max-width: 520px;
  margin: 10px 0 0;
  color: #718199;
  font-size: 12px;
  line-height: 1.65;
}

.app-shell.has-project-selection .project-empty-prompt {
  display: none;
}

.app-shell:not(.has-project-selection) .project-dependent-content {
  display: none;
}

.card {
  position: relative;
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 9%;
  left: 9%;
  z-index: 1;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--tech-cyan), var(--tech-violet), transparent);
  opacity: .4;
}

.card:hover {
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 21px 62px rgba(2, 6, 23, .24), 0 0 22px var(--tech-glow);
}

.picker-trigger:hover,
.machine-choice:hover {
  color: #fff;
}

.picker-trigger:hover > .ui-icon,
.machine-choice:hover > .ui-icon {
  color: var(--tech-cyan);
}

.inline-device:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.inline-device.selected {
  box-shadow: 0 0 0 1px var(--tech-glow), 0 0 26px var(--tech-glow);
}

.dna-input-wrap:focus-within,
.note-row input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tech-cyan) 14%, transparent), 0 0 24px var(--tech-glow);
}

.primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.primary::after {
  content: "";
  position: absolute;
  top: -55%;
  bottom: -55%;
  left: -38%;
  z-index: -1;
  width: 25%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .23), transparent);
  transform: skewX(-19deg);
  transition: left .5s ease;
}

.primary:hover::after {
  left: 112%;
}

.project-ready.ready {
  box-shadow: 0 0 18px rgba(40, 209, 124, .075);
}

html[data-avatar="blue"] .account-trigger,
html[data-avatar="blue"] .topbar > .avatar {
  border-color: #345f98;
  background: linear-gradient(145deg, #3274bd, #1d385e);
}

html[data-avatar="violet"] .account-trigger,
html[data-avatar="violet"] .topbar > .avatar {
  border-color: #7354b8;
  background: linear-gradient(145deg, #7654bd, #39265f);
}

html[data-avatar="cyan"] .account-trigger,
html[data-avatar="cyan"] .topbar > .avatar {
  border-color: #2697a4;
  background: linear-gradient(145deg, #1b95a5, #17434f);
}

html[data-avatar="rose"] .account-trigger,
html[data-avatar="rose"] .topbar > .avatar {
  border-color: #be567e;
  background: linear-gradient(145deg, #bd527d, #5f263d);
}

.account-trigger.has-custom-avatar,
.topbar > .avatar.has-custom-avatar {
  background-position: center;
  background-size: cover;
  color: transparent;
  text-shadow: none;
}

.account-popover {
  width: min(330px, calc(100vw - 20px));
}

.account-customization {
  display: grid;
  gap: 5px;
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid #223149;
  border-bottom: 1px solid #223149;
}

.account-setting-row {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #aebbd0;
  text-align: left;
}

.account-setting-row:hover,
.account-setting-row:focus-visible {
  border-color: #2c4568;
  background: #111d30;
  color: #fff;
  outline: none;
}

.account-setting-row > span {
  display: grid;
  gap: 2px;
}

.account-popover .account-setting-row strong {
  color: inherit;
  font-size: 10px;
  letter-spacing: .02em;
}

.account-popover .account-setting-row small {
  margin: 0;
  color: #667991;
  font-size: 8px;
}

.settings-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-chevron {
  color: #596b84;
  font-size: 18px;
  font-style: normal;
}

.account-avatar-input {
  display: none;
}

.account-setting-status {
  min-height: 0;
  margin: 0;
  color: #5edaa0;
  font-size: 9px;
  text-align: center;
}

.account-setting-status:not(:empty) {
  min-height: 18px;
  padding: 4px 7px;
}

.account-setting-status.error {
  color: #ff8797;
}

.builder-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.builder-settings-modal[hidden] {
  display: none;
}

.builder-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 11, .76);
  backdrop-filter: blur(8px);
}

.builder-settings-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid #293b59;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(13, 22, 38, .985), rgba(7, 12, 22, .985));
  box-shadow: 0 34px 110px rgba(0, 0, 0, .62), 0 0 48px var(--tech-glow);
}

.builder-settings-dialog > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #263651;
  background: rgba(10, 17, 30, .94);
  backdrop-filter: blur(14px);
}

.builder-settings-dialog > header span {
  color: var(--tech-cyan);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .16em;
}

.builder-settings-dialog > header h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  letter-spacing: -.02em;
}

.settings-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #293a55;
  border-radius: 9px;
  background: #101a2b;
  color: #8594aa;
  font-size: 21px;
  line-height: 1;
}

.settings-close:hover { color: #fff; border-color: #4d6284; }

.settings-view {
  padding: 18px 20px 22px;
}

.settings-lead {
  margin: 0 0 12px;
  color: #7788a0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.theme-option-list,
.sound-option-list {
  display: grid;
  gap: 8px;
}

.theme-option-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #21314b;
  border-radius: 7px;
  background: rgba(20, 31, 51, .78);
  color: #aab8cc;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.theme-option-row:hover {
  border-color: #3a5277;
}

.theme-option-row.selected {
  border-color: var(--tech-cyan);
  background: color-mix(in srgb, var(--tech-cyan) 13%, #142038);
  box-shadow: 0 0 0 1px var(--tech-glow), 0 0 16px var(--tech-glow);
}

.theme-option-radio {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #52617a;
  border-radius: 50%;
  color: transparent;
}

.theme-option-radio b {
  font-size: 9px;
  line-height: 1;
}

.theme-option-row.selected .theme-option-radio {
  border-color: var(--tech-cyan);
  background: color-mix(in srgb, var(--tech-cyan) 24%, transparent);
  color: var(--tech-cyan);
}

.theme-option-label {
  color: #b7c2d4;
  font-size: 11px;
  font-weight: 650;
}

.mesh-under-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 11px 10px;
  border: 1px solid #21314b;
  border-radius: 7px;
  background: rgba(20, 31, 51, .72);
  color: #aebacd;
  font-size: 10px;
}

.mesh-under-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--tech-cyan);
}

.palette-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #223149;
}

.palette-section > span,
.sound-volume label span {
  color: #71829b;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .12em;
}

.palette-options { display: flex; gap: 8px; }

.palette-option {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #2b3b55;
  border-radius: 9px;
  background: #0d1626;
}

.palette-option i { width: 12px; height: 12px; border-radius: 50%; }
.palette-blue i { background: #4b91ff; }
.palette-violet i { background: #a27bff; }
.palette-cyan i { background: #28d9e8; }
.palette-rose i { background: #ff719d; }
.palette-option.selected { border-color: var(--tech-cyan); box-shadow: 0 0 15px var(--tech-glow); }

.sound-volume {
  margin-bottom: 17px;
  padding: 13px;
  border: 1px solid #21314b;
  border-radius: 11px;
  background: #09111f;
}

.sound-volume label { display: flex; justify-content: space-between; margin-bottom: 10px; }
.sound-volume label b { color: var(--tech-cyan); font-size: 9px; }
.sound-volume input { width: 100%; accent-color: var(--tech-cyan); }

.sound-type-option {
  display: grid;
  grid-template-columns: 30px 1fr 20px;
  align-items: center;
  min-height: 47px;
  padding: 9px 12px;
  border: 1px solid #21314b;
  border-radius: 10px;
  background: #09111f;
  color: #aab8cc;
  text-align: left;
}

.sound-type-option:hover { border-color: #3a5277; color: #fff; }
.sound-type-option.selected { border-color: var(--tech-cyan); background: color-mix(in srgb,var(--tech-cyan) 7%,#09111f); }
.sound-type-option em { opacity: 0; color: var(--tech-cyan); font-style: normal; }
.sound-type-option.selected em { opacity: 1; }

.sound-bars { display: flex; align-items: center; gap: 2px; height: 15px; }
.sound-bars b { width: 2px; border-radius: 3px; background: var(--tech-cyan); }
.sound-bars b:nth-child(1) { height: 6px; }
.sound-bars b:nth-child(2) { height: 13px; }
.sound-bars b:nth-child(3) { height: 9px; }

.test-sound-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #335d91;
  border-radius: 10px;
  background: linear-gradient(180deg,rgba(53,121,222,.32),rgba(27,73,145,.28));
  color: #cfe2ff;
  font-size: 10px;
  font-weight: 800;
}

.test-sound-button .settings-icon { width: 14px; height: 14px; }
.test-sound-button:hover { border-color: var(--tech-cyan); color: #fff; box-shadow: 0 0 20px var(--tech-glow); }

body.settings-open { overflow: hidden; }

.version-chip .brand-emblem {
  width: 28px;
  height: 28px;
}

footer {
  position: fixed;
  min-height: 48px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.footer-service {
  display: none;
}

.footer-service time {
  margin-left: 5px;
  padding-left: 11px;
  border-left: 1px solid #253149;
  color: #63738b;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
  white-space: nowrap;
}

.footer-clock-center {
  position: absolute;
  left: 50%;
  color: #718096;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .045em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.session-indicator {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 999;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  background: rgba(15, 23, 42, .74);
  box-shadow: 0 8px 24px rgba(2, 6, 23, .2);
  color: #e2e8f0;
  font-family: "JetBrains Mono", "Cascadia Code", "Cascadia Mono", Consolas, monospace;
  font-size: 13.6px;
  font-variant-numeric: tabular-nums;
  opacity: .66;
  outline: none;
  transition: opacity .2s ease, border-color .2s ease, background .2s ease;
}

.session-indicator:hover,
.session-indicator:focus-visible,
.session-indicator:focus-within {
  border-color: rgba(96, 165, 250, .32);
  background: rgba(15, 23, 42, .94);
  opacity: 1;
}

.session-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 7px rgba(34, 197, 94, .9);
}

.session-details {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 245px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  background: rgba(11, 15, 28, .97);
  box-shadow: 0 18px 45px rgba(2, 6, 23, .48);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, visibility .18s ease, transform .2s ease;
}

.session-indicator:hover .session-details,
.session-indicator:focus-visible .session-details,
.session-indicator:focus-within .session-details {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.session-details-inner {
  display: grid;
  gap: 7px;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 11px;
}

.session-row b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  font-weight: 500;
}

.session-row .session-dot {
  width: 7px;
  height: 7px;
}

.session-indicator.warning .session-dot {
  background: #f97316;
  box-shadow: 0 0 7px #f97316;
}

.session-indicator.expired .session-dot {
  background: #ef4444;
  box-shadow: 0 0 7px #ef4444;
}

.footer-brand {
  gap: 6px;
  margin-left: auto;
}

.footer-brand .brand-emblem {
  width: 25px;
  height: 25px;
}

.footer-brand .brand-meta {
  align-items: start;
}

.footer-brand .brand-meta strong,
.footer-brand .brand-meta small {
  white-space: nowrap;
}

.admin-login-card {
  margin: 28px 0 18px;
  overflow: hidden;
}

.admin-login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.admin-login-head h2 {
  margin: 0;
  color: #e7eef9;
  font-size: 16px;
}

.admin-login-head p {
  margin: 5px 0 0;
  color: #718096;
  font-size: 10px;
}

.admin-login-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-login-tools select {
  min-width: 170px;
  padding: 8px 30px 8px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  background: rgba(8, 12, 22, .74);
  color: #cbd5e1;
  outline: none;
}

.admin-login-tools select:focus {
  border-color: rgba(96, 165, 250, .5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.admin-login-count {
  min-width: 64px;
  color: #7f90a8;
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.admin-login-table-wrap {
  max-height: 390px;
  overflow: auto;
}

.admin-login-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-login-table th,
.admin-login-table td {
  padding: 11px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  text-align: left;
  white-space: nowrap;
}

.admin-login-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(11, 15, 28, .97);
  color: #697b94;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-login-table td {
  color: #91a0b5;
  font-size: 10px;
}

.admin-login-table td strong {
  color: #dbe5f4;
  font-weight: 650;
}

.admin-login-ip {
  padding: 4px 7px;
  border: 1px solid rgba(96, 165, 250, .16);
  border-radius: 6px;
  background: rgba(59, 130, 246, .07);
  color: #91bfff;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 9px;
}

.admin-login-ip:hover {
  border-color: rgba(96, 165, 250, .42);
  background: rgba(59, 130, 246, .13);
}

.admin-login-device {
  color: #74869e;
}

.admin-login-empty {
  height: 95px;
  color: #65758b !important;
  text-align: center !important;
}

.admin-login-empty.error {
  color: #ff8797 !important;
}

.admin-login-card.loading {
  opacity: .72;
}

.footer-brand .brand-meta small {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-4px);
  transition: max-width .25s ease, opacity .2s ease, transform .25s ease;
}

.footer-brand:hover .brand-meta small,
.footer-brand:focus-visible .brand-meta small {
  max-width: 220px;
  opacity: 1;
  transform: translateX(0);
}

/* V10.2: centered desktop navigation, matching the reference header rhythm. */
@media (min-width: 821px) {
  .topbar {
    position: sticky;
  }

  .desktop-nav {
    position: absolute;
    left: 50%;
    z-index: 2;
    max-width: calc(100% - 330px);
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
    transform: translateX(-50%);
  }

  .desktop-nav::-webkit-scrollbar {
    display: none;
  }
}

/* V10.2: glass selectors with a quiet outer frame and defined inner controls. */
.selector-strip {
  position: relative;
  z-index: 50;
  gap: 12px;
  padding: 13px;
  border-color: rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15, 23, 42, .62), rgba(15, 23, 42, .38));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 18px 44px rgba(2, 6, 23, .2);
  backdrop-filter: blur(16px) saturate(120%);
}

.selector-strip:hover {
  border-color: rgba(255, 255, 255, .14);
}

.selector-block {
  position: relative;
  padding: 11px 12px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  background: rgba(15, 23, 42, .5);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.machine-selector {
  z-index: 2;
}

.project-selector-block {
  z-index: 3;
}

.selector-block:hover,
.selector-block:focus-within {
  border-color: rgba(96, 165, 250, .36);
  background: rgba(15, 23, 42, .64);
  box-shadow: 0 10px 28px rgba(2, 6, 23, .16), 0 0 18px rgba(59, 130, 246, .07);
  transform: translateY(-1px);
}

.machine-choice,
.picker-trigger {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(15, 23, 42, .5);
}

.machine-choice:hover,
.picker-trigger:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(15, 23, 42, .62);
}

.picker-trigger.open,
.machine-choice.open,
.picker-trigger:focus-visible,
.machine-choice:focus-visible {
  border-color: color-mix(in srgb, var(--tech-cyan) 62%, #50617d);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tech-cyan) 10%, transparent), 0 0 20px var(--tech-glow);
}

.project-popover {
  border-color: rgba(255, 255, 255, .1);
  border-radius: 14px;
  z-index: 80;
  background: rgba(15, 23, 42, .96);
  box-shadow: 0 28px 90px rgba(2, 6, 23, .58), 0 0 24px rgba(59, 130, 246, .06);
  backdrop-filter: blur(20px) saturate(120%);
  transform: translateY(-8px) scale(.985);
  transform-origin: top center;
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}

.project-popover.open {
  transform: translateY(0) scale(1);
}

.tab-panel,
.workspace {
  overflow: visible;
}

.project-empty-prompt,
.project-dependent-content {
  position: relative;
  z-index: 1;
}

.project-empty-prompt {
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, .13), transparent 58%), rgba(15, 23, 42, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.card {
  border-color: rgba(255, 255, 255, .1);
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, .075), transparent 62%), rgba(15, 23, 42, .42);
  box-shadow: 0 18px 44px rgba(2, 6, 23, .16), inset 0 1px rgba(255, 255, 255, .055);
  backdrop-filter: blur(16px) saturate(120%);
}

.account-popover,
.builder-settings-dialog {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(15, 23, 42, .96);
}

footer {
  border-top-color: rgba(255, 255, 255, .08);
  background: rgba(11, 15, 28, .82);
  color: #888;
  backdrop-filter: blur(14px) saturate(115%);
}

/* V10.2.3: normalize every major legacy surface to the reference palette. */
.login-card,
.app-shell,
.workspace,
.tab-panel {
  color: #e0e0e0;
}

.auth-field,
.orders-toolbar > label,
.picker-search,
.dna-input-wrap,
.note-row input,
.summary-box,
.selected-device-info,
.metric-grid > div,
.service-grid > div,
.admin-metrics > div,
.admin-user-stats span,
.admin-create-form input,
.admin-user-form input,
.password-form input,
.driver-file-picker,
.drivers-path,
.sound-volume,
.sound-type-option,
.theme-option-row,
.mesh-under-row {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(15, 23, 42, .62);
  color: #e0e0e0;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}

.auth-field {
  border-radius: 17px;
  background: rgba(15, 23, 42, .62);
  box-shadow: 0 18px 42px -30px rgba(0, 0, 0, .9), inset 0 1px rgba(255, 255, 255, .043);
}

.auth-field:focus-within,
.dna-input-wrap:focus-within,
.note-row input:focus,
.admin-create-form input:focus,
.admin-user-form input:focus,
.password-form input:focus {
  border-color: rgba(96, 165, 250, .72);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12), 0 14px 40px rgba(2, 6, 23, .22);
}

.auth-submit,
.primary,
.download {
  border-color: rgba(147, 197, 253, .52);
  background: linear-gradient(180deg, #5798ff, #3678ef);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .2), inset 0 1px rgba(255, 255, 255, .15);
}

.desktop-nav .nav-tab,
.nav-drawer .nav-tab,
.ghost,
.auto-refresh,
.account-setting-row {
  color: #94a3b8;
}

.desktop-nav .nav-tab:hover,
.nav-drawer .nav-tab:hover,
.ghost:hover,
.account-setting-row:hover,
.account-setting-row:focus-visible {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(15, 23, 42, .64);
  color: #f8fafc;
}

.desktop-nav .nav-tab.active {
  border-color: transparent;
  background: rgba(59, 130, 246, .11);
  color: #fff;
  box-shadow: inset 0 -2px #3b82f6;
}

.nav-drawer .nav-tab.active {
  border-color: rgba(96, 165, 250, .35);
  background: rgba(59, 130, 246, .14);
  color: #93c5fd;
}

.nav-drawer,
.dialog-card,
.builder-settings-dialog,
.account-popover,
.project-popover,
.toast {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(15, 23, 42, .96);
  color: #e0e0e0;
  box-shadow: 0 28px 80px rgba(2, 6, 23, .52), inset 0 1px rgba(255, 255, 255, .05);
}

.picker-option,
.inline-device,
.job-row,
.admin-user-card,
.driver-row {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(15, 23, 42, .48);
}

.picker-option:hover,
.picker-option.selected,
.inline-device:hover,
.inline-device.selected {
  border-color: rgba(96, 165, 250, .48);
  background: linear-gradient(90deg, rgba(59, 130, 246, .18), rgba(15, 23, 42, .44));
}

.page-heading p,
.section-title p,
.project-empty-prompt p,
.field-hint,
.machine-title p,
.driver-row small,
.picker-option small,
th {
  color: #94a3b8;
}

.page-heading h1,
.section-title h2,
.project-empty-prompt h1,
.machine-title h2,
.project-title-row h1,
.card h1,
.card h2,
td {
  color: #f8fafc;
}

.notice {
  border-color: #342e18;
  background: linear-gradient(90deg, rgba(245, 158, 11, .08), rgba(251, 191, 36, .13));
  color: #dbe4f0;
  border-bottom-color: rgba(245, 158, 11, .2);
}

.notice > span {
  background: rgba(244, 189, 85, .16);
  color: #f5cc73;
}

.eyebrow,
.field-label,
.selector-block > label {
  color: #93c5fd;
}

table,
th,
td,
.order-tabs,
.machine-title,
.admin-user-form,
.account-customization,
.drawer-foot {
  border-color: rgba(255, 255, 255, .08);
}

@media (max-width: 620px) {
  .project-empty-prompt {
    min-height: 250px;
    padding: 40px 16px 58px;
  }

  .footer-service {
    display: none;
  }

  .footer-clock-center {
    display: none;
  }

  .session-indicator {
    bottom: 14px;
    left: 10px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .footer-brand .brand-emblem {
    width: 24px;
    height: 24px;
  }

  .footer-brand .brand-meta strong {
    font-size: 9px;
  }

  .admin-login-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-login-tools {
    width: 100%;
  }

  .admin-login-tools select {
    flex: 1;
    min-width: 0;
  }

  .admin-login-table {
    min-width: 660px;
  }

  .builder-settings-modal {
    align-items: end;
    padding: 8px;
  }

  .builder-settings-dialog {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .builder-settings-dialog > header,
  .settings-view {
    padding-right: 15px;
    padding-left: 15px;
  }

  .selector-strip {
    gap: 10px;
    padding: 10px;
  }

  .selector-block:hover,
  .selector-block:focus-within {
    transform: none;
  }

}

/* V10.2.6: the reference mobile navigation drops down from the header.
   Keep the desktop navigation available at tablet/embedded-browser widths;
   only a genuinely narrow viewport should switch to the mobile drawer. */
@media (max-width: 820px) {
  body.drawer-open {
    overflow: hidden;
  }

  .topbar {
    min-height: 60px;
  }

  .topbar > .menu-button {
    position: relative;
    z-index: 101;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #9cabc1;
  }

  .topbar > .menu-button:hover,
  .topbar > .menu-button[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .035);
    color: #fff;
  }

  .mobile-menu-glyph {
    display: grid;
    gap: 4px;
    width: 20px;
  }

  .mobile-menu-glyph i {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: opacity .22s ease, transform .3s cubic-bezier(.4, 0, .2, 1);
  }

  .menu-button[aria-expanded="true"] .mobile-menu-glyph i:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] .mobile-menu-glyph i:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .menu-button[aria-expanded="true"] .mobile-menu-glyph i:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .desktop-nav,
  .topbar-title {
    display: none;
  }

  .nav-backdrop {
    z-index: 98;
    min-height: calc(100dvh - 60px);
    border: 0;
    border-radius: 0;
    background: rgba(2, 6, 23, .42);
    backdrop-filter: none;
    inset: 60px 0 0;
  }

  .nav-drawer {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 99;
    width: 100%;
    max-height: calc(100dvh - 60px);
    height: auto;
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: rgba(11, 15, 28, .985);
    box-shadow: 0 18px 42px rgba(2, 6, 23, .44);
    opacity: 0;
    visibility: hidden;
    transform: scaleY(0);
    transform-origin: center top;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s ease, visibility .3s ease;
  }

  .nav-drawer.open {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
  }

  .nav-drawer .drawer-head,
  .nav-drawer .drawer-foot,
  .nav-drawer .nav-arrow {
    display: none;
  }

  .nav-drawer .nav-tabs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
  }

  .nav-drawer .nav-tab {
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    text-align: left;
    transition: color .18s ease, background .18s ease;
  }

  .nav-drawer .nav-tab:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, .03);
    color: #fff;
  }

  .nav-drawer .nav-tab.active {
    border-color: transparent;
    background: rgba(59, 130, 246, .12);
    color: #fff;
    box-shadow: inset 3px 0 0 #3b82f6;
  }
}

@media (max-width: 480px) {
  .topbar {
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .auto-refresh {
    padding: 7px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }

  .brand-emblem,
  .desktop-nav .nav-tab,
  .nav-drawer .nav-tab,
  .picker-trigger,
  .machine-choice,
  .inline-device,
  .ghost,
  .card,
  .primary::after,
  .theme-option-row,
  .footer-brand .brand-meta small {
    transition: none;
  }
}

/* V10.6.9: match the source builder's glass navigation and selector geometry. */
.app-shell {
  padding-top: 60px;
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  min-height: 60px;
  height: 60px;
  padding: 0 16px;
  gap: 0;
  background: rgba(11, 15, 28, .72);
  border-bottom-color: rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(2, 6, 23, .18);
  backdrop-filter: blur(18px) saturate(120%);
}

.topbar-title {
  display: none;
}

.desktop-nav {
  position: static;
  left: auto;
  max-width: none;
  margin-left: 0;
  overflow: visible;
  transform: none;
  gap: 4px;
}

.desktop-nav .nav-tab {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  gap: 6px;
  color: rgba(226, 232, 240, .76);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.2;
}

.desktop-nav .nav-tab .ui-icon {
  width: 1em;
  height: 1em;
  stroke-width: 1.9;
}

.desktop-nav .nav-tab:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, .067);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.desktop-nav .nav-tab.active {
  border-color: transparent;
  background: rgba(59, 130, 246, .11);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--primary-color);
}

.account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 42px;
  padding: 2px 13px 2px 2px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .043);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
}

.account-avatar-image {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin: -2px 0;
  border-radius: 50%;
  object-fit: cover;
}

.account-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-trigger:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .1);
}

.notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 20px;
  line-height: 1.45;
  font-size: .82rem;
}

.notice span {
  flex: 0 0 auto;
  margin: 0;
}

.selector-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15, 23, 42, .62), rgba(15, 23, 42, .38));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 18px 44px rgba(2, 6, 23, .2);
  backdrop-filter: blur(16px) saturate(120%);
}

.selector-block {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.selector-block:hover,
.selector-block:focus-within {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.selector-block > label {
  gap: 7px;
  margin-bottom: 7px;
  color: #9fb0c7;
  font-size: .68rem;
  letter-spacing: .09em;
}

.selector-block > label small {
  color: #718198;
  font-size: .68rem;
}

.machine-choice,
.picker-trigger {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(15, 23, 42, .5);
  font-size: 14px;
  font-weight: 500;
}

.machine-choice:hover,
.picker-trigger:hover {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(15, 23, 42, .64);
}

@media (min-width: 1101px) {
  .topbar > .menu-button {
    display: none;
  }
}

@media (max-width: 1100px) {
  .topbar {
    padding-right: 8px;
    padding-left: 8px;
  }

  .topbar > .menu-button {
    display: grid;
  }

  .desktop-nav {
    display: none;
  }

  .account-name {
    max-width: 72px;
  }
}

@media (max-width: 640px) {
  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    padding: 10px 16px 11px;
    font-size: .78rem;
  }

  .selector-strip {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 14px 14px;
  }

  .selector-block > label small {
    display: none;
  }
}

/* V10.6.10: final geometry pass against the source builder at 1280px and
   319px viewports. Keep the selector frame and empty state on the same grid. */
.workspace {
  width: min(1320px, calc(100% - 32px));
  padding-top: 16px;
}

.topbar {
  padding-right: 8px;
  padding-left: 8px;
}

.notice {
  background: linear-gradient(90deg, rgba(245, 158, 11, .08), rgba(251, 191, 36, .13));
  border-bottom-color: rgba(245, 158, 11, .2);
  color: #dbe4f0;
  min-height: 44.7px;
}

.selector-strip {
  position: relative;
}

.selector-refresh {
  position: absolute;
  top: -1px;
  left: -1px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  padding: 0;
  border: 0 solid rgba(255, 255, 255, .08);
  border-right-width: 1px;
  border-bottom-width: 1px;
  border-radius: 16px 0 11px;
  background: rgba(15, 23, 42, .34);
  color: #8292a8;
}

.selector-refresh:hover:not(:disabled) {
  border-color: rgba(147, 197, 253, .2);
  background: rgba(59, 130, 246, .13);
  color: #dbeafe;
}

.selector-refresh .ui-icon {
  width: 14px;
  height: 14px;
}

.selector-refresh.is-refreshing .ui-icon {
  animation: builder-spin .8s linear infinite;
}

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

.selector-block > label .help-dot {
  display: none;
}

.selector-block > label {
  line-height: 1.5;
  margin-bottom: 8px;
}

.machine-selector > label {
  padding-left: 28px;
}

.project-selector-block .picker-trigger > span > .ui-icon {
  display: none;
}

.project-empty-prompt {
  min-height: 210px;
  padding: 52px 24px;
}

.project-empty-eyebrow {
  display: inline-block;
  min-width: 144px;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: 999px;
  background: rgba(59, 130, 246, .09);
  color: #93c5fd;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* On wide screens the source keeps the brand at the left and the primary
   navigation in the middle of a generous header rhythm. Narrow layouts keep
   the compact navigation already defined above. */
@media (min-width: 1600px) {
  .topbar {
    padding-right: 80px;
    padding-left: 80px;
  }

  .topbar-title {
    display: block;
    min-width: 260px;
    color: #3b82f6;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .desktop-nav {
    margin-left: 120px;
  }
}

.project-empty-prompt h1 {
  font-size: clamp(1.08rem, 2.4vw, 1.35rem);
  font-weight: 600;
  line-height: 1.5;
}

.project-empty-prompt p {
  font-size: .86rem;
  line-height: 1.55;
}

/* data-avatar is intentionally more specific than the legacy palette rules. */
html[data-avatar] .account-trigger,
html[data-avatar] .topbar > .avatar {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .043);
}

@media (max-width: 640px) {
  .notice {
    min-height: 0;
  }

  .topbar {
    padding-right: 8px;
    padding-left: 8px;
  }

  .topbar > .menu-button {
    width: 44px;
    height: 44px;
    border-color: transparent;
    border-radius: 8px;
  }

  .auto-refresh {
    display: none;
  }

  .workspace {
    width: min(1320px, calc(100% - 32px));
    padding-top: 16px;
  }

  .selector-refresh {
    width: 36px;
    height: 34px;
  }

  .machine-selector > label {
    padding-left: 27px;
  }

  .project-empty-prompt {
    min-height: 210px;
    padding: 28px 24px;
  }

  .project-empty-eyebrow {
    margin-bottom: 10px;
  }
}

/* V10.6.11: desktop header and native-order form match the reference layout. */
@media (min-width: 1101px) {
  .topbar {
    padding-right: 48px;
    padding-left: 48px;
  }

  .topbar-title {
    display: block;
    min-width: 170px;
    color: #3b82f6;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .desktop-nav {
    position: absolute;
    left: 50%;
    margin-left: 0;
    transform: translateX(-50%);
  }
}

@media (min-width: 1600px) {
  .topbar {
    padding-right: 80px;
    padding-left: 80px;
  }

  .topbar-title {
    min-width: 260px;
    font-size: 28px;
  }
}

.topbar > .auto-refresh {
  display: none;
}

/* V10.6.12: keep the same desktop gutter as the source builder. */
@media (min-width: 1101px) {
  .workspace {
    width: min(1320px, calc(100% - 96px));
  }
}

/* V10.6.12: the source grid sits over a translucent blue/purple ambient
   field.  The old fallback used opaque fine lines and hid that depth. */
html[data-theme="grid"] body::before {
  background-image:
    linear-gradient(rgba(130, 167, 241, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 167, 241, .12) 1px, transparent 1px),
    radial-gradient(ellipse at 14% 74%, rgba(38, 102, 224, .32), transparent 44%),
    radial-gradient(ellipse at 76% 38%, rgba(91, 77, 196, .28), transparent 42%),
    radial-gradient(ellipse at 42% 18%, rgba(32, 65, 147, .24), transparent 46%);
  background-size: 20px 20px, 20px 20px, 145% 145%, 145% 145%, 145% 145%;
  background-position: center;
  filter: blur(24px);
  opacity: .8 !important;
  animation: builder-mesh 18s ease-in-out infinite alternate;
}

html[data-theme="grid"] .app-shell::before {
  content: "";
  position: fixed;
  inset: 18% -18% -28% 28%;
  z-index: 0;
  pointer-events: none;
  border-radius: 48% 52% 45% 55%;
  background:
    linear-gradient(145deg, rgba(76, 109, 222, .2), rgba(29, 56, 133, .08) 48%, transparent 72%),
    radial-gradient(ellipse at 18% 38%, rgba(77, 141, 255, .22), transparent 58%);
  filter: blur(10px);
  opacity: .78;
  transform: rotate(13deg);
  mix-blend-mode: screen;
}

html[data-theme="grid"] .app-shell::after {
  opacity: .68;
  animation-duration: 1.8s;
}

.builder-effect-canvas {
  opacity: .86;
}

/* Keep the live-machine indicator moving like the source status pill. */
.status-dot {
  animation: builder-status-pulse 1.8s ease-in-out infinite;
}

@keyframes builder-status-pulse {
  0%, 100% { box-shadow: 0 0 7px rgba(40, 209, 124, .48); }
  50% { box-shadow: 0 0 16px rgba(40, 209, 124, .95); }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
}

/* Native projects use the same order controls as the source builder. */
.project-native .credits-strip,
.project-native .selected-device-info,
.project-native .dna-section-head {
  display: none;
}

.project-native .project-title-row .eyebrow,
.project-native .project-ready {
  display: none;
}

.project-native .project-title-row {
  padding-top: 27px;
  padding-bottom: 25px;
}

.project-native .project-title-row h1 {
  color: #3f86ff;
}

.usage-instructions {
  margin: 26px 24px 0;
  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: 12px;
  background: rgba(24, 39, 79, .52);
  color: #e7eefb;
  overflow: hidden;
}

.usage-instructions summary {
  display: grid;
  grid-template-columns: 26px 1fr 20px;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 13px 17px;
  cursor: pointer;
  list-style: none;
}

.usage-instructions summary::-webkit-details-marker {
  display: none;
}

.usage-instructions summary > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.usage-instructions summary strong {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 16px;
  letter-spacing: .02em;
}

.usage-instructions summary small {
  color: #94a3ba;
  font-size: 12px;
}

.usage-instructions summary .ui-icon {
  width: 16px;
  height: 16px;
  color: #a6b7d2;
  transition: transform .18s ease;
}

.usage-instructions[open] summary .ui-icon {
  transform: rotate(90deg);
}

.usage-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: #263d83;
  color: #d5e2ff;
  font-size: 15px;
  font-weight: 800;
}

.usage-instructions-body {
  padding: 0 17px 16px 53px;
  color: #aab9d0;
  font-size: 12px;
  line-height: 1.6;
}

.usage-instructions-body p {
  margin: 0;
}

.write-gate-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  margin: 26px 24px 12px;
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  background: rgba(7, 16, 32, .48);
}

.write-gate-copy {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.write-gate-copy > div {
  display: grid;
  gap: 6px;
}

.write-gate-copy strong {
  color: #e1e8f5;
  font-size: 15px;
}

.write-gate-copy small {
  color: #8797b0;
  font-size: 12px;
}

.write-gate-copy code {
  color: #c2cfdf;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

.write-gate-copy code b {
  color: #d9e7fb;
}

.write-gate-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 7px;
  background: #263d83;
  color: #a9c2ff;
}

.write-gate-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.write-gate-toggle {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 43px;
  height: 24px;
}

.write-gate-toggle input {
  position: absolute;
  opacity: 0;
}

.write-gate-toggle i {
  display: block;
  width: 43px;
  height: 24px;
  border-radius: 999px;
  background: #263752;
  transition: background .18s ease;
}

.write-gate-toggle i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8291a9;
  content: "";
  transition: left .18s ease, background .18s ease;
}

.write-gate-toggle input:checked + i {
  background: #2b69c5;
}

.write-gate-toggle input:checked + i::after {
  left: 22px;
  background: #8ec4ff;
}

.native-build-options {
  grid-template-columns: 1fr;
  gap: 13px;
  margin: 0 24px 16px;
}

.project-native .lock-mode-picker {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.project-native .lock-mode-choice {
  min-width: 154px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid rgba(96, 165, 250, .14);
  border-radius: 9px;
  background: rgba(29, 48, 91, .54);
  color: #c2cde0;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 14px;
  font-weight: 700;
}

.project-native .lock-mode-choice.selected {
  border-color: #3f91ff;
  background: linear-gradient(180deg, rgba(43, 111, 223, .52), rgba(32, 67, 138, .5));
  color: #f1f6ff;
}

.project-native .build-balance-list {
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.project-native .build-balance-list span {
  display: block;
  padding: 9px 14px;
  border: 1px solid rgba(28, 202, 131, .18);
  border-radius: 5px;
  background: rgba(9, 104, 94, .2);
  color: #39db8a;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
}

.project-native .build-balance-list span + span {
  margin-top: 2px;
}

.project-native .build-balance-list b {
  color: #40e894;
}

.project-native .summary-box {
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  padding: 17px 18px;
  border-radius: 9px;
  background: rgba(21, 37, 76, .58);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
}

.project-native .summary-box span {
  color: #e3e9f5;
}

.project-native .summary-box strong {
  color: #e3e9f5;
  font-weight: 500;
}

.project-native .summary-box .build-cost-label {
  display: none;
}

.project-native #submit-build {
  min-height: 48px;
  background: rgba(111, 137, 180, .35);
  box-shadow: none;
  color: #d2dbea;
}

.project-native #submit-build:not(:disabled) {
  background: linear-gradient(180deg, #418dff, #3479e8);
  color: #fff;
}

.project-native #submit-build .ui-icon {
  width: 17px;
  height: 17px;
  margin-right: 6px;
  vertical-align: -3px;
}

/* Match the source builder's single-row license target selector on desktop. */
.project-native .license-target-field {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.project-native .license-target-field legend {
  padding: 0;
  margin-bottom: 8px;
}

.project-native .license-target-grid {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 900px) {
  .project-native .license-target-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .project-native .license-target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .usage-instructions,
  .write-gate-panel,
  .native-build-options {
    margin-right: 16px;
    margin-left: 16px;
  }

  .usage-instructions summary strong {
    font-size: 13px;
  }

  .write-gate-copy small {
    max-width: 220px;
  }

  .project-native .lock-mode-picker {
    width: 100%;
  }

  .project-native .lock-mode-choice {
    min-width: 0;
    flex: 1;
    padding-inline: 8px;
    font-size: 11px;
  }
}
