:root {
  color-scheme: dark;
  --bg: #171a19;
  --panel: #1e2220;
  --raised: #272d29;
  --line: #343c36;
  --ink: #ebeee7;
  --muted: #96a296;
  --lime: #d5f769;
  --blue: #a4baf4;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  white-space: nowrap;
}
button:hover {
  background: var(--raised);
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
}
svg.icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
a {
  color: inherit;
}
input,
select,
textarea {
  background: #151916;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type="color"] {
  height: 33px;
  padding: 3px;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--lime);
}
input[type="range"] {
  padding: 0;
  accent-color: var(--lime);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  font-weight: 580;
  letter-spacing: -1.4px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 14px;
  font-weight: 580;
}
small {
  font-size: 10px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
}
.btn {
  border: 1px solid var(--line);
  padding: 9px 13px;
  background: var(--panel);
}
.primary {
  background: var(--lime);
  color: #1c2b13;
  border: 1px solid var(--lime);
  font-weight: 650;
}
.primary:hover {
  background: #e4ff96;
}
.subtle {
  color: var(--muted);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  background: #303a29;
  color: #d8eab7;
}
.tag.amber {
  background: #423b27;
  color: #f1cc88;
}
.tag.blue {
  background: #2b344b;
  color: #bdcdfa;
}
.chip {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.spacer {
  flex: 1;
}
.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #1c211e;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: 24px;
  text-decoration: none;
  font-size: 22px;
  letter-spacing: -1px;
  font-weight: 750;
}
.brand img {
  width: 29px;
  height: 29px;
}
.brand span {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 500;
  margin-left: 1px;
}
.breadcrumb {
  color: #afbaae;
  font-size: 12px;
}
.saved {
  font-size: 11px;
  color: var(--muted);
}
.user {
  background: #4a5640;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.appbody {
  display: flex;
  height: calc(100dvh - 60px);
  overflow: hidden;
}
.rail {
  width: 77px;
  flex: none;
  background: #181d19;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 6px;
  gap: 3px;
  overflow: auto;
}
.rail button {
  flex-direction: column;
  gap: 5px;
  font-size: 9px;
  min-height: 47px;
  white-space: normal;
  padding: 6px 1px;
  color: #9fa99d;
}
.rail button.active {
  color: var(--lime);
  background: #2c3628;
}
.rail button svg {
  width: 18px;
  height: 18px;
}
.main {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.editor {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.toolbar {
  min-height: 47px;
  border-bottom: 1px solid var(--line);
  padding: 6px 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
}
.toolbar .sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 6px;
}
.toolbar .tool.active {
  background: #3d4b30;
  color: var(--lime);
}
.tools-device {
  display: flex;
  padding: 2px;
  background: #111612;
  border-radius: 6px;
}
.tools-device button {
  padding: 5px 9px;
}
.tools-device button.active {
  color: var(--lime);
  background: #303c29;
}
.editorbody {
  display: flex;
  min-height: 0;
  flex: 1;
}
.left {
  width: 206px;
  flex: none;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: auto;
}
.right {
  width: 270px;
  flex: none;
  background: var(--panel);
  border-left: 1px solid var(--line);
  overflow: auto;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 8px;
  gap: 3px;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 4;
}
.tabs button {
  flex: 1;
  font-size: 11px;
  padding: 8px 4px;
}
.tabs button.active {
  background: #343e2f;
  color: #e9f5d8;
}
.panelhead {
  padding: 18px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.layer {
  padding: 7px 8px;
  margin: 2px 7px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  gap: 6px;
}
.layer.active {
  background: #323d2b;
  border-color: #738a52;
}
.layer > button {
  padding: 3px;
  font-size: 11px;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  text-overflow: ellipsis;
  overflow: hidden;
}
.layer .mini {
  flex: 0;
}
.layer.hidden {
  opacity: 0.45;
}
.layer .index {
  font-size: 9px;
  color: #718071;
}
.panelhint {
  margin: 20px 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.panelhint strong {
  color: var(--ink);
  font-weight: 500;
}
.addgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 8px 12px;
}
.addgrid button {
  height: 73px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  font-size: 11px;
  background: #222922;
}
.addgrid svg {
  height: 22px;
  width: 22px;
  color: var(--lime);
}
.canvas-zone {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #121714;
}
.canvas-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background-image: radial-gradient(#354132 1px, transparent 1px);
  background-size: 16px 16px;
  overscroll-behavior: contain;
}
.canvas-stage {
  padding: 40px 34px 60px;
  min-width: 100%;
  width: max-content;
  position: relative;
}
.artboard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #bac4b0;
  margin-bottom: 12px;
}
.artboard-title i {
  width: 5px;
  height: 5px;
  background: var(--lime);
  border-radius: 50%;
}
.artboard-frame {
  position: relative;
  background: #f5f6ef;
  box-shadow: 0 12px 60px #0004;
}
.artboard {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  isolation: isolate;
  overflow: visible;
  color: #202922;
}
.obj {
  position: absolute;
  box-sizing: border-box;
  white-space: pre-wrap;
  cursor: move;
  user-select: none;
  touch-action: none;
  transform-origin: center;
}
.obj.hover:not(.locked) {
  outline: 1px solid #9cbd43;
}
.obj.selected {
  outline: 1px solid #7da438;
}
.obj.locked {
  cursor: default;
}
.obj img,
.obj video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}
.obj .text-inner {
  display: block;
  min-height: 100%;
  width: 100%;
}
.obj .text-inner[contenteditable="true"] {
  outline: 2px solid #6f932c;
  user-select: text;
  cursor: text;
  background: #eaf2d470;
  min-height: 100%;
  white-space: pre-wrap;
}
.obj.kind-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.obj.kind-text {
  overflow: visible;
}
.selection {
  position: absolute;
  pointer-events: none;
  border: 1.6px solid #729d20;
  z-index: 9999;
  transform-origin: center;
}
.handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid #679010;
  background: #faffee;
  border-radius: 0;
  pointer-events: auto;
  padding: 0;
  touch-action: none;
}
.handle:hover {
  background: var(--lime);
}
.handle.nw {
  left: -5px;
  top: -5px;
  cursor: nwse-resize;
}
.handle.n {
  left: calc(50% - 5px);
  top: -5px;
  cursor: ns-resize;
}
.handle.ne {
  right: -5px;
  top: -5px;
  cursor: nesw-resize;
}
.handle.e {
  right: -5px;
  top: calc(50% - 5px);
  cursor: ew-resize;
}
.handle.se {
  right: -5px;
  bottom: -5px;
  cursor: nwse-resize;
}
.handle.s {
  left: calc(50% - 5px);
  bottom: -5px;
  cursor: ns-resize;
}
.handle.sw {
  left: -5px;
  bottom: -5px;
  cursor: nesw-resize;
}
.handle.w {
  left: -5px;
  top: calc(50% - 5px);
  cursor: ew-resize;
}
.rotate-handle {
  left: calc(50% - 6px);
  top: -31px;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  cursor: grab;
}
.rotate-handle:after {
  content: "";
  position: absolute;
  top: 11px;
  left: 5px;
  width: 1px;
  height: 18px;
  background: #6d912b;
}
.selection-label {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  white-space: nowrap;
  font-size: 10px;
  background: var(--lime);
  color: #284019;
  padding: 4px 6px;
}
.selection-size {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #293920;
  color: #def8b7;
  padding: 4px 7px;
  font-size: 10px;
  white-space: nowrap;
}
.rubber {
  position: absolute;
  border: 1px solid var(--lime);
  background: #d5f76924;
  pointer-events: none;
  z-index: 999;
}
.guide {
  position: absolute;
  pointer-events: none;
  background: #af34d4;
  z-index: 9000;
}
.guide.v {
  top: 0;
  bottom: 0;
  width: 1px;
}
.guide.h {
  left: 0;
  right: 0;
  height: 1px;
}
.statusbar {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  background: #1e251f;
  gap: 10px;
}
.inspector-section {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.inspector-section h3 {
  margin-bottom: 14px;
  font-size: 12px;
}
.inspector-title {
  padding: 17px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}
.inspector-title .icon {
  color: var(--lime);
}
.inspector-title strong {
  display: block;
  font-weight: 550;
}
.inspector-title small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fields .full {
  grid-column: 1/-1;
}
.numfield {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #151916;
}
.numfield span {
  padding-left: 9px;
  width: 25px;
  font-size: 10px;
  color: #a8b5a2;
}
.numfield input {
  border: 0;
  background: transparent;
  padding: 9px 6px;
}
.toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.actionline {
  display: flex;
  justify-content: space-between;
  gap: 3px;
}
.actionline button {
  padding: 6px 8px;
}
.actionline svg {
  height: 15px;
  width: 15px;
}
.help {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 11px;
}
.help b {
  color: var(--lime);
  font-weight: 500;
}
.prompt {
  min-height: 106px;
  margin-top: 10px;
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0;
}
.quick button {
  border: 1px solid var(--line);
  font-size: 10px;
  padding: 6px 8px;
  white-space: normal;
  text-align: left;
}
.proposal {
  background: #2b3425;
  border: 1px solid #657c43;
  padding: 14px;
  border-radius: 8px;
  margin-top: 14px;
}
.proposal h3 {
  margin: 9px 0;
}
.proposal p {
  line-height: 1.6;
  color: #c2cfb6;
  font-size: 11px;
}
.proposal .row {
  margin-top: 13px;
}
.page {
  padding: 40px 5%;
  max-width: 1500px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}
.page-heading .chip {
  margin-bottom: 12px;
}
.page-heading p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 650px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 23px;
  min-width: 0;
}
.card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0;
}
.card h3 {
  font-size: 18px;
}
.card .icon {
  color: var(--lime);
}
.card .row {
  margin-top: 16px;
}
.card img,
.card video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  background: #121614;
}
.bigcard {
  background: linear-gradient(115deg, #2b3927, #19251c);
  padding: 32px;
  border: 1px solid #53673e;
  border-radius: 10px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 35px;
}
.bigcard h2 {
  font-size: 29px;
  max-width: 500px;
  margin: 10px 0;
}
.bigcard p {
  color: #b7c7aa;
  line-height: 1.8;
  max-width: 620px;
}
.bigcard .big-symbol {
  font-size: 90px;
  color: var(--lime);
  line-height: 1;
}
.project-thumb {
  background: #eef3e3;
  border-radius: 5px;
  height: 177px;
  color: #283124;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.project-thumb strong {
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1.1;
}
.project-thumb img {
  width: 36%;
  height: 140px;
}
.empty {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.listtable {
  width: 100%;
  border-collapse: collapse;
}
.listtable th {
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 1px;
  padding: 12px;
  text-transform: uppercase;
}
.listtable td {
  padding: 16px 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.listtable td p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.listtable td:last-child {
  text-align: right;
}
.filterbar {
  display: flex;
  gap: 8px;
  margin: 24px 0;
}
.filterbar input {
  max-width: 340px;
}
.filterbar button.active {
  background: #36432c;
  color: var(--lime);
}
.flow {
  display: flex;
  align-items: stretch;
  gap: 15px;
  margin: 32px 0;
  overflow: auto;
}
.flow .step {
  min-width: 165px;
  flex: 1;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202921;
}
.flow .step.done {
  border-color: #87a156;
  background: #304026;
}
.step h3 {
  margin: 13px 0 9px;
}
.step p {
  color: var(--muted);
  line-height: 1.6;
}
.arrow {
  align-self: center;
  color: #809071;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.model-list .card {
  margin-bottom: 12px;
}
.server-icon {
  display: grid;
  place-items: center;
  border: 1px solid #677b4c;
  width: 100px;
  height: 100px;
  border-radius: 20px;
  background: #304126;
}
.server-icon svg {
  width: 50px;
  height: 50px;
}
.phase-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 24px;
}
.phase-list button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  gap: 14px;
  padding: 14px 12px;
  margin: 4px 0;
  text-align: left;
}
.phase-list button.active {
  background: #34442c;
  color: #e6f6c4;
}
.phase-list .tag {
  width: 45px;
  justify-content: center;
}
.phase-detail {
  padding: 32px;
}
.phase-detail h2 {
  margin: 14px 0 22px;
  font-size: 30px;
}
.phase-detail h3 {
  margin-top: 27px;
}
.phase-detail p {
  font-size: 14px;
  line-height: 1.9;
}
.screen-card {
  cursor: pointer;
}
.screen-mini {
  height: 105px;
  background: #111813;
  border: 1px solid #3b4a30;
  display: grid;
  grid-template-columns: 15% 65% 20%;
  gap: 4px;
  padding: 7px;
  border-radius: 5px;
  margin-bottom: 16px;
}
.screen-mini span {
  background: #293422;
  border-radius: 2px;
}
.screen-mini span:nth-child(2) {
  background: linear-gradient(145deg, #e5ecd6, #bbd278);
}
.screen-card h3 {
  font-size: 16px;
}
.screen-card p {
  font-size: 11px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.65;
  color: #acbea0;
  background: #253020;
  border: 1px solid #425538;
  border-radius: 6px;
  padding: 11px 14px;
  margin: 18px 0;
}
.asset-empty {
  background: #263022;
  display: grid;
  place-items: center;
  height: 180px;
  border-radius: 6px;
  font-size: 40px;
  color: var(--lime);
}
.danger {
  color: #edac92;
}
.preview-top {
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.preview-wrap {
  margin: auto;
  position: relative;
}
.preview-wrap .artboard {
  overflow: hidden;
}
.preview-wrap .obj {
  cursor: default;
  touch-action: auto;
  user-select: text;
}
.preview-wrap .obj img,
.preview-wrap .obj video {
  pointer-events: auto;
}
.preview-wrap a {
  display: contents;
}
.preview-wrap .obj.kind-button a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.preview-wrap .obj.selected {
  outline: none;
}
#toast {
  position: fixed;
  bottom: 23px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(550px, 90vw);
  background: #e0f4b2;
  color: #263a18;
  padding: 12px 19px;
  border-radius: 7px;
  box-shadow: 0 6px 32px #0004;
  z-index: 30000;
  display: none;
  font-size: 12px;
  line-height: 1.5;
}
dialog {
  width: min(610px, calc(100vw - 30px));
  border: 1px solid #58634e;
  background: #222b22;
  color: var(--ink);
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 35px 100px #0009;
}
dialog::backdrop {
  background: #080e0b99;
  backdrop-filter: blur(5px);
}
dialog h2 {
  margin: 5px 0 18px;
}
dialog p {
  line-height: 1.7;
  color: var(--muted);
}
dialog label {
  margin: 15px 0;
}
dialog .row {
  margin-top: 22px;
}
.keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 20px 0;
}
.keys div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
kbd {
  font: 10px ui-monospace;
  background: #151d15;
  border: 1px solid #4b5d43;
  border-radius: 4px;
  padding: 3px 5px;
  color: #e6f2da;
}
.desktop-note {
  display: none;
}
.mobile-panel-button {
  display: none;
}
.motion-enter {
  animation: enter 0.7s ease both;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .motion-enter {
    animation: none;
  }
  * {
    scroll-behavior: auto !important;
  }
}
@media (max-width: 1100px) {
  .left {
    width: 170px;
  }
  .right {
    width: 245px;
  }
  .brand {
    margin-right: 6px;
  }
  .saved {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar .hintlabel {
    display: none;
  }
}
@media (max-width: 800px) {
  .topbar {
    padding: 10px;
    height: 55px;
    gap: 5px;
  }
  .brand {
    font-size: 18px;
  }
  .brand span,
  .breadcrumb,
  .topbar .user {
    display: none;
  }
  .appbody {
    height: calc(100dvh - 55px);
  }
  .rail {
    width: 62px;
  }
  .rail button {
    font-size: 8px;
    min-height: 46px;
  }
  .left {
    display: none;
  }
  .right {
    width: 230px;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 3px;
  }
  .toolbar .sep {
    display: none;
  }
  .toolbar button {
    padding: 6px;
  }
  .page {
    padding: 25px 20px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 28px;
  }
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .bigcard {
    padding: 22px;
  }
  .bigcard .big-symbol,
  .bigcard .server-icon {
    display: none;
  }
  .phase-layout {
    grid-template-columns: 1fr;
  }
  .phase-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .phase-list button {
    padding: 9px;
    font-size: 10px;
  }
  .phase-detail {
    padding: 20px;
  }
  .listtable {
    font-size: 10px;
  }
  .listtable td {
    padding: 12px 5px;
  }
  .listtable th {
    padding: 9px 5px;
  }
  .filterbar {
    flex-wrap: wrap;
  }
  .desktop-note {
    display: block;
    font-size: 10px;
    color: #c3d4ae;
    padding: 8px 13px;
    background: #2b3724;
  }
  .statusbar .long {
    display: none;
  }
}
@media (max-width: 600px) {
  .right {
    display: none;
    position: absolute;
    right: 0;
    top: 146px;
    bottom: 0;
    width: min(285px, calc(100vw - 62px));
    z-index: 110;
    box-shadow: -10px 0 25px #0005;
  }
  .right.open {
    display: block;
  }
  .mobile-panel-button {
    display: inline-flex;
  }
  .toolbar {
    padding: 5px;
  }
  .toolbar .tools-device {
    margin-left: auto;
  }
  .toolbar .hintlabel,
  .toolbar .wide {
    display: none;
  }
  .canvas-stage {
    padding: 35px 14px 45px;
  }
  .topbar .btn,
  .topbar .primary {
    font-size: 10px;
    padding: 7px;
  }
  .topbar .brand {
    margin-right: auto;
  }
  .topbar .brand img {
    width: 25px;
    height: 25px;
  }
  .rail {
    width: 59px;
  }
  .page {
    padding: 25px 15px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .phase-list {
    grid-template-columns: 1fr;
  }
  .phase-detail h2 {
    font-size: 24px;
  }
  .listtable td:first-child {
    max-width: 130px;
  }
  .statusbar {
    font-size: 9px;
    padding: 6px;
  }
  .preview-top {
    padding: 7px;
    font-size: 10px;
  }
  .keys {
    grid-template-columns: 1fr;
  }
}
.layer .mini {
  width: 23px;
  min-width: 23px;
  flex: 0 0 23px;
}
.layer > button:first-of-type {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.layer .mini .index {
  font-size: 9px;
  min-width: 15px;
}
.topbar .tag {
  white-space: nowrap;
}
@media (max-width: 600px) {
  .topbar > [data-action="screen:projects"],
  .topbar > .tag {
    display: none;
  }
  .topbar .brand {
    font-size: 17px;
  }
  .topbar {
    gap: 8px;
  }
  .editorbody {
    position: relative;
  }
  .right {
    top: 0;
  }
  .rail {
    flex-shrink: 0;
  }
}
.generation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 24px;
}
.generation-form {
  padding: 30px;
}
.generation-form .server-icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  flex: none;
}
.generation-form .server-icon svg {
  width: 25px;
  height: 25px;
}
.generation-form p {
  margin: 7px 0;
}
.generation-form textarea {
  font-size: 16px;
  padding: 17px;
  line-height: 1.65;
  min-height: 180px;
}
.generation-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}
.generation-steps > div {
  display: flex;
  gap: 15px;
}
.generation-steps > div > span {
  font: 12px ui-monospace;
  color: var(--lime);
  border: 1px solid #455a32;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: none;
}
.generation-steps p {
  margin: 6px 0 0;
  font-size: 11px;
}
.generation-dock {
  position: fixed;
  bottom: 49px;
  right: 286px;
  width: 310px;
  z-index: 120;
  padding: 17px;
  background: #203025f5;
  border: 1px solid #7f9a58;
  border-radius: 10px;
  box-shadow: 0 12px 40px #0006;
  backdrop-filter: blur(10px);
}
.generation-dock p {
  font-size: 11px;
  line-height: 1.65;
  color: #d4dfcd;
  margin: 10px 0;
}
.generation-dock small {
  color: #afc29e;
  font-size: 9px;
}
.gen-progress {
  height: 4px;
  background: #45583a;
  border-radius: 4px;
  margin: 13px 0;
}
.gen-progress span {
  display: block;
  height: 100%;
  background: var(--lime);
  border-radius: 4px;
  transition: width 0.25s;
}
.generation-dock button {
  padding: 6px;
  font-size: 11px;
}
@media (max-width: 1100px) {
  .topbar .breadcrumb {
    display: none;
  }
  .generation-dock {
    right: 258px;
  }
  .topbar > [data-action="screen:projects"] {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 800px) {
  .generation-layout {
    grid-template-columns: 1fr;
  }
  .generation-form {
    padding: 20px;
  }
  .generation-dock {
    width: 265px;
    right: 240px;
  }
  .topbar > .tag {
    display: none;
  }
  .topbar > [data-action="screen:projects"] {
    display: none;
  }
}
@media (max-width: 600px) {
  .generation-dock {
    width: min(270px, calc(100vw - 86px));
    right: 13px;
    bottom: 43px;
    padding: 12px;
  }
  .generation-dock .row {
    gap: 4px;
  }
  .generation-dock p {
    font-size: 10px;
  }
  .topbar .generate-top {
    font-size: 9px;
    padding: 7px;
    gap: 3px;
  }
  .topbar .brand {
    font-size: 15px;
  }
  .topbar .brand img {
    width: 21px;
    height: 21px;
  }
  .topbar {
    gap: 4px;
  }
  .topbar .brand span {
    display: none;
  }
  .generation-form textarea {
    font-size: 14px;
  }
  .generation-layout {
    gap: 16px;
  }
}
.rail {
  width: 74px;
  gap: 7px;
  padding-top: 14px;
}
.rail button {
  min-height: 56px;
  font-size: 10px;
}
.more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
}
.more-grid .btn {
  justify-content: flex-start;
  padding: 13px;
}
.canvas-options {
  position: relative;
}
.canvas-options summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  color: #b3bfb0;
}
.canvas-options > div {
  position: absolute;
  top: 36px;
  right: 0;
  background: #253021;
  border: 1px solid #526446;
  z-index: 100;
  padding: 8px;
  border-radius: 7px;
  min-width: 175px;
  box-shadow: 0 8px 25px #0007;
}
.canvas-options button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}
.inspector-details {
  border-bottom: 1px solid var(--line);
}
.inspector-details summary {
  cursor: pointer;
  padding: 15px;
  color: #aeb9a8;
  font-size: 11px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inspector-details summary:after {
  content: "+";
  font-size: 15px;
  color: #889d78;
}
.inspector-details[open] summary:after {
  content: "−";
}
.inspector-details[open] summary {
  color: #e6f0dc;
}
.inspector-details > .inspector-section {
  border: 0;
  padding-top: 0;
}
.quick-properties textarea {
  min-height: 98px;
  font-size: 13px;
}
.quick-properties .fields {
  gap: 14px;
}
.protection {
  margin: 17px 0;
  gap: 14px;
  border: 1px solid #536643;
  background: #2a3824;
  border-radius: 7px;
  padding: 12px;
  font-size: 11px;
  color: #e0edcf;
  line-height: 1.4;
}
.protection small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: #abbf9e;
  margin-top: 5px;
}
.protection input {
  width: 16px;
  height: 16px;
  flex: none;
}
.inspector-section > .actionline {
  margin-top: 6px;
}
.topbar .saved {
  margin-right: 10px;
}
.topbar .breadcrumb {
  display: none;
}
@media (max-width: 600px) {
  .rail {
    width: 62px;
  }
  .rail button {
    font-size: 9px;
  }
  .more-grid {
    grid-template-columns: 1fr;
  }
  .more-grid .btn {
    padding: 10px;
  }
  .canvas-options summary {
    padding: 5px;
  }
  .topbar .saved {
    display: none;
  }
}

.screen-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1.6;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
@media (max-width: 600px) {
  .generation-form > .fields {
    grid-template-columns: 1fr;
  }
}

.connection-checks {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.connection-checks p {
  font-size: 12px;
  line-height: 1.7;
  margin: 8px 0;
}
#modal .fields {
  margin: 20px 0;
}
#modal input,
#modal select {
  min-width: 0;
}
#modal > .notice {
  font-size: 11px;
  line-height: 1.6;
}
/* Nested auto-layout remains normal DOM content in the editor and preview. */
.obj.kind-frame { cursor: grab; }
.obj.kind-frame:empty::after { content: "Контейнер · добавьте блоки"; font: 14px/1.4 Arial; color: #68755e; padding: 16px; }
.layout-drop { outline: 3px dashed #638b30 !important; outline-offset: 5px; }
