
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('/apps/web/fonts/inter/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url('/apps/web/fonts/inter/InterVariable-Italic.woff2') format('woff2');
}
:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f5;
  --bg-hover: #f0f0f0;
  --border: #e6e6e6;
  --text: #1e1e1e;
  --text-muted: #5c5c5c;
  --text-faint: #707070;
  --accent: #0d99ff;
  --accent-soft: #e5f4ff;
  --danger: #e03e1a;
  --component: #9747ff;
  --component-soft: #f1e8ff;
  --smart: #7a2fe0;
  --smart-soft: #f1e8ff;
  --warning-bg: #fff4e0;
  --warning-text: #8a5300;
  --field-h: 28px;
  --font: 12px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #2c2c2c;
    --bg-subtle: #383838;
    --bg-hover: #3a3a3a;
    --border: #444444;
    --text: #f2f2f2;
    --text-muted: #c2c2c2;
    --text-faint: #a6a6a6;
    --accent: #0d99ff;
    --accent-soft: #1e3a52;
    --component: #b48cff;
    --component-soft: #3a2d52;
    --smart: #b98cff;
    --smart-soft: #3a2d52;
    --warning-bg: #4a3816;
    --warning-text: #ffd48a;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #2c2c2c;
  --bg-subtle: #383838;
  --bg-hover: #3a3a3a;
  --border: #444444;
  --text: #f2f2f2;
  --text-muted: #c2c2c2;
  --text-faint: #a6a6a6;
  --accent: #0d99ff;
  --accent-soft: #1e3a52;
  --component: #b48cff;
  --component-soft: #3a2d52;
  --smart: #b98cff;
  --smart-soft: #3a2d52;
  --warning-bg: #4a3816;
  --warning-text: #ffd48a;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: var(--font);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
kbd {
  font: 11px system-ui, sans-serif;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}
.icon {
  display: block;
  flex: none;
}
.app {
  display: grid;
  width: 100vw;
  overflow: hidden;
  --left-w: 240px;
  --right-w: 260px;
  grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w);
  grid-template-rows: 44px minmax(0, 1fr);
  grid-template-areas:
    'top top top'
    'left canvas right';
  height: 100vh;
}
.app.hide-left {
  grid-template-columns: 0 minmax(0, 1fr) var(--right-w);
}
.app.hide-right {
  grid-template-columns: var(--left-w) minmax(0, 1fr) 0;
}
.app.hide-left.hide-right {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}
.app.hide-ui {
  grid-template-columns: 0 minmax(0, 1fr) 0;
  grid-template-rows: 0 minmax(0, 1fr);
}
.app.hide-ui .topbar,
.app.hide-ui .panel,
.app.hide-left .layers-panel,
.app.hide-right .properties-panel {
  visibility: hidden;
  overflow: hidden;
}
.topbar {
  grid-area: top;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  min-width: 0;
}
.topbar-left,
.topbar-right,
.tools {
  display: flex;
  align-items: center;
  gap: 2px;
}
.topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
}
.topbar-left,
.topbar-right {
  flex: none;
}
.file-name {
  flex: 0 1 220px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius);
  padding: 4px 6px;
  font-weight: 600;
  text-align: center;
  width: 220px;
  min-width: 80px;
}
.file-name:hover {
  border-color: var(--border);
}
.file-name:focus {
  outline: none;
  border-color: var(--accent);
}
.save-status {
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.save-status[data-state='error'] {
  color: var(--danger);
}
.tool-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
}
.tool-button {
  width: 32px;
  height: 32px;
}
.icon-button {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}
.tool-button:hover,
.icon-button:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.tool-button.active {
  background: var(--accent);
  color: #fff;
}
.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
  background: transparent;
}
.tool-button:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
.segment:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.zoom-label {
  border: none;
  background: transparent;
  min-width: 48px;
  padding: 4px;
  border-radius: var(--radius);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.zoom-label:hover {
  background: var(--bg-hover);
}
.canvas-area {
  grid-area: canvas;
  position: relative;
  min-width: 0;
  min-height: 0;
}
.canvas-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.canvas-view canvas {
  display: block;
  outline: none;
  touch-action: none;
}
.vector-bar {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
}
.vector-bar-tool {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.vector-bar-tool:hover {
  background: var(--bg-hover);
}
.vector-bar-tool.active {
  background: var(--accent);
  color: #fff;
}
.vector-bar-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--border);
}
@media (max-width: 700px) {
  .vector-bar-tool span {
    display: none;
  }
}
.canvas-view .canvas-tiles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.canvas-view .canvas-tiles + canvas {
  position: relative;
}
.canvas-view .canvas-tiles[hidden] {
  display: none;
}
.text-editor {
  position: absolute;
  width: 2px;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  resize: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  white-space: pre;
  z-index: 2;
}
.panel {
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}
.layers-panel {
  grid-area: left;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.properties-panel {
  grid-area: right;
  border-left: 1px solid var(--border);
}
.panel-section {
  border-bottom: 1px solid var(--border);
  padding: 4px 0 10px;
}
.panel-section.grow {
  flex: 1;
  border-bottom: none;
  overflow: auto;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 0 8px 0 12px;
}
.section-header h3 {
  margin: 0 auto 0 0;
  font-size: 11px;
  font-weight: 600;
}
.section-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px;
}
.subsection-title {
  color: var(--text-faint);
  font-size: 11px;
  margin-top: 4px;
}
.hint {
  color: var(--text-muted);
  margin: 0;
  padding: 0 12px;
  line-height: 1.5;
}
.section-body .hint {
  padding: 0;
}
.selection-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 6px;
}
.selection-type {
  font-weight: 600;
}
.align-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 8px 8px;
  border-bottom: 1px solid var(--border);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.grid-2 > :only-child {
  grid-column: 1 / -1;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.row-label {
  color: var(--text-muted);
}
.field {
  display: flex;
  align-items: center;
  height: var(--field-h);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  min-width: 0;
}
.field:hover {
  border-color: var(--border);
}
.field:focus-within {
  border-color: var(--accent);
  background: var(--bg);
}
.field.disabled {
  opacity: 0.45;
}
.field-label {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 0 4px;
  color: var(--text-faint);
  cursor: ew-resize;
  user-select: none;
  font-size: 11px;
}
.select-wrap .field-label,
.text-field .field-label {
  cursor: default;
}
.field-input {
  flex: 1;
  width: 0;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 6px 0 2px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.text-field .field-input {
  padding-left: 8px;
}
.field-input.mixed {
  color: var(--text-faint);
}
.field-input.invalid {
  color: var(--danger);
}
.field-suffix {
  color: var(--text-faint);
  padding-right: 6px;
  font-size: 11px;
}
.field-select {
  flex: 1;
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  height: var(--field-h);
  border: 1px solid transparent;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  padding: 0 4px;
  outline: none;
}
.select-wrap .field-select {
  border: none;
  background: transparent;
  height: 100%;
}
.field-select:focus {
  border-color: var(--accent);
}
.color-field {
  gap: 4px;
  padding-left: 4px;
  flex: 1;
}
.color-swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  flex: none;
}
.color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}
.color-field .hex {
  flex: 2;
  text-transform: uppercase;
}
.color-field .opacity {
  flex: 1;
  text-align: right;
  padding-right: 0;
}
.paint-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.paint-row > .field,
.paint-row > .select-wrap {
  flex: 1;
}
.paint-row.muted > .field {
  opacity: 0.5;
}
.gradient-label {
  flex: 1;
  height: var(--field-h);
  border-radius: var(--radius);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}
.segment {
  border: none;
  background: transparent;
  border-radius: 4px;
  height: 24px;
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}
.segment.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  min-height: 24px;
}
.checkbox input {
  accent-color: var(--accent);
  margin: 0;
}
.text-button {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  height: var(--field-h);
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.text-button:hover {
  background: var(--bg-hover);
}
.text-button.wide {
  width: 100%;
}
.pages {
  display: flex;
  flex-direction: column;
  padding: 0 4px;
}
.page-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
}
.page-item:hover {
  background: var(--bg-hover);
}
.page-item.active {
  color: var(--text);
  font-weight: 600;
}
.layer-tree {
  padding: 0 4px 24px;
}
.layer-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding-right: 4px;
  border-radius: var(--radius);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}
.layer-row:hover,
.layer-row.hovered {
  box-shadow: inset 0 0 0 1px var(--accent);
}
.layer-row.selected {
  background: var(--accent-soft);
}
.layer-row.child-of-selected {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}
.layer-row.hidden-layer .label,
.layer-row.hidden-layer .type-icon {
  opacity: 0.45;
}
.layer-row .label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.type-frame .label {
  font-weight: 600;
}
.type-icon {
  color: var(--text-faint);
  display: flex;
}
.tree-toggle {
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  cursor: pointer;
}
.row-action {
  border: none;
  background: none;
  padding: 2px;
  color: var(--text-faint);
  cursor: pointer;
  display: none;
}
.layer-row:hover .row-action,
.row-action.on {
  display: flex;
}
.row-action:hover {
  color: var(--text);
}
.rename-input {
  flex: 1;
  min-width: 0;
  height: 22px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0 4px;
  outline: none;
  background: var(--bg);
}
.layer-row.drop-before::before,
.layer-row.drop-after::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 4px;
  height: 2px;
  background: var(--accent);
}
.layer-row.drop-before::before {
  top: -1px;
}
.layer-row.drop-after::after {
  bottom: -1px;
}
.layer-row.drop-inside {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  z-index: 50;
}
.palette-backdrop[hidden] {
  display: none;
}
.palette {
  width: min(560px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.palette-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}
.palette-input {
  flex: 1;
  height: 48px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: var(--text);
}
.palette-list {
  max-height: 50vh;
  overflow-y: auto;
  padding: 6px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
}
.palette-item.active {
  background: var(--accent-soft);
}
.palette-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette-group {
  color: var(--text-faint);
  font-size: 11px;
}
.palette-empty {
  padding: 16px;
  color: var(--text-muted);
  text-align: center;
}
.toasts {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  z-index: 60;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #1e1e1e;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  max-width: min(560px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.error {
  background: var(--danger);
}
.toast-close {
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .toast {
    animation: toast-in 160ms ease-out;
  }
  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}
.panel-section,
.section-body > *,
.selection-header > * {
  min-width: 0;
  max-width: 100%;
}
.paint-row > * {
  min-width: 0;
}
.text-button {
  max-width: 100%;
}
.menu-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
}
.menu-layer[hidden] {
  display: none;
}
.menu {
  position: fixed;
  min-width: 220px;
  max-width: 320px;
  max-height: calc(100vh - 8px);
  overflow-y: auto;
  background: #1e1e1e;
  color: #f2f2f2;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
  outline: none;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  cursor: default;
  outline: none;
  white-space: pre;
}
.menu-item:focus,
.menu-item:hover {
  background: var(--accent);
  color: #fff;
}
.menu-item.disabled {
  opacity: 0.4;
  background: none;
}
.menu-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-shortcut {
  color: #a0a0a0;
  font-size: 11px;
}
.menu-item:focus .menu-shortcut,
.menu-item:hover .menu-shortcut {
  color: #e6f3ff;
}
.menu-separator {
  height: 1px;
  background: #3a3a3a;
  margin: 5px 4px;
}
@media (max-width: 1200px) {
  .save-status {
    display: none;
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 0 minmax(0, 1fr) 240px;
  }
  .app .layers-panel {
    visibility: hidden;
  }
  .save-status {
    display: none;
  }
}
.panel-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px 0;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.panel-tab {
  border: none;
  background: none;
  height: 30px;
  padding: 0 6px;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}
.panel-tab-icon {
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 0 8px;
}
.panel-tab:hover {
  color: var(--text);
}
.panel-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.panel-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.tab-body {
  min-height: 0;
}
.type-component .label,
.type-component-set .label,
.type-instance .label,
.type-component .type-icon,
.type-component-set .type-icon,
.type-instance .type-icon,
.in-instance .type-icon {
  color: var(--component);
}
.type-component .label,
.type-component-set .label {
  font-weight: 600;
}
.layer-row.in-instance.selected,
.layer-row.type-instance.selected,
.layer-row.type-component.selected,
.layer-row.type-component-set.selected {
  background: var(--component-soft);
}
.layer-row.in-instance:hover,
.layer-row.type-instance:hover,
.layer-row.type-component:hover,
.layer-row.type-component-set:hover {
  box-shadow: inset 0 0 0 1px var(--component);
}
.selection-header.component-header .selection-type {
  color: var(--component);
}
.component-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--field-h);
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--component);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.component-link:hover {
  background: var(--component-soft);
}
.warning.subtle {
  background: none;
  color: var(--text-muted);
  padding-left: 0;
  padding-right: 0;
}
.font-action {
  margin-top: 2px;
}
.font-action[hidden] {
  display: none;
}
.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-radius: var(--radius);
  padding: 6px 8px;
  line-height: 1.4;
  margin: 0;
}
.button-row {
  display: flex;
  gap: 6px;
}
.button-row > * {
  flex: 1;
  min-width: 0;
}
.button-row.wrap {
  flex-wrap: wrap;
}
.button-row.wrap > * {
  flex: 1 1 120px;
}
.prop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
}
.prop-type {
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
}
.binding {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--component);
}
.binding {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hint.values {
  color: var(--text);
}
.overrides-list {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}
.override-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--component);
  flex: none;
  transform: translateY(-1px);
}
.assets-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 4px 24px;
}
.assets-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--field-h);
  margin: 0 4px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-faint);
}
.assets-search-wrap:focus-within {
  border-color: var(--accent);
}
.assets-search {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  height: 100%;
}
.assets-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.assets-group {
  color: var(--text-faint);
  font-size: 11px;
  padding: 8px 8px 2px;
}
.asset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: var(--radius);
  cursor: grab;
  user-select: none;
}
.asset-item:hover {
  background: var(--bg-hover);
}
.asset-item:focus-visible {
  outline: 2px solid var(--component);
  outline-offset: -2px;
}
.asset-thumb {
  flex: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-subtle);
}
.asset-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.asset-name,
.asset-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.asset-name {
  font-weight: 600;
}
.asset-meta {
  color: var(--text-faint);
  font-size: 11px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.text-button > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.paint-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.paint-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.image-prompt {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.image-prompt.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.image-prompt-actions {
  display: flex;
  gap: 6px;
}
.paint-item.muted > :not(.paint-row) {
  opacity: 0.5;
}
.paint-row > .select-wrap {
  flex: 1;
}
.gradient-editor,
.image-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gradient-preview {
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.stop-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
}
.stop-row .field-label:empty {
  display: none;
}
.image-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}
.image-thumb {
  width: 72px;
  height: 64px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: repeating-conic-gradient(#e6e6e6 0 25%, #fff 0 50%) 0 0 / 10px 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 11px;
  text-align: center;
}
.image-thumb:hover {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.image-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.prop-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.prop-label {
  color: var(--text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prop-line > .segmented {
  justify-self: start;
}
.segmented.with-text .segment {
  padding: 0 8px;
  gap: 4px;
}
.hint.small {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-faint);
}
.align-block {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.align-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.align-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 76px;
  height: 62px;
  padding: 3px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
}
.align-cell {
  border: none;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}
.align-cell:hover {
  background: var(--bg-hover);
}
.align-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
}
.align-cell.active .align-dot {
  width: 14px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.align-cell:hover .align-dot {
  background: var(--text-muted);
}
.align-cell.active:hover .align-dot {
  background: var(--accent);
}
.sizing-row .field-label {
  min-width: 56px;
  justify-content: flex-start;
  padding-left: 8px;
}
.segmented.with-text {
  display: flex;
  width: 100%;
}
.segmented.with-text .segment {
  flex: 1;
}
.with-action {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.with-action > :first-child {
  flex: 1;
  min-width: 0;
}
.icon-button.on {
  background: var(--accent-soft);
  color: var(--accent);
}
.canvas-area {
  position: relative;
}
.panel-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  z-index: 5;
  cursor: col-resize;
  touch-action: none;
}
.panel-resizer.left {
  left: -3px;
}
.panel-resizer.right {
  right: -3px;
}
.panel-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 1px;
  background: transparent;
  transition: background 0.12s;
}
.panel-resizer:hover::after,
.panel-resizer.dragging::after {
  background: var(--accent);
  width: 2px;
  left: 2.5px;
}
.app.hide-left .panel-resizer.left,
.app.hide-right .panel-resizer.right,
.app.hide-ui .panel-resizer {
  display: none;
}
.tool-dock {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  max-width: calc(100% - 24px);
  overflow-x: auto;
}
.tool-dock .tool-button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.dock-separator {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 4px;
  flex: none;
}
.app.hide-ui .tool-dock {
  display: none;
}
.font-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.font-button {
  width: 100%;
  justify-content: space-between;
  padding: 0 6px 0 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}
.font-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-popover {
  position: fixed;
  z-index: 80;
  max-height: min(420px, calc(100vh - 16px));
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.font-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}
.font-search {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  min-width: 0;
}
.font-list {
  overflow-y: auto;
  padding: 4px;
  flex: 1;
}
.font-group {
  font-size: 11px;
  color: var(--text-faint);
  padding: 8px 8px 4px;
}
.font-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  cursor: pointer;
}
.font-item.active {
  background: var(--bg-hover);
}
.font-item.selected {
  color: var(--accent);
}
.font-item.missing {
  opacity: 0.55;
}
.font-preview {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-missing {
  font-size: 11px;
  color: var(--text-faint);
}
.font-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
}
.font-footer:empty {
  display: none;
}
.gradient-bar {
  position: relative;
  height: 34px;
  margin: 0 8px;
}
.gradient-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: copy;
}
.gradient-stop {
  position: absolute;
  top: 14px;
  width: 16px;
  height: 20px;
  margin-left: -8px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  cursor: ew-resize;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  touch-action: none;
}
.gradient-stop::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-bottom-color: var(--border);
  border-top: none;
}
.gradient-stop-color {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
}
.gradient-stop.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.gradient-stop.selected::before {
  border-bottom-color: var(--accent);
}
.stop-row.selected .color-field {
  box-shadow: inset 0 0 0 1px var(--accent);
}
.segmented.text-styles {
  display: flex;
  width: 100%;
}
.segmented.text-styles .segment {
  flex: 1;
  font-size: 13px;
}
.text-style.bold {
  font-weight: 700;
}
.text-style.italic {
  font-style: italic;
  font-family: Georgia, serif;
}
.text-style.underline {
  text-decoration: underline;
}
.text-style.strike {
  text-decoration: line-through;
}
.text-scope {
  background: var(--accent-soft);
  color: var(--text);
  border-radius: var(--radius);
  padding: 6px 8px;
}
.grid-2.align-center {
  align-items: center;
}
.segmented.with-text .segment span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.segmented.with-text .segment {
  min-width: 0;
}
.tool-group {
  display: inline-flex;
  align-items: center;
}
.tool-chevron {
  width: 16px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tool-chevron:hover,
.tool-chevron.open {
  background: var(--bg-hover);
  color: var(--text);
}
.tool-flyout {
  position: fixed;
  z-index: 80;
  min-width: 220px;
  padding: 6px;
  background: #1e1e1e;
  color: #f2f2f2;
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}
.tool-flyout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 10px;
  border: none;
  background: none;
  color: inherit;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.tool-flyout-item:hover,
.tool-flyout-item:focus-visible {
  background: var(--accent);
  color: #fff;
  outline: none;
}
.tool-flyout-item.active .tool-flyout-label::after {
  content: ' ✓';
}
.tool-flyout-label {
  flex: 1;
}
.tool-flyout-key {
  color: #a0a0a0;
  font-size: 11px;
}
.tool-flyout-item:hover .tool-flyout-key {
  color: #e6f3ff;
}
.context-bar {
  position: absolute;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}
.cb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.cb-button:hover {
  background: var(--bg-hover);
}
.cb-button.on {
  background: var(--accent-soft);
  color: var(--accent);
}
.cb-button:focus-visible,
.cb-style:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.cb-button.cb-smart {
  color: var(--smart);
}
.cb-sep {
  width: 1px;
  height: 18px;
  margin: 0 3px;
  background: var(--border);
}
.cb-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.cb-swatch.ring {
  box-sizing: border-box;
  border: 3px solid;
  box-shadow: none;
}
.cb-swatch.none {
  box-sizing: border-box;
  border: 1.5px dashed var(--text-faint);
  box-shadow: none;
  background: linear-gradient(to top right, transparent calc(50% - 0.75px), var(--text-faint) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px));
}
.cb-style {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  max-width: 180px;
  padding: 0 6px 0 8px;
  border: none;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text);
  cursor: pointer;
}
.cb-style:hover {
  background: var(--bg-hover);
}
.cb-style-aa {
  color: var(--text-faint);
  font-size: 11px;
}
.cb-style-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.context-bar .font-picker {
  display: flex;
}
.context-bar .font-warning,
.context-bar .font-action {
  display: none !important;
}
.context-bar .font-button {
  height: 28px;
  width: 150px;
  border: none;
  background: var(--bg-subtle);
}
.context-bar .cb-weight {
  width: 112px;
  height: 28px;
  border: none;
  background: var(--bg-subtle);
}
.cb-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}
.cb-field[hidden] {
  display: none;
}
.cb-field:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.cb-field-glyph {
  display: inline-flex;
  font-size: 12px;
}
.cb-input {
  width: 38px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.cb-field-unit {
  font-size: 11px;
}
.panel-fold {
  margin-left: 4px;
}
.smart-button {
  width: 36px;
  color: var(--smart);
}
.smart-button:hover {
  color: var(--smart);
}
.smart-button.open {
  background: var(--smart-soft);
  box-shadow: inset 0 0 0 1px var(--smart);
}
.smart-menu {
  position: fixed;
  z-index: 80;
  width: 360px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}
.smart-menu-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 6px;
  color: var(--smart);
  font-weight: 600;
  min-width: 0;
}
.smart-menu-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.smart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: none;
  color: inherit;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.smart-item.primary {
  background: var(--smart-soft);
}
.smart-item:hover,
.smart-item:focus-visible {
  background: var(--smart-soft);
  outline: none;
}
.smart-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.smart-item-title {
  font-weight: 600;
}
.smart-item-desc {
  color: var(--text-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.smart-item-key {
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
}
.smart-empty {
  margin: 0;
  padding: 6px 10px 10px;
  color: var(--text-muted);
  line-height: 1.4;
}
.smart-foot {
  margin: 4px 0 0;
  padding: 8px 10px 6px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.4;
}
.export-row {
  display: grid;
  grid-template-columns: 62px 72px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
}
.export-suffix {
  padding-left: 8px;
}
.export-row.quick {
  grid-template-columns: minmax(0, 1fr) auto;
}
.layer-row .type-icon.mask {
  color: var(--accent);
}
.style-popover {
  position: fixed;
  z-index: 80;
  max-height: min(460px, calc(100vh - 16px));
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.style-picker {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}
.style-picker > .hint {
  padding: 0 10px 8px;
  margin: 0;
}
.style-list {
  overflow-y: auto;
  padding: 4px;
  flex: 1;
  min-height: 40px;
}
.style-list > .hint {
  padding: 8px;
  margin: 0;
}
.style-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}
.style-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.style-item.local {
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  padding-right: 2px;
}
.style-item.local .style-meta {
  display: none;
}
.style-item.local .icon-button {
  opacity: 0;
}
.style-item.local:hover .icon-button,
.style-item.local:focus-within .icon-button {
  opacity: 1;
}
.style-item:hover,
.style-item.active {
  background: var(--bg-hover);
}
.style-item.selected .style-name {
  color: var(--accent);
}
.style-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.style-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.style-name.muted {
  color: var(--text-muted);
  flex: 1;
}
.style-meta,
.style-count {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.style-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  background-clip: padding-box;
  flex: none;
}
.style-glyph {
  width: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text);
  flex: none;
}
.style-effect {
  width: 14px;
  height: 14px;
  margin: 1px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  flex: none;
}
.style-effect.blur {
  background: linear-gradient(135deg, var(--bg-hover), var(--bg));
  filter: blur(0.6px);
}
.styles-kind {
  padding: 6px 0 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
}
.styles-empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.5;
}
.styles-empty svg {
  display: inline;
  vertical-align: -2px;
  color: var(--text);
}
.style-folder {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-faint);
  padding: 6px 2px 2px;
}
.style-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: var(--field-h);
}
.style-row:empty {
  display: none;
}
.style-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--field-h);
  padding: 0 6px;
  border: none;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.style-open:hover {
  background: var(--bg-hover);
}
.style-open .style-name {
  flex: 1;
}
.style-menu {
  display: flex;
  flex-direction: column;
  padding: 4px;
  overflow-y: auto;
}
.style-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.style-menu-item:hover:not(:disabled) {
  background: var(--bg-hover);
}
.style-menu-item:disabled {
  color: var(--text-faint);
  cursor: default;
}
.style-menu-title {
  font-size: 11px;
  color: var(--text-faint);
  padding: 8px 8px 2px;
}
.style-editor-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 4px;
}
.style-editor-header h3 {
  flex: 1;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.style-editor-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: repeating-conic-gradient(var(--bg-hover) 0 25%, var(--bg) 0 50%) 0 0 / 12px 12px;
  overflow: hidden;
}
.style-editor-preview .style-swatch {
  width: 100%;
  height: 56px;
  border-radius: 8px;
}
.style-editor-preview .style-effect {
  width: 64px;
  height: 36px;
  border-radius: 6px;
}
.style-editor-preview.kind-text {
  background: var(--bg-subtle);
  justify-content: flex-start;
  padding: 10px;
}
.style-text-sample {
  color: var(--text);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-button.danger {
  color: var(--danger);
}
.text-button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.text-button.primary:hover {
  background: #0b85e0;
}
.text-button:disabled {
  opacity: 0.5;
  cursor: default;
}
.bindable {
  position: relative;
  min-width: 0;
}
.bindable > .field,
.bindable > .color-field {
  width: 100%;
}
.var-bind {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
}
.var-bind[hidden] {
  display: none !important;
}
.bindable:hover .var-bind,
.bindable:focus-within .var-bind {
  display: inline-flex;
}
.var-bind:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.bindable.has-match > :first-child {
  padding-right: 24px;
}
.bindable.has-match .var-bind {
  display: inline-flex;
  color: var(--accent);
}
.bindable.has-match .var-bind::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.var-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  height: var(--field-h);
  min-width: 0;
}
.var-pill[hidden] {
  display: none;
}
.var-pill-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--field-h);
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.var-pill-open .icon {
  color: var(--accent);
  flex: none;
}
.var-pill-open:hover {
  border-color: var(--accent);
}
.var-pill-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.var-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex: none;
}
.var-value {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.var-picker-footer {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.mode-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vars-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  padding: 24px;
}
.vars-overlay[hidden] {
  display: none;
}
.vars-dialog {
  display: flex;
  flex-direction: column;
  width: min(1280px, 100%);
  height: min(820px, 100%);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  font: var(--font);
}
.vars-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.vars-header h2 {
  margin: 0 8px 0 4px;
  font-size: 13px;
  font-weight: 600;
}
.vars-header .field {
  width: 150px;
  flex: none;
}
.vars-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--field-h);
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text-faint);
  min-width: 120px;
}
.vars-search {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font: inherit;
  min-width: 0;
}
.vars-main {
  flex: 1;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 280px;
  min-height: 0;
}
.vars-side {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 6px;
}
.vars-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 6px 4px;
}
.vars-collection,
.vars-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 4px 0 8px;
  border-radius: 6px;
  cursor: pointer;
}
.vars-collection:hover,
.vars-group:hover {
  background: var(--bg-hover);
}
.vars-collection.active,
.vars-group.active {
  background: var(--accent-soft);
}
.vars-collection-name,
.vars-group > span:nth-of-type(1) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vars-collection .icon-button {
  opacity: 0;
}
.vars-collection:hover .icon-button,
.vars-collection.active .icon-button {
  opacity: 1;
}
.vars-group.has-hits {
  color: var(--accent);
  font-weight: 600;
}
.vars-count {
  font-size: 11px;
  color: var(--text-faint);
}
.vars-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.vars-scroller {
  flex: 1;
  overflow: auto;
  outline: none;
  position: relative;
}
.vars-row {
  display: grid;
  height: 32px;
  border-bottom: 1px solid var(--border);
  min-width: max-content;
}
.vars-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
}
.vars-body-rows {
  position: relative;
}
.vars-rows {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}
.vars-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 8px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
}
.vars-cell:last-child {
  border-right: none;
}
.vars-head-cell .icon-button {
  margin-left: auto;
  opacity: 0;
}
.vars-head-cell:hover .icon-button,
.vars-add-mode .icon-button {
  opacity: 1;
}
.vars-add-mode {
  padding: 0 2px;
  justify-content: center;
}
.vars-mode-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.vars-default {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-faint);
}
.vars-group-row {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
}
.vars-group-row .vars-cell {
  grid-column: 1 / -1;
  border-right: none;
}
.vars-row.selected .vars-name {
  background: var(--accent-soft);
}
.vars-cell.active {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.vars-cell.in-range {
  background: var(--accent-soft);
}
.vars-cell.editing {
  padding: 0 2px;
}
.vars-type {
  display: inline-flex;
  color: var(--text-faint);
}
.vars-name-text,
.vars-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.vars-badge {
  font-size: 10px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
}
.vars-muted {
  color: var(--text-faint);
  font-size: 11px;
}
.vars-swatch-wrap {
  position: relative;
  display: inline-flex;
}
.vars-color-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
.vars-alias {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 22px;
  padding: 0 8px 0 6px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
}
.vars-alias-opacity {
  font-size: 11px;
  color: var(--text-muted);
}
.vars-input {
  width: 100%;
  height: 26px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  outline: none;
}
.vars-input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(224, 62, 26, 0.15);
}
.vars-empty {
  padding: 40px 24px;
  max-width: 520px;
  color: var(--text-muted);
  line-height: 1.5;
}
.vars-empty .text-button {
  margin-top: 8px;
}
.vars-bulk {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-wrap: wrap;
}
.vars-bulk[hidden] {
  display: none;
}
.vars-bulk-count {
  font-weight: 600;
  margin-right: 6px;
}
.vars-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}
.vars-scopes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}
.style-popover .vars-scopes {
  padding: 10px;
}
.checkbox.indent {
  padding-left: 18px;
}
.vars-details {
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 8px 12px 16px;
}
.vars-details > .hint {
  margin-top: 12px;
}
.vars-detail-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.vars-detail-section h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}
.vars-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.vars-textarea {
  height: auto;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid transparent;
  resize: vertical;
  font: inherit;
  color: var(--text);
}
.vars-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.vars-code {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vars-code .field-label {
  width: 56px;
  flex: none;
}
.vars-usages,
.vars-chain {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vars-usage {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 6px;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.vars-usage:hover {
  background: var(--bg-hover);
}
.vars-usage-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vars-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.vars-details .button-row {
  margin-top: 12px;
  display: flex;
  gap: 6px;
}
.bindable > [hidden] {
  display: none !important;
}
.vars-textarea {
  width: 100%;
  box-sizing: border-box;
}
.vars-import {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  max-height: inherit;
  min-height: 0;
}
.vars-import h3 {
  margin: 0;
  font-size: 12px;
}
.vars-import-list {
  overflow-y: auto;
  min-height: 0;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vars-import-item {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vars-import-item.added {
  color: #14ae5c;
}
.vars-import-item.warning {
  color: var(--warning-text);
  white-space: normal;
}
.vars-import .button-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.guide-input {
  position: absolute;
  z-index: 5;
  width: 80px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font: var(--font);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  outline: none;
}
.row.end {
  justify-content: space-between;
}
.icon-button.on {
  color: var(--accent);
  background: var(--accent-soft);
}
.stroke-more {
  margin-top: 4px;
}
.stroke-more > summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 0;
  list-style: none;
}
.stroke-more > summary::before {
  content: '▸ ';
}
.stroke-more[open] > summary::before {
  content: '▾ ';
}
.stroke-more > .grid-2 {
  margin-top: 4px;
}
.style-grid {
  background-color: var(--bg);
}
.layers-search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 6px;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
.layers-search {
  flex: 1;
  min-width: 0;
  height: 24px;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font: inherit;
}
.layers-filter {
  height: 24px;
  max-width: 96px;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}
.layers-found {
  font-size: 11px;
  color: var(--text-faint);
  padding: 6px 10px 4px;
}
.layer-row.found {
  padding-left: 10px;
}
.layer-row.found .label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  padding: 3px 0;
}
.layer-path {
  font-size: 10px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.files-dialog {
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: min(640px, 100%);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  font: var(--font);
}
.files-list {
  overflow-y: auto;
  padding: 6px;
  flex: 1;
  min-height: 120px;
}
.files-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 8px;
  border-radius: 8px;
  cursor: pointer;
}
.files-row:hover,
.files-row:focus-visible {
  background: var(--bg-hover);
  outline: none;
}
.files-row.current {
  background: var(--accent-soft);
}
.files-row > .icon {
  color: var(--text-faint);
  flex: none;
}
.files-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.files-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.files-meta {
  font-size: 11px;
  color: var(--text-faint);
}
.files-row .icon-button,
.files-delete {
  opacity: 0;
}
.files-row:hover .icon-button,
.files-row:hover .files-delete,
.files-row:focus-within .icon-button,
.files-delete.danger {
  opacity: 1;
}
.files-note {
  padding: 8px 14px 12px;
  margin: 0;
  border-top: 1px solid var(--border);
}
.files-button {
  margin-left: -6px;
}
.section-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.section-swatch {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.15));
  cursor: pointer;
}
.section-swatch:hover,
.section-swatch:focus-visible {
  outline: 2px solid var(--accent, #0d99ff);
  outline-offset: 1px;
}
.panel-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 8px 0 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}
.panel-tab {
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  padding: 6px 8px 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.panel-tab:hover {
  color: var(--text);
}
.panel-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.panel-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.panel-play {
  margin-left: auto;
}
.proto-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.proto-head {
  display: flex;
  align-items: center;
  gap: 4px;
}
.proto-head .proto-select {
  flex: 1;
  min-width: 0;
}
.proto-action {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 8px;
  border-left: 2px solid var(--accent-soft);
}
.proto-select.proto-missing {
  color: var(--danger);
}
.proto-input {
  width: 100%;
  box-sizing: border-box;
  height: var(--field-h);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text);
  font: inherit;
  padding: 0 8px;
}
.proto-input:focus {
  outline: none;
  border-color: var(--accent);
}
.proto-desc {
  height: auto;
  padding: 6px 8px;
  resize: vertical;
}
.proto-number {
  width: 96px;
}
.proto-key {
  width: 120px;
  cursor: pointer;
  text-align: center;
}
.proto-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.proto-check {
  font-size: 11px;
}
.proto-add-action {
  align-self: flex-start;
  color: var(--text-muted);
}
.proto-present {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.proto-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.proto-color {
  width: 40px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0;
  background: none;
  cursor: pointer;
}
.flow-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.flow-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.flow-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-screen {
  padding: 0;
  height: auto;
  border: 0;
  background: none;
  color: var(--text-muted);
  text-align: left;
}
.flow-screen:hover {
  color: var(--accent);
  background: none;
}
.player {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  color: #f0f0f0;
}
.player.standalone {
  position: absolute;
}
.player-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 8px;
  background: #2c2c2c;
  border-bottom: 1px solid #3a3a3a;
  flex: none;
  min-width: 0;
}
.player-bar .icon-button {
  color: #f0f0f0;
}
.player-bar .icon-button:hover {
  background: #3a3a3a;
}
.player-bar .icon-button:disabled {
  opacity: 0.35;
}
.player-bar .field-select {
  background: #383838;
  color: #f0f0f0;
  width: auto;
  max-width: 180px;
}
.player-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 30vw;
}
.player-spacer {
  flex: 1;
}
.player-check {
  color: #c8c8c8;
  white-space: nowrap;
}
.player-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}
.player-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
@media (max-width: 640px) {
  .player-check,
  .player-scale {
    display: none;
  }
}
.proto-transition {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.proto-transition .proto-line .proto-select {
  flex: 1;
  width: auto;
  min-width: 0;
  max-width: 140px;
}
.proto-transition .proto-line .field-label {
  flex: none;
}
.proto-dirs {
  display: flex;
  gap: 2px;
}
.proto-dir {
  width: 28px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.proto-dir.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.proto-dir:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.proto-spring {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.proto-spring-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.proto-spring-field .field-label {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.curve-editor {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.curve-canvas {
  width: 220px;
  height: 132px;
  max-width: 100%;
  border-radius: var(--radius);
  background: var(--bg-subtle);
}
.curve-canvas.editable {
  cursor: crosshair;
  touch-action: none;
}
.curve-values {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.proto-offsets {
  display: flex;
  gap: 4px;
}
.proto-offset {
  display: flex;
  align-items: center;
  gap: 3px;
}
.proto-offset .proto-input {
  width: 48px;
  padding: 0 4px;
}
.proto-line:has(.proto-offsets) {
  flex-wrap: wrap;
  row-gap: 4px;
}
.proto-dim {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.proto-percent {
  width: 52px;
}
.proto-expr-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.proto-expr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.proto-insert {
  width: 44px;
  flex: none;
  padding: 0 2px;
}
.proto-expr-status {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proto-expr-status.ok {
  color: #14ae5c;
}
.proto-expr-status.error {
  color: var(--danger);
}
.proto-expr-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}
.proto-expr-code mark {
  background: none;
  color: var(--danger);
  text-decoration: underline wavy var(--danger);
}
.proto-branch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.proto-branch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.proto-branch-label {
  font-weight: 600;
  color: var(--component);
}
.player-body {
  flex: 1;
  min-height: 0;
  display: flex;
}
.player-body .player-stage {
  flex: 1;
  min-width: 0;
}
.player-debug {
  width: 280px;
  flex: none;
  overflow-y: auto;
  background: #252525;
  border-left: 1px solid #3a3a3a;
  padding: 8px 12px 16px;
  font-size: 12px;
}
.player-debug h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9a9a9a;
  margin: 12px 0 6px;
}
.player-var {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid #333;
}
.player-var-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-var-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #8fd3ff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid #555;
}
.player-log-entry {
  padding: 4px 0;
  border-bottom: 1px solid #333;
}
.player-log-cause {
  color: #c8c8c8;
}
.player-log-cause time {
  color: #777;
  font-variant-numeric: tabular-nums;
}
.player-log-line {
  padding-left: 10px;
  color: #a8e6b8;
}
.player-log-line.error {
  color: #ff8f7a;
}
.player-empty {
  color: #777;
}
.player-bar .icon-button.active {
  background: #0d99ff;
  color: #fff;
}
@media (max-width: 640px) {
  .player-debug {
    position: absolute;
    right: 0;
    top: 44px;
    bottom: 0;
    z-index: 2;
  }
}
.proto-transition .proto-number {
  width: 72px;
}
.proto-branch .curve-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 220 / 132;
}
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg-subtle);
  overflow-y: auto;
}
.auth-card {
  width: min(380px, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.auth-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--bg-subtle);
  border-radius: 8px;
}
.auth-tab {
  flex: 1;
  border: 0;
  border-radius: 6px;
  padding: 6px;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-tab.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-submit {
  height: 38px;
  justify-content: center;
  font-size: 14px;
}
.auth-error {
  margin: 0;
  min-height: 1em;
  color: var(--danger);
  font-size: 12px;
}
.auth-error:empty {
  display: none;
}
.auth-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}
.auth-hint:empty {
  display: none;
}
.auth-local {
  align-self: center;
  color: var(--text-muted);
  font-size: 12px;
}
.account-button {
  width: 28px;
  height: 28px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.account-button.signed-in {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.account-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.files-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 12px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 12px;
}
.auth-field[hidden] {
  display: none;
}
.auth-local {
  height: auto;
  min-height: 36px;
  padding: 8px 12px;
  white-space: normal;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg);
}
.auth-local:hover {
  color: var(--text);
  background: var(--bg-subtle);
}
.auth-tabs[hidden],
.auth-link[hidden] {
  display: none;
}
.auth-links {
  display: flex;
  justify-content: center;
}
.auth-link {
  padding: 2px 4px;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.auth-link:hover {
  text-decoration: underline;
}
.auth-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.home {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 14px 10px 10px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 6px;
  font-size: 14px;
  font-weight: 600;
}
a.home-brand {
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
}
a.home-brand:hover {
  background: var(--bg-hover);
}
.brand-mark {
  flex: none;
  display: block;
}
.home-account {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.home-account:hover {
  background: var(--bg-hover);
}
.home-account-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.home-account-text strong,
.home-account-text small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.home-account-text strong {
  font-weight: 600;
}
.home-account-text small {
  color: var(--text-muted);
  font-size: 11px;
}
.home-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.home-avatar.signed-in {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.home-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin: 2px 0 4px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.home-search:focus-within {
  border-color: var(--accent);
}
.home-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font: inherit;
}
.home-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.home-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.home-nav-item svg {
  flex: none;
  color: var(--text-muted);
}
.home-nav-item:hover {
  background: var(--bg-hover);
}
.home-nav-item.active {
  background: var(--accent-soft);
  font-weight: 600;
}
.home-nav-item.active svg {
  color: var(--accent);
}
.home-nav-item.drop {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.home-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.home-nav-count {
  color: var(--text-faint);
  font-size: 11px;
}
.home-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 0 4px 2px 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-team-heading {
  gap: 4px;
}
.home-team-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 2px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}
.home-team-name:hover,
.home-team-name.active {
  color: var(--text);
}
.home-team-actions {
  display: flex;
  flex: none;
}
.home-new-team {
  margin-top: 10px;
  color: var(--text-muted);
}
.home-header-team {
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 12px;
}
.home-nav-hint {
  margin: 2px 8px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.4;
}
.home-sidebar-footer {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.home-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}
.home-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 32px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
}
.home-banner[hidden] {
  display: none;
}
.home-main {
  padding: 24px 32px 40px;
}
.home-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
.home-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.home-header-spacer {
  flex: 1;
}
.home-new {
  text-decoration: none;
  gap: 6px;
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  outline: none;
}
.home-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--text-faint);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.home-card:hover .home-thumb,
.home-card:focus-visible .home-thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.home-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0 28px 0 2px;
}
.home-card-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.home-card-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-muted);
  font-size: 12px;
}
.home-card-more {
  position: absolute;
  right: 0;
  bottom: 4px;
  opacity: 0;
}
.home-card:hover .home-card-more,
.home-card:focus-within .home-card-more {
  opacity: 1;
}
@media (hover: none) {
  .home-card-more {
    opacity: 1;
  }
}
.home-rename {
  width: 100%;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}
.home-title + .home-rename,
.home-header .home-rename {
  max-width: 360px;
  height: 30px;
  font-size: 18px;
}
.home-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 460px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.home-empty p {
  margin: 0;
}
.home-empty a,
.home-missing a {
  text-decoration: none;
  gap: 6px;
}
.home-missing {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  height: 100%;
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}
.home-button {
  width: auto;
  gap: 4px;
  padding: 0 8px 0 4px;
  font-size: 12px;
}
@media (max-width: 720px) {
  .home {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100dvh;
  }
  .home .home-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .home .home-brand {
    padding: 0;
  }
  .home .home-guest {
    display: contents;
  }
  .home .home-signin {
    width: auto;
    padding: 0 16px;
  }
  .home .home-guest small,
  .home .home-search,
  .home .home-nav,
  .home .home-sidebar-footer {
    grid-column: 1 / -1;
  }
  .home .home-account {
    width: auto;
    padding: 2px;
  }
  .home .home-account-text,
  .home .home-account > .icon {
    display: none;
  }
  .home .home-search {
    height: 36px;
    margin: 0;
  }
  .home .home-nav,
  .home .home-sidebar-footer {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .home .home-sidebar-footer {
    display: flex;
    padding-top: 0;
    padding-bottom: 8px;
    border-top: none;
  }
  .home .home-nav-item {
    flex: none;
    width: auto;
    height: 34px;
    padding: 0 12px;
  }
  .home .home-nav-heading,
  .home .home-nav-hint,
  .home .home-disk {
    display: none;
  }
  .home .home-banner {
    margin: 12px 16px 0;
  }
  .home .home-main {
    padding: 16px 16px 32px;
  }
  .home .home-header {
    margin-bottom: 14px;
  }
  .home .home-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
}
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.32);
  animation: dialog-fade 0.12s ease-out;
}
.dialog {
  width: min(400px, 100%);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  font: var(--font);
  font-size: 13px;
  animation: dialog-pop 0.14s ease-out;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 12px 4px 18px;
}
.dialog-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 18px 4px;
}
.dialog-message {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}
.dialog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}
.dialog-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.dialog-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.dialog-hint {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.4;
}
.dialog-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}
.dialog-error:empty {
  display: none;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px 16px;
}
.text-button.danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.text-button.danger-solid:hover {
  filter: brightness(1.08);
}
@keyframes dialog-fade {
  from { opacity: 0; }
}
@keyframes dialog-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .dialog-overlay,
  .dialog {
    animation: none;
  }
}
.share-button {
  height: 28px;
  margin: 0 4px 0 8px;
  padding: 0 12px;
}
.share-button[hidden],
.view-only-badge[hidden],
.save-status[hidden] {
  display: none;
}
.view-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 11px;
}
.app.read-only .tool-dock > :not(.for-viewers) {
  display: none;
}
.share-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}
.share-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 18px 0;
  overflow-y: auto;
}
.share-error {
  padding: 0 18px;
}
.share-error .dialog-error:not(:empty) {
  padding-bottom: 6px;
}
.share-invite {
  display: flex;
  gap: 6px;
}
.share-email {
  flex: 1;
  min-width: 0;
}
.share-select {
  height: 32px;
  max-width: 200px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.share-select:focus {
  outline: none;
  border-color: var(--accent);
}
.share-select[hidden] {
  display: none;
}
.share-heading {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.share-people {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.share-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.share-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.share-person-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.share-person-text strong,
.share-person-text small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.share-person-text strong {
  font-weight: 600;
}
.share-person-text small {
  color: var(--text-muted);
  font-size: 11px;
}
.share-muted {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}
.share-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.share-link-row .share-select:first-of-type {
  flex: 1;
  max-width: none;
}
.share-link-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-subtle);
}
.share-link-settings[hidden] {
  display: none;
}
.share-setting {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-setting > span:first-child {
  width: 56px;
  flex: none;
  color: var(--text-muted);
  font-size: 12px;
}
.share-setting .dialog-input {
  flex: 1;
  min-width: 0;
  height: 30px;
}
.share-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.share-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 16px;
}
.share-footer .text-button {
  gap: 6px;
}
.share-spacer {
  flex: 1;
}
.share-url {
  width: 100%;
  margin-bottom: 12px;
}
.home-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.home-missing-actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 560px) {
  .share-invite {
    flex-wrap: wrap;
  }
  .share-email {
    flex-basis: 100%;
  }
}
.peers {
  display: flex;
  align-items: center;
  margin-left: 6px;
}
.peers:empty {
  display: none;
}
.peer {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -6px;
  padding: 0;
  border: 2px solid var(--bg);
  border-radius: 50%;
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
button.peer:hover {
  position: relative;
  z-index: 1;
}
.peer.following {
  position: relative;
  z-index: 1;
  outline: 2px solid;
  outline-offset: 1px;
}
.peer:first-child {
  margin-left: 0;
}
.peer.more {
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: default;
}
.foldout {
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.foldout > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.foldout > summary::-webkit-details-marker {
  display: none;
}
.foldout > summary::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.12s;
}
.foldout[open] > summary::before {
  transform: rotate(90deg);
}
.foldout > summary:hover {
  color: var(--text);
}
.foldout-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
}
.field-explain {
  margin: -2px 0 4px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.4;
}
.peer-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.peer-selection {
  position: absolute;
  border: 2px solid;
  border-radius: 2px;
}
.peer-cursor {
  position: absolute;
  left: 0;
  top: 0;
  transition: transform 0.08s linear;
  will-change: transform;
}
.peer-cursor svg {
  display: block;
  margin: -2px 0 0 -2px;
}
.peer-name {
  position: absolute;
  left: 14px;
  top: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.peer-chat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: max-content;
  max-width: 240px;
  padding: 5px 10px 6px;
  border-radius: 4px 12px 12px 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.peer-chat-name {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
}
.peer-chat-text {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}
@media (prefers-reduced-motion: reduce) {
  .peer-cursor {
    transition: none;
  }
}
.cursor-chat {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
}
.cursor-chat[hidden] {
  display: none;
}
.cursor-chat-input {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 220px;
  padding: 7px 12px;
  border: none;
  border-radius: 4px 14px 14px 14px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}
.cursor-chat-input::placeholder {
  color: rgb(255 255 255 / 0.7);
}
.export-svg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: -2px 0 6px;
}
.link-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  color: var(--text-muted);
}
.link-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  text-decoration: none;
}
.link-url.muted {
  color: var(--text-muted);
}
.versions-view {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}
.versions-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
}
.versions-header h2 {
  margin: 0;
  font-size: 14px;
}
.versions-file {
  color: var(--text-muted);
}
.versions-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.versions-list {
  overflow-y: auto;
  padding: 8px;
  border-right: 1px solid var(--border);
}
.versions-list .hint {
  padding: 8px;
  line-height: 1.45;
}
.versions-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.versions-row:hover {
  background: var(--bg-hover);
}
.versions-row.active {
  background: var(--accent-soft);
}
.versions-name {
  color: var(--text-muted);
}
.versions-row.named .versions-name {
  color: var(--text);
  font-weight: 600;
}
.versions-meta,
.versions-desc {
  color: var(--text-faint);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.versions-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 12px 16px 16px;
  gap: 12px;
  overflow-y: auto;
}
.versions-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.versions-summary {
  color: var(--text-muted);
}
.versions-panes {
  flex: 1;
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.versions-panes figure {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.versions-panes figcaption {
  color: var(--text-muted);
  font-weight: 600;
}
.versions-canvas {
  flex: 1;
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-faint);
}
.versions-changes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.versions-changes li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.versions-changes i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
}
.find-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 340px;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.18);
}
.find-panel[hidden] {
  display: none;
}
.find-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.find-input {
  flex: 1;
  min-width: 0;
  height: var(--field-h);
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.find-input:focus {
  outline: none;
  border-color: var(--accent);
}
.find-panel.none .find-input[type='search'] {
  border-color: var(--danger);
}
.find-count {
  min-width: 44px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.find-options .select-wrap {
  flex: 1;
}
.find-toggle {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.find-toggle.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.history-popover {
  position: fixed;
  z-index: 2000;
  width: 290px;
  max-height: min(480px, calc(100vh - 80px));
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.18);
}
.history-title {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.history-list {
  overflow-y: auto;
  padding: 4px;
}
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.history-row:hover:not(:disabled) {
  background: var(--bg-hover);
}
.history-row.current {
  background: var(--accent-soft);
  cursor: default;
  font-weight: 600;
}
.history-row.future {
  color: var(--text-faint);
}
.history-row.start {
  color: var(--text-muted);
  font-style: italic;
}
.history-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-time {
  flex: none;
  color: var(--text-faint);
  font-size: 11px;
}
.history-now {
  margin: 4px 8px;
  padding-top: 4px;
  border-top: 1px dashed var(--accent);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.history-empty {
  margin: 0;
  padding: 12px;
  color: var(--text-faint);
}
.crop-dialog {
  width: min(700px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}
.crop-stage {
  position: relative;
  align-self: center;
  margin: 16px;
  min-width: 120px;
  min-height: 80px;
  user-select: none;
  background: repeating-conic-gradient(var(--bg-subtle) 0 25%, var(--bg) 0 50%) 0 0 / 16px 16px;
}
.crop-image {
  display: block;
}
.crop-frame {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid #fff;
  outline: 1px solid rgb(0 0 0 / 0.5);
  cursor: move;
  touch-action: none;
  background:
    linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35)) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35)) 66.66% 0 / 1px 100% no-repeat,
    linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35)) 0 33.33% / 100% 1px no-repeat,
    linear-gradient(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.35)) 0 66.66% / 100% 1px no-repeat;
}
.crop-shade {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.crop-hole {
  position: absolute;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.55);
}
.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: #fff;
}
.crop-handle.nw { left: 0; top: 0; cursor: nwse-resize; }
.crop-handle.n { left: 50%; top: 0; cursor: ns-resize; }
.crop-handle.ne { left: 100%; top: 0; cursor: nesw-resize; }
.crop-handle.e { left: 100%; top: 50%; cursor: ew-resize; }
.crop-handle.se { left: 100%; top: 100%; cursor: nwse-resize; }
.crop-handle.s { left: 50%; top: 100%; cursor: ns-resize; }
.crop-handle.sw { left: 0; top: 100%; cursor: nesw-resize; }
.crop-handle.w { left: 0; top: 50%; cursor: ew-resize; }
.crop-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.crop-size {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.crop-spacer {
  flex: 1;
}
.comment-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}
.comment-pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 14px 14px 14px 2px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.3);
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
}
.comment-pin:hover,
.comment-pin.active {
  box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgb(0 0 0 / 0.3);
}
.comment-pin.resolved {
  background: var(--text-faint);
}
.comment-pin.draft {
  pointer-events: none;
  font-size: 16px;
}
.comment-pin-count {
  position: absolute;
  right: -7px;
  top: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 10px;
  line-height: 16px;
}
.comment-popover {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.18);
  pointer-events: auto;
  overflow: hidden;
}
.comment-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 6px 12px;
  border-bottom: 1px solid var(--border);
}
.comment-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.comment-resolve.on {
  color: var(--accent);
}
.comment-on {
  padding: 6px 12px 0;
  color: var(--text-faint);
  font-size: 11px;
}
.comment-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.comment-item {
  padding: 8px 12px;
}
.comment-item + .comment-item {
  border-top: 1px solid var(--border);
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.comment-avatar {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.comment-author {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment-time {
  flex: none;
  color: var(--text-faint);
  font-size: 11px;
}
.comment-text {
  margin: 4px 0 0 28px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.comment-actions,
.comment-edit-actions {
  display: flex;
  gap: 12px;
  margin: 2px 0 0 28px;
}
.comment-edit {
  margin: 4px 0 0 28px;
}
.comment-edit-actions {
  justify-content: flex-end;
  margin-left: 0;
}
.comment-reply {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border);
}
.composer .comment-reply {
  border-top: none;
}
.comment-input {
  flex: 1;
  min-width: 0;
  resize: none;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
}
.comment-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.comment-box .comment-input {
  width: 100%;
}
.mention-list {
  max-height: 176px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.mention-list[hidden] {
  display: none;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mention-item.active,
.mention-item:hover {
  background: var(--accent-soft);
}
.comment-mention {
  color: var(--accent);
  font-weight: 600;
}
.comment-mention.me {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--accent-soft);
}
.comment-input:focus {
  outline: none;
  border-color: var(--accent);
}
.comment-send {
  flex: none;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.comment-note {
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
}
.comments-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.comments-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border);
}
.comments-bar .select-wrap {
  flex: 1;
}
.comments-filter {
  width: 100%;
}
.comments-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.comments-empty {
  margin: 0;
  padding: 16px 12px;
  color: var(--text-faint);
  line-height: 1.4;
}
.comment-row {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.comment-row:hover {
  background: var(--bg-hover);
}
.comment-row.active {
  background: var(--accent-soft);
}
.comment-row.resolved .comment-row-text {
  color: var(--text-muted);
}
.comment-row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.comment-row-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.comment-row-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.comment-row-meta {
  color: var(--text-faint);
  font-size: 11px;
}
.follow-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 2px solid;
  pointer-events: none;
}
.follow-frame[hidden] {
  display: none;
}
.follow-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 5px 10px;
  border-radius: 0 0 8px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: auto;
}
.follow-stop {
  padding: 2px 8px;
  border: none;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.22);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.follow-stop:hover {
  background: rgb(255 255 255 / 0.36);
}
.hi-dialog {
  width: min(1040px, 100%);
  height: min(720px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
}
.hi-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 4px 18px 0;
}
.hi-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.hi-pane[hidden] {
  display: none;
}
.hi-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}
.hi-drop strong {
  color: var(--text);
  font-size: 13px;
}
.hi-drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.hi-drop-buttons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.hi-file {
  margin: 6px 0 0;
  font-size: 12px;
  word-break: break-all;
}
.hi-file[hidden] {
  display: none;
}
.hi-code {
  width: 100%;
  height: 160px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: 11px/1.4 'SF Mono', Menlo, Consolas, monospace;
  resize: vertical;
}
.hi-code:focus {
  outline: none;
  border-color: var(--accent);
}
.hi-width {
  flex: 1;
  max-width: none;
}
.hi-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}
.hi-check input {
  margin-top: 2px;
}
.hi-check span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hi-check small {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.35;
}
.hi-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 6px;
}
.hi-preview {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.hi-preview-inner {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  background: #fff;
}
.hi-preview-inner iframe {
  position: absolute;
  left: 0;
  top: 0;
  border: 0;
  transform-origin: 0 0;
  background: #fff;
}
.hi-empty,
.hi-note {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
}
.hi-footer {
  align-items: center;
}
.hi-status {
  flex: 1;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}
.hi-status.error {
  color: var(--danger);
}
@media (max-width: 760px) {
  .hi-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .hi-preview {
    min-height: 260px;
  }
}
.stroke-more.foldout[open] {
  padding-bottom: 8px;
}
.stroke-more.foldout > .grid-2 + .grid-2 {
  margin-top: 6px;
}
button.vars-color-input {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.color-picker {
  position: fixed;
  z-index: 3500;
  width: 240px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  font: var(--font);
}
.cp-sv {
  position: relative;
  height: 160px;
  border-radius: 6px;
  cursor: crosshair;
  touch-action: none;
  outline: none;
}
.cp-sv-white,
.cp-sv-black {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}
.cp-sv-white {
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}
.cp-sv-black {
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}
.cp-knob {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.cp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cp-sliders {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cp-slider {
  position: relative;
  height: 12px;
  border-radius: 6px;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.cp-slider[hidden] {
  display: none;
}
.cp-slider:focus-visible,
.cp-sv:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}
.cp-hue {
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.cp-alpha {
  background-color: #fff;
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%), linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}
.cp-alpha-fill {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}
.cp-slider-knob {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.cp-dropper {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
}
.cp-dropper[hidden] {
  display: none;
}
.cp-inputs .cp-label {
  color: var(--text-muted);
  font-size: 11px;
}
.cp-hex {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
}
.cp-pct {
  width: 44px;
  text-align: right;
}
.cp-pct[hidden] {
  display: none;
}
.cp-swatches-title {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 11px;
}
.cp-swatch-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
.cp-swatch {
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.cp-swatch:hover {
  box-shadow: 0 0 0 2px var(--accent);
}
.assets-intro {
  margin: 8px 12px 4px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}
.asset-item {
  position: relative;
}
.asset-actions {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  padding-left: 8px;
  background: var(--bg-hover);
  opacity: 0;
  pointer-events: none;
}
.asset-item:hover .asset-actions,
.asset-item:focus-within .asset-actions {
  pointer-events: auto;
}
.asset-item:hover .asset-actions,
.asset-item:focus-within .asset-actions {
  opacity: 1;
}
@media (hover: none) {
  .asset-actions {
    opacity: 1;
  }
}
.asset-action {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}
.layers-panel,
.layers-panel * {
  user-select: none;
  -webkit-user-select: none;
}
.layers-panel input,
.layers-panel textarea {
  user-select: text;
  -webkit-user-select: text;
}
.app {
  user-select: none;
  -webkit-user-select: none;
}
.app input,
.app textarea,
.app [contenteditable='true'] {
  user-select: text;
  -webkit-user-select: text;
}
.px-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  align-content: start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-subtle);
}
.px-empty {
  grid-column: 1 / -1;
  align-self: center;
  padding: 40px 12px;
  text-align: center;
}
.px-slide {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.px-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border);
  overflow: hidden;
}
.px-canvas {
  width: 100%;
  height: 100%;
}
.px-n {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 0 5px;
  border-radius: 3px;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
}
.px-slide figcaption {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.px-notes {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.px-warn {
  color: var(--warning-text);
}
.px-off {
  opacity: 0.45;
  pointer-events: none;
}
.px-suffix {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.px-name {
  flex: 1;
  min-width: 0;
}
.px-state {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.px-progress {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.px-progress[hidden] {
  display: none;
}
.px-progress > div {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s;
}
.px-dialog .share-setting > span:first-child {
  width: 112px;
}
.home-guest {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 8px;
}
.home-guest small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}
.home-signin {
  width: 100%;
  justify-content: center;
}
.app.phone-view {
  height: 100dvh;
  grid-template-columns: 0 minmax(0, 1fr) 0;
}
.app.phone-view .panel,
.app.phone-view .panel-resizer,
.app.phone-view .tool-dock {
  display: none;
}
.app.phone-view .canvas-host,
.app.phone-view canvas {
  touch-action: none;
}
.app.phone-view .topbar {
  gap: 4px;
  padding: 0 4px;
}
.app.phone-view .home-button > span,
.app.phone-view .view-only-badge > span,
.app.phone-view .files-button,
.app.phone-view .topbar-left .icon-button:not(.home-button),
.app.phone-view .topbar-right .icon-button,
.app.phone-view .save-status {
  display: none;
}
.app.phone-view .topbar-center {
  justify-content: flex-start;
  gap: 4px;
}
.app.phone-view .file-name {
  flex: 1;
  min-width: 0;
}
.boot {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
}
.boot-text {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  animation: boot-in 0.2s 0.3s both;
}
.boot-spinner,
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite, boot-in 0.2s 0.3s both;
}
.spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  display: inline-block;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes boot-in {
  from {
    opacity: 0;
  }
}
.home-skeleton-title,
.home-skeleton-thumb,
.home-skeleton-line {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--bg-hover) 50%, var(--bg-subtle) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.home-skeleton-title {
  width: 160px;
  height: 24px;
  margin-bottom: 24px;
}
.home-skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-skeleton-thumb {
  aspect-ratio: 16 / 10;
}
.home-skeleton-line {
  width: 60%;
  height: 12px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .boot-spinner,
  .spinner,
  .home-skeleton-title,
  .home-skeleton-thumb,
  .home-skeleton-line {
    animation: none;
  }
}
.layer-thumb {
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border);
}
.layer-thumb img {
  width: 14px;
  height: 14px;
  object-fit: cover;
  display: block;
}
.layer-effects {
  flex: none;
  display: inline-flex;
  gap: 2px;
  color: var(--text-faint);
}
.tool-dock[data-place='top'] {
  top: 12px;
  bottom: auto;
}
.tool-dock[data-place='left'] {
  left: 12px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  flex-direction: column;
  max-width: none;
  max-height: calc(100% - 24px);
  overflow-x: hidden;
  overflow-y: auto;
}
.tool-dock[data-place='left'] .tool-group {
  flex-direction: column;
}
.tool-dock[data-place='left'] .tool-chevron {
  width: 36px;
  height: 14px;
}
.tool-dock[data-place='left'] .dock-separator {
  width: 22px;
  height: 1px;
  margin: 4px 0;
}
.app.ui-scaled {
  grid-template-rows: calc(44px * var(--ui, 1)) minmax(0, 1fr);
}
.app.ui-scaled .topbar,
.app.ui-scaled .panel,
.app.ui-scaled .tool-dock {
  zoom: var(--ui, 1);
}
.app.ui-scaled:not(.hide-left):not(.hide-right):not(.hide-ui):not(.phone-view) {
  grid-template-columns: calc(var(--left-w) * var(--ui, 1)) minmax(0, 1fr) calc(var(--right-w) * var(--ui, 1));
}
.help-dialog {
  width: min(860px, 100%);
  height: min(620px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
}
.help-dialog .dialog-header {
  gap: 8px;
}
.help-dialog .dialog-header h2 {
  flex: 1;
}
.help-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 8px;
  padding: 0 18px 18px;
}
.help-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.help-nav-item {
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.help-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.help-nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.help-content {
  overflow-y: auto;
  padding: 4px 12px 12px;
  font-size: 13px;
  line-height: 1.55;
}
.help-content h3 {
  margin: 4px 0 10px;
  font-size: 16px;
}
.help-content p {
  margin: 0 0 10px;
}
.help-content ul {
  margin: 0 0 10px;
  padding-left: 18px;
}
.help-content li {
  margin-bottom: 6px;
}
.help-keys {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0;
}
.help-keys dt {
  white-space: nowrap;
}
.help-keys dd {
  margin: 0;
  color: var(--text-muted);
}
.help-keys kbd {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-subtle);
  font: 12px/1.4 inherit;
}
.help-button {
  font-weight: 700;
  font-size: 14px;
}
@media (max-width: 640px) {
  .help-body {
    grid-template-columns: 1fr;
  }
  .help-nav {
    flex-direction: row;
    overflow-x: auto;
  }
}
.image-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tpl-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}
.tpl-intro {
  padding: 0 18px;
}
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding: 14px 18px 18px;
  overflow-y: auto;
}
.tpl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tpl-card:hover,
.tpl-card:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.tpl-card small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.tpl-shape {
  display: grid;
  place-items: center;
  width: 40px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}
.tpl-shape.wide {
  width: 64px;
  height: 40px;
}
.tpl-size {
  margin-top: auto;
  color: var(--text-faint);
  font-size: 11px;
}
.help-link-icon {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: none;
  color: var(--text-faint);
  font: 600 10px/1 inherit;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.panel-section:hover .help-link-icon,
.help-link-icon:focus-visible {
  opacity: 1;
}
.help-link-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.section-header h3 + .help-link-icon {
  margin-right: auto;
}
.section-header h3:has(+ .help-link-icon) {
  margin-right: 0;
}
.link-button {
  padding: 2px 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.link-button:hover {
  text-decoration: underline;
}
.vars-example {
  margin: 8px 8px 0;
}
.settings-dialog {
  width: min(460px, 100%);
}
.settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 18px 18px;
}
.settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-label {
  font-weight: 600;
  font-size: 13px;
}
.settings-choices {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--bg-subtle);
}
.settings-choice {
  flex: 1;
  position: relative;
}
.settings-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.settings-choice span {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.settings-choice input:checked + span {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.settings-choice input:focus-visible + span {
  outline: 2px solid var(--accent);
}
.settings-note {
  margin: -8px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}
.help-dialog {
  width: min(980px, 100%);
  height: min(720px, calc(100vh - 32px));
}
.help-header {
  gap: 10px;
}
.help-header h2 {
  flex: none !important;
}
.help-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-faint);
}
.help-search-wrap:focus-within {
  border-color: var(--accent);
}
.help-search {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.help-body {
  grid-template-columns: 250px 1fr !important;
}
.help-section {
  margin: 12px 10px 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.help-section:first-child {
  margin-top: 0;
}
.help-nav-item {
  padding: 6px 10px !important;
}
.help-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.help-result:hover {
  background: var(--bg-hover);
}
.help-result small {
  color: var(--text-faint);
  font-size: 11px;
}
.help-result span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.help-empty {
  padding: 10px;
  color: var(--text-muted);
  font-size: 13px;
}
.help-content mark {
  border-radius: 2px;
  background: rgb(255 214 0 / 0.35);
  color: inherit;
}
.help-crumb {
  color: var(--text-faint);
  font-size: 12px;
}
.help-content h3 {
  margin: 2px 0 12px !important;
  font-size: 20px !important;
}
.help-content h4 {
  margin: 18px 0 6px;
  font-size: 14px;
}
.help-content p,
.help-content li {
  max-width: 64ch;
}
.help-steps {
  margin: 0 0 12px;
  padding-left: 22px;
}
.help-steps li {
  margin-bottom: 8px;
}
.help-tip {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
}
.help-related {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
}
.help-related h4 {
  width: 100%;
  margin: 0 0 2px;
}
.help-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.help-link:hover {
  text-decoration: underline;
}
.help-shortcuts h4:first-child {
  margin-top: 4px;
}
.sim-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}
.sim-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 18px 18px;
  overflow-y: auto;
}
.sim-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sim-thumb {
  flex: none;
  width: 72px;
  height: 48px;
  border-radius: 6px;
  background: var(--bg-subtle);
}
.sim-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sim-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sim-info small {
  color: var(--text-muted);
}
.code-kind,
.code-sub,
.code-note {
  color: var(--text-faint);
  font-size: 11px;
}
.code-sub {
  margin-top: 4px;
}
.code-note {
  margin: -4px 0 2px 8px;
  overflow-wrap: anywhere;
}
.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.code-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 6px;
  margin: 0 -6px;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: copy;
}
.code-row:hover {
  background: var(--bg-hover);
}
.code-row.ready {
  cursor: pointer;
}
.code-label {
  flex: none;
  color: var(--text-faint);
}
.code-row.ready .code-label {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.code-swatch {
  flex: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.code-controls {
  display: flex;
  gap: 6px;
}
.code-controls .select-wrap:first-child {
  flex: 1;
}
.code-block {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text);
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  tab-size: 4;
  user-select: text;
}
.code-assets {
  display: flex;
  gap: 6px;
}
.code-assets .text-button {
  flex: 1;
}
.code-empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
}
.row.end .link-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.code-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.assets-top {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 0 4px;
}
.assets-top .assets-search-wrap {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.assets-libraries {
  flex: none;
  height: var(--field-h);
  padding: 0 8px;
}
.assets-group.library {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--component);
}
.assets-group.library span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.libraries-dialog {
  width: min(560px, calc(100vw - 32px));
}
.libraries-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 20px 20px;
  max-height: min(70vh, 640px);
  overflow-y: auto;
}
.libraries-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
}
.libraries-status,
.libraries-note,
.libraries-empty {
  margin: 0 0 10px;
  color: var(--text-muted);
  line-height: 1.5;
}
.libraries-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}
.libraries-actions {
  display: flex;
  gap: 8px;
}
.library-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.library-row > svg {
  flex: none;
  color: var(--component);
}
.library-row.muted {
  opacity: 0.7;
}
.library-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.library-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-meta {
  color: var(--text-faint);
  font-size: 11px;
}
.lp {
  --lp-bg: #ffffff;
  --lp-ink: #111111;
  --lp-muted: #5f5f5f;
  --lp-line: #e8e8e8;
  --lp-card: #f6f5f3;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--lp-bg);
  color: var(--lp-ink);
  font-family: Inter, -apple-system, 'Segoe UI', Roboto, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 50;
}
@media (prefers-color-scheme: dark) {
  .lp {
    --lp-bg: #121212;
    --lp-ink: #f3f3f3;
    --lp-muted: #a8a8a8;
    --lp-line: #2a2a2a;
    --lp-card: #1c1c1c;
  }
}
.lp-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 40px;
  background: var(--lp-bg);
  border-bottom: 1px solid var(--lp-line);
}
.lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}
.lp-nav {
  display: flex;
  gap: 24px;
  flex: 1;
}
.lp-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 16px;
}
.lp-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.lp-link,
.lp-secondary {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  padding: 10px 14px;
}
.lp-secondary {
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  padding: 14px 22px;
}
.lp-cta {
  border: none;
  border-radius: 10px;
  background: var(--lp-ink);
  color: var(--lp-bg);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
}
.lp-cta.big {
  font-size: 18px;
  padding: 16px 28px;
}
.lp-hero {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) 7fr;
  gap: 48px;
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
  padding: 72px 40px 56px;
}
.lp-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.lp-hero p {
  margin: 0 0 32px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--lp-muted);
}
.lp-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.lp-shot {
  position: relative;
}
.lp-window {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
  background: var(--lp-card);
  transform: rotate(-1.2deg);
}
.lp-dots {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--lp-line);
}
.lp-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d7d7d7;
}
.lp-window img {
  display: block;
  width: 100%;
  height: auto;
}
.lp-cursor {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 18px solid #9747ff;
  transform: rotate(-30deg);
}
.lp-cursor span {
  position: absolute;
  left: 8px;
  top: 14px;
  transform: rotate(30deg);
  background: #9747ff;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.lp-cursor.one {
  left: 30%;
  top: 44%;
}
.lp-cursor.two {
  left: 72%;
  top: 62%;
  border-bottom-color: #14ae5c;
}
.lp-cursor.two span {
  background: #14ae5c;
}
.lp-bubble {
  position: absolute;
  right: -12px;
  top: 12%;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--lp-bg);
  border: 1px solid var(--lp-line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  font-size: 14px;
  line-height: 1.4;
}
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
}
.lp-badge b {
  padding: 3px 10px;
  border-radius: 999px;
  background: #0d99ff;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.lp-badge:hover {
  border-color: var(--lp-muted);
}
.lp-figma,
.lp-features {
  scroll-margin-top: 72px;
}
.lp-figma {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 48px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 56px 40px;
}
.lp-figma-text {
  grid-column: 1 / -1;
}
.lp-figma-text h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.lp-figma-text p {
  margin: 0;
  max-width: 720px;
  color: var(--lp-muted);
  font-size: 20px;
  line-height: 1.5;
}
.lp-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lp-steps li {
  display: flex;
  gap: 16px;
}
.lp-step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lp-ink);
  color: var(--lp-bg);
  font-size: 17px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lp-steps h3,
.lp-figma-list h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}
.lp-steps p {
  margin: 0;
  color: var(--lp-muted);
  font-size: 16px;
  line-height: 1.5;
}
.lp-figma-list {
  padding: 28px;
  border-radius: 18px;
  background: var(--lp-card);
}
.lp-figma-list ul {
  margin: 0;
  padding-left: 20px;
  color: var(--lp-muted);
  font-size: 16px;
  line-height: 1.8;
}
.lp-features,
.lp-final {
  max-width: 1360px;
  margin: 0 auto;
  padding: 56px 40px;
}
.lp-features h2,
.lp-final h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  letter-spacing: -0.02em;
  margin: 0 0 32px;
}
.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lp-card {
  padding: 28px;
  border-radius: 18px;
  background: var(--lp-card);
}
.lp-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}
.lp-card p {
  margin: 0;
  color: var(--lp-muted);
  font-size: 16px;
  line-height: 1.5;
}
.lp-final {
  text-align: center;
  padding-bottom: 96px;
}
.lp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--lp-line);
  color: var(--lp-muted);
}
.lp-focus {
  max-width: 1360px;
  margin: 0 auto;
  padding: 56px 40px 24px;
}
.lp-focus h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.lp-focus-lead {
  margin: 0 0 32px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--lp-muted);
}
.lp-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.lp-focus-item h3 {
  margin: 24px 0 10px;
  font-size: 26px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-focus-item p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--lp-muted);
}
.lp-spark-inline {
  display: inline-flex;
  color: #8b4dff;
}
.lp-art {
  position: relative;
  height: 300px;
  border-radius: 20px;
  background: var(--lp-card);
  overflow: hidden;
  display: flex;
  font-size: 13px;
}
.lp-art-canvas {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-art-card {
  margin-top: 64px;
  width: 230px;
  padding: 18px;
  border-radius: 14px;
  background: #ffffff;
  color: #1e1e1e;
  box-shadow: 0 0 0 2px #0d99ff, 0 12px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-art-title {
  font-size: 18px;
  font-weight: 700;
}
.lp-art-line {
  height: 8px;
  border-radius: 4px;
  background: #e6e2dc;
}
.lp-art-line.short {
  width: 60%;
}
.lp-mini-bar {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 10px;
  background: #2c2c2c;
  color: #f2f2f2;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}
.lp-mini-bar b,
.lp-mini-bar i,
.lp-mini-bar u {
  width: 22px;
  text-align: center;
}
.lp-mini-field {
  padding: 4px 8px;
  border-radius: 6px;
  background: #383838;
}
.lp-mini-field.wide {
  min-width: 64px;
}
.lp-mini-sep {
  width: 1px;
  height: 16px;
  background: #4a4a4a;
}
.lp-mini-spark {
  display: inline-flex;
  color: #b98cff;
}
.lp-art-panel {
  width: 84px;
  margin: 14px 14px 14px 0;
  border: 2px dashed var(--lp-line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.06em;
}
.lp-art-smart {
  align-items: center;
  justify-content: center;
}
.lp-smart-menu {
  width: min(360px, calc(100% - 32px));
  padding: 6px;
  border-radius: 12px;
  background: #2c2c2c;
  color: #f2f2f2;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}
.lp-smart-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 6px;
  color: #b98cff;
  font-weight: 600;
}
.lp-smart-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
}
.lp-smart-item.primary {
  background: #3a2d52;
}
.lp-smart-item span {
  color: #c2c2c2;
}
.lp-smart-foot {
  margin-top: 4px;
  padding: 8px 10px 6px;
  border-top: 1px solid #444444;
  color: #a6a6a6;
  font-size: 12px;
}
@media (max-width: 900px) {
  .lp-header {
    padding: 12px 16px;
    gap: 12px;
  }
  .lp-nav {
    display: none;
  }
  .lp-actions {
    margin-left: auto;
  }
  .lp-hero {
    grid-template-columns: 1fr;
    padding: 40px 16px;
  }
  .lp-grid {
    grid-template-columns: 1fr;
  }
  .lp-figma {
    grid-template-columns: 1fr;
    padding: 40px 16px;
  }
  .lp-features,
  .lp-final {
    padding: 40px 16px;
  }
  .lp-focus {
    padding: 40px 16px 8px;
  }
  .lp-focus-grid {
    grid-template-columns: 1fr;
  }
  .lp-art-panel {
    width: 48px;
  }
  .lp-bubble {
    display: none;
  }
  .lp-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}
.lp-cta {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .lp-header .lp-cta {
    padding: 10px 14px;
    font-size: 15px;
  }
  .lp-brand span {
    display: none;
  }
}
