:root {
  color-scheme: dark;
  --bg: #08121b;
  --panel: #0e1c27;
  --panel-2: #132431;
  --panel-3: #172d3b;
  --line: #233b49;
  --line-strong: #355462;
  --text: #e8f4f2;
  --muted: #91a8ad;
  --faint: #637b84;
  --cyan: #54ddd5;
  --cyan-dark: #123c42;
  --orange: #f29a52;
  --red: #ff6b61;
  --yellow: #f6c763;
  --green: #61d39b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1100px; min-height: 720px; background: var(--bg); color: var(--text); }
body { height: 100vh; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; color: #061316; background: var(--cyan); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.eyebrow { display: block; color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: 14px; line-height: 1.2; }
h3 { font-size: 12px; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--muted); background: #0a1720; font-size: 10px; }

.app-header { height: 68px; display: grid; grid-template-columns: minmax(300px, 1fr) auto minmax(520px, 1fr); align-items: center; gap: 24px; padding: 0 18px; background: #0b1822; border-bottom: 1px solid var(--line); }
.brand-block { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #4e8c8e; border-radius: 11px; color: var(--cyan); background: linear-gradient(145deg, #173847, #10202c); font-family: Georgia, serif; font-size: 24px; box-shadow: inset 0 0 0 3px #0b1822; }
.stage-badge { display: inline-block; margin-left: 5px; padding: 3px 6px; border-radius: 99px; color: #9debe4; background: #15343a; font-size: 9px; vertical-align: 2px; }
.document-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.document-meta > span:first-child { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 700; }
.save-state { display: flex; align-items: center; gap: 6px; }
.save-state i, .status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(97, 211, 155, .1); }
.save-state.saving i { background: var(--yellow); }
.header-actions { justify-self: end; display: flex; gap: 7px; }
.button, .text-button, .icon-button, .tool-button { border: 1px solid var(--line); background: #12222d; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .12s; }
.button:hover, .text-button:hover, .icon-button:hover, .tool-button:hover { border-color: var(--line-strong); background: #172e3b; }
.button:active, .icon-button:active, .tool-button:active { transform: translateY(1px); }
.button { min-height: 34px; padding: 7px 11px; border-radius: 8px; font-size: 11px; font-weight: 750; }
.button.primary { border-color: #398e8a; color: #072024; background: var(--cyan); }
.button.primary:hover { background: #70e9e1; }
.button.ghost { background: transparent; }
.button:disabled, .icon-button:disabled, .text-button:disabled { opacity: .38; cursor: not-allowed; }
.ui-tooltip { position: relative; }
.ui-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 120;
  right: 0;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: 230px;
  padding: 7px 9px;
  border: 1px solid #496572;
  border-radius: 7px;
  color: #e8f4f2;
  background: #07131b;
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease;
}
.ui-tooltip.tooltip-bottom::after { top: calc(100% + 9px); bottom: auto; }
.ui-tooltip:hover::after, .ui-tooltip:focus-visible::after, .ui-tooltip:focus-within::after { opacity: 1; transform: translateY(0); }

.editor-toolbar { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border-bottom: 1px solid var(--line); background: #0c1a24; }
.toolbar-group { display: flex; align-items: center; gap: 4px; padding-right: 9px; border-right: 1px solid var(--line); }
.toolbar-group:last-of-type { border-right: 0; }
.toolbar-spacer { flex: 1; }
.icon-button { width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; border-radius: 7px; font-size: 17px; }
.tool-button { min-height: 30px; padding: 4px 9px; border-radius: 6px; color: var(--muted); font-size: 11px; }
.tool-button.active { color: var(--cyan); border-color: #3d797b; background: #17383d; }
.tool-button kbd { margin-left: 5px; }
.toggle { display: flex; align-items: center; gap: 5px; padding: 5px 7px; color: var(--muted); cursor: pointer; font-size: 10px; user-select: none; }
.toggle input { width: 13px; height: 13px; accent-color: var(--cyan); }
.compact-field { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
select, input, textarea { border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #0a1720; }
select { min-height: 30px; padding: 4px 28px 4px 8px; font-size: 11px; }
.zoom-control { display: flex; align-items: center; gap: 6px; }
.zoom-control input { width: 85px; accent-color: var(--cyan); }
.zoom-control output { min-width: 38px; color: var(--muted); font-size: 10px; text-align: right; }
.text-button { min-height: 28px; padding: 4px 8px; border-radius: 6px; color: var(--cyan); font-size: 10px; }

.workspace { height: calc(100vh - 116px); display: grid; grid-template-columns: 268px minmax(430px, 1fr) 350px; overflow: hidden; }
.panel { min-height: 0; background: var(--panel); }
.left-panel { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.right-panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-heading { padding: 15px 14px 10px; }
.section-heading { padding: 10px 12px; }
.count-pill { min-width: 24px; padding: 3px 7px; border-radius: 99px; color: var(--muted); background: #172b38; font-size: 10px; text-align: center; }
.search-box { display: flex; align-items: center; gap: 8px; margin: 0 12px 10px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--faint); background: #0a1720; }
.search-box:focus-within { border-color: #3b7477; }
.search-box input { width: 100%; height: 34px; padding: 0; border: 0; outline: 0; background: transparent; font-size: 11px; }
.catalog-tabs, .inspector-tabs { display: grid; padding: 0 10px; border-bottom: 1px solid var(--line); }
.catalog-tabs { grid-template-columns: repeat(4, 1fr); }
.inspector-tabs { grid-template-columns: repeat(3, 1fr); padding-top: 10px; }
.catalog-tabs button, .inspector-tabs button { position: relative; padding: 9px 4px; border: 0; color: var(--faint); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.catalog-tabs button[aria-selected="true"], .inspector-tabs button[aria-selected="true"] { color: var(--text); }
.catalog-tabs button[aria-selected="true"]::after, .inspector-tabs button[aria-selected="true"]::after { content: ""; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; border-radius: 2px 2px 0 0; background: var(--cyan); }
.catalog-list { min-height: 165px; flex: 0 1 43%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 7px; padding: 10px 10px 4px; overflow: auto; }
.catalog-card { min-height: 91px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: linear-gradient(160deg, #162a36, #0d1c27); cursor: grab; user-select: none; }
.catalog-card:hover { color: var(--text); border-color: #3c6c71; background: linear-gradient(160deg, #1b3440, #112632); }
.catalog-card:active { cursor: grabbing; }
.catalog-card img { width: 58px; height: 54px; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(0,0,0,.32)); pointer-events: none; }
.catalog-card.guide-card .guide-preview { width: 70px; height: 34px; display: grid; place-items: center; }
.catalog-card.guide-card svg { width: 66px; overflow: visible; }
.catalog-card strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.catalog-card small { color: var(--faint); font-size: 8px; }
.catalog-hint { padding: 7px 12px 10px; color: var(--faint); font-size: 9px; line-height: 1.4; }
.layers-section { min-height: 180px; flex: 1; display: flex; flex-direction: column; border-top: 1px solid var(--line); overflow: hidden; }
.mini-actions { display: flex; gap: 4px; }
.mini-actions button { width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #12232e; cursor: pointer; }
.layers-list { flex: 1; padding: 2px 8px 10px; overflow: auto; }
.layer-row { display: grid; grid-template-columns: 24px 22px minmax(0,1fr) auto; align-items: center; gap: 4px; min-height: 30px; padding: 3px 5px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 10px; }
.layer-row:hover { background: #132632; }
.layer-row.selected { border-color: #35686c; color: var(--text); background: #17353b; }
.layer-row .layer-icon { text-align: center; color: var(--cyan); }
.layer-row .layer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-row .layer-lock { border: 0; color: var(--faint); background: transparent; cursor: pointer; }
.layer-row .layer-z { color: var(--faint); font-variant-numeric: tabular-nums; }

.canvas-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: 34px minmax(0,1fr) 31px; background: radial-gradient(circle at 50% 40%, #152938 0, #0a151e 62%); }
.canvas-topline, .canvas-status { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: var(--faint); background: rgba(8,18,27,.72); font-size: 9px; }
.canvas-topline { border-bottom: 1px solid rgba(35,59,73,.75); }
.canvas-topline .crumb { display: flex; gap: 7px; }
.canvas-topline b { color: #38505c; }
.canvas-shell { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.canvas-shell.panning, .canvas-shell.panning * { cursor: grabbing !important; }
.device-frame { position: relative; width: 520px; height: 673px; overflow: hidden; border: 8px solid #061018; border-radius: 24px; background: #111; box-shadow: 0 28px 60px rgba(0,0,0,.48), 0 0 0 1px #29434e; }
.device-frame::after { content: ""; position: absolute; inset: 0; z-index: 20; border: 1px solid rgba(255,255,255,.08); border-radius: 15px; pointer-events: none; }
.device-notch { display: none; position: absolute; z-index: 30; top: 0; left: 50%; width: 112px; height: 24px; transform: translateX(-50%); border-radius: 0 0 14px 14px; background: #061018; pointer-events: none; }
.device-frame.ios .device-notch { display: block; }
#editor-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: default; background: #040b11; }
#editor-canvas[data-tool="pan"] { cursor: grab; }
#grid-overlay[hidden] { display: none; }
.editor-object { cursor: move; }
.editor-object.locked { cursor: not-allowed; opacity: .74; }
.editor-object image { filter: drop-shadow(0 7px 6px rgba(1,8,13,.46)); }
.editor-object:hover .hover-outline { opacity: 1; }
.hover-outline { opacity: 0; fill: none; stroke: rgba(84,221,213,.58); stroke-width: 2; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.guide-path { fill: none; stroke-linecap: round; stroke-linejoin: round; cursor: pointer; }
.guide-path:hover { filter: url(#selection-glow); }
.selection-box { fill: rgba(84,221,213,.035); stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 7 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.selection-handle { fill: #e7ffff; stroke: #15535a; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: nwse-resize; }
.rotation-handle { fill: var(--orange); stroke: #613614; cursor: crosshair; }
.selection-stem { stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; }
.guide-point-handle { fill: #dffefd; stroke: #125b62; stroke-width: 3; vector-effect: non-scaling-stroke; cursor: move; }
.guide-point-handle.endpoint { fill: var(--orange); stroke: #6f3f17; }
.guide-point-handle:hover, .guide-point-handle:focus { filter: url(#selection-glow); outline: none; }
.destination-target { cursor: crosshair; }
.destination-target.locked { cursor: not-allowed; }
.destination-hit-target { fill: transparent; stroke: none; }
.destination-target-ring { fill: #17242d; stroke: #f2b46f; stroke-width: 2; vector-effect: non-scaling-stroke; }
.destination-target-dot { fill: #f2b46f; pointer-events: none; }
.destination-target:hover .destination-target-ring, .destination-target:focus .destination-target-ring { fill: #3a2a1c; stroke: #ffd393; stroke-width: 3; filter: url(#selection-glow); }
.destination-target:focus { outline: none; }
.hit-overlay { fill: rgba(242,154,82,.11); stroke: var(--orange); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.effect-overlay { fill: rgba(255,107,97,.07); stroke: var(--red); stroke-width: 2; stroke-dasharray: 10 7; vector-effect: non-scaling-stroke; }
.safe-overlay { fill: rgba(84,221,213,.025); stroke: rgba(84,221,213,.72); stroke-width: 2; stroke-dasharray: 8 6; vector-effect: non-scaling-stroke; }
.critical-overlay { fill: rgba(246,199,99,.025); stroke: rgba(246,199,99,.62); stroke-width: 2; stroke-dasharray: 12 8; vector-effect: non-scaling-stroke; }
.hud-overlay { fill: rgba(255,107,97,.13); stroke: rgba(255,107,97,.72); stroke-width: 2; vector-effect: non-scaling-stroke; }
.overlay-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; paint-order: stroke; stroke: #08121b; stroke-width: 4px; stroke-linejoin: round; }
.marker-label { font-size: 10px; font-weight: 800; fill: #c9fbf7; paint-order: stroke; stroke: #0a1720; stroke-width: 4px; }
.warning-ring { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.canvas-status { border-top: 1px solid rgba(35,59,73,.75); }
.canvas-status > div, .coordinate-readout { display: flex; align-items: center; gap: 8px; }
.coordinate-readout { gap: 15px; font-variant-numeric: tabular-nums; }

.inspector-content { flex: 1; padding: 12px; overflow-x: hidden; overflow-y: auto; }
.empty-inspector { min-height: 260px; display: grid; place-items: center; padding: 25px; color: var(--faint); text-align: center; }
.empty-inspector .empty-icon { display: block; margin-bottom: 10px; color: #305361; font-size: 36px; }
.empty-inspector p { margin-top: 6px; line-height: 1.5; }
.empty-help-button { margin-top: 13px; }
.inspector-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.inspector-title h2 { font-size: 16px; }
.inspector-title p { margin-top: 3px; color: var(--faint); font-size: 9px; }
.inspector-actions { display: flex; gap: 4px; }
.inspector-actions button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #11222d; cursor: pointer; }
.form-section { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 9px; background: #0b1923; overflow: hidden; }
.form-section.flag-section { position: relative; overflow: visible; }
.form-section > h3 { padding: 9px 10px; border-bottom: 1px solid var(--line); color: #afc6c9; background: #10222d; letter-spacing: .04em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 10px; }
.form-grid.one { grid-template-columns: 1fr; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--faint); font-size: 9px; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 31px; padding: 5px 7px; font-size: 11px; }
.field textarea { min-height: 68px; resize: vertical; line-height: 1.4; }
.field small { color: #58717a; line-height: 1.3; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; padding: 10px; }
.check-chip { position: relative; display: flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 5px 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 9px; }
.check-chip:has(input:checked) { color: #bff8f2; border-color: #386f72; background: #143238; }
.check-chip input { accent-color: var(--cyan); }
.check-chip-label { min-width: 0; flex: 1; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.check-chip-label span { min-width: 0; overflow-wrap: anywhere; }
.info-tip { position: relative; flex: 0 0 16px; width: 16px; height: 16px; padding: 0; border: 1px solid #48616b; border-radius: 50%; color: #a9c8cd; background: #122731; font: 700 9px/14px Georgia, serif; text-align: center; cursor: help; }
.info-tip:hover, .info-tip:focus-visible { border-color: var(--cyan); color: #dffffc; outline: none; }
.info-tip::before, .info-tip::after { position: absolute; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .12s ease, transform .12s ease; }
.info-tip::before { content: ""; right: 3px; bottom: calc(100% + 3px); border: 5px solid transparent; border-top-color: #d5e9e8; transform: translateY(3px); }
.info-tip::after { content: attr(data-tooltip); right: -5px; bottom: calc(100% + 12px); width: 165px; padding: 8px 9px; border: 1px solid #d5e9e8; border-radius: 7px; color: #eaf8f7; background: #07131b; box-shadow: 0 8px 24px rgba(0,0,0,.42); font: 500 10px/1.45 Inter, system-ui, sans-serif; letter-spacing: 0; text-align: left; white-space: normal; transform: translateY(3px); }
.check-chip:nth-child(odd) .info-tip::after { right: auto; left: -5px; }
.info-tip:hover::before, .info-tip:hover::after, .info-tip:focus-visible::before, .info-tip:focus-visible::after { opacity: 1; transform: translateY(0); }
.asset-readout { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #0a1720; }
.asset-readout img { width: 42px; height: 42px; object-fit: contain; }
.asset-readout code { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--cyan); font-size: 9px; }
.inline-warning { padding: 8px 9px; border: 1px solid #6e5832; border-radius: 7px; color: #edcd8e; background: #2b2519; font-size: 9px; line-height: 1.45; }
.connection-list { display: flex; flex-direction: column; gap: 8px; }
.connection-card { padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #0a1720; }
.connection-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.connection-card header strong { color: var(--cyan); font-size: 10px; }
.connection-card header button { border: 0; color: var(--red); background: transparent; cursor: pointer; }
.connection-arrow { padding: 5px 0; color: var(--faint); font-size: 9px; text-align: center; }
.add-connection { width: 100%; margin-top: 9px; }
.validation-dock { flex: 0 0 205px; border-top: 1px solid var(--line); background: #0b1923; overflow: hidden; }
.validation-summary { display: flex; gap: 6px; padding: 0 12px 8px; }
.validation-chip { padding: 4px 7px; border-radius: 99px; font-size: 9px; font-weight: 750; }
.validation-chip.error { color: #ffc0bb; background: #4a2325; }
.validation-chip.warning { color: #f9dfa2; background: #42351e; }
.validation-chip.ok { color: #b9f2d6; background: #18392d; }
.validation-preview { max-height: 130px; padding: 0 9px 8px; overflow: auto; }
.validation-item { display: grid; grid-template-columns: 15px minmax(0,1fr); gap: 5px; padding: 5px 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.validation-item.error i { color: var(--red); }
.validation-item.warning i { color: var(--yellow); }

.validation-dialog { width: min(760px, calc(100vw - 40px)); max-height: min(800px, calc(100vh - 40px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--text); background: var(--panel); box-shadow: var(--shadow); }
.validation-dialog::backdrop { background: rgba(2,8,13,.76); backdrop-filter: blur(4px); }
.dialog-card { display: flex; flex-direction: column; max-height: inherit; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.validation-report { min-height: 220px; overflow: auto; padding: 12px 15px; }
.report-group { margin-bottom: 14px; }
.report-group h3 { margin-bottom: 6px; color: var(--muted); }
.report-row { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 6px; padding: 8px; border-bottom: 1px solid rgba(35,59,73,.55); font-size: 11px; line-height: 1.4; }
.report-row.error span:first-child { color: var(--red); }
.report-row.warning span:first-child { color: var(--yellow); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 7px; padding: 11px 15px; border-top: 1px solid var(--line); }
.onboarding-dialog { width: min(850px, calc(100vw - 40px)); }
.welcome-content { padding: 20px; overflow: auto; }
.welcome-intro { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 13px; padding: 14px; border: 1px solid #315462; border-radius: 11px; background: linear-gradient(135deg, #14303a, #0d202b); }
.welcome-intro strong { font-size: 14px; }
.welcome-intro p { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.welcome-symbol { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--cyan); background: #102830; font-size: 28px; }
.workflow-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin: 16px 0 0; padding: 0; list-style: none; }
.workflow-cards li { min-height: 132px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #0a1720; }
.workflow-cards li > span { width: 25px; height: 25px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%; color: #072024; background: var(--cyan); font-size: 11px; font-weight: 850; }
.workflow-cards strong { font-size: 12px; }
.workflow-cards p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.welcome-tip { margin-top: 14px; padding: 9px 11px; border-radius: 8px; color: #c5d7d8; background: #132631; font-size: 10px; }
.onboarding-actions { justify-content: space-between; }

#help-dialog { width: min(930px, calc(100vw - 40px)); }
.help-card { min-height: min(620px, calc(100vh - 40px)); }
.help-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: 184px minmax(0,1fr); overflow: hidden; }
.help-tabs { padding: 12px 9px; border-right: 1px solid var(--line); background: #0a1720; }
.help-tabs button { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; text-align: left; }
.help-tabs button:hover { color: var(--text); background: #112632; }
.help-tabs button[aria-selected="true"] { color: #cafffa; border-color: #35676c; background: #15343a; }
.help-panels { min-height: 0; padding: 22px 24px; overflow: auto; }
.help-panels section > h3 { margin: 5px 0 16px; font-size: 18px; }
.help-steps { margin: 0; padding: 0; list-style: none; counter-reset: help-step; }
.help-steps li { position: relative; display: grid; gap: 3px; padding: 3px 0 15px 39px; counter-increment: help-step; }
.help-steps li::before { content: counter(help-step); position: absolute; top: 0; left: 0; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #3c7174; border-radius: 50%; color: var(--cyan); background: #102a32; font-size: 10px; font-weight: 800; }
.help-steps li:not(:last-child)::after { content: ""; position: absolute; top: 27px; bottom: 1px; left: 12px; width: 1px; background: var(--line); }
.help-steps b, .concept-list b, .help-topic-grid b { font-size: 11px; }
.help-steps span, .concept-list p, .help-topic-grid p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.help-tour-button { margin-top: 5px; }
.help-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.help-topic-grid article, .concept-list article { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #0a1720; }
.help-topic-grid p, .concept-list p { margin-top: 5px; }
.concept-list { display: grid; gap: 9px; }
.delivery-checklist { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: delivery; }
.delivery-checklist li { position: relative; padding: 11px 12px 11px 38px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #0a1720; font-size: 10px; line-height: 1.5; counter-increment: delivery; }
.delivery-checklist li::before { content: "✓"; position: absolute; top: 10px; left: 13px; color: var(--green); font-weight: 900; }
.delivery-checklist code { color: var(--cyan); }
.shortcut-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 10px 12px; padding: 18px; color: var(--muted); font-size: 11px; }
.help-panels .shortcut-grid { padding: 0; }
.help-button { position: fixed; z-index: 50; right: 366px; bottom: 40px; min-width: 78px; height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--cyan); background: #102630; box-shadow: 0 7px 18px rgba(0,0,0,.28); cursor: pointer; }
.help-button span { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #47747a; border-radius: 50%; font: 700 10px/1 Georgia, serif; }
.help-button b { font-size: 10px; }
.help-button.ui-tooltip::after { right: 0; }

.tour-layer { position: fixed; z-index: 200; inset: 0; }
.tour-layer[hidden] { display: none; }
.tour-spotlight { position: fixed; z-index: 201; border: 2px solid var(--cyan); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(2,8,13,.82), 0 0 0 5px rgba(84,221,213,.13), 0 12px 35px rgba(0,0,0,.45); pointer-events: none; transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease; }
.tour-card { position: fixed; z-index: 202; width: 340px; padding: 15px; border: 1px solid #4a7780; border-radius: 12px; color: var(--text); background: #10232e; box-shadow: 0 22px 65px rgba(0,0,0,.6); outline: none; }
.tour-card-header { display: flex; align-items: center; justify-content: space-between; }
.tour-card-header button { width: 25px; height: 25px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 18px; }
.tour-card h2 { margin-top: 5px; font-size: 17px; }
.tour-card > p { min-height: 45px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.tour-dots { display: flex; gap: 5px; margin: 13px 0; }
.tour-dots i { width: 18px; height: 3px; border-radius: 3px; background: #294451; }
.tour-dots i.active { background: var(--cyan); }
.tour-actions { display: flex; justify-content: space-between; gap: 8px; }
.tour-actions .button { min-width: 75px; }
.toast-region { position: fixed; z-index: 90; right: 17px; bottom: 17px; display: flex; flex-direction: column; gap: 7px; pointer-events: none; }
.toast { max-width: 340px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: #16303b; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .18s ease-out; }
.toast.error { border-color: #77413f; background: #3b2326; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1320px) {
  .workspace { grid-template-columns: 238px minmax(420px, 1fr) 326px; }
  .editor-toolbar { gap: 5px; padding-inline: 10px; }
  .toolbar-group { padding-right: 5px; }
  .toggle { padding-inline: 4px; }
  .zoom-control input { width: 62px; }
  .help-button { right: 342px; }
}

@media (max-height: 790px) {
  .catalog-list { flex-basis: 35%; }
  .validation-dock { flex-basis: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
