.local-workspace { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin-bottom: 20px; }
.local-workspace > div:first-child { display: grid; gap: 5px; }
.local-workspace [data-local-status] { font-size: 12px; color: var(--muted); }
.local-workspace-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-device .local-workspace { margin-top: 20px; margin-bottom: 0; border: 0; padding: 0; background: none; }
.local-workspace-dialog { width: min(760px, 86vw); max-height: 84vh; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); color: var(--text); box-shadow: 0 24px 100px #0005; }
.local-workspace-dialog::backdrop { background: #0006; }
.local-workspace-dialog[open] { display: flex; flex-direction: column; }
.local-workspace-dialog > header { display: flex; justify-content: space-between; gap: 24px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); }
.local-workspace-dialog h2 { margin: 0; font-size: 22px; }
.local-workspace-dialog header p, .local-workspace-note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.local-workspace-dialog header button { align-self: flex-start; }
.local-workspace-body { padding: 20px 28px; overflow-y: auto; min-height: 160px; }
.local-workspace-folderbar { display: flex; gap: 12px; align-items: end; }
.local-workspace-folderbar > div { flex: 1; min-width: 0; }
.local-workspace-folderbar strong { overflow-wrap: anywhere; }
.local-workspace-folderbar > button { flex-shrink: 0; }
.local-workspace-folderbar label { display: grid; gap: 8px; flex: 1; font-size: 13px; }
.local-workspace-folderbar select { padding: 10px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
.local-workspace-files { margin-top: 20px; display: grid; gap: 2px; }
.local-workspace-files > label { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.local-workspace-files input { accent-color: var(--accent, #e8b922); }
.local-workspace-files label > span { flex: 1; overflow-wrap: anywhere; }
.local-workspace-files small, .local-workspace-dialog footer > span { color: var(--muted); font-size: 12px; }
.local-workspace-message { min-height: 20px; margin: 16px 0 0; font-size: 13px; }
.local-workspace-message.is-error { color: var(--danger, #d05b5b); }
.local-workspace-dialog > footer { padding: 16px 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.local-workspace-setup { padding: 12px 0; }
.local-workspace-setup h3 { font-size: 16px; }
.local-workspace-setup p { color: var(--muted); font-size: 13px; max-width: 52ch; line-height: 1.7; }
.local-workspace-models { list-style: none; padding: 0; display: grid; gap: 0; }
.local-workspace-models li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.local-workspace-models small { color: var(--muted); }
.local-workspace-dialog .platform-button { min-height: 36px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font-size: 13px; }
.local-workspace-dialog .platform-button:hover { background: var(--panel-2); }
.local-workspace-dialog .platform-button:disabled { opacity: .5; cursor: default; }
.local-workspace-dialog .platform-primary { background: var(--yellow); color: #201805; border-color: transparent; }
.local-workspace-dialog .platform-primary:hover { background: color-mix(in srgb, var(--yellow) 90%, white); }
.local-workspace-dialog .platform-quiet { background: none; border-color: transparent; color: var(--muted); }
.local-workspace-dialog :is(button, input, select):focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.platform-captcha { padding: 16px 0; min-height: 100px; }
.platform-captcha p { color: var(--muted); font-size: 13px; }

#platform-shell {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#platform-shell[hidden] { display: none !important; }
#platform-shell *, #platform-project-dialog * { box-sizing: border-box; }
#platform-shell :is(h1, h2, h3, p) { margin: 0; }
#platform-shell button, #platform-project-dialog button { font: inherit; }
#platform-shell button { -webkit-tap-highlight-color: transparent; }
#platform-shell :is(button, a, input):focus-visible,
#platform-project-dialog :is(button, input):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}
#platform-shell :is(button, input):disabled,
#platform-project-dialog :is(button, input):disabled { cursor: default; opacity: .45; }

#platform-shell .platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 30px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  background: color-mix(in srgb, var(--panel) 22%, var(--bg));
}
#platform-shell .platform-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.65px;
  text-decoration: none;
}
#platform-shell .platform-brand img { width: 29px; height: 29px; object-fit: contain; }
#platform-shell .platform-brand .logo-on-light { display: none; }
html[data-theme="light"] #platform-shell .platform-brand .logo-on-light { display: block; }
html[data-theme="light"] #platform-shell .platform-brand .logo-on-dark { display: none; }
#platform-shell .platform-header-actions,
#platform-shell .platform-actions,
#platform-shell .platform-project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#platform-shell .platform-header-actions { justify-content: flex-end; }
#platform-shell:not(.platform-public) .platform-public-nav { display: none; }

#platform-shell .platform-layout { display: grid; grid-template-columns: 188px minmax(0, 1fr); min-height: 0; }
#platform-shell .platform-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 29px 14px;
  overflow-y: auto;
  border-right: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
#platform-shell .platform-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
#platform-shell .platform-nav button:hover { background: color-mix(in srgb, var(--panel) 65%, transparent); color: var(--text); }
#platform-shell .platform-nav button.is-active { background: var(--panel-2); color: var(--text); }
#platform-shell .platform-nav button svg { width: 17px; height: 17px; flex: 0 0 17px; }
#platform-shell .platform-content {
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 40px clamp(24px, 3.5vw, 58px) 60px;
}
#platform-shell .platform-content > * { max-width: 1320px; margin-inline: auto; }
#platform-shell .platform-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#platform-shell .platform-device-card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
#platform-shell .platform-device-card p { flex: 1; color: var(--muted); max-width: 48ch; }
#platform-shell .platform-device-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
#platform-shell .platform-device-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@media (max-width: 768px) {
  #platform-shell .platform-device-grid { grid-template-columns: minmax(0, 1fr); }
}
#platform-shell .platform-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
#platform-shell .platform-page-heading h1 { font-size: clamp(25px, 2.3vw, 32px); line-height: 1.25; font-weight: 600; letter-spacing: -1px; }
#platform-shell .platform-page-heading p { max-width: 640px; margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.65; }
#platform-shell .platform-page-heading > .platform-actions { flex-shrink: 0; padding-top: 2px; }
#platform-shell .platform-page-heading > .platform-button { flex-shrink: 0; margin-top: 2px; }
#platform-shell .platform-eyebrow { display: block; margin-bottom: 13px; color: var(--dim); font-size: 10px; font-weight: 600; letter-spacing: 1.6px; }
#platform-shell .platform-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 38px; margin-bottom: 18px; }
#platform-shell .platform-section-heading h2 { font-size: 14px; font-weight: 550; }
#platform-shell .platform-section-heading > span { color: var(--dim); font-size: 11px; }
#platform-shell .platform-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 22px; }
#platform-shell .platform-filter-bar .platform-button { min-height: 32px; padding: 6px 13px; border-color: transparent; background: transparent; color: var(--muted); }
#platform-shell .platform-filter-bar .platform-button:hover { background: var(--panel); color: var(--text); }
#platform-shell .platform-filter-bar .platform-button.is-active { background: var(--panel-2); color: var(--text); }

#platform-shell .platform-button,
#platform-project-dialog .platform-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
#platform-shell .platform-button:hover,
#platform-project-dialog .platform-button:hover { background: var(--panel-2); border-color: var(--muted); }
#platform-shell .platform-primary,
#platform-project-dialog .platform-primary { border-color: transparent; background: var(--text); color: var(--bg); }
#platform-shell .platform-primary:hover,
#platform-project-dialog .platform-primary:hover { background: color-mix(in srgb, var(--text) 85%, var(--bg)); border-color: transparent; }
#platform-shell .platform-quiet,
#platform-project-dialog .platform-quiet { border-color: transparent; background: transparent; color: var(--muted); }
#platform-shell .platform-quiet:hover,
#platform-project-dialog .platform-quiet:hover { border-color: transparent; background: var(--panel-2); color: var(--text); }
#platform-shell .platform-button svg { width: 15px; height: 15px; }

#platform-shell .platform-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; }
#platform-shell .platform-project-card { min-width: 0; }
#platform-shell .platform-project-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 11px;
  background: var(--panel);
  color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
#platform-shell .platform-project-preview:hover { border-color: var(--muted); box-shadow: 0 7px 22px color-mix(in srgb, var(--bg) 35%, transparent); }
#platform-shell .platform-project-preview :is(img, video) { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
#platform-shell .platform-project-empty { display: grid; place-items: center; gap: 10px; width: 100%; height: 100%; color: var(--dim); font-size: 12px; background-image: radial-gradient(circle, color-mix(in srgb, var(--muted) 18%, transparent) .8px, transparent .8px); background-size: 18px 18px; }
#platform-shell .platform-project-empty svg { width: 32px; height: 32px; color: var(--muted); stroke-width: 1.25; }
#platform-shell .platform-graph-preview { display: block; width: 100%; height: 100%; pointer-events: none; background-image: radial-gradient(circle, color-mix(in srgb, var(--muted) 13%, transparent) .7px, transparent .7px); background-size: 17px 17px; }
#platform-shell .platform-graph-edge { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .5; }
#platform-shell .platform-graph-node { --preview-accent: var(--muted); }
#platform-shell .platform-graph-image { --preview-accent: var(--image); }
#platform-shell .platform-graph-video { --preview-accent: var(--video); }
#platform-shell .platform-graph-audio { --preview-accent: var(--audio); }
#platform-shell .platform-graph-node rect { fill: color-mix(in srgb, var(--preview-accent) 6%, var(--panel-2)); stroke: color-mix(in srgb, var(--preview-accent) 30%, var(--line)); stroke-width: .8; }
#platform-shell .platform-graph-node path { fill: none; stroke: var(--preview-accent); stroke-width: 1.3; opacity: .65; }
#platform-shell .platform-graph-node text { fill: var(--muted); text-anchor: middle; font-size: 8px; }
#platform-shell .platform-graph-empty { display: grid; place-items: center; gap: 12px; color: var(--dim); font-size: 11px; }
#platform-shell .platform-graph-empty svg { width: 40px; height: 32px; fill: none; stroke: var(--muted); stroke-width: 1; }
#platform-shell .platform-project-info { padding: 14px 12px 3px; }
#platform-shell .platform-project-info h2 { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
#platform-shell .platform-project-info p { margin-top: 4px; color: var(--muted); font-size: 11px; }
#platform-shell .platform-project-actions { gap: 2px; margin-top: 8px; }
#platform-shell .platform-project-actions .platform-button { min-height: 29px; padding: 5px 8px; font-size: 11px; }
#platform-shell .platform-new-project { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: start; gap: 8px; width: 100%; aspect-ratio: 16 / 10; padding: 20px; border: 1px dashed var(--line); border-radius: 11px; background: transparent; color: var(--muted); transition: border-color .15s, background .15s; }
#platform-shell .platform-new-project:hover { border-color: var(--muted); background: color-mix(in srgb, var(--panel) 60%, transparent); }
#platform-shell .platform-new-project > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font-size: 22px; font-weight: 300; }
#platform-shell .platform-new-project > strong { color: var(--text); font-size: 13px; font-weight: 500; }
#platform-shell .platform-new-project > small { color: var(--dim); font-size: 11px; }

#platform-shell .platform-media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
#platform-shell .platform-media-card { min-width: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 10px; background: var(--panel); }
#platform-shell .platform-media-preview { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; border: 0; background: color-mix(in srgb, var(--panel) 75%, var(--bg)); color: var(--muted); }
#platform-shell .platform-media-preview :is(img, video) { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
#platform-shell .platform-media-preview audio { width: calc(100% - 20px); max-width: 100%; }
#platform-shell .platform-media-info { padding: 12px; }
#platform-shell .platform-media-info :is(h2, h3, strong) { display: block; overflow: hidden; font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
#platform-shell .platform-media-info p { margin: 4px 0 10px; color: var(--muted); font-size: 11px; }
#platform-shell .platform-media-info .platform-button { min-height: 29px; padding: 5px 9px; font-size: 11px; }

#platform-shell .platform-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
#platform-shell .platform-service-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; padding: 26px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--panel) 60%, var(--bg)); }
#platform-shell .platform-service-card h2 { font-size: 17px; line-height: 1.4; font-weight: 550; letter-spacing: -.3px; }
#platform-shell .platform-service-card p { max-width: 58ch; color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
#platform-shell .platform-service-card > .platform-button:last-child { margin-top: auto; }
#platform-shell .platform-status { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#platform-shell .platform-status.is-ready { border-color: color-mix(in srgb, var(--green) 28%, transparent); background: color-mix(in srgb, var(--green) 7%, transparent); color: var(--green); }
#platform-shell .platform-status.is-error { border-color: color-mix(in srgb, var(--red) 28%, transparent); color: var(--red); }
#platform-shell .platform-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; grid-column: 1 / -1; min-height: 270px; padding: 40px 24px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
#platform-shell .platform-empty :is(h2, strong) { color: var(--text); font-size: 17px; font-weight: 550; }
#platform-shell .platform-empty p { max-width: 45ch; font-size: 13px; line-height: 1.7; }
#platform-shell .platform-empty svg { width: 32px; height: 32px; margin-bottom: 5px; stroke-width: 1.25; }
#platform-shell .platform-notice { margin-bottom: 22px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }

#platform-shell .platform-auth-form { display: grid; gap: 20px; width: 100%; max-width: 410px; margin: 24px auto 0; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
#platform-shell .platform-auth-form label,
#platform-project-dialog label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
#platform-shell .platform-auth-form input,
#platform-project-dialog input { width: 100%; min-width: 0; height: 41px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; outline: none; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
#platform-shell .platform-auth-form input::placeholder,
#platform-project-dialog input::placeholder { color: var(--dim); }
#platform-shell .platform-auth-form input:focus,
#platform-project-dialog input:focus { border-color: var(--focus-ring); }
#platform-shell .platform-auth-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 7px; background: var(--bg); }
#platform-shell .platform-auth-tabs button { flex: 1; min-height: 35px; padding: 7px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; }
#platform-shell .platform-auth-tabs button.is-active { background: var(--panel-2); color: var(--text); }
#platform-shell .platform-auth-form > .platform-button { width: 100%; min-height: 40px; }
#platform-shell .platform-auth-form p { color: var(--muted); font-size: 12px; line-height: 1.65; }
#platform-shell .platform-account-card { width: 100%; max-width: 420px; margin-inline: auto; padding: 28px; gap: 25px; background: var(--panel); }
#platform-shell .platform-account-card > .platform-auth-tabs { width: 100%; }
#platform-shell .platform-account-card .platform-auth-form { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
#platform-shell .platform-account-card .platform-status { padding: 0; border: 0; }

#platform-shell :is(.platform-model-list, .platform-job-list) { display: grid; gap: 0; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
#platform-shell :is(.platform-model-list, .platform-job-list):empty { display: none; }
#platform-shell .platform-service-grid + .platform-model-list { margin-top: 24px; }
#platform-shell :is(.platform-model-row, .platform-job-row) { display: flex; align-items: center; gap: 18px; min-width: 0; padding: 17px 20px; background: color-mix(in srgb, var(--panel) 40%, var(--bg)); }
#platform-shell :is(.platform-model-row, .platform-job-row) + :is(.platform-model-row, .platform-job-row) { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
#platform-shell :is(.platform-model-row, .platform-job-row) > div:first-child { flex: 1; min-width: 0; }
#platform-shell :is(.platform-model-row, .platform-job-row) :is(h2, h3, strong) { display: block; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
#platform-shell :is(.platform-model-row, .platform-job-row) :is(p, small) { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
#platform-shell :is(.platform-model-row, .platform-job-row) .platform-button { flex-shrink: 0; }
#platform-shell progress { width: 100%; max-width: 400px; height: 4px; overflow: hidden; border: 0; border-radius: 4px; accent-color: var(--blue); }
#platform-shell progress::-webkit-progress-bar { background: var(--panel-3); }
#platform-shell progress::-webkit-progress-value { background: var(--blue); }

#platform-project-dialog.platform-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
#platform-project-dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
#platform-project-dialog form { display: grid; gap: 25px; padding: 25px; }
#platform-project-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
#platform-project-dialog h2 { margin: 0; font-size: 19px; font-weight: 550; letter-spacing: -.4px; }
#platform-project-dialog header button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 20px; }
#platform-project-dialog header button:hover { background: var(--panel-2); color: var(--text); }
#platform-project-dialog footer { display: flex; justify-content: flex-end; gap: 8px; }
#platform-project-dialog [role="status"] { margin: 0; color: var(--red); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
#platform-project-dialog [role="status"]:empty { display: none; }

#platform-media-dialog.platform-dialog { width: min(1000px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
#platform-media-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
#platform-media-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; padding: 15px 20px; }
#platform-media-dialog h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 550; }
#platform-media-dialog header button { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 22px; }
#platform-media-dialog header button:hover { background: var(--panel-2); color: var(--text); }
#platform-media-dialog button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
#platform-media-dialog .platform-media-detail { display: grid; place-items: center; min-height: 200px; background: #090a0c; }
#platform-media-dialog .platform-media-detail :is(img, video) { display: block; width: 100%; max-height: calc(100dvh - 130px); object-fit: contain; }
#platform-media-dialog .platform-media-detail.is-audio { min-height: 150px; padding: 22px; background: var(--panel-2); }
#platform-media-dialog .platform-audio-preview { display: flex; align-items: center; gap: 18px; width: min(720px, 100%); }
#platform-media-dialog .platform-audio-preview .workspace-icon { flex: 0 0 42px; width: 42px; height: 42px; padding: 9px; border-radius: 12px; background: var(--panel); color: var(--audio); }
#platform-media-dialog .platform-media-detail audio { flex: 1; min-width: 0; width: 100%; }

#platform-services-button.platform-canvas-entry,
#platform-account-button.platform-canvas-entry { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 10px; white-space: nowrap; }
#platform-services-button.platform-canvas-entry:hover,
#platform-account-button.platform-canvas-entry:hover { background: var(--panel-2); color: var(--text); }

@media (min-width: 1600px) {
  #platform-shell .platform-project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
  #platform-shell .platform-layout { grid-template-columns: 164px minmax(0, 1fr); }
  #platform-shell .platform-content { padding: 32px 26px 48px; }
  #platform-shell .platform-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  #platform-shell .platform-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  #platform-shell .platform-service-card { padding: 22px; }
}
@media (max-width: 768px) {
  #platform-shell { grid-template-rows: 60px minmax(0, 1fr); }
  #platform-shell .platform-header { padding: 0 20px; gap: 12px; }
  #platform-shell .platform-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  #platform-shell .platform-nav { flex-direction: row; gap: 4px; padding: 10px 16px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); scrollbar-width: none; }
  #platform-shell .platform-nav button { flex: 0 0 auto; min-height: 36px; padding: 7px 13px; }
  #platform-shell .platform-content { padding: 28px 20px 40px; }
  #platform-shell .platform-page-heading { gap: 16px; margin-bottom: 24px; }
  #platform-shell .platform-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #platform-shell .platform-service-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  #platform-shell .platform-header { padding: 0 16px; }
  #platform-shell .platform-brand { gap: 8px; font-size: 16px; }
  #platform-shell .platform-brand img { width: 25px; height: 25px; }
  #platform-shell .platform-header-actions { gap: 4px; }
  #platform-shell .platform-header-actions .platform-button { min-height: 34px; padding: 7px 9px; font-size: 11px; }
  #platform-shell .platform-content { padding: 25px 16px 36px; }
  #platform-shell .platform-page-heading { flex-wrap: wrap; gap: 17px; }
  #platform-shell .platform-page-heading h1 { font-size: 26px; }
  #platform-shell .platform-page-heading p { font-size: 12px; }
  #platform-shell .platform-project-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  #platform-shell .platform-media-grid { gap: 12px; }
  #platform-shell .platform-media-info { padding: 10px; }
  #platform-shell .platform-service-card { padding: 21px; }
  #platform-shell .platform-auth-form { margin-top: 0; padding: 23px 20px; }
  #platform-shell .platform-account-card { padding: 23px 20px; }
  #platform-shell .platform-account-card .platform-auth-form { padding: 0; }
  #platform-shell :is(.platform-model-row, .platform-job-row) { flex-wrap: wrap; gap: 12px; padding: 16px; }
  #platform-shell :is(.platform-model-row, .platform-job-row) > div:first-child { flex-basis: 100%; }
  #platform-shell .platform-empty { min-height: 240px; padding: 32px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #platform-shell *, #platform-project-dialog * { scroll-behavior: auto; transition: none !important; }
}

/* Workspace pages */
#platform-shell .workspace-icon { width: 18px; height: 18px; flex: 0 0 18px; }
#platform-shell .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#platform-shell .platform-layout { grid-template-columns: 216px minmax(0, 1fr); }
#platform-shell .platform-nav { gap: 24px; padding: 25px 14px 18px; }
#platform-shell .platform-nav-group { display: grid; gap: 4px; }
#platform-shell .platform-nav-group > span { padding: 0 14px 7px; color: var(--dim); font-size: 10px; font-weight: 650; letter-spacing: .12em; }
#platform-shell .platform-nav button { position: relative; min-height: 44px; }
#platform-shell .platform-nav button.is-active { background: color-mix(in srgb, var(--yellow) 8%, var(--panel-2)); color: var(--text); }
#platform-shell .platform-nav button.is-active::before { position: absolute; left: 0; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--yellow); content: ''; }
#platform-shell .platform-nav-secondary { margin-top: auto; }
#platform-shell .platform-nav-canvas { border-color: color-mix(in srgb, var(--yellow) 24%, var(--line)); color: var(--text); }
#platform-shell .platform-nav-canvas .workspace-icon:last-child { width: 14px; height: 14px; margin-left: auto; }
#platform-shell .platform-workspace-page { min-width: 0; }
#platform-shell .workspace-page-meta { display: inline-flex; margin-top: 12px; color: var(--dim); font-size: 11px; }
#platform-shell .platform-workspace-page .platform-button { min-height: 42px; }
#platform-shell .platform-workspace-page .platform-primary { border-color: #dfb614; background: var(--yellow); color: #1b1708; font-weight: 650; }
#platform-shell .platform-workspace-page .platform-primary:hover { border-color: #f1ca31; background: #f4d249; }
#platform-shell .platform-workspace-page :is(button, input):focus-visible { outline-color: var(--focus-ring); }

#platform-shell .platform-project-grid { gap: 24px; }
#platform-shell .platform-project-card { overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--panel) 70%, var(--bg)); transition: border-color .15s, transform .15s; }
#platform-shell .platform-project-card:hover { border-color: color-mix(in srgb, var(--muted) 72%, var(--line)); transform: translateY(-2px); }
#platform-shell .platform-project-card .platform-project-preview { aspect-ratio: 16 / 9; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
#platform-shell .platform-project-card .platform-project-preview:hover { box-shadow: none; }
#platform-shell .platform-project-info { display: flex; align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px 16px; }
#platform-shell .platform-project-info > div { min-width: 0; width: 100%; }
#platform-shell .platform-project-info .platform-button { flex: 0 0 auto; min-height: 40px; }
#platform-shell .platform-project-info p { overflow-wrap: anywhere; }

#platform-shell .workspace-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 320px; padding: 42px 24px; border: 1px dashed var(--line); border-radius: 16px; background: color-mix(in srgb, var(--panel) 42%, transparent); color: var(--muted); text-align: center; }
#platform-shell .workspace-empty-state > .workspace-icon { width: 34px; height: 34px; margin-bottom: 5px; color: var(--dim); stroke-width: 1.35; }
#platform-shell .workspace-empty-state h2 { color: var(--text); font-size: 17px; font-weight: 600; }
#platform-shell .workspace-empty-state p { max-width: 50ch; font-size: 13px; line-height: 1.7; }
#platform-shell .workspace-empty-state .platform-button { margin-top: 7px; }

#platform-shell .workspace-asset-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
#platform-shell .workspace-filter-tabs, #platform-shell .workspace-model-tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--panel) 60%, var(--bg)); }
#platform-shell :is(.workspace-filter-tabs, .workspace-model-tabs) button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 7px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; }
#platform-shell :is(.workspace-filter-tabs, .workspace-model-tabs) button:hover { background: color-mix(in srgb, var(--panel-2) 65%, transparent); color: var(--text); }
#platform-shell :is(.workspace-filter-tabs, .workspace-model-tabs) button.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px var(--yellow); }
#platform-shell .workspace-filter-tabs button span { color: var(--dim); font-size: 10px; }
#platform-shell .workspace-search { display: flex; align-items: center; gap: 8px; width: min(320px, 42%); min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--panel) 60%, var(--bg)); color: var(--muted); }
#platform-shell .workspace-search:focus-within { border-color: color-mix(in srgb, var(--yellow) 66%, var(--line)); }
#platform-shell .workspace-search .workspace-icon { width: 17px; height: 17px; }
#platform-shell .workspace-search input { width: 100%; min-width: 0; height: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 12px; }
#platform-shell .platform-workspace-page .workspace-search input:focus-visible { outline: 0; }
#platform-shell .workspace-search input::placeholder { color: var(--dim); }
#platform-shell .platform-media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
#platform-shell .platform-media-card { border-radius: 13px; background: color-mix(in srgb, var(--panel) 70%, var(--bg)); }
#platform-shell .platform-media-preview { aspect-ratio: 16 / 10; }
#platform-shell .platform-media-preview :is(img, video) { object-fit: cover; }
#platform-shell .platform-media-fallback { display: grid; place-items: center; gap: 9px; color: var(--dim); font-size: 11px; }
#platform-shell .platform-media-fallback[hidden] { display: none; }
#platform-shell .platform-media-fallback .workspace-icon { width: 28px; height: 28px; stroke-width: 1.4; }
#platform-shell .platform-media-info { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 13px; }
#platform-shell .platform-media-info > div:first-child { min-width: 0; }
#platform-shell .workspace-media-type { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
#platform-shell .workspace-media-type .workspace-icon { width: 13px; height: 13px; }
#platform-shell .workspace-media-actions { display: flex; flex: 0 0 auto; gap: 5px; }
#platform-shell .workspace-media-actions .platform-button { min-height: 40px; padding: 7px 9px; font-size: 10px; }
#platform-shell .workspace-assets-empty { min-height: 280px; }

#platform-shell .workspace-model-tabs { margin-bottom: 20px; }
#platform-shell .workspace-device-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--dim); border-radius: 11px; background: color-mix(in srgb, var(--panel) 68%, var(--bg)); }
#platform-shell .workspace-device-strip.is-ready { border-left-color: var(--green); }
#platform-shell .workspace-device-strip > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
#platform-shell .workspace-device-strip > div > .workspace-icon { color: var(--muted); }
#platform-shell .workspace-device-strip span { display: grid; min-width: 0; gap: 2px; }
#platform-shell .workspace-device-strip strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
#platform-shell .workspace-device-strip small { color: var(--muted); font-size: 10px; }
#platform-shell .workspace-model-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
#platform-shell .workspace-model-toolbar > span { color: var(--dim); font-size: 11px; }
#platform-shell .workspace-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
#platform-shell .workspace-model-card { display: grid; grid-template-rows: auto auto minmax(44px, auto) auto; gap: 16px; min-width: 0; min-height: 244px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--panel) 70%, var(--bg)); }
#platform-shell .workspace-model-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 10px; }
#platform-shell .workspace-model-origin { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; }
#platform-shell .workspace-model-origin.is-local { border-color: color-mix(in srgb, var(--green) 34%, var(--line)); color: var(--green); }
#platform-shell .workspace-model-origin.is-cloud { border-color: color-mix(in srgb, var(--yellow) 38%, var(--line)); color: var(--yellow); }
#platform-shell .workspace-model-card h3 { overflow-wrap: anywhere; font-size: 15px; font-weight: 600; }
#platform-shell .workspace-model-card > div p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
#platform-shell .workspace-model-card code { font: inherit; color: var(--dim); }
#platform-shell .workspace-model-reason { color: var(--muted); font-size: 11px; line-height: 1.65; }
#platform-shell .workspace-model-reason.is-ready { color: color-mix(in srgb, var(--green) 76%, var(--text)); }
#platform-shell .workspace-model-card footer { align-self: end; }
#platform-shell .workspace-model-card footer .platform-button { width: 100%; }
#platform-shell .workspace-model-skeleton { display: block; min-height: 244px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(105deg, var(--panel) 35%, var(--panel-2) 50%, var(--panel) 65%); background-size: 220% 100%; animation: workspace-skeleton 1.25s linear infinite; }
@keyframes workspace-skeleton { to { background-position-x: -220%; } }
@media (prefers-reduced-motion: reduce) { #platform-shell .workspace-model-skeleton { animation: none; } }
#platform-shell .workspace-inline-error { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); border-radius: 10px; color: var(--red); font-size: 12px; }
#platform-shell .workspace-model-configuration[hidden] { display: none; }

#platform-shell .workspace-task-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 58%, var(--bg)); }
#platform-shell .workspace-task-frame > header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
#platform-shell .workspace-task-frame > header h2 { font-size: 14px; font-weight: 600; }
#platform-shell .workspace-task-frame > header p { margin-top: 4px; color: var(--muted); font-size: 11px; }
#platform-shell .workspace-task-summary { display: flex; align-items: center; gap: 18px; }
#platform-shell .workspace-task-summary span { display: grid; gap: 2px; color: var(--dim); font-size: 9px; text-align: right; }
#platform-shell .workspace-task-summary strong { color: var(--text); font-size: 14px; font-weight: 600; }
#platform-shell .workspace-task-frame .platform-job-list { border: 0; border-radius: 0; }
#platform-shell .workspace-task-frame .platform-job-row { min-height: 68px; }
#platform-shell .workspace-task-status { display: inline-flex; align-items: center; gap: 7px; min-width: 74px; color: var(--muted); font-size: 11px; }
#platform-shell .workspace-task-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#platform-shell .workspace-task-status.is-completed { color: var(--green); }
#platform-shell .workspace-task-status.is-failed { color: var(--red); }
#platform-shell .workspace-task-status.is-running { color: var(--yellow); }
#platform-shell .workspace-task-empty { min-height: 300px; border: 0; border-radius: 0; }

@media (max-width: 1150px) {
  #platform-shell .platform-layout { grid-template-columns: 190px minmax(0, 1fr); }
  #platform-shell .platform-media-grid, #platform-shell .workspace-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  #platform-shell .platform-nav { gap: 4px; }
  #platform-shell .platform-nav-group { display: contents; }
  #platform-shell .platform-nav-group > span { display: none; }
  #platform-shell .platform-nav-secondary { margin-top: 0; }
  #platform-shell .platform-nav button { min-height: 42px; }
  #platform-shell .platform-nav button.is-active::before { inset: auto 10px 0; width: auto; height: 2px; }
  #platform-shell .workspace-asset-toolbar, #platform-shell .workspace-model-toolbar { align-items: stretch; flex-direction: column; }
  #platform-shell .workspace-search { width: 100%; }
  #platform-shell .workspace-model-toolbar > span { padding-inline: 4px; }
}
@media (max-width: 560px) {
  #platform-shell .platform-project-info, #platform-shell .workspace-device-strip, #platform-shell .workspace-task-frame > header { align-items: stretch; flex-direction: column; }
  #platform-shell .platform-project-info .platform-button, #platform-shell .workspace-device-strip > .platform-button { width: 100%; }
  #platform-shell .workspace-filter-tabs, #platform-shell .workspace-model-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  #platform-shell .platform-media-grid, #platform-shell .workspace-model-grid { grid-template-columns: minmax(0, 1fr); }
  #platform-shell .workspace-task-summary { width: 100%; justify-content: space-between; }
  #platform-shell .workspace-task-summary span { text-align: left; }
  #platform-shell .workspace-inline-error { align-items: stretch; flex-direction: column; }
}

#platform-shell .platform-device-panel { display: grid; gap: 24px; width: 100%; padding: clamp(20px, 2.6vw, 34px); border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb, var(--panel) 72%, var(--bg)); }
#platform-shell .platform-device-panel > .platform-page-heading { margin-bottom: 0; }
#platform-shell .platform-device-panel > .platform-page-heading h2 { font-size: clamp(22px, 2vw, 28px); font-weight: 620; letter-spacing: -.7px; }
#platform-shell .platform-device-panel .platform-primary { border-color: #e7bd22; background: var(--yellow); color: #18150a; font-weight: 650; }
#platform-shell .platform-device-panel .platform-primary:hover { border-color: #f4cf42; background: #f7d75c; }
#platform-shell .platform-device-panel :is(select, button):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
#platform-shell .platform-device-notice { min-height: 0; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--yellow) 35%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--yellow) 8%, transparent); color: var(--text); font-size: 12px; line-height: 1.55; }
#platform-shell .platform-device-notice:empty { display: none; }
#platform-shell .platform-device-notice.is-error { border-color: color-mix(in srgb, var(--red) 48%, var(--line)); background: color-mix(in srgb, var(--red) 8%, transparent); color: color-mix(in srgb, var(--red) 78%, var(--text)); }
#platform-shell .platform-device-notice.is-success { border-color: color-mix(in srgb, var(--green) 38%, var(--line)); background: color-mix(in srgb, var(--green) 7%, transparent); }
#platform-shell .platform-device-loading { min-height: 180px; display: grid; place-items: center; color: var(--muted); }
#platform-shell .platform-device-picker { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 2px; }
#platform-shell .platform-device-picker label { display: grid; flex: 0 1 440px; gap: 8px; min-width: 240px; color: var(--muted); font-size: 12px; font-weight: 550; }
#platform-shell .platform-device-picker select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 38px 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; }
#platform-shell .platform-device-picker p { max-width: 620px; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: right; }
#platform-shell .platform-device-overview { padding: clamp(20px, 2.4vw, 30px); border: 1px solid var(--line); border-left: 3px solid var(--dim); border-radius: 15px; background: color-mix(in srgb, var(--bg) 74%, var(--panel)); }
#platform-shell .platform-device-overview.is-online { border-left-color: var(--yellow); }
#platform-shell .platform-device-overview > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
#platform-shell .platform-device-overview > header > div:first-child { min-width: 0; }
#platform-shell .platform-device-overview > header > div:first-child > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
#platform-shell .platform-device-overview h2 { overflow-wrap: anywhere; font-size: clamp(19px, 1.6vw, 24px); font-weight: 620; letter-spacing: -.45px; }
#platform-shell .platform-device-overview header small { display: block; max-width: 100%; margin-top: 6px; overflow: hidden; color: var(--dim); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#platform-shell .platform-device-status, #platform-shell .platform-device-default { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; line-height: 1; }
#platform-shell .platform-device-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
#platform-shell .is-online .platform-device-status { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); color: var(--text); }
#platform-shell .is-online .platform-device-status i { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 16%, transparent); }
#platform-shell .platform-device-default { border-color: color-mix(in srgb, var(--yellow) 48%, var(--line)); background: color-mix(in srgb, var(--yellow) 9%, transparent); color: color-mix(in srgb, var(--yellow) 82%, var(--text)); }
#platform-shell .platform-device-actions { display: flex; flex-shrink: 0; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
#platform-shell .platform-device-actions .platform-button { min-height: 42px; }
#platform-shell .platform-device-revoke { border-color: color-mix(in srgb, var(--red) 32%, var(--line)); color: color-mix(in srgb, var(--red) 72%, var(--text)); }
#platform-shell .platform-device-revoke:hover { border-color: color-mix(in srgb, var(--red) 65%, var(--line)); background: color-mix(in srgb, var(--red) 7%, var(--panel)); }
#platform-shell .platform-device-metrics { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 1px; margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
#platform-shell .platform-device-metrics > div { display: grid; align-content: start; gap: 6px; min-width: 0; min-height: 92px; padding: 16px; background: var(--panel); }
#platform-shell .platform-device-metrics span { color: var(--dim); font-size: 10px; font-weight: 600; letter-spacing: .08em; }
#platform-shell .platform-device-metrics strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 580; }
#platform-shell .platform-device-metrics small { color: var(--muted); font-size: 10px; }
#platform-shell .platform-device-metrics progress { width: 100%; height: 4px; margin-top: 3px; accent-color: var(--yellow); }
#platform-shell .platform-device-readiness { margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.65; }
#platform-shell .platform-device-operations .platform-section-heading { margin: 0 0 12px; }
#platform-shell .platform-device-command-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
#platform-shell .platform-device-command { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 32%); align-items: center; gap: 18px; min-width: 0; padding: 14px 16px; background: color-mix(in srgb, var(--bg) 72%, var(--panel)); }
#platform-shell .platform-device-command + .platform-device-command { border-top: 1px solid var(--line); }
#platform-shell .platform-device-command > div { display: grid; min-width: 0; gap: 3px; }
#platform-shell .platform-device-command strong { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
#platform-shell .platform-device-command :is(span, small) { color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
#platform-shell .platform-device-command progress { width: 100%; height: 5px; accent-color: var(--yellow); }
#platform-shell .platform-device-command > b { justify-self: end; color: var(--green); font-size: 11px; font-weight: 600; }
#platform-shell .platform-device-command.is-failed > b { color: var(--red); }
#platform-shell .platform-device-library { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-top: 8px; }
#platform-shell .platform-device-library-heading { grid-column: 1 / -1; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 2px; }
#platform-shell .platform-device-library-heading h2 { font-size: 21px; font-weight: 620; letter-spacing: -.4px; }
#platform-shell .platform-device-library-heading p { max-width: 720px; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; }
#platform-shell .platform-device-library-heading > .platform-button { flex-shrink: 0; min-height: 42px; }
#platform-shell .platform-device-model-group { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--bg) 70%, var(--panel)); }
#platform-shell .platform-device-model-group > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; min-height: 74px; padding: 15px 17px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 75%, var(--bg)); }
#platform-shell .platform-device-model-group > header span { color: var(--yellow); font-size: 9px; font-weight: 650; letter-spacing: .12em; }
#platform-shell .platform-device-model-group > header h3 { margin-top: 3px; font-size: 16px; font-weight: 620; }
#platform-shell .platform-device-model-group > header small { flex-shrink: 0; color: var(--muted); font-size: 10px; }
#platform-shell .platform-device-model-list { display: grid; }
#platform-shell .platform-device-model-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; min-height: 96px; padding: 16px 17px; }
#platform-shell .platform-device-model-row + .platform-device-model-row { border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent); }
#platform-shell .platform-device-model-row > div { min-width: 0; }
#platform-shell .platform-device-model-row > div > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#platform-shell .platform-device-model-row strong { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; line-height: 1.45; }
#platform-shell .platform-device-model-row p { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.55; }
#platform-shell .platform-device-model-row > .platform-button { flex: 0 0 auto; min-height: 40px; max-width: 180px; }
#platform-shell .platform-model-state { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; white-space: nowrap; }
#platform-shell .platform-model-state.is-ready { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); color: var(--green); }
#platform-shell .platform-model-remove { color: var(--muted); }
#platform-shell .platform-device-history { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: color-mix(in srgb, var(--bg) 58%, var(--panel)); }
#platform-shell .platform-device-history > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 50px; padding: 11px 16px; cursor: pointer; list-style: none; }
#platform-shell .platform-device-history > summary::-webkit-details-marker { display: none; }
#platform-shell .platform-device-history > summary::after { content: '+'; order: 3; color: var(--yellow); font-size: 18px; }
#platform-shell .platform-device-history[open] > summary::after { content: '−'; }
#platform-shell .platform-device-history > summary span { font-size: 12px; font-weight: 600; }
#platform-shell .platform-device-history > summary small { margin-left: auto; color: var(--muted); font-size: 10px; }
#platform-shell .platform-device-history > .platform-device-command-list { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.platform-device-panel form { display:flex; align-items:end; gap:12px; margin:18px 0; }
.platform-device-panel label { display:grid; gap:8px; flex:1; font-size:13px; }
.platform-device-panel input { width:100%; padding:12px; border-radius:10px; border:1px solid var(--line,#444); background:transparent; color:inherit; }
.platform-device-path { overflow-wrap:anywhere; color:var(--muted,#999); }
.platform-device-confirm { border:1px solid #a87631; border-radius:12px; padding:20px; margin-top:20px; }
.platform-device-confirm ul { max-height:220px; overflow:auto; overflow-wrap:anywhere; }
.platform-device-panel [role=status]:empty { display:none; }
@media(max-width:950px){
  #platform-shell .platform-device-library { grid-template-columns: minmax(0, 1fr); }
  #platform-shell .platform-device-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width:650px){
  #platform-shell .platform-device-panel { gap: 20px; padding: 17px; border-radius: 15px; }
  #platform-shell .platform-device-picker, #platform-shell .platform-device-overview > header, #platform-shell .platform-device-library-heading { align-items: stretch; flex-direction: column; }
  #platform-shell .platform-device-picker label { flex-basis: auto; min-width: 0; }
  #platform-shell .platform-device-picker p { text-align: left; }
  #platform-shell .platform-device-actions { justify-content: stretch; }
  #platform-shell .platform-device-actions .platform-button { flex: 1 1 160px; }
  #platform-shell .platform-device-metrics { grid-template-columns: minmax(0, 1fr); }
  #platform-shell .platform-device-model-row, #platform-shell .platform-device-command { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  #platform-shell .platform-device-model-row { flex-direction: column; align-items: stretch; }
  #platform-shell .platform-device-model-row > .platform-button { width: 100%; max-width: none; min-height: 44px; }
  #platform-shell .platform-device-command > b { justify-self: start; }
  #platform-shell .platform-device-history > summary small { display: none; }
  .platform-device-panel form { align-items:stretch; flex-direction:column; }
}

