/* assets/ui/ui.css */

/* Import Inter font for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Font and Typography */
html, body {
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Color Variables */
:root {
  /* Primary Colors */
  --color-primary: #4caf50;
  --color-primary-hover: #45a049;
  --color-primary-dark: #1565c0;
  
  /* Secondary Colors */
  --color-secondary: #1976d2;
  --color-secondary-light: #bbdefb;
  --color-secondary-lighter: #e3f2fd;
  --color-secondary-hover: #90caf9;
  
  /* Danger/Stop Colors */
  --color-danger: #f44336;
  --color-danger-hover: #da190b;
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-black: #000000;
  
  /* Background Colors */
  --color-bg-primary: #ffffff;        /* Main content backgrounds */
  --color-bg-secondary: #fafafa;      /* Container backgrounds (stack, palette) */
  --color-bg-tertiary: #f8f9fa;       /* Header/footer backgrounds */
  
  /* Interactive Element Colors */
  --color-button-default: #f5f5f5;    /* Default button background */
  --color-button-hover: #e8e8e8;      /* Button hover state */
  --color-button-light: #f0f0f0;      /* Light button backgrounds (remove buttons) */
  
  /* Border Colors */
  --color-border: #d0d0d0;            /* Standard borders */
  --color-border-light: #e0e0e0;      /* Light borders */
  --color-border-dark: #23252b;       /* Dark borders (debug panel) */
  
  /* Border Hover States */
  --color-border-hover: #b0b0b0;       /* Border hover state */
  
  /* Success Colors */
  --color-success: #4caf50;
  --color-success-light: #e8f5e9;
  --color-success-border: #a5d6a7;
  --color-success-text: #2e7d32;
  
  /* Text Colors */
  --color-text-primary: #333;          /* Main text color */
  --color-text-secondary: #666;        /* Secondary text (labels) */
  --color-text-muted: #999;            /* Muted text (remove buttons) */
  --color-text-white: #fff;            /* White text (buttons) */
  --color-text-light: #e6e6e6;         /* Light text (debug panel) */
  --color-text-accent: #9cc2ff;        /* Accent text (debug keys) */
  
  /* Shadow Colors */
  --shadow-light: rgba(0,0,0,0.08);
  --shadow-medium: rgba(0,0,0,0.1);
  --shadow-dark: rgba(0,0,0,0.12);
  --shadow-darker: rgba(0,0,0,0.15);
  --shadow-overlay: rgba(0,0,0,0.6);
  --shadow-success: rgba(76,175,80,0.25);
  --shadow-danger: rgba(244,67,54,0.25);
  --start-menu-viewport-height: 100vh;
}

@supports (height: 100dvh) {
  :root {
    --start-menu-viewport-height: 100dvh;
  }
}

html,body,#app{height:100%;margin:0;overflow:hidden}
#app{position:relative;width:100%;height:100%}

body.app-loading{
  background:var(--color-black);
}

body.app-loading #app{
  opacity:0;
  visibility:hidden;
}

body.app-ready #app{
  opacity:1;
  visibility:visible;
  transition:opacity .3s ease;
}

body.menu-active #programmer,
body.menu-active #debug{display:none}

body.menu-active #topbar{opacity:0;pointer-events:none;transform:translate(-50%,-1rem);transition:opacity .2s ease,transform .2s ease}
body.menu-active #topbar.topbar--settings-visible{opacity:1;pointer-events:auto;transform:translate(-50%,0)}

body.menu-active .start-menu{opacity:1}

.hidden{display:none !important}

.title-screen{position:absolute;inset:0;background:var(--color-black);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1.75rem;z-index:400;pointer-events:none;opacity:0;transition:opacity var(--title-screen-fade-duration,1000ms) ease}
.title-screen--hidden{opacity:0;pointer-events:none}
.title-screen--visible{opacity:1;pointer-events:auto}
.title-screen--no-transition{transition:none !important}
.title-screen__content{display:flex;flex-direction:column;align-items:center;gap:1.5rem;text-align:center;color:var(--color-white);letter-spacing:0.2em;text-transform:uppercase}
.title-screen__icon{width:120px;height:120px;display:block;filter:drop-shadow(0 12px 24px rgba(0,0,0,0.45))}
.title-screen__title{margin:0;font-size:clamp(1.75rem,4vw,3.5rem);font-weight:900;letter-spacing:0.35em;text-align:center}
.title-screen__enter-button{display:flex;align-items:center;gap:0.75rem;border:2px solid var(--color-white);border-radius:999px;padding:0.55rem 1.35rem;background:transparent;color:var(--color-white);font-weight:700;font-size:0.75rem;letter-spacing:0.3em;text-transform:uppercase;cursor:pointer;transition:transform .15s ease,background .15s ease,color .15s ease;border-width:2px}
.title-screen__enter-button:focus-visible{outline:3px solid var(--color-secondary);outline-offset:4px}
.title-screen__enter-button:hover{background:var(--color-white);color:var(--color-black);transform:translateY(-1px)}
.title-screen__enter-icon{width:28px;height:28px;display:block;transition:filter .15s ease}
.title-screen__enter-button:hover .title-screen__enter-icon{filter:brightness(0)}
.title-screen__enter-label{display:inline-block}

.start-menu{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:1.5rem;z-index:120;pointer-events:none;transition:opacity .3s ease;background:none}
.start-menu.hidden{opacity:0;pointer-events:none}
/* Floating windows (macOS 1.0-like) */
.floating-window{position:fixed;top:10vh;left:10vw;width:min(420px,calc(100vw - 2rem));max-width:520px;background:var(--color-white);border:2px solid #000;border-radius:10px;box-shadow:0 20px 60px var(--shadow-dark);pointer-events:auto;z-index:200;display:flex;flex-direction:column;overflow:hidden;transform-origin:center center;min-width:280px;min-height:240px}
/* Per-window default layout variables (used by draggableWindow resetLayout). */
#settingsWindow{--floating-window-default-left: 52vw; --floating-window-default-top: 12vh; --floating-window-default-width: 420px; --floating-window-default-height: 380px}
#customizeWindow{--floating-window-default-left: 6vw; --floating-window-default-top: 10vh; --floating-window-default-width: 520px; --floating-window-default-height: 72vh}
#levelSelectWindow{--floating-window-default-left: center; --floating-window-default-top: center; --floating-window-default-width: min(94vw, 960px); --floating-window-default-height: calc(2 * 78vh)}
@media (orientation: portrait){
  /* Center level window in portrait with responsive size */
  #levelSelectWindow{
    --floating-window-default-left: center;
    --floating-window-default-top: center;
    --floating-window-default-width: min(96vw, 640px);
    --floating-window-default-height: min(96vh, 72rem);
  }
  #customizeWindow{
    --floating-window-default-left: center;
    --floating-window-default-top: 66vh;
    --floating-window-default-width: 92vw;
    --floating-window-default-height: 34vh;
  }
}
.floating-window--opening{
  transform-origin:var(--floating-window-open-origin,center center);
  animation:floating-window-open 220ms cubic-bezier(0.16,1,0.3,1);
}
.floating-window--closing{
  transform-origin:var(--floating-window-open-origin,center center);
  animation:floating-window-close 200ms cubic-bezier(0.33,0,0.67,0.2) forwards;
}
@keyframes floating-window-open{
  0%{transform:scale(0.82);opacity:0}
  100%{transform:scale(1);opacity:1}
}
@keyframes floating-window-close{
  0%{transform:scale(1);opacity:1}
  100%{transform:scale(0.82);opacity:0}
}
.floating-window__titlebar{display:flex;align-items:center;justify-content:space-between;gap:0.5rem;background:#4a9eff;border-bottom:2px solid #000;padding:0.25rem 0.6rem;cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none}
.floating-window__titlebar:active{cursor:grabbing}
.floating-window--active .floating-window__titlebar{background:#ffd700}
.floating-window__title{font-size:0.95rem;font-weight:800;color:#000}
.floating-window__close{margin-left:auto;border:none;border-radius:6px;padding:0.2rem;line-height:1;font-size:1rem;cursor:pointer;background:transparent}
.floating-window__close:hover{background:rgba(0,0,0,0.1)}
.floating-window__body{padding:0;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden;}
.floating-window__resize-handle{position:absolute;bottom:0;user-select:none;-webkit-user-select:none;-moz-user-select:none;touch-action:none;z-index:2;}
.floating-window__resize-handle--vertical{left:0;right:16px;height:12px;cursor:ns-resize;display:flex;align-items:center;justify-content:center;}
.floating-window__resize-handle--vertical::after{content:'';width:60%;max-width:200px;height:3px;border-radius:999px;background:rgba(0,0,0,0.2);}
.floating-window__resize-handle--corner{width:16px;height:16px;right:0;cursor:nwse-resize;display:flex;align-items:flex-end;justify-content:flex-end;padding:0 0 2px 2px;}
.floating-window__resize-handle--corner::after{content:'';width:100%;height:100%;background:linear-gradient(135deg,rgba(0,0,0,0) 35%,rgba(0,0,0,0.25) 36%,rgba(0,0,0,0.25) 50%,rgba(0,0,0,0) 51%);border-bottom-right-radius:10px;}
.start-menu-panel{--start-menu-panel-padding:1.5rem;background:var(--color-white);border:1px solid var(--color-border-light);border-radius:0px;padding:var(--start-menu-panel-padding);box-shadow:0 20px 60px var(--shadow-dark);display:flex;flex-direction:column;gap:1.25rem;pointer-events:auto;flex:1 1 auto;min-height:0;height:100%;overflow:auto;box-sizing:border-box;width:100%;}
.start-menu-panel__content{display:flex;flex-direction:column;gap:1.25rem;flex:1 1 auto;min-height:0;}
.start-menu-sidepanel--collapsed .start-menu-sidepanel__tray{transform:translateX(calc(-100% + var(--start-menu-collapsed-peek)))}
.start-menu__panel{background:var(--color-white);border:1px solid var(--color-border-light);border-radius:0px;padding:2.5rem 3rem;max-width:360px;text-align:center;box-shadow:0 20px 60px var(--shadow-dark);pointer-events:auto;display:flex;flex-direction:column;gap:1.2rem;color:var(--color-text-primary)}
.start-menu__panel--intro{position:absolute;top:clamp(2.5rem,10vh,6rem);left:50%;transform:translateX(-50%);background:transparent;border:none;box-shadow:none;padding:0;max-width:none;gap:1rem;align-items:center;color:var(--color-primary-dark)}
.start-menu-icons{position:fixed;top:50%;right:2rem;display:flex;flex-direction:column;gap:0rem;transform:translateY(-50%);pointer-events:auto;z-index:150}
.start-menu-icon-button{width:100px;height:120px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;padding:0.75rem;border-radius:0 !important;border:none !important;background:none !important;background-color:transparent !important;box-shadow:none !important;color:var(--color-primary-dark);font-weight:800;font-size:0.85rem;letter-spacing:0.04em;text-transform:uppercase;cursor:pointer;transition:none;outline:none;appearance:none !important;-webkit-appearance:none !important;-moz-appearance:none !important;}
.start-menu-icon-button__icon{width:56px;height:56px;filter:brightness(0) invert(1) drop-shadow(2px 0 0 black) drop-shadow(-2px 0 0 black) drop-shadow(0 4px 0 black) drop-shadow(0 -2px 0 black);display:block;}
.start-menu-icon-button__icon--start{filter:brightness(0) saturate(100%) invert(54%) sepia(96%) saturate(750%) hue-rotate(185deg) brightness(95%) contrast(92%) drop-shadow(2px 0 0 black) drop-shadow(-2px 0 0 black) drop-shadow(0 4px 0 black) drop-shadow(0 -2px 0 black);}
.start-menu-icon-button__icon--settings{filter:brightness(0) saturate(100%) invert(73%) sepia(77%) saturate(2000%) hue-rotate(135deg) brightness(95%) contrast(95%) drop-shadow(2px 0 0 black) drop-shadow(-2px 0 0 black) drop-shadow(0 4px 0 black) drop-shadow(0 -2px 0 black);}
.start-menu-icon-button__icon--customize{filter:brightness(0) saturate(100%) invert(25%) sepia(96%) saturate(2000%) hue-rotate(318deg) brightness(95%) contrast(95%) drop-shadow(2px 0 0 black) drop-shadow(-2px 0 0 black) drop-shadow(0 4px 0 black) drop-shadow(0 -2px 0 black);}
.start-menu-icon-button__icon--discord{filter:brightness(0) saturate(100%) invert(35%) sepia(89%) saturate(1848%) hue-rotate(218deg) brightness(97%) contrast(95%) drop-shadow(2px 0 0 black) drop-shadow(-2px 0 0 black) drop-shadow(0 4px 0 black) drop-shadow(0 -2px 0 black);}
.start-menu-icon-button__label{font-size:0.68rem;line-height:1.1;color:var(--color-white);background:var(--color-black);border:2px solid var(--color-black);border-radius:2px;padding:0.35rem 0.6rem;text-align:center;min-width:60px;transition:background .15s ease,color .15s ease,border-color .15s ease}
.start-menu-icon-button:hover{transform:none;box-shadow:none;}
.start-menu-icon-button:hover .start-menu-icon-button__label{background:var(--color-white);color:var(--color-black);border-color:var(--color-black);}
.start-menu-icon-button:focus-visible{outline:2px solid var(--color-secondary);outline-offset:3px}
.start-menu-icon-button:active{transform:none;box-shadow:none;}
.robot-customization{--robot-panel-peek:2.5rem;transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease;position:relative}
.robot-customization--collapsed{box-shadow:0 12px 36px var(--shadow-light)}
.robot-customization__content{display:flex;flex-direction:column;gap:1rem;flex:1 1 auto;min-height:0}
.robot-customization__content--hidden{display:none}
.robot-customization__header{display:flex;flex-direction:column;gap:0.75rem}
.robot-customization__header-top{display:flex;align-items:center;justify-content:flex-end;gap:0.75rem;flex-wrap:wrap}
.robot-customization__menubar{display:flex;align-items:center;gap:0.5rem;width:calc(100% + (var(--start-menu-panel-padding,1.5rem) * 2));padding:0;margin:calc(-1 * var(--start-menu-panel-padding,1.5rem)) calc(-1 * var(--start-menu-panel-padding,1.5rem)) 0 calc(-1 * var(--start-menu-panel-padding,1.5rem));background:var(--color-white);border-bottom:2px solid #000;box-shadow:none;font:inherit;font-weight:700;letter-spacing:0.02em;color:var(--color-text-primary)}
.robot-customization__menu{position:relative}
.robot-customization__menu-button{display:inline-flex;align-items:center;border:2px solid transparent;border-radius:0;background:var(--color-white);color:var(--color-text-primary);font:inherit;font-weight:700;padding:0.25rem 0.75rem;cursor:pointer;letter-spacing:0.02em;min-width:3.25rem;text-align:left;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease}
.robot-customization__menu-button:focus-visible{outline:3px solid var(--color-secondary);outline-offset:2px}
.robot-customization__menu-button--active,.robot-customization__menu-button:hover{background:var(--color-secondary-lighter);border-color:#000;box-shadow:3px 3px 0 rgba(0,0,0,0.18)}
.robot-customization__menu-list{position:absolute;top:calc(100% + 2px);left:0;display:none;flex-direction:column;min-width:9rem;background:var(--color-white);border:2px solid #000;box-shadow:4px 4px 0 rgba(0,0,0,0.2);color:var(--color-text-primary);padding:0.25rem 0;z-index:5}
.robot-customization__menu-list--open{display:flex}
.robot-customization__menu-item{border:none;background:transparent;color:var(--color-text-primary);font:inherit;text-align:left;padding:0.45rem 1.75rem 0.45rem 0.75rem;cursor:pointer;white-space:nowrap;letter-spacing:0.01em;transition:background .12s ease,color .12s ease}
.robot-customization__menu-item:focus-visible{outline:none}
.robot-customization__menu-list--open .robot-customization__menu-item:hover,.robot-customization__menu-list--open .robot-customization__menu-item:focus{background:var(--color-secondary-lighter);color:var(--color-text-primary)}
.robot-customization__toggle{position:absolute;right:calc(var(--robot-panel-peek) / -2);top:50%;transform:translateY(-50%);width:var(--robot-panel-peek);height:var(--robot-panel-peek);display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:999px;background:var(--color-button-default);border:1px solid var(--color-border);color:var(--color-text-secondary);box-shadow:0 2px 6px var(--shadow-light);transition:background .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;z-index:2}
.robot-customization__toggle:hover{background:var(--color-button-hover);color:var(--color-text-primary);box-shadow:0 4px 10px var(--shadow-medium);transform:translateY(-50%) scale(1.05)}
.robot-customization__toggle-icon{width:.65rem;height:.65rem;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateX(1px) rotate(135deg);transition:transform .2s ease}
.robot-customization--collapsed .robot-customization__toggle-icon,.robot-customization__toggle--collapsed .robot-customization__toggle-icon{transform:translateX(-1px) rotate(-45deg)}
.robot-customization__title{margin:0;font-size:1.05rem;font-weight:800;color:var(--color-primary-dark);flex:1 1 auto;min-width:0}
.robot-customization__actions{display:flex;gap:0.5rem;flex-wrap:wrap}
.robot-customization__header-controls{display:flex;align-items:center;gap:0.5rem;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.robot-customization__action-button{border:2px solid #000;background:var(--color-bg-tertiary);color:var(--color-text-secondary);padding:0.35rem 0.8rem;border-radius:4px;font-size:0.75rem;font-weight:700;cursor:pointer;transition:background .2s ease,color .2s ease,box-shadow .2s ease}
.robot-customization__action-button:hover{background:var(--color-secondary-lighter);color:var(--color-secondary);box-shadow:0 4px 12px var(--shadow-light)}
.robot-customization__tabs{display:flex;gap:2px;flex-wrap:nowrap;border-bottom:2px solid #000;margin:0 -1rem;padding:0 1rem;width:100%}
.robot-customization__tab-toolbar{display:flex;gap:0.5rem;flex-wrap:wrap;justify-content:flex-end}
.robot-customization__tab-toolbar-button{border:2px solid #000;background:var(--color-bg-tertiary);color:var(--color-text-secondary);padding:0.3rem 0.7rem;border-radius:4px;font-size:0.7rem;font-weight:700;cursor:pointer;transition:background .2s ease,color .2s ease,box-shadow .2s ease}
.robot-customization__tab-toolbar-button:hover{background:var(--color-secondary-lighter);color:var(--color-secondary);box-shadow:0 4px 12px var(--shadow-light)}
.robot-customization__tab-button{border:2px solid #000;background:var(--color-bg-tertiary);color:var(--color-text-secondary);padding:0.5rem 1rem;border-radius:4px 4px 0 0;border-bottom:none;font-size:0.75rem;font-weight:700;cursor:pointer;transition:box-shadow .2s ease;position:relative;margin-bottom:0}
.robot-customization__tab-button:hover{background:var(--color-secondary-lighter);color:var(--color-secondary)}
.robot-customization__tab-button--active{background:var(--color-secondary);color:var(--color-text-white);box-shadow:none;border:2px solid #000;border-bottom:2px solid var(--color-secondary);z-index:1;transition:none}
.robot-customization__tab-button--active:hover{background:var(--color-secondary);color:var(--color-text-white)}
.robot-customization__body{display:flex;flex-direction:column;gap:1rem;flex:1 1 auto;min-height:0;padding-right:0.25rem}
.robot-customization__tab-panel{display:flex;flex-direction:column;gap:1rem}
.robot-customization__tab-panel--hidden{display:none}
.robot-customization__group{background:var(--color-bg-secondary);border:1px solid var(--color-border-light);border-radius:12px;padding:0.75rem 1rem;display:flex;flex-direction:column;gap:0.75rem;box-shadow:0 8px 20px var(--shadow-light)}
.robot-customization__group-title{margin:0;font-size:0.8rem;font-weight:800;color:var(--color-text-secondary);letter-spacing:0.06em;text-transform:uppercase}
.robot-customization__control{display:flex;flex-direction:column;gap:0.35rem;font-size:0.82rem;color:var(--color-text-secondary)}
.robot-customization__control--color{gap:0.5rem}
.robot-customization__control--checkbox{flex-direction:row;align-items:center;gap:0.5rem}
.robot-customization__control--grid{gap:0.5rem}
.robot-customization__label{font-weight:700;color:var(--color-text-primary)}
.robot-customization__value-row{display:flex;align-items:center;gap:0.5rem}
.robot-customization__grid{display:grid;gap:0.4rem;grid-template-columns:repeat(auto-fill,minmax(4.5rem,1fr))}
.robot-customization__grid-button{border:2px solid #000;background:var(--color-bg-tertiary);color:var(--color-text-secondary);padding:0.35rem 0.6rem;border-radius:4px;font-size:0.75rem;font-weight:700;cursor:pointer;transition:box-shadow .2s ease;text-align:center}
.robot-customization__grid-button:hover{background:var(--color-secondary-lighter);color:var(--color-secondary);box-shadow:0 4px 12px var(--shadow-light)}
.robot-customization__grid-button--active{background:var(--color-secondary);color:var(--color-text-white);box-shadow:0 4px 12px var(--shadow-light);border-color:#000;transition:none}
.robot-customization__grid-button--active:hover{background:var(--color-secondary);color:var(--color-text-white);box-shadow:0 4px 12px var(--shadow-light)}
.robot-customization__checkbox{width:1rem;height:1rem;border-radius:4px;border:1px solid var(--color-border-light);accent-color:var(--color-secondary)}
.robot-customization__color-input{width:32px;height:32px;border-radius:2px;border:none;background:var(--color-bg-secondary);cursor:pointer;padding:0;box-shadow:0 0 0 2px #000}
.robot-customization__color-input::-webkit-color-swatch-wrapper{padding:0;border:none;border-radius:2px}
.robot-customization__color-input::-webkit-color-swatch{border:none;border-radius:2px}
.robot-customization__color-input::-moz-color-swatch{border:none;border-radius:2px}
.robot-customization__value{font-weight:700;color:var(--color-text-secondary);font-size:0.75rem;min-width:3rem;text-align:right}

/* Unified range slider styles */
input[type='range']{width:100%;accent-color:var(--color-secondary);-webkit-appearance:none;appearance:none;height:4px;background:linear-gradient(to right,var(--color-secondary) 0%,var(--color-secondary) var(--fill,0%),var(--color-white) var(--fill,0%),var(--color-white) 100%);border:2px solid var(--color-black);border-radius:999px;outline:none;padding:0}
input[type='range']::-moz-range-track{background:var(--color-white);height:4px;border:2px solid var(--color-black);border-radius:999px}
input[type='range']::-moz-range-progress{background:var(--color-secondary);height:4px;border-radius:999px}
input[type='range']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:var(--color-secondary);border:2px solid var(--color-black);cursor:pointer;margin-top:0px}
input[type='range']::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--color-secondary);border:2px solid var(--color-black);cursor:pointer}
input[type='range']:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}

/* width */
.start-menu-panel::-webkit-scrollbar{width:15px}
/* Track */
.start-menu-panel::-webkit-scrollbar-track{background:#f4f1ea;box-shadow:inset 2px 0 0 #000}
/* Handle */
.start-menu-panel::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#f9d66a 0%,#f2b22a 100%);border-radius:15px;box-shadow:inset 0 0 0 2px #000}
/* Handle on hover */
.start-menu-panel::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#f7cd53 0%,#eca41e 100%);border-radius:15px;box-shadow:inset 0 0 0 2px #000}
/* Faux left rail for overlay scrollbars: draws a black line at the left edge of the scrollbar area */
.start-menu-panel{position:relative;background-image:linear-gradient(to left,#000 4px,rgba(0,0,0,0) 0);background-repeat:no-repeat;background-position:right top;background-size:4px 100%}

/* Theme scrollbar colors to window active/inactive state */
.floating-window{--window-accent:#4a9eff;--window-accent-light:#8cc4ff;--window-accent-dark:#2e7bd6}
.floating-window--active{--window-accent:#ffd700;--window-accent-light:#f9d66a;--window-accent-dark:#f2b22a}
.floating-window .start-menu-panel{--start-scrollbar-thumb:var(--window-accent);--start-scrollbar-thumb-light:var(--window-accent-light);--start-scrollbar-thumb-dark:var(--window-accent-dark)}
.floating-window .start-menu-panel{scrollbar-color:var(--start-scrollbar-thumb) var(--start-scrollbar-track, #f4f1ea)}
.floating-window .start-menu-panel::-webkit-scrollbar-thumb{background:linear-gradient(180deg,var(--start-scrollbar-thumb-light, var(--start-scrollbar-thumb)) 0%,var(--start-scrollbar-thumb-dark, var(--start-scrollbar-thumb)) 100%);border-radius:15px;box-shadow:inset 0 0 0 2px #000}
.floating-window .start-menu-panel::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,var(--start-scrollbar-thumb, #f7cd53) 0%,var(--start-scrollbar-thumb-dark, #eca41e) 100%);border-radius:15px;box-shadow:inset 0 0 0 2px #000}
.floating-window .start-menu-panel::-webkit-scrollbar-thumb:active{background:linear-gradient(180deg,var(--start-scrollbar-thumb-dark, #f6c23c) 0%,var(--start-scrollbar-thumb-dark, #e39412) 100%);border-radius:15px;box-shadow:inset 0 0 0 2px #000}
.start-menu-settings{display:flex;flex-direction:column;gap:1.25rem;flex:1 1 auto;min-height:0;height:100%}
.start-menu-settings--hidden{display:none}
.start-menu-settings__content{gap:1.25rem}
.start-menu-settings__header{display:flex;align-items:flex-start;justify-content:space-between;gap:0.75rem;flex-wrap:wrap}
.start-menu-settings__header-text{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto;min-width:0}
.start-menu-settings__title{margin:0;font-size:1.2rem;font-weight:800;color:var(--color-text-secondary)}
.start-menu-settings__subtitle{margin:0;color:var(--color-text-secondary);font-size:0.85rem;line-height:1.4}
.start-menu-settings__close{display:none}
.start-menu-settings__close:hover{background:var(--color-secondary-lighter);color:var(--color-secondary);box-shadow:0 4px 12px var(--shadow-light)}
.start-menu-settings__close-icon{display:inline-block;font-size:1.1rem;line-height:1}
.start-menu-settings__section{display:flex;flex-direction:column;gap:1rem;background:var(--color-bg-secondary);border:1px solid var(--color-border-light);border-radius:16px;padding:1rem;box-shadow:0 8px 24px var(--shadow-light)}
.start-menu-settings__section-title{margin:0;font-size:0.95rem;font-weight:800;color:var(--color-text-secondary)}
.start-menu-settings__control{display:flex;flex-direction:column;gap:0.5rem}
.start-menu-settings__label{display:flex;align-items:center;justify-content:space-between;font-size:0.85rem;font-weight:700;color:var(--color-text-primary)}
.start-menu-settings__value{font-weight:700;color:var(--color-text-secondary);font-size:0.8rem;min-width:3rem;text-align:right}
.start-menu-settings__description{margin:0;font-size:0.8rem;color:var(--color-text-secondary);line-height:1.4}
.start-menu-settings__checkbox-label{display:flex;align-items:flex-start;gap:0.75rem;cursor:pointer;font-size:0.85rem;font-weight:700;color:var(--color-text-primary);line-height:1.4}
.start-menu-settings__checkbox{width:18px;height:18px;margin:0;flex-shrink:0;accent-color:var(--color-secondary);cursor:pointer;border-radius:4px}
.start-menu-settings__checkbox:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.start-menu-settings__checkbox-text{flex:1 1 auto;min-width:0}
.start-menu-settings__button{background:var(--color-primary);color:var(--color-text-white);border:2px solid #000;border-radius:4px;padding:0.65rem 1.25rem;font-size:0.9rem;font-weight:700;cursor:pointer;transition:background .15s ease,transform .15s ease,box-shadow .15s ease;box-shadow:0 2px 8px var(--shadow-medium)}
.start-menu-settings__button:hover{background:var(--color-primary-hover);transform:translateY(-1px);box-shadow:0 4px 12px var(--shadow-dark)}
.start-menu-settings__button:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.start-menu-settings__button:active{transform:translateY(0);box-shadow:0 2px 6px var(--shadow-medium)}
.start-menu-settings__footer{margin-top:auto;padding-top:1rem;padding-bottom:1rem;border-top:1px solid var(--color-border-light);text-align:center}
.start-menu-settings__version{margin:0;font-size:0.75rem;color:var(--color-text-muted);font-weight:600}
.start-menu-settings__return-button-container{display:flex;align-items:center;margin-top:1rem}
.start-menu-settings__return-button{background:var(--color-secondary-lighter);color:var(--color-secondary);border:1px solid var(--color-secondary);border-radius:12px;padding:0.65rem 1.25rem;font-size:0.9rem;font-weight:700;cursor:pointer;transition:background .15s ease,color .15s ease,transform .15s ease,box-shadow .15s ease;box-shadow:0 2px 8px var(--shadow-medium)}
.start-menu-settings__return-button:hover{background:var(--color-secondary);color:var(--color-white);transform:translateY(-1px);box-shadow:0 4px 12px var(--shadow-dark)}
.start-menu-settings__return-button:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.start-menu-settings__return-button:active{transform:translateY(0);box-shadow:0 2px 6px var(--shadow-medium)}
.start-menu-mode-tabs{display:flex;align-items:flex-end;gap:0.25rem;margin-bottom:0;pointer-events:auto;flex:1 1 auto;min-width:0}
.start-menu-mode-tabs__button{border:1px solid var(--color-border-light);background:var(--color-bg-tertiary);color:var(--color-text-secondary);padding:0.5rem 1rem;border-radius:12px 12px 0 0;font-size:0.8rem;font-weight:700;cursor:pointer;transition:background .2s ease,color .2s ease,box-shadow .2s ease,border-color .2s ease;position:relative;border-bottom:none}
.start-menu-mode-tabs__button:hover{background:var(--color-secondary-lighter);color:var(--color-secondary)}
.start-menu-mode-tabs__button--active{background:var(--color-white);color:var(--color-primary-dark);box-shadow:none;border-color:var(--color-border-light);border-bottom:2px solid var(--color-white);margin-bottom:-2px;z-index:1}
.start-menu-mode-tabs__button:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
@media (orientation: portrait){
  .start-menu-icons{top:50%;bottom:auto;right:2rem;transform:translateY(-50%);flex-direction:column}
  .start-menu-sidepanel{top:auto;bottom:0;left:50%;transform:translate(-50%,0);width:min(520px,calc(100vw - 2.5rem));max-height:none;height:auto;max-height:min(50vh,calc(var(--start-menu-viewport-height) - 3.5rem));padding-bottom:0;--robot-panel-peek:2rem;--start-menu-panel-peek-min:3.5rem}
  .start-menu-sidepanel__tray{height:min(40vh,calc(var(--start-menu-viewport-height) - 3.5rem));max-height:min(50vh,calc(var(--start-menu-viewport-height) - 3.5rem));--start-menu-collapsed-peek:calc(max(var(--robot-panel-peek), var(--start-menu-panel-peek-min)) + max(env(safe-area-inset-bottom), 0px))}
  .robot-customization{--robot-panel-peek:2rem;height:100%;max-height:100%;border-radius:0 18px 0 0;transform:translateY(0)}
  .robot-customization__toggle{right:auto;top:calc(var(--robot-panel-peek) / -2);left:50%;transform:translateX(-50%)}
  .robot-customization__toggle:hover{transform:translateX(-50%) scale(1.05)}
  .start-menu-sidepanel--collapsed{padding-bottom:calc(env(safe-area-inset-bottom) + 0.5rem)}
  .start-menu-sidepanel--collapsed .start-menu-sidepanel__tray{transform:translateY(calc(100% - var(--start-menu-collapsed-peek)))}
  .start-menu-settings:not(.start-menu-settings--hidden){flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
  .robot-customization__toggle-icon{transform:translateY(-1px) rotate(45deg)}
  .robot-customization--collapsed .robot-customization__toggle-icon,.robot-customization__toggle--collapsed .robot-customization__toggle-icon{transform:translateY(1px) rotate(-135deg)}
  .start-menu{justify-content:center;align-items:stretch;padding:5vh 5vw;height:var(--start-menu-viewport-height);min-height:var(--start-menu-viewport-height);box-sizing:border-box;overflow:hidden;gap:1rem;padding-bottom:5vh;padding-bottom:calc(5vh + env(safe-area-inset-bottom))}
  .start-menu .start-menu__panel{max-width:100%;box-sizing:border-box}
  .start-menu .start-menu__panel--intro{top:1rem}
}
@media (max-width:900px){.start-menu{gap:1rem;padding-top:1.5rem}}

@media (max-width:900px) and (orientation: landscape){
  .start-menu-icons{top:auto;bottom:2rem;right:1.5rem;transform:none;flex-direction:row}
}

@media (max-width:900px) and (orientation: portrait){
  .start-menu-icons{top:50%;bottom:auto;right:1.5rem;transform:translateY(-50%);flex-direction:column}
}

@media (max-width:640px){
  .start-menu-icons{right:1rem}
  .start-menu-icon-button{width:90px;height:110px;font-size:0.75rem;border-radius:0 !important;background:none !important;background-color:transparent !important;box-shadow:none !important;}
  .start-menu-icon-button__label{font-size:0.62rem;padding:0.3rem 0.5rem;min-width:50px;border-radius:2px;}
  .start-menu-icon-button__icon{width:44px;height:44px;filter:brightness(0) invert(1) drop-shadow(1.5px 0 0 black) drop-shadow(-1.5px 0 0 black) drop-shadow(0 3px 0 black) drop-shadow(0 -1.5px 0 black);}
  .start-menu-icon-button__icon--start{filter:brightness(0) saturate(100%) invert(54%) sepia(96%) saturate(750%) hue-rotate(185deg) brightness(95%) contrast(92%) drop-shadow(1.5px 0 0 black) drop-shadow(-1.5px 0 0 black) drop-shadow(0 3px 0 black) drop-shadow(0 -1.5px 0 black);}
  .start-menu-icon-button__icon--settings{filter:brightness(0) saturate(100%) invert(73%) sepia(77%) saturate(2000%) hue-rotate(135deg) brightness(95%) contrast(95%) drop-shadow(1.5px 0 0 black) drop-shadow(-1.5px 0 0 black) drop-shadow(0 3px 0 black) drop-shadow(0 -1.5px 0 black);}
  .start-menu-icon-button__icon--customize{filter:brightness(0) saturate(100%) invert(25%) sepia(96%) saturate(2000%) hue-rotate(318deg) brightness(95%) contrast(95%) drop-shadow(1.5px 0 0 black) drop-shadow(-1.5px 0 0 black) drop-shadow(0 3px 0 black) drop-shadow(0 -1.5px 0 black);}
  .start-menu-icon-button__icon--discord{filter:brightness(0) saturate(100%) invert(35%) sepia(89%) saturate(1848%) hue-rotate(218deg) brightness(97%) contrast(95%) drop-shadow(1.5px 0 0 black) drop-shadow(-1.5px 0 0 black) drop-shadow(0 3px 0 black) drop-shadow(0 -1.5px 0 black);}
}

@media (max-width:640px) and (orientation: landscape){
  .start-menu-icons{bottom:1.5rem;right:1rem}
}

@media (max-width:640px) and (orientation: portrait){
  .start-menu-icons{top:50%;bottom:auto;right:1rem;transform:translateY(-50%);flex-direction:column}
}

@media (max-width:640px){
  .start-menu__panel{width:calc(100vw - 2rem);max-width:none;padding:1.75rem clamp(1.25rem,5vw,1.75rem)}
  .level-select{max-height:none}
}

@media (max-width:640px) and (orientation: portrait){
  .start-menu .start-menu__panel--intro{top:0rem}
}

@media (max-width:640px) and (orientation: landscape){
}
.start-menu__panel--intro h1{color:inherit;font-size:2.8rem}
/* Memphis 80s title styling for RoboRun */
.start-menu__panel--intro .memphis-title{
  --memphis-pink:#ff4fb0;
  --memphis-yellow:#ffea00;
  --memphis-lime:#000000;
  --memphis-blue:#1448c7;
  --memphis-blue-dark:#0b2a7a;
  font-size:clamp(2.5rem,8vw,12rem);
  line-height:0.9;
  letter-spacing:0.06em;
  text-transform:uppercase;
  font-weight:900;
  color:var(--memphis-pink);
  position:relative;
  padding:0 0.25rem;
  text-shadow:
    /* Lime outline */
    0 0 4px var(--memphis-lime),
    0 0 8px var(--memphis-lime),
    -2px -2px 0 var(--memphis-lime),
    2px -2px 0 var(--memphis-lime),
    -2px 2px 0 var(--memphis-lime),
    2px 2px 0 var(--memphis-lime),
    -3px 0 0 var(--memphis-lime),
    3px 0 0 var(--memphis-lime),
    0 -3px 0 var(--memphis-lime),
    0 3px 0 var(--memphis-lime),
    /* 3D extrusion stack */
    1px 3px 0 var(--memphis-blue),
    2px 4px 0 var(--memphis-blue),
    3px 5px 0 var(--memphis-blue),
    4px 6px 0 var(--memphis-blue),
    5px 7px 0 var(--memphis-blue),
    6px 8px 0 var(--memphis-blue),
    7px 9px 0 var(--memphis-blue),
    8px 10px 0 var(--memphis-blue),
    9px 11px 0 var(--memphis-blue-dark),
    10px 12px 0 var(--memphis-blue-dark),
    12px 16px 18px rgba(11,42,122,0.35);
  /* Subtle 3D movement animation */
  animation:memphisTextFloat 12s ease-in-out infinite;
}
.start-menu__panel--intro .memphis-title span{
  display:inline-block;
  animation:memphisLetterWave 2s ease-in-out infinite;
  animation-delay:calc(var(--letter-index) * 0.1s);
}
.memphis-title::before{
  /* outer yellow rim */
  content:attr(data-text);
  position:absolute;left:0;top:0;z-index:-1;
  color:transparent;
  text-shadow:
    /* Yellow outline - thicker */
    0 0 12px var(--memphis-yellow),
    0 0 16px var(--memphis-yellow),
    -4px -4px 0 var(--memphis-yellow),
    4px -4px 0 var(--memphis-yellow),
    -4px 4px 0 var(--memphis-yellow),
    4px 4px 0 var(--memphis-yellow),
    -5px 0 0 var(--memphis-yellow),
    5px 0 0 var(--memphis-yellow),
    0 -5px 0 var(--memphis-yellow),
    0 5px 0 var(--memphis-yellow),
    -6px -6px 0 var(--memphis-yellow),
    6px -6px 0 var(--memphis-yellow),
    -6px 6px 0 var(--memphis-yellow),
    6px 6px 0 var(--memphis-yellow);
  /* Different movement speed for 3D depth effect */
  animation:memphisTextMove 15s ease-in-out infinite;
  transform-origin:center center;
}
.memphis-title::after{
  /* sprinkles overlay clipped to text */
  content:attr(data-text);
  position:absolute;left:0;top:0;z-index:-1;pointer-events:none;
  background:
    repeating-linear-gradient(60deg,transparent 0 18px,transparent 18px 34px,#ffe66d 34px 36px,transparent 36px 52px),
    repeating-linear-gradient(-60deg,transparent 0 14px,transparent 14px 28px,#55efc4 28px 30px,transparent 30px 46px),
    repeating-linear-gradient(120deg,transparent 0 22px,transparent 22px 38px,#00d1ff 38px 40px,transparent 40px 56px),
    repeating-linear-gradient(-120deg,transparent 0 26px,transparent 26px 42px,#ff6b6b 42px 44px,transparent 44px 60px);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
  opacity:.25;
  /* Fast movement for sprinkles layer */
  animation:memphisTextMove 8s ease-in-out infinite reverse;
  transform-origin:center center;
}
@media (max-width:640px){
  .memphis-title{font-size:clamp(2.2rem,13vw,4.6rem)}
}

/* 3D Text movement animations */
@keyframes memphisTextFloat{
  0%,100%{
    transform:translateX(0px) translateY(0px) translateZ(0px);
  }
  25%{
    transform:translateX(8px) translateY(-15px) translateZ(3px);
  }
  50%{
    transform:translateX(-6px) translateY(-10px) translateZ(5px);
  }
  75%{
    transform:translateX(-10px) translateY(-30px) translateZ(2px);
  }
}

@keyframes memphisTextMove{
  0%{
    transform:translateX(0px) translateY(0px) scale(1);
  }
  25%{
    transform:translateX(4px) translateY(3px) scale(1.01);
  }
  50%{
    transform:translateX(2px) translateY(15px) scale(1);
  }
  75%{
    transform:translateX(-3px) translateY(2px) scale(0.99);
  }
  100%{
    transform:translateX(0px) translateY(0px) scale(1);
  }
}

@keyframes memphisLetterWave{
  0%, 100%{
    transform:translateY(0px);
  }
  50%{
    transform:translateY(-15px);
  }
}

.start-menu__panel--intro .start-menu__button{box-shadow:0 12px 32px var(--shadow-dark)}
.start-menu__panel h1{margin:0;font-size:2.4rem;font-weight:900;letter-spacing:0.08em;text-transform:uppercase;color:var(--color-primary-dark)}
.start-menu__panel h2{margin:0;font-size:1.6rem;font-weight:800;color:var(--color-primary)}
.start-menu__tagline{margin:0;font-size:1rem;color:var(--color-text-secondary)}
.start-menu__panel p{margin:0;color:var(--color-text-secondary);line-height:1.5}
/* Replace start menu button with Memphis style */
.start-menu__button{position:relative;display:inline-block;padding:0.75rem 1.6rem;border:2px solid #000;border-radius:4px;background:var(--memphis-bg,var(--color-secondary));color:var(--memphis-fg,var(--color-text-white));font-size:1rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;box-shadow:4px 4px 0 rgba(0,0,0,0.3)}
.start-menu__button:not([data-text]){color:var(--memphis-fg,var(--color-text-white))}
.start-menu__button:hover{transform:translateY(-2px);box-shadow:6px 6px 0 rgba(0,0,0,0.3)}
.start-menu__button:active{transform:translateY(0);box-shadow:2px 2px 0 rgba(0,0,0,0.3)}
.start-menu__button--primary{--memphis-bg:var(--color-secondary);--memphis-fg:var(--color-text-white);--memphis-accent:var(--color-secondary-light)}
.start-menu__panel--howto{max-width:420px;background:var(--color-bg-secondary)}
.level-select-panel{flex:1 1 auto;min-height:0}
.level-select-panel__content{display:flex;flex-direction:column;gap:1.5rem;flex:1 1 auto;min-height:0}
.level-select-panel__header{display:flex;gap:0.75rem;align-items:center;justify-content:space-between;flex-wrap:wrap}
.level-select-panel__title{margin:0;font-size:1.4rem;font-weight:800;color:var(--color-primary)}
.level-select{display:flex;flex-direction:column;gap:1.25rem;flex:1 1 auto;min-height:0;width:100%}
.level-select__empty{color:var(--color-text-secondary);font-size:0.95rem;text-align:center;padding:1rem 0}
.level-select__item{display:flex;align-items:flex-start;gap:1.25rem;padding:1rem 1.25rem;border-radius:16px;border:1px solid var(--color-border-light);background:var(--color-bg-secondary);box-shadow:0 10px 30px var(--shadow-light);width:100%;box-sizing:border-box;flex-wrap:wrap}
.level-select__title-wrapper{display:flex;flex-direction:column;gap:0.25rem;flex:1 1 auto;min-width:0}
.level-select__level-number{font-size:0.7rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:0.05em}
.level-select__title{font-size:1.4rem;font-weight:800;color:var(--color-text-primary);white-space:normal;overflow-wrap:anywhere}
.level-select__buttons{display:flex;flex-direction:column;align-items:stretch;gap:0.5rem;flex-wrap:nowrap;justify-content:flex-end;order:3;flex-basis:100%;width:100%;margin-top:0.75rem}
.level-select__play{background:var(--color-secondary);color:var(--color-text-white);border:2px solid #000;border-radius:4px;padding:0.55rem 1.35rem;font-size:0.95rem;font-weight:700;cursor:pointer;transition:background .2s ease,transform .2s ease,box-shadow .2s ease;flex:0 0 auto;min-width:0}
.level-select__play:hover{background:var(--color-secondary-hover);transform:translateY(-2px);box-shadow:0 8px 20px var(--shadow-dark)}
.level-select__play:disabled{cursor:not-allowed;opacity:0.55;transform:none;box-shadow:none;background:var(--color-button-light);color:var(--color-text-muted)}
.level-select__star{font-size:4.2rem;line-height:1;color:var(--color-border);text-shadow:0 4px 12px rgba(0,0,0,0.1);flex-shrink:0}
.level-select__star--complete{color:#ffc107;text-shadow:0 6px 16px rgba(255,193,7,0.45)}
.level-select__edit{background:var(--color-button-default);color:var(--color-text-secondary);border:2px solid #000;border-radius:4px;padding:0.45rem 1rem;font-size:0.85rem;font-weight:600;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease;flex:0 0 auto;min-width:0}
.level-select__edit:hover{transform:translateY(-1px);box-shadow:0 6px 16px var(--shadow-light);color:var(--color-text-primary)}
.level-select__edit:disabled{cursor:not-allowed;opacity:0.5;transform:none;box-shadow:none;background:var(--color-button-light);color:var(--color-text-muted)}

.level-select__buttons>button{width:100%}
.start-menu__button--secondary{--memphis-bg:var(--color-secondary-lighter);--memphis-fg:var(--color-secondary);--memphis-accent:var(--color-secondary-light)}
#btnCreateLevel,#btnBackToMenu{display:block;width:100%}
#topbar #btnBackToMenu.start-menu__button{display:block;width:100%;padding:0.75rem 1.6rem;border:2px solid #000;border-radius:4px;background:var(--memphis-bg,var(--color-secondary-lighter));color:var(--memphis-fg,var(--color-secondary));font-size:1rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;box-shadow:4px 4px 0 rgba(0,0,0,0.3);justify-content:center;align-items:center}
#topbar #btnBackToMenu.start-menu__button:hover{transform:translateY(-2px);box-shadow:6px 6px 0 rgba(0,0,0,0.3);background:var(--memphis-bg,var(--color-secondary-lighter))}
#topbar #btnBackToMenu.start-menu__button:active{transform:translateY(0);box-shadow:2px 2px 0 rgba(0,0,0,0.3)}
.start-menu-settings__return-button-container{flex-basis:100%;width:100%;margin-bottom:0.75rem;order:-1}
#btnReturnToMenuFromGame{display:block;width:100%;padding:0.75rem 1.6rem;border:2px solid #000;border-radius:4px;background:var(--memphis-bg,var(--color-secondary-lighter));color:var(--memphis-fg,var(--color-secondary));font-size:1rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;box-shadow:4px 4px 0 rgba(0,0,0,0.3);justify-content:center;align-items:center;text-align:center}
#btnReturnToMenuFromGame:hover{transform:translateY(-2px);box-shadow:6px 6px 0 rgba(0,0,0,0.3);background:var(--memphis-bg,var(--color-secondary-lighter))}
#btnReturnToMenuFromGame:active{transform:translateY(0);box-shadow:2px 2px 0 rgba(0,0,0,0.3)}
.level-complete{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:rgba(15,16,25,0.72);backdrop-filter:blur(6px);z-index:150;transition:opacity .25s ease;pointer-events:none;opacity:0}
.level-complete:not(.hidden){opacity:1;pointer-events:auto}
.level-complete__panel{background:var(--color-white);border-radius:24px;padding:2.5rem 3rem;box-shadow:0 24px 60px var(--shadow-overlay);text-align:center;max-width:420px;width:min(90%,420px);display:flex;flex-direction:column;gap:1rem}
.level-complete__title{margin:0;font-size:2rem;font-weight:900;color:var(--color-primary-dark);letter-spacing:0.04em;text-transform:uppercase}
.level-complete__message{margin:0;font-size:1rem;color:var(--color-text-secondary);line-height:1.6}
.level-complete__buttons{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}
.level-complete__button{background:var(--color-primary);color:var(--color-text-white);border:none;padding:0.8rem 1.8rem;border-radius:999px;font-size:1rem;font-weight:700;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}
.level-complete__button:hover{transform:translateY(-2px);box-shadow:0 12px 26px var(--shadow-success)}
.level-complete__button--secondary{background:var(--color-text-secondary);color:var(--color-white)}
.level-complete__button--secondary:hover{box-shadow:0 12px 26px rgba(108,117,125,0.45)}

.level-failed{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:rgba(15,16,25,0.76);backdrop-filter:blur(6px);z-index:150;transition:opacity .25s ease;pointer-events:none;opacity:0}
.level-failed:not(.hidden){opacity:1;pointer-events:auto}
.level-failed__panel{background:var(--color-white);border-radius:24px;padding:2.5rem 3rem;box-shadow:0 24px 60px var(--shadow-overlay);text-align:center;max-width:420px;width:min(90%,420px);display:flex;flex-direction:column;gap:1rem}
.level-failed__title{margin:0;font-size:2rem;font-weight:900;color:var(--color-danger);letter-spacing:0.04em;text-transform:uppercase}
.level-failed__message{margin:0;font-size:1rem;color:var(--color-text-secondary);line-height:1.6}
.level-failed__button{background:var(--color-danger);color:var(--color-text-white);border:none;padding:0.8rem 1.8rem;border-radius:999px;font-size:1rem;font-weight:700;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}
.level-failed__button:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(244,67,54,0.45)}
.credits-screen{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:260;pointer-events:none;overflow:hidden}
.credits-screen__backdrop{position:absolute;inset:0;background:var(--color-white);opacity:0;transition:opacity 1.6s ease}
.credits-screen__content{position:relative;z-index:1;max-width:72ch;padding:2.5rem 2rem;text-align:center;opacity:0;transform:translateY(48px);transition:opacity var(--credits-fade-ms,600ms) ease,transform var(--credits-fade-ms,600ms) ease;line-height:1.35}
.credits-screen__content--visible{opacity:1;transform:translateY(0)}
.credits-screen__content--exiting{transform:translateY(-36px)}
.credits-screen__names{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:0.45rem;align-items:center}
.credits-screen__name{margin:0;font-size:clamp(1.9rem,5vw,4rem);font-weight:900;letter-spacing:0.12em;text-transform:uppercase;color:rgba(10,12,18,0.92)}
.credits-screen__role{margin:0 0 0.65rem;font-size:clamp(1rem,3vw,1.7rem);font-weight:750;letter-spacing:0.34em;text-transform:uppercase;color:rgba(40,44,62,0.7)}
.credits-screen__role--hidden{display:none}
.credits-screen--active{pointer-events:auto;cursor:pointer}
.credits-screen--active .credits-screen__backdrop{opacity:1}

/* Global top bar */
#topbar{position:absolute;top:0;left:50%;transform:translateX(-50%);min-width:310px;max-width:min(900px,calc(100vw - 0.5rem));background:var(--color-white);border-bottom-left-radius:12px;border-bottom-right-radius:12px;z-index:100;display:flex;align-items:stretch;box-shadow:0 4px 12px var(--shadow-darker);padding:0.35rem 0.75rem 0.6rem;box-sizing:border-box}
.topbar-content{display:flex;flex-direction:column;gap:0.45rem;width:100%}
#topbar .topbar-actions{display:flex;align-items:center;justify-content:center;gap:0.75rem;flex-wrap:wrap;width:100%}
#topbar .topbar-settings{position:relative;display:flex;align-items:center}
#topbar button{background:var(--color-button-default);border:1px solid var(--color-border);border-radius:8px;color:var(--color-text-primary);padding:0.5rem 1.2rem;cursor:pointer;font-size:0.9rem;font-weight:600;transition:all 0.15s ease;white-space:nowrap}
#topbar button:hover{background:var(--color-button-hover);transform:translateY(-1px);box-shadow:0 2px 6px var(--shadow-medium)}
#topbar .btn-settings{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;padding:0;border-radius:999px;font-size:1.1rem;line-height:1;flex-shrink:0}
#topbar .btn-settings.btn-settings--open{background:var(--color-button-hover);box-shadow:0 2px 8px var(--shadow-medium)}
#topbar .btn-play-stop{background:var(--color-primary);border-color:var(--color-primary-hover);color:var(--color-text-white);flex-shrink:0}
#topbar .btn-play-stop:hover{background:var(--color-primary-hover)}
#topbar .btn-play-stop.playing{background:var(--color-danger);border-color:var(--color-danger-hover)}
#topbar .btn-play-stop.playing:hover{background:var(--color-danger-hover)}
#topbar .btn-edit{background:var(--color-secondary-lighter);border-color:var(--color-secondary-light);color:var(--color-secondary);flex-shrink:0}
#topbar .btn-edit:hover{background:var(--color-secondary-light);border-color:var(--color-secondary)}
#topbar .btn-edit.active{background:var(--color-secondary);border-color:var(--color-secondary);color:var(--color-text-white);box-shadow:0 0 0 2px rgba(25,118,210,0.2)}
#topbar .btn-edit.active:hover{background:var(--color-secondary-hover)}
#topbar .btn-edit:disabled{opacity:0.55;cursor:not-allowed;box-shadow:none;transform:none}
#topbar .btn-blueprint{background:var(--color-button-default);border-color:var(--color-border);color:var(--color-text-secondary);font-size:0.8rem;padding:0.45rem 0.9rem}
#topbar .btn-blueprint:hover{background:var(--color-button-hover);color:var(--color-text-primary)}
#topbar .btn-blueprint:disabled{opacity:0.45;cursor:not-allowed;box-shadow:none;transform:none;color:var(--color-text-muted)}
#topbar .topbar-playback{display:flex;align-items:center;gap:0.4rem;min-width:0}
#topbar .topbar-speed{display:flex;flex-direction:column;gap:0.25rem;width:100%}
#topbar .topbar-speed__header{display:flex;align-items:center;justify-content:space-between;gap:0.5rem}
#topbar .topbar-speed__label{font-size:0.65rem;font-weight:700;color:var(--color-text-secondary);letter-spacing:0.08em;text-transform:uppercase}
#topbar .topbar-speed__value{font-size:0.85rem;font-weight:700;color:var(--color-text-secondary);min-width:2.5rem;text-align:right}
#topbar .topbar-speed__slider{max-width:100%;box-sizing:border-box;margin:0}
.settings-panel{position:absolute;top:calc(100% + 0.5rem);left:0;display:flex;flex-direction:column;gap:0.5rem;min-width:200px;padding:0.75rem;background:var(--color-white);border:1px solid var(--color-border-light);border-radius:12px;box-shadow:0 16px 36px var(--shadow-dark);z-index:160}
#topbar .settings-panel__section{display:flex;flex-direction:column;gap:0.6rem;padding-bottom:0.25rem;border-bottom:1px solid var(--color-border-light)}
#topbar .settings-panel__heading{margin:0;font-size:0.65rem;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--color-text-muted)}
#topbar .settings-panel__control{display:flex;flex-direction:column;gap:0.3rem}
#topbar .settings-panel__control-label{display:flex;align-items:center;justify-content:space-between;font-size:0.8rem;font-weight:600;color:var(--color-text-secondary)}
#topbar .settings-panel__value{font-size:0.75rem;font-weight:700;color:var(--color-text-secondary);min-width:3rem;text-align:right}
#topbar .settings-panel__slider{margin:0}
#topbar .settings-panel button{width:100%;display:flex;align-items:center;justify-content:flex-start;padding:0.6rem 0.9rem;font-size:0.85rem;font-weight:700}
#topbar .settings-panel button:hover{transform:none;box-shadow:none;background:var(--color-button-hover)}
#topbar .settings-panel__button{border-radius:10px}

/* Robot buttons in top bar */
.robot-buttons{position:relative;display:flex;align-items:center;justify-content:center}
.robot-buttons .btn-robot-menu{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;padding:0;border-radius:999px;background:var(--color-secondary-lighter);border:1px solid var(--color-secondary-light);color:var(--color-secondary);font-size:1.3rem;line-height:1;flex-shrink:0}
.robot-buttons .btn-robot-menu:hover{background:var(--color-secondary-light);border-color:var(--color-secondary-hover)}
.robot-buttons .btn-robot-menu:disabled{opacity:0.5;cursor:not-allowed;box-shadow:none;transform:none}
.robot-buttons .robot-menu{position:absolute;top:calc(100% + 0.4rem);right:0;display:flex;flex-direction:column;gap:0.35rem;min-width:180px;padding:0.5rem;background:var(--color-white);border:1px solid var(--color-border-light);border-radius:12px;box-shadow:0 16px 32px var(--shadow-medium);z-index:160;transform-origin:top right;opacity:0;transform:scale(0.88)}
.robot-buttons .robot-menu--open{opacity:1;transform:scale(1)}
.robot-buttons .robot-menu--opening{animation:robotMenuEnter .26s cubic-bezier(0.34,1.56,0.64,1) both}
.robot-buttons .robot-menu__list{display:flex;flex-direction:column;gap:0.35rem}
.robot-buttons .robot-menu__item{background:var(--color-secondary-lighter);border:1px solid var(--color-secondary-light);color:var(--color-secondary);padding:0.45rem 0.75rem;border-radius:10px;font-size:0.85rem;font-weight:600;text-align:left;cursor:pointer;transition:background 0.15s ease,border-color 0.15s ease}
.robot-buttons .robot-menu__item:hover{background:var(--color-secondary-light);border-color:var(--color-secondary-hover)}
.robot-buttons .robot-menu__item.active{background:var(--color-secondary);border-color:var(--color-secondary);color:var(--color-text-white)}
.robot-buttons .robot-menu__item.active:hover{background:var(--color-secondary-hover)}
.robot-buttons .robot-menu__empty{font-size:0.8rem;color:var(--color-text-muted);padding:0.4rem 0.25rem;text-align:center}

@keyframes robotMenuEnter{0%{opacity:0;transform:scale(0.88)}60%{opacity:1;transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}

/* FPS Counter */
.fps-counter{position:absolute;top:1rem;right:1rem;z-index:100;background:rgba(15,15,15,0.85);color:var(--color-text-white);font:600 0.85rem/1.3 system-ui,Segoe UI,Roboto,Arial;padding:0.5rem 0.9rem;border-radius:10px;box-shadow:0 4px 12px var(--shadow-dark);backdrop-filter:blur(6px);pointer-events:none;user-select:none;letter-spacing:0.04em}
.camera-debug-panel{position:absolute;top:1rem;left:1rem;z-index:100;background:rgba(15,15,15,0.85);color:var(--color-text-white);font:600 0.75rem/1.4 system-ui,Segoe UI,Roboto,Arial;padding:0.6rem 0.9rem;border-radius:10px;box-shadow:0 4px 12px var(--shadow-dark);backdrop-filter:blur(6px);pointer-events:none;user-select:none;min-width:280px}
.camera-debug-row{display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.3rem}
.camera-debug-row:last-child{margin-bottom:0}
.camera-debug-label{color:var(--color-text-muted);font-weight:500}
.camera-debug-value{color:var(--color-text-white);font-family:ui-monospace,SF Mono,Consolas,Monaco,monospace;font-size:0.7rem;letter-spacing:0.02em}

#viewport{position:absolute;top:0;left:0;width:100%;height:100%}
#viewport canvas{width:100%;height:100%;display:block;touch-action:none}
.robot-tooltips,.blueprint-tooltips{position:absolute;inset:0;pointer-events:none;z-index:90}
.blueprint-tooltips.hidden{display:none}
.blueprint-trash{position:absolute;top:88px;left:32px;width:64px;height:64px;border-radius:20px;background:rgba(28,30,36,0.78);border:2px dashed rgba(255,255,255,0.35);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,0.72);font-size:0;box-shadow:0 14px 28px var(--shadow-dark);transition:transform .18s ease,background .18s ease,border-color .18s ease,color .18s ease,opacity .18s ease;z-index:135;pointer-events:none;opacity:0;transform:scale(0.9);}
.blueprint-trash::before,.blueprint-trash::after{content:"";position:absolute;display:block;background:currentColor;opacity:0.88;transition:inherit}
.blueprint-trash::before{width:26px;height:20px;border-radius:6px 6px 10px 10px;bottom:18px}
.blueprint-trash::after{width:32px;height:6px;border-radius:4px;top:18px}
.blueprint-trash:not(.hidden){opacity:1;transform:scale(1)}
.blueprint-trash.is-active{background:var(--color-danger);border-color:rgba(0,0,0,0.25);color:var(--color-text-white);transform:scale(1.08)}
.blueprint-trash.is-active::before,.blueprint-trash.is-active::after{opacity:1}
#app .blueprint-trash.hidden{display:none}
.robot-tooltip-anchor{position:absolute;transform:translate(-50%,-120%);pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:0.35rem}
.robot-tooltip{position:relative;background:var(--color-secondary);color:var(--color-text-white);border:none;border-radius:999px;padding:0.35rem 0.75rem;font-size:0.7rem;letter-spacing:0.08em;text-transform:uppercase;pointer-events:auto;cursor:pointer;font-weight:700;box-shadow:0 6px 18px var(--shadow-dark);transition:transform 0.15s ease,box-shadow 0.15s ease,background 0.15s ease;--tooltip-scale:1;transform:scale(var(--tooltip-scale));transform-origin:center}
.robot-tooltip.robot-tooltip--scaling{transition:box-shadow 0.15s ease,background 0.15s ease}
.robot-tooltip:hover{background:var(--color-secondary-hover);transform:translateY(-2px) scale(var(--tooltip-scale));box-shadow:0 8px 22px var(--shadow-medium)}
.robot-tooltip-stack{display:flex;flex-direction:column;gap:0.3rem;align-items:center;pointer-events:none}
.robot-tooltip-stack__item{pointer-events:none;min-width:140px;cursor:default;box-shadow:0 6px 18px var(--shadow-dark);letter-spacing:0.08em;text-transform:uppercase;display:flex;align-items:center;justify-content:center}
.robot-tooltip-stack__value{font-size:0.72rem;font-weight:700;color:inherit;text-transform:none;letter-spacing:0.02em}
.robot-tooltip-stack__timer{margin-left:0.35rem;font-size:0.65rem;font-weight:600;color:inherit;opacity:0.9;letter-spacing:0.05em}
.blueprint-link-button{width:2.6rem;height:2.6rem;border-radius:999px;border:none;background:var(--color-success);color:var(--color-text-white);box-shadow:0 6px 18px var(--shadow-success);display:flex;align-items:center;justify-content:center;font-size:1.3rem;font-weight:700;cursor:pointer;pointer-events:auto;transition:transform .15s ease,box-shadow .15s ease,background .15s ease;--tooltip-scale:1;transform:scale(var(--tooltip-scale))}
.blueprint-link-button::before{content:'+';}
.blueprint-link-button:hover{background:#3b8b3f;transform:translateY(-2px) scale(var(--tooltip-scale));box-shadow:0 8px 22px var(--shadow-success)}
.blueprint-link-button:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.blueprint-link-receiver{position:relative;width:2.4rem;height:2.4rem;border-radius:999px;border:2px solid rgba(255,255,255,0.92);background:rgba(0,0,0,0.3);box-shadow:0 6px 18px var(--shadow-dark);display:flex;align-items:center;justify-content:center;pointer-events:auto;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease;--tooltip-scale:1;transform:scale(var(--tooltip-scale))}
.blueprint-link-receiver::before{content:'';display:block;width:1.1rem;height:1.1rem;border-radius:999px;border:2px solid rgba(255,255,255,0.6);transition:border-color .15s ease,background .15s ease}
.blueprint-link-receiver::after{content:none}
.blueprint-link-receiver:hover,.blueprint-link-receiver.is-hovered{border-color:rgba(76,175,80,0.9);background:rgba(76,175,80,0.18);box-shadow:0 8px 22px var(--shadow-success)}
.blueprint-link-receiver.is-removable,.blueprint-link-receiver.is-removable:hover,.blueprint-link-receiver.is-removable.is-hovered{border-color:rgba(244,67,54,0.95);background:rgba(244,67,54,0.18);box-shadow:0 8px 22px var(--shadow-danger)}
.blueprint-link-receiver.is-removable::before{border-color:rgba(244,67,54,0.9);background:rgba(244,67,54,0.12)}
.blueprint-link-receiver.is-removable::after{content:'';position:absolute;top:50%;left:50%;width:1.3rem;height:1.3rem;transform:translate(-50%,-50%);border-radius:999px;background:linear-gradient(45deg,transparent calc(50% - 0.08rem),rgba(244,67,54,0.95) calc(50% - 0.08rem),rgba(244,67,54,0.95) calc(50% + 0.08rem),transparent calc(50% + 0.08rem)),linear-gradient(-45deg,transparent calc(50% - 0.08rem),rgba(244,67,54,0.95) calc(50% - 0.08rem),rgba(244,67,54,0.95) calc(50% + 0.08rem),transparent calc(50% + 0.08rem))}
.blueprint-link-receiver:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.blueprint-link-line{position:absolute;height:0;border-top:2px dotted rgba(76,175,80,0.9);transform-origin:0 0;pointer-events:none;z-index:95}
.blueprint-link-line.is-removing{border-top-color:rgba(244,67,54,0.85)}
.robot-tooltip-stack__item--previous{background:var(--color-bg-secondary);color:var(--color-text-muted);box-shadow:0 4px 12px var(--shadow-medium)}
.robot-tooltip-stack__item--previous .robot-tooltip-stack__value{opacity:0.65}
.robot-tooltip-stack__item--current{background:var(--color-success);box-shadow:0 6px 18px var(--shadow-success);color:var(--color-text-white)}
.robot-tooltip-stack__item--next{background:var(--color-white);color:var(--color-text-primary);box-shadow:0 6px 18px var(--shadow-dark)}
.robot-tooltip-stack--animating .robot-tooltip-stack__item--previous{animation:robotTooltipPreviousFade 0.28s ease}
.robot-tooltip-stack--animating .robot-tooltip-stack__item--current{animation:robotTooltipCurrentRise 0.28s ease}
.robot-tooltip-stack--animating .robot-tooltip-stack__item--next{animation:robotTooltipNextRise 0.28s ease}
@keyframes robotTooltipPreviousFade{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-10px)}}
@keyframes robotTooltipCurrentRise{0%{transform:translateY(12px)}100%{transform:translateY(0)}}
@keyframes robotTooltipNextRise{0%{transform:translateY(16px);opacity:0.85}100%{transform:translateY(0);opacity:1}}
#debug:empty{display:none}
#debug{position:absolute;left:0;right:0;bottom:0;background:var(--shadow-overlay);color:var(--color-text-light);font:12px/1.3 system-ui,Segoe UI,Roboto,Arial;padding:.35rem .5rem;border-top:1px solid var(--color-border-dark);gap:1rem;align-items:center;pointer-events:none;z-index:50;display:none}
#debug .kv{display:flex;gap:.35rem;align-items:center}
#debug .kv b{color:var(--color-text-accent);font-weight:700}
.mobile-touch-debug{position:absolute;bottom:1rem;right:1rem;z-index:110;min-width:160px;max-width:260px;background:rgba(15,15,15,0.85);color:var(--color-text-light);font:12px/1.4 system-ui,Segoe UI,Roboto,Arial;padding:0.6rem 0.75rem;border-radius:12px;box-shadow:0 10px 24px var(--shadow-dark);backdrop-filter:blur(6px);pointer-events:auto}
.mobile-touch-debug__header{display:flex;align-items:center;justify-content:space-between;gap:0.6rem;margin-bottom:0.45rem}
.mobile-touch-debug__body{display:flex;flex-direction:column;gap:0.35rem;pointer-events:none}
.mobile-touch-debug .touch-mode{font-weight:700;color:var(--color-text-white);text-transform:uppercase;letter-spacing:0.05em;font-size:0.7rem;opacity:0.85}
.mobile-touch-debug__button{pointer-events:auto;flex-shrink:0;border:none;border-radius:999px;background:rgba(255,255,255,0.18);color:var(--color-text-white);font-size:0.65rem;font-weight:700;padding:0.35rem 0.8rem;text-transform:uppercase;letter-spacing:0.06em;cursor:pointer;transition:background 0.15s ease,transform 0.15s ease,opacity 0.15s ease}
.mobile-touch-debug__button:hover:not(:disabled){background:rgba(255,255,255,0.28);transform:translateY(-1px)}
.mobile-touch-debug__button:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.mobile-touch-debug__button:disabled{opacity:0.45;cursor:not-allowed;transform:none}
.mobile-touch-debug .touch-zoom{font-size:0.7rem;color:var(--color-text-accent)}
.mobile-touch-debug__rows{display:flex;flex-direction:column;gap:0.25rem}
.mobile-touch-debug .touch-row{display:flex;justify-content:space-between;align-items:center;font-size:0.75rem}
.mobile-touch-debug .touch-row b{color:var(--color-text-white);font-weight:700}
.mobile-touch-debug .touch-empty{font-size:0.7rem;opacity:0.6}
.side-panel{position:absolute;top:24px;bottom:24px;right:24px;width:min(360px,40vw);max-width:40vw;background:var(--color-white);color:var(--color-text-primary);border-left:2px solid var(--color-border-light);display:flex;flex-direction:column;transition:transform .15s ease;box-shadow:-4px 0 16px var(--shadow-medium);z-index:140;border-radius:24px;overflow:hidden}
.editor-active #programmer{z-index:150}
.side-panel.closed{transform:translateX(100%);pointer-events:none;}
.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}
.blueprint-panel{--blueprint-panel-peek:3.25rem}
.blueprint-panel .ui-body{transition:opacity .2s ease}
.blueprint-panel.closed{transform:translateX(calc(100% - var(--blueprint-panel-peek)));pointer-events:auto;}
.blueprint-panel.closed .ui-body{opacity:0;pointer-events:none}
.blueprint-panel:not(.closed) .ui-body{opacity:1}
.blueprint-panel .panel-toggle{width:var(--blueprint-panel-peek);height:var(--blueprint-panel-peek);display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:999px;background:var(--color-button-default);border:1px solid var(--color-border);color:var(--color-text-secondary);box-shadow:0 2px 6px var(--shadow-light);transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.blueprint-panel .panel-toggle:hover{background:var(--color-button-hover);color:var(--color-text-primary);box-shadow:0 4px 10px var(--shadow-medium)}
.blueprint-panel .panel-toggle__icon{width:.65rem;height:.65rem;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateX(-1px) rotate(-45deg);transition:transform .2s ease}
.blueprint-panel.closed .panel-toggle__icon{transform:translateX(1px) rotate(135deg)}
.blueprint-panel .btn-set-camera{background:var(--color-button-default);border:1px solid var(--color-border);color:var(--color-text-secondary);padding:0.4rem 0.85rem;border-radius:12px;font-size:0.8rem;font-weight:600;cursor:pointer;transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.blueprint-panel .btn-set-camera:hover{background:var(--color-button-hover);color:var(--color-text-primary);box-shadow:0 2px 6px var(--shadow-light)}
.blueprint-panel .btn-set-camera:disabled{opacity:0.45;cursor:not-allowed;box-shadow:none}
.blueprint-panel .btn-blueprint-playlist{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:999px;border:1px solid var(--color-border);background:var(--color-button-default);color:var(--color-text-secondary);font-size:1.1rem;box-shadow:0 2px 6px var(--shadow-light);transition:background .15s ease,color .15s ease,box-shadow .15s ease;cursor:pointer}
.blueprint-panel .btn-blueprint-playlist:hover{background:var(--color-button-hover);color:var(--color-text-primary);box-shadow:0 4px 10px var(--shadow-medium)}
.blueprint-panel .btn-blueprint-playlist.hidden{display:none}
.playlist-panel__backdrop{position:fixed;inset:0;background:rgba(10,10,10,0.45);backdrop-filter:blur(2px);z-index:180;transition:opacity .15s ease;opacity:1}
.playlist-panel__backdrop.hidden{opacity:0;pointer-events:none}
.playlist-panel{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(520px,85vw);max-height:80vh;background:var(--color-white);border-radius:20px;box-shadow:0 18px 40px var(--shadow-dark);display:flex;flex-direction:column;z-index:190;padding:1rem 1.25rem;gap:1rem;transition:opacity .2s ease,transform .2s ease;opacity:1}
.playlist-panel.hidden{opacity:0;pointer-events:none;transform:translate(-50%,-48%)}
.playlist-panel__header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}
.playlist-panel__header h2{margin:0;font-size:1.2rem;color:var(--color-text-primary)}
.playlist-panel__close{background:var(--color-button-default);border:1px solid var(--color-border);border-radius:999px;width:2.2rem;height:2.2rem;display:inline-flex;align-items:center;justify-content:center;font-size:1.1rem;color:var(--color-text-secondary);cursor:pointer;transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.playlist-panel__close:hover{background:var(--color-button-hover);color:var(--color-text-primary);box-shadow:0 4px 12px var(--shadow-medium)}
.playlist-panel__body{display:flex;gap:1.25rem;align-items:flex-start;justify-content:space-between}
.playlist-panel__column{flex:1;display:flex;flex-direction:column;gap:0.75rem;min-width:0}
.playlist-panel__column h3{margin:0;font-size:1rem;color:var(--color-text-secondary)}
.playlist-options,.playlist-tracks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem;max-height:48vh;overflow-y:auto;overscroll-behavior:contain}
.playlist-option{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.55rem 0.65rem;border:1px solid var(--color-border);border-radius:12px;background:var(--color-bg-secondary)}
.playlist-option__label{font-weight:600;color:var(--color-text-primary)}
.playlist-option__controls{display:flex;align-items:center;gap:0.35rem;flex-shrink:0}
.playlist-option__btn{width:2rem;height:2rem;padding:0;border-radius:999px;border:1px solid var(--color-border);background:var(--color-button-default);color:var(--color-text-secondary);display:inline-flex;align-items:center;justify-content:center;font-size:0.9rem;cursor:pointer;transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.playlist-option__btn:hover{background:var(--color-button-hover);color:var(--color-text-primary);box-shadow:0 2px 6px var(--shadow-light)}
.playlist-option__btn:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.playlist-option__btn:disabled{opacity:0.45;cursor:not-allowed;box-shadow:none}
.playlist-option__btn--preview[aria-pressed='true']{background:var(--color-secondary);border-color:var(--color-secondary);color:var(--color-text-white);box-shadow:0 4px 12px var(--shadow-medium)}
.playlist-option__btn--add{font-size:1.1rem;font-weight:700}
.playlist-track{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.55rem 0.65rem;border:1px solid var(--color-border-light);border-radius:12px;background:var(--color-white);box-shadow:0 2px 6px var(--shadow-light)}
.playlist-track__label{font-weight:600;color:var(--color-text-primary);flex:1 1 auto;min-width:0}
.playlist-track__controls{display:flex;gap:0.35rem;align-items:center}
.playlist-track__btn{width:2rem;height:2rem;padding:0;border-radius:999px;font-size:0.85rem;display:inline-flex;align-items:center;justify-content:center}
.playlist-track__btn--remove{background:var(--color-danger);border-color:var(--color-danger);color:var(--color-text-white)}
.playlist-track__btn--remove:hover{background:var(--color-danger-hover);border-color:var(--color-danger-hover)}
.playlist-empty-message{margin:0;font-size:0.85rem;color:var(--color-text-secondary)}
.playlist-panel .playlist-empty-message.hidden{display:none}
.playlist-panel .playlist-track__btn:disabled{opacity:0.45;cursor:not-allowed}
@media (max-width: 720px){
  .playlist-panel{width:min(95vw,540px);max-height:85vh;padding:0.85rem 1rem}
  .playlist-panel__body{flex-direction:column}
  .playlist-panel__column{width:100%}
}
.side-panel:not(.closed){pointer-events:auto;}
.ui-bar,.ui-foot{display:flex;align-items:center;gap:.5rem;padding:.65rem .75rem;background:var(--color-bg-tertiary);border-bottom:1px solid var(--color-border-light)}
.ui-foot{border-top:1px solid var(--color-border-light);border-bottom:none}
.ui-body{display:flex;flex-direction:column;gap:.5rem;padding:.75rem;flex:1;min-height:0;background:var(--color-white)}
.ui-body.programming-layout{flex-direction:row;gap:.75rem;align-items:stretch;padding-top:1.5rem;position:relative;overflow:hidden}
.programming-layout .programming-column{flex:2 1 0;display:flex;flex-direction:column;gap:.75rem;min-height:0}
.blueprint-hint{margin:0 0 .5rem;color:var(--color-text-secondary);font-size:0.9rem;}
.stack{flex:1;min-height:200px;background:var(--color-bg-secondary);border:2px dashed var(--color-border);border-radius:10px;padding:.6rem;padding-top:2rem;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;position:relative}
.programming-layout::before{content:"Program";position:absolute;top:0.75rem;left:1.5rem;font-size:0.85rem;font-weight:700;color:var(--color-text-primary);z-index:10;background:var(--color-white);padding:0.25rem 0.75rem;border:2px dashed var(--color-border);border-radius:6px;box-shadow:0 1px 3px var(--shadow-light)}
.programming-layout .stack{flex:1 1 auto;min-height:0;max-height:100%}
.programming-layout .properties{flex:0 0 auto}
.palette{background:var(--color-bg-secondary);border:2px dashed var(--color-border);border-radius:10px;padding:.6rem;padding-right:1.25rem;padding-top:2rem;max-height:180px;overflow-y:auto;overflow-x:hidden;display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;position:relative;align-content:start}
.programming-layout::after{content:"Nodes";position:absolute;top:0.75rem;left:calc(66.67% + 0.75rem - 1em);font-size:0.85rem;font-weight:700;color:var(--color-text-primary);z-index:10;background:var(--color-white);padding:0.25rem 0.75rem;border:2px dashed var(--color-border);border-radius:6px;box-shadow:0 1px 3px var(--shadow-light)}
.programming-layout .palette{flex:1 1 0;max-height:100%;grid-template-columns:1fr;min-height:0;align-content:start}
.palette .block{margin:0;text-align:center}
.palette .block.dragging-source{cursor:grabbing;box-shadow:0 6px 16px var(--shadow-dark);}
.block{user-select:none;cursor:grab;background:var(--color-white);border:2px solid var(--color-border);border-radius:10px;padding:.5rem .6rem;margin:.4rem 0;display:flex;align-items:center;justify-content:center;gap:.5rem;color:var(--color-text-primary);font-weight:600;box-shadow:0 1px 3px var(--shadow-light)}
.palette .block{touch-action:none;}
.stack .block{cursor:default;touch-action:pan-y;}
.block:hover{border-color:var(--color-border-hover);box-shadow:0 2px 6px var(--shadow-dark)}
.block.hollow{background:var(--color-button-default);border-style:dashed}
.block.active{outline:2px solid var(--color-success);box-shadow:0 0 0 2px var(--shadow-success) inset}
.stack .block{justify-content:space-between;position:relative;padding-right:2.5rem}
.block-handle{position:absolute;top:2.5rem;right:0;bottom:0;width:2.5rem;border:none;background:transparent;color:var(--color-text-muted);display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:none;font-size:1rem;padding:0;border-radius:8px;line-height:1;border-left:1px solid var(--color-border-light);transition:background .15s ease,color .15s ease}
.block-handle:hover{background:var(--color-button-light);color:var(--color-text-secondary)}
.block-handle:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.block-handle:active{cursor:grabbing;background:var(--color-button-light)}
.block-content{flex:1;display:flex;align-items:center;gap:.5rem;justify-content:flex-start}
.block-content--stacked{flex-direction:column;align-items:flex-start;gap:0.35rem;width:100%}
.block-content__title{font-size:0.95rem;font-weight:700;color:var(--color-text-primary)}
.block-property-row{width:100%;display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap}
.block-property-label{font-size:0.8rem;font-weight:600;color:var(--color-text-secondary)}
.block-property-field{font-size:0.92rem;font-weight:600;padding:0.25rem 0.6rem;border-radius:8px;border:1px solid var(--color-border);background:var(--color-white);color:var(--color-text-primary);width:3.5rem}
.block-property-field:focus{outline:2px solid var(--color-secondary);outline-offset:1px}
.block-property-suffix{font-size:0.88rem;font-weight:600;color:var(--color-text-secondary)}
.block-property-hint{font-size:0.7rem;font-weight:500;color:var(--color-text-muted);margin-right:0.5rem}
.palette .block.hollow{text-align:center}
.block-controls{display:flex;align-items:center;gap:.25rem}
.btn-move{display:none;min-width:2rem;height:2rem;padding:0;justify-content:center;align-items:center;font-size:0.75rem}
.btn-move:disabled{opacity:0.4;cursor:not-allowed}
.start-slot{opacity:.9;margin:.4rem 0;padding:.45rem .6rem;border-radius:10px;background:var(--color-success-light);border:2px solid var(--color-success-border);font-weight:700;color:var(--color-success-text);display:flex;align-items:center;gap:.6rem;justify-content:space-between}
.start-slot__toggle{width:auto;flex:1 1 auto}
.start-slot__label{font-size:0.95rem}
.start-slot__value{font-size:0.75rem;font-weight:600;color:var(--color-success-text);text-transform:uppercase;letter-spacing:0.03em;text-align:right;min-width:2.5rem}
.start-slot__toggle .property-toggle__track{background:rgba(255,255,255,0.35);box-shadow:inset 0 0 0 1px var(--color-success-border);}
.start-slot__toggle .property-toggle__input:checked + .property-toggle__track{background:var(--color-success);box-shadow:inset 0 0 0 1px var(--color-success-border);}
.block.dragging{opacity:.7}
.block.drag-preview{opacity:1;pointer-events:none;box-shadow:0 10px 24px var(--shadow-dark);}
.block.drag-preview.dragging{opacity:1;}
.drop-hint{height:12px;border-radius:6px;margin:.3rem 0;background:linear-gradient(90deg,var(--color-success),transparent)}
.ui-bar .spacer,.ui-foot .foot-spacer{flex:1}
button{background:var(--color-button-default);border:2px solid #000;border-radius:4px;color:var(--color-text-primary);padding:.4rem .7rem;cursor:pointer;font-weight:600}
button:hover{background:var(--color-button-hover);box-shadow:0 2px 4px var(--shadow-medium)}
#btnToggleEdit.btn-edit{font-variant:small-caps;letter-spacing:0.04em}
#btnClose{background:var(--color-button-default);border:1px solid var(--color-border);font-size:1.2rem;padding:.3rem .6rem;line-height:1;color:var(--color-text-secondary)}
#btnClose:hover{background:var(--color-button-hover);color:var(--color-text-primary)}
input,select{background:var(--color-white);border:1px solid var(--color-border);color:var(--color-text-primary);border-radius:6px;padding:.2rem .4rem;width:4.5rem}
.robot-label,.program-label{color:var(--color-text-secondary);font-size:0.9rem}
.program-timer{color:var(--color-secondary);font-size:0.85rem;font-weight:600;letter-spacing:0.04em;margin-left:0.75rem;min-width:0}
#robotName,#programTarget{color:var(--color-text-primary);font-weight:700}
.properties{display:flex;flex-direction:column;gap:.6rem;padding:.55rem .6rem;background:var(--color-bg-secondary);border:2px dashed var(--color-border);border-radius:10px;min-height:0;max-height:200px;overflow-y:auto;overscroll-behavior:contain}
.properties.hidden{display:none}
.property-row{display:flex;flex-direction:column;gap:.25rem}
.property-row label{font-weight:700;color:var(--color-text-secondary);font-size:0.85rem}
.property-control{display:flex;align-items:center;gap:.4rem}
.property-control input{width:5.5rem}
.property-value{font-size:0.8rem;color:var(--color-text-muted);min-width:3rem}
.property-row--boolean{gap:.35rem}
.property-toggle-label{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;cursor:pointer}
.property-toggle-label .property-label{flex:1 1 auto;min-width:0}
.property-toggle__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.property-toggle__track{position:relative;display:block;width:2.6rem;height:1.35rem;border-radius:999px;background:var(--color-border-light);box-shadow:inset 0 0 0 1px var(--color-border);transition:background .2s ease,box-shadow .2s ease;flex:0 0 auto}
.property-toggle__thumb{position:absolute;top:50%;left:2px;width:1.05rem;height:1.05rem;border-radius:50%;background:var(--color-white);box-shadow:0 2px 6px var(--shadow-light);transform:translate(0,-50%);transition:left .2s ease,transform .2s ease}
.property-toggle-label:hover .property-toggle__track{box-shadow:inset 0 0 0 1px var(--color-border),0 2px 6px var(--shadow-light)}
.property-toggle__input:focus-visible + .property-toggle__track{box-shadow:0 0 0 3px var(--color-secondary-light),inset 0 0 0 1px var(--color-secondary)}
.property-toggle__input:checked + .property-toggle__track{background:var(--color-secondary);box-shadow:inset 0 0 0 1px var(--color-secondary)}
.property-toggle__input:checked + .property-toggle__track .property-toggle__thumb{left:calc(100% - 1.05rem - 2px)}

.stack .block .btn-remove{position:absolute;top:0.35rem;right:0.35rem;display:inline-flex;align-items:center;justify-content:center;background:var(--color-button-default);border:1px solid var(--color-border);color:var(--color-text-secondary);padding:.3rem .6rem;border-radius:8px;line-height:1;font-size:1.2rem;box-shadow:none;opacity:1}
.stack .block .btn-remove:hover{background:var(--color-button-hover);color:var(--color-text-primary)}

.editor-active .robot-tooltips{display:none !important}
.editor-active #debug{display:none}
@media (pointer: coarse){
  .btn-move{display:inline-flex;}
  .stack .block{cursor:default;}
}

@media (max-width: 1024px){
  #topbar{left:50%;transform:translateX(-50%);max-width:calc(100% - 1.5rem)}
  .robot-buttons{max-width:220px}
}

@media (orientation: portrait){
  .side-panel{top:auto;bottom:0;left:0;right:0;width:100%;max-width:none;height:clamp(260px,55vh,520px);border-left:none;border-top:2px solid var(--color-border-light);box-shadow:0 -4px 16px var(--shadow-medium);border-radius:16px 16px 0 0}
  .side-panel.closed{transform:translateY(100%);}
  .blueprint-panel.closed{transform:translateY(calc(100% - var(--blueprint-panel-peek)));}
  .blueprint-panel .panel-toggle__icon{transform:translateY(-1px) rotate(45deg)}
  .blueprint-panel.closed .panel-toggle__icon{transform:translateY(1px) rotate(-135deg)}
  .side-panel:not(.closed){transform:translateY(0);}
  .ui-body{padding:1rem;height:100%;gap:.75rem}
  .stack{min-height:150px}
  .palette{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}
  .programming-layout .stack{min-height:120px}
  .programming-layout .palette{min-height:120px;grid-template-columns:repeat(1,1fr)}
}


/* Memphis button styles (80s UI badges) */
.btn-memphis{--memphis-bg:#ffffff;--memphis-fg:#111827;--memphis-accent:#8aa9ff;--memphis-border:#111827;--memphis-offset-x:8px;--memphis-offset-y:6px;position:relative;display:inline-block;padding:.6rem 1.2rem;border:2px solid var(--memphis-border);border-radius:0;background:var(--memphis-bg);color:transparent;font-weight:800;letter-spacing:.06em;text-transform:uppercase;box-shadow:0 2px 0 rgba(0,0,0,0.06);cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;z-index:2}
.btn-memphis:not([data-text]){color:var(--memphis-fg)}
.btn-memphis::before{content:attr(data-text);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--memphis-fg);font-weight:800;letter-spacing:.06em;text-transform:uppercase;z-index:3;pointer-events:none}
.btn-memphis::after{content:"";position:absolute;inset:0;border:2px solid var(--memphis-border);border-radius:0;background:var(--memphis-accent);transform:translate(var(--memphis-offset-x),var(--memphis-offset-y));z-index:1;box-shadow:0 6px 16px var(--shadow-dark)}
.btn-memphis:hover{transform:translate(var(--memphis-offset-x),var(--memphis-offset-y));box-shadow:0 8px 18px var(--shadow-dark);z-index:1}
.btn-memphis:hover::after{transform:translate(calc(-1 * var(--memphis-offset-x)),calc(-1 * var(--memphis-offset-y)));z-index:2;background:radial-gradient(circle at 0 0, rgba(17,24,39,0.25) 1.6px, transparent 1.6px),radial-gradient(circle at 8px 8px, rgba(17,24,39,0.25) 1.6px, transparent 1.6px),var(--memphis-accent);background-size:16px 16px;background-repeat:repeat}
.btn-memphis:active{transform:translate(0,0);z-index:2}
.btn-memphis:active::after{transform:translate(var(--memphis-offset-x),var(--memphis-offset-y));z-index:1}
.btn-memphis:disabled{opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}

/* Color themes */
.btn-memphis--yellow{--memphis-bg:#fff8b8;--memphis-accent:#f6d34f}
.btn-memphis--white{--memphis-bg:#ffffff;--memphis-accent:#a3c4ff}
.btn-memphis--blue{--memphis-bg:#a7e1ff;--memphis-accent:#5b69ff}
.btn-memphis--purple{--memphis-bg:#e2c9ff;--memphis-accent:#a883ff}

/* Stripe accents (left/right) */
.btn-memphis--stripe-right{background-image:linear-gradient(var(--memphis-bg),var(--memphis-bg)),repeating-linear-gradient(-45deg,rgba(0,0,0,0.12) 0 6px,transparent 6px 12px);background-size:100% 100%,22% 100%;background-position:left top,right top;background-repeat:no-repeat}
.btn-memphis--stripe-left{background-image:linear-gradient(var(--memphis-bg),var(--memphis-bg)),repeating-linear-gradient(45deg,rgba(0,0,0,0.12) 0 6px,transparent 6px 12px);background-size:100% 100%,22% 100%;background-position:left top,left top;background-repeat:no-repeat}

/* Grid accent fill */
.btn-memphis--grid{background-image:linear-gradient(var(--memphis-bg),var(--memphis-bg)),linear-gradient(#0000 0,#0000 95%),linear-gradient(90deg,rgba(0,0,0,0.08) 1px,transparent 1px),linear-gradient(rgba(0,0,0,0.08) 1px,transparent 1px);background-size:100% 100%,100% 100%,18px 100%,100% 18px;background-position:0 0,0 0,0 0,0 0;background-repeat:no-repeat}

/* Small corner fold (top-right) */
.btn-memphis--corner{background-image:linear-gradient(var(--memphis-bg),var(--memphis-bg)),linear-gradient(135deg,transparent 0 50%,rgba(0,0,0,0.12) 50% 51%,transparent 51%);background-size:100% 100%,22px 22px;background-position:left top,right -1px top -1px;background-repeat:no-repeat}


/* Guided tutorial overlay */
.tutorial-overlay{position:fixed;inset:0;pointer-events:none;z-index:350;font-family:inherit;--tutorial-highlight-color:#ff3b30}
.tutorial-callout{position:fixed;left:0;top:0;max-width:min(320px,calc(100vw - 3.5rem));pointer-events:auto;transform:translate(-9999px,-9999px);transition:opacity .18s ease}
.tutorial-callout__panel{position:relative;z-index:1;background:var(--color-white);color:var(--color-text-primary);border-radius:18px;padding:1.5rem 2rem;box-shadow:0 0 0 8px var(--color-white),0 16px 36px rgba(255,59,48,0.25);border:5px dotted var(--tutorial-highlight-color);display:flex;flex-direction:column;gap:0.75rem;align-items:center;text-align:center;transform-origin:center center}
.tutorial-callout__actions{display:flex;align-items:center;justify-content:center;gap:0.75rem;width:100%;flex-wrap:wrap}
.tutorial-callout__text{margin:0;font-size:1rem;line-height:1.5}
.tutorial-callout__button{align-self:center;background:var(--color-primary);color:var(--color-text-white);border:none;border-radius:999px;padding:0.55rem 1.25rem;font-size:0.9rem;font-weight:700;cursor:pointer;box-shadow:0 8px 20px var(--shadow-dark);transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.tutorial-callout__button:hover{transform:translateY(-1px);background:var(--color-primary-hover);box-shadow:0 12px 28px var(--shadow-dark)}
.tutorial-callout__button:focus-visible{outline:2px solid var(--color-secondary);outline-offset:2px}
.tutorial-callout__button--skip{background:var(--color-white);color:var(--color-primary);border:1px solid var(--color-border-light);box-shadow:none}
.tutorial-callout__button--skip:hover{background:var(--color-button-light);box-shadow:none;transform:none}
.tutorial-callout__connector{position:absolute;left:0;top:0;pointer-events:none;width:var(--tutorial-connector-width,4px);height:0;transform-origin:50% 0%;display:block;z-index:0}
.tutorial-callout__connector-body{width:100%;height:100%;background-image:radial-gradient(circle,var(--tutorial-highlight-color) 2.5px,transparent 2.5px);background-size:12px 12px;background-repeat:repeat-y;background-position:center 0;overflow:hidden}
.tutorial-callout__target-highlight{position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;transform:translate(-50%,-50%);visibility:hidden;z-index:0;transform-origin:center center}
.tutorial-callout__target-highlight-ring{width:100%;height:100%;border-radius:50%;border:5px dotted var(--tutorial-highlight-color);animation:tutorial-target-highlight 6s linear infinite;box-sizing:border-box;transform-origin:center center}
@keyframes tutorial-target-highlight{0%{transform:scale(0.9) rotate(0deg);}25%{transform:scale(1.1) rotate(90deg);}50%{transform:scale(0.9) rotate(180deg);}75%{transform:scale(1.1) rotate(270deg);}100%{transform:scale(0.9) rotate(360deg);}}
