/* ==========================================================================
   Atelier3D 2027 - Professional 3D Digital Content Creation Suite
   Design: Adobe Photoshop Dark UI Palette + Standard DCC Layout
   Clean-Room Architecture
   ========================================================================== */

:root {
  /* Adobe Photoshop Sleek Dark Color Palette */
  --ps-bg-darkest: #1a1a1a;
  --ps-bg-dark: #202020;
  --ps-bg-panel: #282828;
  --ps-bg-hover: #343434;
  --ps-bg-active: #3e3e3e;
  --ps-input: #161616;
  --ps-border: #161616;
  --ps-border-light: #363636;
  --ps-border-subtle: #2d2d2d;
  --ps-text: #cccccc;
  --ps-text-bright: #ffffff;
  --ps-text-dim: #888888;
  --ps-text-muted: #606060;
  --ps-blue: #007acc;
  --ps-blue-hover: #008be5;
  --ps-accent: #00a8e8;
  --ps-accent-hover: #00b4d8;
  
  /* Functional Colors */
  --at-orange: #ff9100;
  --at-orange-dark: #e65100;
  --at-red: #e53935;
  --at-green: #43a047;
  --at-cyan: #00e5ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: var(--ps-text);
  user-select: none;
  -webkit-user-drag: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--ps-bg-dark);
}

/* ==========================================================================
   1. SPLASH SCREEN (Optional cold-boot splash, hidden by default for instant start)
   ========================================================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #141416 linear-gradient(135deg, #1c2028 0%, #111317 60%, #0a0b0d 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#splash-screen.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-art-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 35%, rgba(0, 168, 232, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.splash-body {
  position: relative;
  z-index: 2;
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  height: calc(100% - 32px);
  justify-content: space-between;
}

.splash-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 15vh;
}

.splash-logo-cube {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #007acc 0%, #005a9e 100%);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 122, 204, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.splash-m-letter {
  font-size: 42px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1px;
}

.splash-titles {
  display: flex;
  flex-direction: column;
}

.splash-app-title {
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1;
}

.splash-app-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: #8f8f8f;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.splash-meta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 20px;
}

.splash-edition-text {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.splash-vendor-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.splash-vendor-logo {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.splash-bottom-bar {
  position: relative;
  z-index: 2;
  height: 32px;
  background: #1c1c1f;
  border-top: 1px solid #141416;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.splash-load-status {
  font-size: 11px;
  color: #aaaaaa;
}

.splash-progress-track {
  width: 45%;
  height: 3px;
  background: #2a2a30;
  border-radius: 2px;
  overflow: hidden;
}

.splash-progress-bar {
  height: 100%;
  width: 25%;
  background: var(--ps-blue);
  box-shadow: 0 0 8px var(--ps-blue);
  transition: width 0.3s ease;
}

/* ==========================================================================
   2. HOME SCREEN (Photoshop Dark Elegance + Home Structure)
   ========================================================================== */
#home-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #232323;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#home-screen.hidden {
  display: none !important;
}

.home-titlebar {
  height: 38px;
  background: #1c1c1c;
  border-bottom: 1px solid #141414;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.home-titlebar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-cyan-icon {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #007acc, #005a9e);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 122, 204, 0.4);
}

.home-title-text {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.3px;
}

.home-titlebar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-help-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2b2b2b;
  border: 1px solid #3c3c3c;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.15s;
}

.home-help-btn:hover {
  background: #383838;
  color: #ffffff;
  border-color: #555555;
}

.home-go-btn {
  background: var(--ps-blue);
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 6px 18px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.home-go-btn:hover {
  background: var(--ps-blue-hover);
}

.home-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.home-nav-col {
  width: 250px;
  background: #1c1c1c;
  border-right: 1px solid #141414;
  display: flex;
  flex-direction: column;
  padding: 26px 20px;
  flex-shrink: 0;
  justify-content: space-between;
}

.home-brand-block {
  margin-bottom: 24px;
}

.home-brand-sub {
  font-size: 12px;
  font-weight: 700;
  color: #888888;
  letter-spacing: 1px;
}

.home-brand-main {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.home-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.home-act-btn {
  background: #262626;
  border: 1px solid #363636;
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.home-act-btn:hover {
  background: #333333;
  border-color: #4a4a4a;
  color: #ffffff;
}

.home-proj-selector {
  margin-bottom: 24px;
}

.home-proj-label {
  font-size: 10px;
  color: #777777;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home-proj-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #222222;
  border: 1px solid #333333;
  padding: 6px 10px;
  border-radius: 3px;
  color: #cccccc;
  cursor: pointer;
}

.home-menu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.home-item {
  padding: 8px 10px;
  border-radius: 3px;
  color: #888888;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.home-item:hover {
  background: #262626;
  color: #ffffff;
}

.home-item.active {
  background: #282828;
  color: #ffffff;
  font-weight: 600;
}

.home-footer-checkbox {
  padding-top: 14px;
  border-top: 1px solid #282828;
}

.home-footer-checkbox label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #777777;
  font-size: 11px;
  cursor: pointer;
}

.home-footer-checkbox input {
  accent-color: var(--ps-blue);
}

.home-content-area {
  flex: 1;
  background: #262626;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
}

.home-box-svg {
  width: 96px;
  height: 96px;
  margin-bottom: 20px;
  opacity: 0.85;
}

.home-empty-title {
  font-size: 20px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.home-empty-sub {
  font-size: 12px;
  color: #888888;
  margin-bottom: 24px;
}

.home-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-btn-cyan {
  background: var(--ps-blue);
  color: #ffffff;
  border: none;
  padding: 8px 24px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.home-btn-cyan:hover {
  background: var(--ps-blue-hover);
}

.home-btn-gray {
  background: #333333;
  color: #cccccc;
  border: 1px solid #484848;
  padding: 8px 22px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.home-btn-gray:hover {
  background: #3e3e3e;
  color: #ffffff;
  border-color: #555555;
}

/* ==========================================================================
   3. WORKSPACE (Photoshop Dark Theme + Standard Layout)
   ========================================================================== */
.workspace-root {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ps-bg-dark);
  overflow: hidden;
  position: relative;
}

/* 1. Menu Bar */
.at-menubar {
  min-height: 24px; flex-wrap: wrap;
  background: #232323;
  border-bottom: 1px solid #181818;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  flex-shrink: 0;
}

.at-menu-group {
  display: flex;
  align-items: center;
  gap: 1px;
}

.at-menu-btn {
  padding: 2px 7px;
  font-size: 11px;
  color: #cccccc;
  cursor: pointer;
  border-radius: 2px;
}

.at-menu-btn:hover {
  background: #333333;
  color: #ffffff;
}

.at-menu-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-label {
  color: #777777;
  font-size: 10px;
}

.ws-dropdown {
  background: #181818;
  border: 1px solid #363636;
  color: #cccccc;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
}

.search-box {
  background: #181818;
  border: 1px solid #363636;
  border-radius: 3px;
  padding: 1px 8px;
  cursor: pointer;
}

.search-box:hover {
  border-color: #555555;
}

/* 2. Status Line */
.at-statusline {
  height: 28px;
  background: #262626;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  flex-shrink: 0;
}

.status-mode-select {
  background: #181818;
  border: 1px solid #363636;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 11px;
}

.status-btn-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.status-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 2px 5px;
  cursor: pointer;
  border-radius: 2px;
  color: #aaaaaa;
  font-size: 11px;
}

.status-btn:hover {
  background: #333333;
  color: #ffffff;
}

.status-div {
  width: 1px;
  height: 16px;
  background: #363636;
  margin: 0 2px;
}

.status-tag {
  color: #777777;
  font-size: 10px;
  margin-right: 2px;
}

/* 3. Shelf */
.at-shelf {
  height: 52px;
  background: #232323;
  border-bottom: 1px solid #181818;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.shelf-tabs-row {
  display: flex;
  background: #1c1c1c;
  border-bottom: 1px solid #161616;
  overflow-x: auto;
  scrollbar-width: none;
  padding-left: 2px;
}

.shelf-tabs-row::-webkit-scrollbar {
  display: none;
}

.shelf-tab {
  padding: 2px 10px;
  font-size: 10px;
  color: #777777;
  border-right: 1px solid #161616;
  cursor: pointer;
  white-space: nowrap;
}

.shelf-tab:hover {
  color: #ffffff;
  background: #262626;
}

.shelf-tab.active {
  background: #282828;
  color: #ffffff;
  font-weight: 600;
  border-bottom: 2px solid var(--ps-blue);
}

.shelf-icons-tray {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.shelf-icons-tray::-webkit-scrollbar {
  display: none;
}

.shelf-icon-btn {
  width: 26px;
  height: 24px;
  background: #282828;
  border: 1px solid #363636;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--at-orange);
  transition: all 0.15s;
  flex-shrink: 0;
}

.shelf-icon-btn:hover {
  background: #363636;
  border-color: #505050;
}

.shelf-divider {
  width: 1px;
  height: 20px;
  background: #363636;
  margin: 0 4px;
  flex-shrink: 0;
}

/* 4. Main Center View: Tool Box + Outliner + Viewport + Channel Box */
.at-main-view {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Vertical Tool Box */
.at-toolbox-col {
  width: 34px;
  background: #202020;
  border-right: 1px solid #161616;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  gap: 3px;
  flex-shrink: 0;
}

.tool-btn {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #aaaaaa;
}

.tool-btn:hover {
  background: #303030;
  color: #ffffff;
}

.tool-btn.active {
  background: #161616;
  border-color: var(--ps-blue);
  color: var(--ps-blue);
}

.tb-sep {
  width: 20px;
  height: 1px;
  background: #303030;
  margin: 4px 0;
}

.tb-flex-spacer {
  flex: 1;
}

/* Outliner Column */
.at-outliner-col {
  width: 210px;
  background: #232323;
  border-right: 1px solid #181818;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.outliner-bar-title {
  height: 24px;
  background: #1c1c1c;
  border-bottom: 1px solid #161616;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-weight: 600;
  font-size: 11px;
  color: #ffffff;
}

.outliner-search-box {
  padding: 4px 6px;
  background: #202020;
  border-bottom: 1px solid #181818;
}

.outliner-search-box input {
  width: 100%;
  background: #141414;
  border: 1px solid #333333;
  border-radius: 2px;
  padding: 3px 6px;
  color: #cccccc;
  font-size: 10px;
  outline: none;
}

.outliner-search-box input:focus {
  border-color: var(--ps-blue);
}

.outliner-nodes-tree {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.outliner-row {
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #cccccc;
  cursor: pointer;
}

.outliner-row:hover {
  background: #2c2c2c;
  color: #ffffff;
}

.outliner-row.fixed {
  color: #666666;
}

.outliner-sep {
  height: 1px;
  background: #2c2c2c;
  margin: 4px 6px;
}

.out-item {
  padding: 3px 12px;
  color: #cccccc;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.out-item:before {
  content: "▨";
  color: var(--at-orange);
  font-size: 9px;
}

.out-item:hover {
  background: #2c2c2c;
  color: #ffffff;
}

.out-item.sel {
  background: var(--ps-blue);
  color: #ffffff;
  font-weight: 600;
}

/* Viewport 3D Column */
.at-viewport-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #2b2b2b;
  position: relative;
  overflow: hidden;
}

.vp-toolbar {
  height: 24px;
  background: #202020;
  border-bottom: 1px solid #161616;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  flex-shrink: 0;
  z-index: 5;
}

.vp-menu-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vp-menu-group span {
  color: #999999;
  font-size: 10px;
  cursor: pointer;
}

.vp-menu-group span:hover {
  color: #ffffff;
}

.vp-shading-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vp-icon-btn {
  background: #181818;
  border: 1px solid #333333;
  color: #cccccc;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 2px;
  cursor: pointer;
}

.vp-icon-btn:hover {
  background: #262626;
  color: #ffffff;
}

.vp-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

#c {
  width: 100%;
  height: 100%;
  display: block;
}

.vp-stat-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  color: #666666;
  font-family: monospace;
  font-size: 10px;
  pointer-events: none;
  z-index: 10;
}

.vp-viewcube-box {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 52px;
  height: 52px;
  background: rgba(30, 30, 30, 0.75);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.vc-face {
  font-size: 9px;
  font-weight: 800;
  color: #aaaaaa;
  letter-spacing: 0.5px;
}

.vp-camera-axis {
  position: absolute;
  bottom: 8px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 10px;
  font-weight: bold;
  pointer-events: none;
  z-index: 10;
}

/* Channel Box Column */
.at-channelbox-col {
  width: 250px;
  background: #232323;
  border-left: 1px solid #181818;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.cb-top-tabs {
  height: 24px;
  background: #1c1c1c;
  border-bottom: 1px solid #161616;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.p-tab {
  padding: 4px 10px;
  font-size: 10px;
  color: #777777;
  cursor: pointer;
  border-right: 1px solid #181818;
  white-space: nowrap;
}

.p-tab:hover {
  color: #ffffff;
}

.p-tab.active {
  background: #232323;
  color: #ffffff;
  font-weight: 600;
}

.cb-inner-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 6px;
}

.cb-menu-line {
  font-size: 10px;
  color: #666666;
  padding-bottom: 6px;
  border-bottom: 1px solid #1c1c1c;
  margin-bottom: 6px;
}

.cb-object-header {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: #181818;
  padding: 4px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
}

.cb-rows-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.cb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  background: #1c1c1c;
  border-radius: 2px;
}

.cb-label {
  font-size: 10px;
  color: #999999;
}

.cb-val-input {
  width: 70px;
  background: #121212;
  border: 1px solid #2e2e2e;
  color: #ffffff;
  font-size: 10px;
  text-align: right;
  padding: 2px 4px;
  border-radius: 2px;
  outline: none;
}

.cb-val-input:focus {
  border-color: var(--ps-blue);
}

.cb-inputs-header {
  font-size: 10px;
  font-weight: 700;
  color: #777777;
  padding: 4px 0;
  border-top: 1px solid #2c2c2c;
  margin-top: 4px;
}

.cb-props-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.prop-row label {
  font-size: 10px;
  color: #777777;
}

.prop-row input {
  width: 80px;
  background: #141414;
  border: 1px solid #2e2e2e;
  color: #ffffff;
  font-size: 10px;
  text-align: right;
  padding: 1px 4px;
  border-radius: 2px;
}

.cb-layers-dock {
  height: 110px;
  background: #1a1a1a;
  border-top: 1px solid #141414;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.cb-layer-tabs {
  height: 22px;
  background: #161616;
  border-bottom: 1px solid #121212;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
}

.cb-layer-tabs span {
  font-size: 10px;
  color: #777777;
  cursor: pointer;
}

.cb-layer-tabs span.active {
  color: #ffffff;
  font-weight: 600;
}

.cb-layer-list {
  flex: 1;
  padding: 4px 8px;
}

.cb-layer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #999999;
}

/* 5. Bottom Panel: Time Slider & Range Slider */
.at-timeline-bar {
  height: 48px;
  background: #232323;
  border-top: 1px solid #181818;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.time-track {
  height: 24px;
  background: #181818;
  border-bottom: 1px solid #141414;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.time-numbers-row {
  display: flex;
  height: 100%;
  align-items: center;
}

.t-tick {
  flex: 1;
  border-left: 1px solid #282828;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 3px;
  font-size: 9px;
  color: #555555;
  pointer-events: none;
}

#tl-scrubber {
  position: absolute;
  top: 0;
  left: 0%;
  width: 2px;
  height: 100%;
  background: var(--at-red);
  pointer-events: none;
  z-index: 10;
}

#tl-scrubber::before {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 8px;
  background: var(--at-red);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.range-track {
  height: 24px;
  background: #232323;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.range-boxes-left, .range-boxes-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.range-box {
  width: 34px;
  background: #181818;
  border: 1px solid #2e2e2e;
  color: #999999;
  font-size: 10px;
  text-align: center;
  border-radius: 2px;
  padding: 1px 0;
}

.playback-tray {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tl-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 1px 6px;
  border-radius: 2px;
  color: #cccccc;
  cursor: pointer;
  font-size: 11px;
}

.tl-btn:hover {
  background: #333333;
  color: #ffffff;
}

.range-tag {
  color: #777777;
  font-size: 10px;
}

.range-box-active {
  width: 38px;
  background: #121212;
  border: 1px solid var(--ps-blue);
  color: #ffffff;
  font-size: 10px;
  text-align: center;
  border-radius: 2px;
  padding: 1px 0;
}

/* 6. Command Line & Help Line */
.at-command-footer {
  height: 22px;
  background: #1c1c1c;
  border-top: 1px solid #141414;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  flex-shrink: 0;
}

.cmd-help-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmd-help-icon {
  background: #282828;
  color: #777777;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
}

.help-line-txt {
  margin-left: 8px;
  color: #9a9a9a;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}
.help-line-txt:empty { display: none; }

#status-sel {
  color: #777777;
  font-size: 10px;
}

.cmd-mel-field {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 55%;
}

.cmd-mel-badge {
  background: #262626;
  border: 1px solid #333333;
  color: #999999;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 700;
}

.cmd-mel-input {
  flex: 1;
  background: #121212;
  border: 1px solid #2e2e2e;
  border-radius: 2px;
  padding: 1px 6px;
  color: #cccccc;
  font-size: 10px;
  outline: none;
}

.cmd-mel-input:focus {
  border-color: var(--ps-blue);
}

.cmd-mel-result {
  color: #555555;
  font-size: 10px;
  font-family: monospace;
  white-space: nowrap;
}

/* Command Palette (Ctrl+K) */
.palette {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  z-index: 10000;
}

.palette[hidden] {
  display: none !important;
}

.palette-box {
  width: 480px;
  background: #232323;
  border: 1px solid #383838;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
}

#palette-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: #181818;
  border: none;
  border-bottom: 1px solid #303030;
  color: #ffffff;
  font-size: 13px;
  outline: none;
}

#palette-list div {
  padding: 8px 14px;
  cursor: pointer;
  color: #cccccc;
}

#palette-list div.sel, #palette-list div:hover {
  background: var(--ps-blue);
  color: #ffffff;
}

.cb-row.cb-active .cb-label { background: var(--at-accent); color: #fff; }
