.smart-autoplay-options {
  margin-top: 24px;
}
.autoplay-adjustments {
  margin-top: 20px;
}
.autoplay-adjustments summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
}
.autoplay-adjustments summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
:root {
  --primary: #6550d9;
  --primary-hover: #503db8;
  --ink: #252332;
  --muted: #706d80;
  --surface: #fff;
  --canvas: #f5f5f9;
  --line: #e6e5ed;
  --soft: #f0edff;
  --danger: #b52d48;
  --success: #217355;
  --radius: 10px;
  --font: "Segoe UI", Arial, sans-serif;
  --display: "Trebuchet MS", "Segoe UI", sans-serif;
  --scroll-thumb: #bcb8cb;
  --scroll-track: #f3f2f7;
  --scroll-hover: #9590a8;
  --scroll-active: #706980;
  color-scheme: light;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
select,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    border-color 0.15s;
}
a {
  color: var(--primary);
}
[hidden] {
  display: none !important;
}
textarea {
  resize: none;
  min-height: 108px;
  line-height: 1.55;
}
button svg {
  width: 18px;
  height: 18px;
}
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 183px;
}
.brand > span {
  font: 700 28px var(--display);
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-studio {
  font: 600 10px var(--font);
  letter-spacing: 2px;
  color: var(--muted);
  padding-top: 5px;
}
.project-heading {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.project-switch {
  display: flex;
  gap: 15px;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  font-weight: 600;
  font-size: 15px;
  text-align: left;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-switch:hover {
  color: var(--primary);
}
.save-status {
  color: var(--muted);
  font-size: 12px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.primary {
  background: var(--primary);
  color: white;
}
.primary:not(:disabled):hover {
  background: var(--primary-hover);
}
.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.secondary:not(:disabled):hover {
  background: var(--canvas);
  border-color: #c8c3d9;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--soft);
  border: 1px solid #ded8fc;
  color: var(--primary);
  font-size: 14px;
  font-weight: bold;
  margin-right: 7px;
}
.avatar:hover {
  background: #e5ddff;
}
.workspace {
  display: grid;
  grid-template-columns: 235px minmax(360px, 1fr) 385px;
  min-height: calc(100vh - 84px);
}
.sidebar {
  background: #fbfbfd;
  border-right: 1px solid var(--line);
  padding: 25px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 9px 17px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: var(--muted);
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 19px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #eae7f2;
  color: var(--ink);
}
.icon-button.selected {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 5px #27204412;
}
.danger {
  color: var(--danger);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--muted);
  padding: 12px;
  font-size: 14px;
  text-align: left;
}
.nav-item > span:first-child {
  font-size: 20px;
}
.nav-item:hover {
  background: #f0eef6;
}
.nav-item.selected {
  background: var(--soft);
  color: var(--primary);
  font-weight: 600;
}
.count {
  margin-left: auto;
  background: #e4defe;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
}
.sidebar-divider {
  height: 1px;
  background: var(--line);
  margin: 24px 9px 17px;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 1.3px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 9px 9px;
}
.step-item {
  display: flex;
  position: relative;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 10px;
  margin: 5px 0;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  color: var(--ink);
}
.step-item:hover {
  background: #f0eef6;
}
.step-item.active {
  background: var(--surface);
  border-color: #cec5f7;
  box-shadow: 0 3px 12px #38304808;
}
.step-num {
  display: grid;
  place-items: center;
  width: 31px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font:
    12px ui-monospace,
    monospace;
  color: var(--muted);
  background: var(--surface);
  flex-shrink: 0;
}
.active .step-num {
  color: var(--primary);
  border-color: #ded7fa;
  background: #f7f5ff;
}
.step-text {
  min-width: 0;
}
.step-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 142px;
}
.step-type {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.add-stage {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: transparent;
  border: 1px dashed #cfcbdc;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
}
.add-stage:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--soft);
}
.sidebar-foot {
  margin-top: auto;
  padding: 70px 8px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.sidebar-foot strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.sidebar-foot span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.little-logo {
  font-size: 25px;
  color: #aaa2c2;
}
.editor {
  min-width: 0;
  background: var(--surface);
  padding: 32px 34px 0;
  display: flex;
  flex-direction: column;
}
.editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 26px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.breadcrumb span {
  padding: 0 8px;
  color: #b1adbf;
}
h1 {
  font: 700 26px var(--display);
  letter-spacing: -0.6px;
  margin: 0;
  overflow-wrap: anywhere;
}
.stage-actions {
  display: flex;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  margin-bottom: 25px;
}
.tabs button {
  position: relative;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.tabs button.active {
  color: var(--primary);
  font-weight: 600;
}
.tabs button.active:after {
  content: "";
  height: 2px;
  background: var(--primary);
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}
.tabs button:hover {
  color: var(--primary);
}
.form-panel {
  padding-bottom: 26px;
  min-height: 520px;
}
.form-section {
  padding-bottom: 23px;
  margin-bottom: 23px;
  border-bottom: 1px solid var(--line);
}
.opening-state {
  margin-bottom: 19px;
}
.opening-state .field-help {
  min-height: 3em;
}
.form-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.form-section h2 {
  font-size: 15px;
  margin: 0 0 6px;
  letter-spacing: -0.1px;
}
.section-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 19px;
}
.field {
  display: block;
  margin: 0 0 19px;
  min-width: 0;
}
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  gap: 8px;
}
.field input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
.field select,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid #dcd9e6;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 14px;
  min-height: 42px;
}
.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #bdb4d6;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  outline: 2px solid #6550d920;
  outline-offset: 0;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #aaa5b7;
}
.field select {
  padding-right: 10px;
}
.field-help {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 7px;
  font-weight: 400;
}
.field input[type="color"] {
  width: 45px;
  height: 35px;
  background: white;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 6px;
  cursor: pointer;
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.variable-tag {
  display: inline-block;
  background: var(--soft);
  border: 1px solid #e1dbfc;
  border-radius: 5px;
  padding: 3px 7px;
  color: var(--primary);
  font:
    12px ui-monospace,
    monospace;
}
.variables {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -8px;
  margin-bottom: 20px;
}
.variables button {
  border: 1px solid #e1dbfc;
  background: var(--soft);
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 5px;
  font:
    12px ui-monospace,
    monospace;
}
.variables button:hover {
  background: #e5defc;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
}
.toggle-row strong {
  font-size: 14px;
}
.toggle-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.toggle-row input {
  appearance: none;
  width: 38px;
  height: 22px;
  background: #c9c5d4;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.toggle-row input:before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  position: absolute;
  top: 3px;
  left: 3px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px #0002;
  transition: transform 0.2s;
}
.toggle-row input:checked {
  background: var(--primary);
}
.toggle-row input:checked:before {
  transform: translateX(16px);
}
.info-box {
  background: #f7f6fc;
  border: 1px solid #eae6f7;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.info-box > span {
  color: var(--primary);
  font-size: 19px;
  line-height: 1.2;
}
.info-box p {
  margin: 0;
}
.info-box strong {
  color: var(--ink);
  font-weight: 600;
}
.media-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  min-height: 158px;
  border: 1px dashed #cbc4de;
  background: #faf9fd;
  border-radius: 12px;
  width: 100%;
  color: var(--muted);
  padding: 20px;
  text-align: center;
  margin-bottom: 17px;
}
.media-drop:hover {
  border-color: var(--primary);
  background: var(--soft);
}
.media-drop .media-symbol {
  font-size: 32px;
  color: var(--primary);
  width: 52px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--soft);
}
.media-drop strong {
  font-size: 14px;
  color: var(--ink);
}
.media-drop small {
  font-size: 12px;
}
.media-url {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.media-url .field {
  flex: 1;
  margin-bottom: 10px;
}
.media-url .btn {
  margin-top: 26px;
}
.timeline {
  background: #f7f6fb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 18px 0;
}
.timeline-track {
  height: 27px;
  background: repeating-linear-gradient(
    90deg,
    #e0dbea 0px,
    #e0dbea 1px,
    transparent 1px,
    transparent 14px
  );
  border-bottom: 1px solid #d6d0e3;
  position: relative;
  margin: 7px 0 12px;
}
.timeline-bar {
  position: absolute;
  inset: 8px 0 0;
  background: #d5ccfa;
  border-radius: 4px;
}
.timeline-marker {
  position: absolute;
  width: 2px;
  height: 36px;
  background: var(--primary);
  top: -2px;
  left: 25%;
}
.timeline-marker:before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
}
.timeline-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.option-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfcfe;
  padding: 14px;
  margin-bottom: 12px;
}
.option-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.option-card .field {
  margin-bottom: 10px;
}
.option-card .field-row {
  grid-template-columns: 1fr 85px;
}
.option-card .field-label {
  font-size: 12px;
}
.option-card input {
  background: white;
}
.editor-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
}
.key-hint {
  white-space: nowrap;
}
.preview-panel {
  border-left: 1px solid var(--line);
  background: #f5f5f9;
  padding: 25px 28px 22px;
  position: sticky;
  top: 0;
  height: fit-content;
  min-height: calc(100vh - 84px);
}
.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.preview-controls {
  display: flex;
  gap: 3px;
  background: #eae8f1;
  padding: 3px;
  border-radius: 8px;
}
.phone-wrap {
  display: flex;
  justify-content: center;
}
.phone {
  position: relative;
  width: 300px;
  height: 586px;
  background: #14121a;
  border: 6px solid #292631;
  border-radius: 34px;
  overflow: hidden;
  box-shadow:
    0 18px 35px #2420371c,
    0 1px 3px #0003;
}
.phone-camera {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 7px;
  width: 66px;
  height: 15px;
  border-radius: 10px;
  background: #15131b;
  transform: translateX(-50%);
  pointer-events: none;
}
.phone iframe {
  border: 0;
  width: 100%;
  height: 100%;
  background: #121117;
}
.phone.wide {
  width: 100%;
  height: 470px;
  border-radius: 17px;
}
.phone.wide .phone-camera {
  display: none;
}
.preview-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  margin: 19px 0 14px;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}
.preview-test {
  display: block;
  margin: auto;
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  padding: 8px;
}
.preview-test:hover {
  text-decoration: underline;
}
.preview-tip {
  display: flex;
  justify-content: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.preview-tip p {
  margin: 0;
}
.preview-tip > span {
  color: #9a91b8;
  font-size: 18px;
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 90px #17102f40;
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: 90svh;
  overflow: auto;
  color: var(--ink);
  background: white;
}
dialog::backdrop {
  background: #17102570;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 3;
}
.dialog-header h2 {
  font: 700 21px var(--display);
  margin: 0;
  letter-spacing: -0.4px;
}
#dialogBody {
  padding: 24px;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.auth-intro {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 23px;
}
.auth-switch {
  background: none;
  border: 0;
  display: block;
  margin: 17px auto 0;
  color: var(--primary);
  font-size: 14px;
}
.form-error {
  background: #fff0f2;
  color: #9b2640;
  border: 1px solid #f6c8d2;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
  margin-bottom: 14px;
}
.banner {
  background: #fff1f3;
  color: #98203a;
  font-size: 13px;
  padding: 12px 28px;
  white-space: pre-line;
  border-bottom: 1px solid #f0ccd4;
}
.banner button {
  float: right;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
}
.project-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.project-card .project-open {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  flex: 1;
  min-width: 0;
  color: var(--ink);
}
.project-card .project-open strong {
  display: block;
  font-size: 15px;
}
.project-card small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.pill {
  background: var(--soft);
  color: var(--primary);
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 11px;
}
.project-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.media-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.media-thumb {
  height: 95px;
  background: #f3f0fa;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: var(--primary);
  width: 100%;
  object-fit: cover;
}
.media-meta {
  padding: 10px;
}
.media-meta strong {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 12px;
}
.media-meta small {
  color: var(--muted);
  font-size: 11px;
}
.media-card .actions {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 8px;
}
.empty {
  padding: 32px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.upload-zone {
  border: 1px dashed #bdb3dc;
  border-radius: 10px;
  padding: 16px;
  background: #f9f7ff;
  margin-bottom: 20px;
}
.upload-zone label {
  font-weight: 600;
  font-size: 14px;
  display: block;
  margin-bottom: 9px;
}
.upload-zone input {
  width: 100%;
  font-size: 12px;
}
progress {
  accent-color: var(--primary);
  width: 100%;
  height: 7px;
}
.upload-state {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.search-row {
  display: flex;
  gap: 8px;
}
.search-row .field {
  flex: 1;
}
.search-row button {
  margin-top: 27px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  background: #282333;
  color: white;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 14px;
  box-shadow: 0 8px 28px #0003;
  max-width: 90vw;
}
.full-preview {
  width: 620px;
}
.full-preview #dialogBody {
  padding: 0;
  background: #0e0c13;
}
.full-preview iframe {
  border: 0;
  display: block;
  margin: auto;
  width: 100%;
  max-width: 480px;
  height: 76svh;
}
.inline-link {
  font-size: 13px;
}
.color-row {
  display: flex;
  gap: 24px;
}
.color-row .field {
  margin-bottom: 0;
}
.list-muted {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.status-line {
  font-size: 13px;
  color: var(--success);
  margin-bottom: 15px;
}
.danger-btn {
  background: var(--danger);
  color: white;
}
.danger-btn:hover {
  background: #91203b;
}
.template-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.template-card strong {
  font-size: 14px;
}
.template-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: 260px minmax(450px, 1fr) 430px;
  }
  .editor {
    padding-left: 50px;
    padding-right: 50px;
  }
  .form-panel {
    max-width: 770px;
    width: 100%;
    margin: auto;
  }
  .phone {
    width: 322px;
    height: 625px;
  }
}
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 200px minmax(330px, 1fr) 325px;
  }
  .sidebar {
    padding: 22px 10px;
  }
  .editor {
    padding: 26px 23px 0;
  }
  .preview-panel {
    padding: 23px 15px;
  }
  .phone {
    width: 274px;
    height: 560px;
  }
  .brand {
    min-width: 150px;
  }
  .topbar {
    gap: 15px;
    padding: 0 20px;
  }
  .tabs {
    gap: 17px;
  }
  .step-name {
    max-width: 122px;
  }
  .stage-actions {
    gap: 0;
  }
  .stage-actions .icon-button {
    width: 25px;
  }
  .key-hint {
    display: none;
  }
}
@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 190px minmax(300px, 1fr);
  }
  .preview-panel {
    grid-column: 2;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    min-height: 0;
  }
  .sidebar {
    grid-row: 1/3;
  }
  .phone {
    width: 300px;
    height: 560px;
  }
  .project-heading {
    max-width: 210px;
  }
  .brand {
    min-width: 115px;
  }
  .brand-studio {
    display: none;
  }
  .top-actions {
    gap: 7px;
  }
  .top-actions .btn {
    padding: 9px 12px;
  }
  .editor {
    min-height: 720px;
  }
  .preview-tip {
    display: none;
  }
}
@media (max-width: 680px) {
  .topbar {
    height: auto;
    min-height: 100px;
    flex-wrap: wrap;
    padding: 13px 16px;
    gap: 10px 16px;
  }
  .brand {
    min-width: 92px;
  }
  .brand > span {
    font-size: 24px;
  }
  .project-heading {
    max-width: calc(100vw - 148px);
    flex: 1;
  }
  .project-switch {
    max-width: 100%;
    font-size: 13px;
  }
  .save-status {
    font-size: 10px;
  }
  .top-actions {
    width: 100%;
    margin: 0;
    justify-content: flex-end;
  }
  .top-actions .avatar {
    margin-right: auto;
  }
  .top-actions .btn {
    font-size: 12px;
    min-height: 36px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    padding: 13px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-divider,
  .sidebar-foot,
  .section-label {
    display: none;
  }
  .sidebar-header {
    margin: 0 0 5px;
  }
  .add-stage {
    margin-top: 8px;
    padding: 9px;
  }
  .nav-item {
    width: auto;
    display: inline-flex;
    min-height: 42px;
  }
  .sidebar {
    display: block;
  }
  .nav-item .count {
    margin-left: 4px;
  }
  #steps {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 4px;
  }
  .step-item {
    width: 165px;
    min-width: 165px;
    margin: 0;
    padding: 9px;
  }
  .step-num {
    width: 25px;
  }
  .step-name {
    max-width: 104px;
    font-size: 12px;
  }
  .step-type {
    font-size: 10px;
  }
  .editor {
    padding: 24px 18px 0;
    min-height: 0;
  }
  .editor-heading {
    margin-bottom: 22px;
  }
  .stage-actions .icon-button {
    width: 27px;
  }
  .tabs {
    gap: 20px;
  }
  .tabs button {
    font-size: 12px;
  }
  .form-panel {
    min-height: 0;
  }
  .field-row {
    gap: 12px;
  }
  .preview-panel {
    padding: 24px 18px;
  }
  .preview-heading {
    max-width: 330px;
    margin-left: auto;
    margin-right: auto;
  }
  .phone {
    height: 570px;
  }
  .editor-bottom {
    font-size: 11px;
  }
  .key-hint {
    display: none;
  }
  .dialog-header {
    padding: 18px;
  }
  #dialogBody {
    padding: 18px;
  }
  .form-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 24px;
  }
  .option-card .field-row {
    grid-template-columns: 1fr 70px;
  }
  .media-grid {
    gap: 8px;
  }
  .preview-caption {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  button,
  input,
  select,
  textarea {
    border: 1px solid ButtonText;
  }
  .toggle-row input {
    appearance: auto;
  }
}
.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.report-toolbar select {
  padding: 9px;
  border: 1px solid var(--line, #e6e5ed);
  border-radius: 8px;
  background: white;
  color: inherit;
}
.analytics-traffic {
  min-width: 0;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
}
dialog.analytics-report {
  width: 900px;
}
.studio-workbench .analytics-traffic .field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.analytics-traffic .field-help {
  font-size: 12px;
}
.analytics-traffic legend {
  font-weight: 600;
  padding: 0 6px;
}
.analytics-traffic select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 600px) {
  .studio-workbench .analytics-traffic .field-row,
  #analyticsExactTraffic .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
#analyticsRange {
  margin-top: 16px;
}
#rangeError:empty {
  display: none;
}
@media (max-width: 600px) {
  #analyticsRange .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
  #analyticsRange input {
    min-width: 0;
    width: 100%;
  }
}
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.analytics-cards > div {
  padding: 16px 12px;
  background: #f0edff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.analytics-cards strong {
  font-size: 30px;
  color: #503db8;
}
.analytics-cards small,
.help {
  color: #706d80;
  line-height: 1.6;
  font-size: 13px;
}
.analytics-table {
  overflow-x: auto;
  margin: 20px 0;
}
.analytics-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.analytics-table th,
.analytics-table td {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid #e6e5ed;
}
.analytics-table td {
  white-space: nowrap;
}
.funnel-track {
  height: 5px;
  background: #f0edff;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.funnel-track span {
  display: block;
  height: 100%;
  background: #6550d9;
}
.analytics-empty,
.integration-status {
  padding: 16px;
  background: #f5f5f9;
  border-radius: 10px;
  line-height: 1.6;
}
#metaForm .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
#metaForm input:not([type="checkbox"]) {
  width: 100%;
  padding: 12px;
  border: 1px solid #e6e5ed;
  border-radius: 8px;
  font: inherit;
}
@media (max-width: 480px) {
  .analytics-cards {
    grid-template-columns: 1fr;
  }
  .analytics-cards > div {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .analytics-cards small {
    grid-column: 1/-1;
  }
}
