:root {
  color-scheme: dark;
  --page: #090a0b;
  --panel: #101112;
  --panel-soft: #141516;
  --panel-raised: #191a1c;
  --line: #27292c;
  --line-soft: rgba(255, 255, 255, 0.065);
  --text: #f4f4f5;
  --muted: #898b92;
  --muted-strong: #b6b8bd;
  --accent: #d96670;
  --accent-bright: #ed7a84;
  --accent-soft: rgba(217, 102, 112, 0.12);
  --success: #8dc9a4;
  --header-height: 78px;
  --sidebar-width: 258px;
  --properties-width: 286px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.editor-shell {
  display: grid;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template:
    "header header header" var(--header-height)
    "sidebar workspace properties" minmax(0, 1fr)
    / var(--sidebar-width) minmax(390px, 1fr) var(--properties-width);
  background: var(--page);
}

.editor-header {
  z-index: 20;
  display: flex;
  grid-area: header;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 0 22px 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(13, 14, 15, 0.94);
  backdrop-filter: blur(18px);
}

.editor-header__identity,
.editor-header__actions,
.brand,
.project-name,
.save-status {
  display: flex;
  align-items: center;
}

.editor-header__identity {
  min-width: 0;
  gap: 22px;
}

.brand {
  flex: 0 0 auto;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: var(--panel-raised);
  font-family: "Manrope", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.brand__mark span:first-child {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--accent);
  color: #180a0b;
}

.brand__name {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.header-divider {
  width: 1px;
  height: 30px;
  background: var(--line);
}

.project-name {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.project-name span,
.properties-heading span,
.sidebar-heading span:first-child {
  color: #63656b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-name strong {
  overflow: hidden;
  max-width: 190px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-header__actions {
  gap: 18px;
}

.save-status {
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.save-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(141, 201, 164, 0.65);
}

.save-status.is-saving > span {
  background: var(--accent-bright);
  box-shadow: 0 0 10px rgba(217, 102, 112, 0.65);
}

.add-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(169, 66, 76, 0.2);
  color: #180a0b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.add-button:hover {
  background: var(--accent-bright);
  box-shadow: 0 14px 34px rgba(169, 66, 76, 0.3);
  transform: translateY(-1px);
}

.add-button:active {
  transform: translateY(1px);
}

.add-button svg {
  width: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.editor-sidebar,
.properties-panel {
  position: relative;
  z-index: 10;
  min-height: 0;
  background: var(--panel);
}

.editor-sidebar {
  display: flex;
  grid-area: sidebar;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
}

.sidebar-heading,
.properties-heading {
  display: flex;
  min-height: 73px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
}

.sidebar-heading > div,
.properties-heading {
  line-height: 1.25;
}

.sidebar-heading strong,
.properties-heading strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 600;
}

.element-count {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted-strong) !important;
  font-size: 10px !important;
  letter-spacing: 0 !important;
}

.layers-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  scrollbar-color: #34363a transparent;
  scrollbar-width: thin;
}

.empty-layers {
  display: flex;
  height: 100%;
  min-height: 270px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-layers__icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel-soft);
  color: #55575d;
}

.empty-layers svg {
  width: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.empty-layers strong {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.empty-layers p {
  max-width: 165px;
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.55;
}

.layer-item {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 11px;
  margin-bottom: 7px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.layer-item:hover {
  background: var(--panel-soft);
  color: var(--muted-strong);
}

.layer-item.is-selected {
  border-color: rgba(217, 102, 112, 0.22);
  background: var(--accent-soft);
  color: var(--text);
}

.layer-item__icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-raised);
}

.layer-item.is-selected .layer-item__icon {
  border-color: rgba(217, 102, 112, 0.28);
  color: var(--accent-bright);
}

.layer-item svg {
  width: 14px;
  stroke: currentColor;
  stroke-width: 1.7;
}

.layer-item__copy {
  min-width: 0;
}

.layer-item__copy strong,
.layer-item__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-item__copy strong {
  font-size: 11px;
  font-weight: 600;
}

.layer-item__copy span {
  margin-top: 3px;
  color: #65676d;
  font-size: 9px;
}

.sidebar-help {
  display: flex;
  gap: 10px;
  margin: 12px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #121314;
  color: #66686e;
}

.sidebar-help svg {
  width: 16px;
  flex: 0 0 auto;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.sidebar-help p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-area: workspace;
  grid-template-rows: 73px minmax(0, 1fr);
  background:
    radial-gradient(circle at 50% 48%, rgba(217, 102, 112, 0.07), transparent 28%),
    #0b0c0d;
}

.workspace__meta {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(12, 13, 14, 0.78);
}

.workspace__title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.workspace__title strong,
.workspace__title span {
  display: block;
}

.workspace__title strong {
  font-size: 12px;
  font-weight: 600;
}

.workspace__title div > span {
  margin-top: 3px;
  color: #62646a;
  font-size: 9px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border: 2px solid #243329;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(141, 201, 164, 0.55);
}

.selection-size {
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #111213;
  color: #6f7177;
  font-family: "Manrope", sans-serif;
  font-size: 9px;
}

.device-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-position: center;
  background-size: 24px 24px;
}

.device-stage::before,
.device-stage::after {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  background: rgba(217, 102, 112, 0.12);
  content: "";
  pointer-events: none;
}

.device-stage::before {
  width: 1px;
  height: 100%;
  transform: translate(-50%, -50%);
}

.device-stage::after {
  width: 100%;
  height: 1px;
  transform: translate(-50%, -50%);
}

.device-scaler {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 396px;
  height: 804px;
  transform: translate(-50%, -50%) scale(var(--device-scale, 0.78));
  transform-origin: center;
}

.device-frame {
  position: relative;
  width: 396px;
  height: 804px;
  padding: 14px;
  border: 1px solid #3a3c40;
  border-radius: 50px;
  background: linear-gradient(145deg, #282a2e, #111214 45%, #24262a);
  box-shadow:
    0 42px 80px rgba(0, 0, 0, 0.52),
    inset 0 0 0 2px #090a0b,
    inset 0 0 0 4px rgba(255, 255, 255, 0.035);
}

.device-speaker {
  position: absolute;
  z-index: 5;
  top: 22px;
  left: 50%;
  width: 92px;
  height: 25px;
  border-radius: 999px;
  background: #070708;
  transform: translateX(-50%);
}

.device-speaker::after {
  position: absolute;
  top: 9px;
  right: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #151c21;
  box-shadow: inset 0 0 0 2px #0a0d10;
  content: "";
}

.device-screen {
  position: relative;
  width: 368px;
  height: 776px;
  overflow: hidden;
  border-radius: 38px;
  background: #101112;
}

.device-statusbar {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  color: #d8d9db;
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}

.device-statusbar > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.device-statusbar svg {
  width: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.preview-canvas {
  position: absolute;
  top: 34px;
  left: 4px;
  width: 360px;
  height: 720px;
  overflow: hidden;
  outline: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.023) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.023) 1px, transparent 1px),
    #0d0e0f;
  background-size: 20px 20px;
  touch-action: none;
  user-select: none;
}

.preview-canvas::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.02);
  content: "";
  pointer-events: none;
}

.canvas-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: 220px;
  flex-direction: column;
  align-items: center;
  color: #5f6167;
  text-align: center;
  transform: translate(-50%, -50%);
}

.canvas-empty[hidden],
.empty-layers[hidden] {
  display: none;
}

.canvas-empty > span {
  display: grid;
  width: 49px;
  height: 49px;
  margin-bottom: 15px;
  place-items: center;
  border: 1px dashed #37393d;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.018);
}

.canvas-empty svg {
  width: 20px;
  stroke: #777980;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.canvas-empty strong {
  color: #8f9197;
  font-size: 12px;
  font-weight: 600;
}

.canvas-empty p {
  margin: 7px 0 0;
  font-size: 10px;
  line-height: 1.5;
}

.device-homebar {
  position: absolute;
  z-index: 5;
  bottom: 8px;
  left: 50%;
  width: 112px;
  height: 4px;
  border-radius: 999px;
  background: #dedfe1;
  opacity: 0.65;
  transform: translateX(-50%);
  pointer-events: none;
}

.layout-block {
  position: absolute;
  min-width: 52px;
  min-height: 52px;
  border: 1px solid var(--block-border, #3c3e43);
  border-radius: var(--block-radius, 16px);
  background: var(--block-color, #18191b);
  color: #c8c9cd;
  cursor: grab;
  touch-action: none;
  transition: border-radius 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.layout-block:active {
  cursor: grabbing;
}

.layout-block.is-selected {
  outline: 1px solid var(--accent-bright);
  outline-offset: 3px;
}

.layout-block.style-solid {
  background: var(--block-color);
  box-shadow: none;
}

.layout-block.style-glass {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 45%),
    rgba(var(--block-color-rgb), 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(var(--block-blur)) saturate(1.35);
}

.layout-block.style-frosted {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(var(--block-color-rgb), 0.76)),
    var(--block-color);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(var(--block-blur)) grayscale(0.25);
}

.layout-block.style-shadow {
  background: var(--block-color);
  box-shadow:
    0 22px 35px rgba(0, 0, 0, 0.5),
    0 7px 16px rgba(var(--block-accent-rgb), 0.12);
}

.layout-block.style-neon {
  border-color: var(--block-accent);
  background: rgba(var(--block-color-rgb), 0.82);
  box-shadow:
    0 0 8px rgba(var(--block-accent-rgb), 0.8),
    0 0 24px rgba(var(--block-accent-rgb), 0.42),
    inset 0 0 20px rgba(var(--block-accent-rgb), 0.09);
}

.layout-block.style-gradient {
  border-color: var(--block-border);
  background: linear-gradient(135deg, var(--block-color), var(--block-accent));
  box-shadow: 0 18px 32px rgba(var(--block-accent-rgb), 0.2);
}

@property --orbit-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.layout-block.style-orbital {
  border-color: transparent;
  background:
    linear-gradient(var(--block-color), var(--block-color)) padding-box,
    conic-gradient(from var(--orbit-angle), transparent 0 18%, var(--block-accent) 28%, transparent 40% 68%, var(--block-accent) 78%, transparent 90%) border-box;
  box-shadow: 0 0 22px rgba(var(--block-accent-rgb), 0.2);
  animation: orbit-border 3.2s linear infinite;
}

@keyframes orbit-border {
  to {
    --orbit-angle: 360deg;
  }
}

.layout-block__label {
  position: absolute;
  top: 13px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
}

.layout-block__label::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--block-accent, var(--accent));
  box-shadow: 0 0 8px rgba(var(--block-accent-rgb), 0.45);
  content: "";
}

.layout-block__dimensions {
  position: absolute;
  right: 11px;
  bottom: 10px;
  color: #66686f;
  font-family: "Manrope", sans-serif;
  font-size: 8px;
  pointer-events: none;
}

.resize-handle {
  position: absolute;
  z-index: 4;
  right: -6px;
  bottom: -6px;
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid #0d0e0f;
  border-radius: 4px;
  background: var(--accent-bright);
  cursor: nwse-resize;
  touch-action: none;
}

.layout-block.is-selected .resize-handle {
  display: block;
}

.properties-panel {
  grid-area: properties;
  overflow-y: auto;
  border-left: 1px solid var(--line-soft);
  scrollbar-color: #34363a transparent;
  scrollbar-width: thin;
}

.properties-heading {
  position: sticky;
  z-index: 3;
  top: 0;
  background: var(--panel);
}

.properties-heading > div {
  line-height: 1.25;
}

.panel-close {
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
}

.panel-close svg {
  width: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.properties-empty {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: #66686e;
  text-align: center;
}

.properties-empty svg {
  width: 25px;
  margin-bottom: 13px;
  stroke: #4f5157;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.properties-empty p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.properties-content {
  padding: 18px;
}

.properties-content[hidden] {
  display: none;
}

.selected-kind {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: var(--panel-soft);
}

.selected-kind > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-bright);
}

.selected-kind svg {
  width: 16px;
  stroke: currentColor;
  stroke-width: 1.7;
}

.selected-kind small,
.selected-kind strong {
  display: block;
}

.selected-kind small {
  margin-bottom: 3px;
  color: #66686e;
  font-size: 8px;
  text-transform: uppercase;
}

.selected-kind strong {
  font-size: 11px;
  font-weight: 600;
}

.geometry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.geometry-grid > div {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #121314;
}

.geometry-grid span {
  color: var(--accent-bright);
  font-family: "Manrope", sans-serif;
  font-size: 9px;
  font-weight: 700;
}

.geometry-grid strong {
  color: var(--muted-strong);
  font-family: "Manrope", sans-serif;
  font-size: 9px;
  font-weight: 600;
}

.style-section {
  margin-top: 19px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.control-heading span {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 600;
}

.control-heading small {
  color: #62646a;
  font-size: 8px;
}

.style-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.style-presets button {
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #121314;
  color: #777980;
  cursor: pointer;
  font-size: 8px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.style-presets button:hover {
  border-color: #393b3f;
  color: var(--muted-strong);
}

.style-presets button.is-active {
  border-color: rgba(217, 102, 112, 0.48);
  background: var(--accent-soft);
  color: var(--text);
}

.preset-preview {
  display: block;
  width: 26px;
  height: 15px;
  border: 1px solid #414349;
  border-radius: 5px;
  background: #25272a;
}

.preset-glass {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.15);
}

.preset-frosted {
  background: linear-gradient(135deg, #55575c, #202124);
}

.preset-shadow {
  box-shadow: 3px 4px 5px #050505;
}

.preset-neon {
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.preset-gradient {
  border: 0;
  background: linear-gradient(135deg, #24262a, var(--accent));
}

.preset-orbital {
  border-color: transparent;
  background: linear-gradient(#202124, #202124) padding-box, conic-gradient(transparent, var(--accent), transparent) border-box;
}

.color-controls {
  display: grid;
  gap: 7px;
}

.color-controls label,
.color-input-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.color-controls label {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #121314;
  color: #777980;
  font-size: 9px;
}

.color-input-wrap {
  gap: 8px;
}

.color-input-wrap input {
  width: 22px;
  height: 22px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #3a3c40;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.color-input-wrap input::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-input-wrap input::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}

.color-input-wrap b {
  width: 53px;
  color: var(--muted-strong);
  font-family: "Manrope", sans-serif;
  font-size: 8px;
  font-weight: 600;
}

.compact-controls {
  padding-bottom: 2px;
}

.range-control {
  display: block;
  margin-top: 12px;
}

.range-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #777980;
  font-size: 9px;
}

.range-control b {
  color: var(--muted-strong);
  font-family: "Manrope", sans-serif;
  font-size: 8px;
}

.range-control input {
  width: 100%;
  height: 3px;
  margin: 11px 0 2px;
  appearance: none;
  border-radius: 999px;
  outline: 0;
  background: #303237;
  accent-color: var(--accent);
}

.range-control input::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  appearance: none;
  border: 2px solid #161719;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 2px rgba(217, 102, 112, 0.18);
  cursor: pointer;
}

.properties-note {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(217, 102, 112, 0.12);
  border-radius: 12px;
  background: rgba(217, 102, 112, 0.045);
}

.properties-note span {
  color: var(--accent-bright);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.properties-note p {
  margin: 7px 0 0;
  color: #686a70;
  font-size: 9px;
  line-height: 1.55;
}

.mobile-add-wrap {
  display: none;
}

.properties-backdrop {
  display: none;
}

.properties-backdrop[hidden] {
  display: none !important;
}

.mobile-style-button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-raised);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.mobile-style-button svg {
  width: 16px;
  stroke: var(--accent-bright);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  padding: 12px 15px;
  border: 1px solid rgba(141, 201, 164, 0.2);
  border-radius: 11px;
  background: #142019;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  color: var(--success);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 220px;
    --properties-width: 240px;
  }

  .brand__name,
  .header-divider,
  .project-name span {
    display: none;
  }

  .project-name strong {
    margin: 0;
  }
}

@media (max-width: 860px) {
  html,
  body {
    overflow: auto;
  }

  .editor-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template:
      "header" 68px
      "workspace" minmax(760px, 1fr)
      / 1fr;
  }

  .editor-header {
    position: sticky;
    top: 0;
    min-width: 0;
    padding: 0 15px;
  }

  .editor-header__actions .add-button,
  .editor-sidebar {
    display: none;
  }

  .properties-panel {
    position: fixed;
    z-index: 42;
    right: 12px;
    bottom: 84px;
    left: 12px;
    display: block;
    max-height: min(720px, calc(100dvh - 110px));
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.62);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 110px));
    transition: opacity 200ms ease, transform 260ms cubic-bezier(0.2, 0.75, 0.2, 1);
  }

  .properties-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .properties-heading {
    min-height: 66px;
    border-radius: 20px 20px 0 0;
  }

  .panel-close {
    display: grid;
  }

  .properties-empty {
    min-height: 220px;
  }

  .properties-content {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 0 18px;
  }

  .properties-content[hidden] {
    display: none;
  }

  .selected-kind,
  .geometry-grid,
  .properties-note {
    grid-column: 1;
  }

  .style-section {
    grid-column: 2;
    margin-top: 0;
  }

  .style-section + .style-section {
    margin-top: 17px;
  }

  .properties-backdrop:not([hidden]) {
    position: fixed;
    z-index: 40;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(5px);
  }

  .project-name {
    display: none;
  }

  .brand__name {
    display: inline;
  }

  .save-status {
    font-size: 9px;
  }

  .workspace {
    grid-template-rows: 62px minmax(650px, 1fr);
  }

  .workspace__meta {
    padding: 0 16px;
  }

  .selection-size {
    display: none;
  }

  .device-stage {
    padding-bottom: 82px;
  }

  .mobile-add-wrap {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 9px;
    padding: 13px 16px calc(13px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-soft);
    background: rgba(12, 13, 14, 0.92);
    backdrop-filter: blur(18px);
  }

  .mobile-add-wrap .add-button {
    width: 100%;
    min-height: 49px;
  }
}

@media (max-width: 590px) {
  .properties-panel {
    right: 8px;
    bottom: 82px;
    left: 8px;
    max-height: calc(100dvh - 98px);
  }

  .properties-content {
    display: block;
  }

  .style-section {
    margin-top: 18px;
  }

  .style-presets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .properties-note {
    display: none;
  }
}

@media (max-width: 430px) {
  .brand__name {
    font-size: 11px;
  }

  .save-status {
    max-width: 72px;
    line-height: 1.25;
  }

  .mobile-add-wrap {
    grid-template-columns: 104px minmax(0, 1fr);
    padding-right: 10px;
    padding-left: 10px;
  }
}

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