* {
  box-sizing: border-box;
}
:root {
  font-family:
    Inter,
    Segoe UI,
    sans-serif;
  color: #2f2f2f;
  background: #f7f7f7;
  font-size: 13px;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #dddddd;
  background: white;
  color: #3e3e3e;
  padding: 9px 12px;
  border-radius: 7px;
  transition: background 0.15s;
}
button:hover {
  background: #ededed;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #ecb01a;
  outline-offset: 2px;
}
.primary {
  background: #ecb01a;
  color: #171717;
  border-color: #ecb01a;
}
.primary:hover {
  background: #d39b12;
}
header {
  height: 76px;
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0e0e0;
  background: white;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #313131;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand > span:first-child {
  background: #ecb01a;
  border-radius: 9px;
  color: #171717;
  width: 33px;
  height: 33px;
  text-align: center;
  font-family: Georgia;
  font-style: italic;
}
.brand .tag {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #8c8c8c;
  font-weight: 500;
  margin-left: 15px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.divider {
  height: 22px;
  width: 1px;
  background: #e0e0e0;
  display: inline-block;
  margin: 0 5px;
}
main {
  display: grid;
  grid-template-columns: 182px minmax(300px, 1fr) 234px;
  height: calc(100dvh - 76px);
}
aside {
  background: #fff;
  padding: 24px 16px;
  overflow: auto;
}
.tools {
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
}
.label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #949494;
  margin-bottom: 17px;
}
#tools {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#tools button {
  text-align: left;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  padding: 10px;
}
#tools button.active {
  background: #fff2ce;
  color: #765400;
  font-weight: 650;
}
#tools button:hover {
  background: #f1f1f1;
}
.tool-icon {
  font-size: 19px;
  width: 22px;
  text-align: center;
  line-height: 20px;
}
.tool-key {
  margin-left: auto;
  color: #9a9a9a;
  font-size: 10px;
}
.aside-foot {
  margin-top: auto;
  padding-top: 30px;
  color: #767676;
  font-size: 11px;
  line-height: 1.6;
}
.aside-foot span {
  display: block;
  font-size: 10px;
  color: #a1a1a1;
  margin-top: 8px;
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.document-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 19px;
  height: 57px;
  background: #fcfcfc;
  border-bottom: 1px solid #e0e0e0;
}
.document-bar > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.document-bar button {
  padding: 5px 8px;
  border: 0;
  background: transparent;
}
.document-bar small {
  color: #959595;
  margin-left: 7px;
}
.document-bar i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #8f8f8f;
  border-radius: 50%;
  margin-right: 8px;
}
#zoomLabel {
  min-width: 40px;
  text-align: center;
  font-size: 11px;
}
#viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 42px;
  display: grid;
  align-items: center;
  justify-items: center;
  background: #eeeeee;
  background-image: radial-gradient(#d7d7d7 0.7px, transparent 0.7px);
  background-size: 12px 12px;
}
#stage {
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 32px #2e2e2e12;
  background-color: white;
  background-image:
    linear-gradient(45deg, #efefef 25%, transparent 25%),
    linear-gradient(-45deg, #efefef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #efefef 75%),
    linear-gradient(-45deg, transparent 75%, #efefef 75%);
  background-size: 16px 16px;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#overlay {
  touch-action: none;
}
#empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #fdfdfdef;
  pointer-events: none;
  text-align: center;
}
#empty button {
  pointer-events: auto;
}
#empty h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(20px, 2.3vw, 34px);
  letter-spacing: -0.7px;
  margin: 20px 0 10px;
}
#empty p {
  color: #8b8b8b;
  line-height: 1.8;
  margin: 0 0 22px;
}
#empty > span {
  color: #9f9f9f;
  font-size: 10px;
  margin-top: 16px;
}
.empty-icon {
  font-size: 42px;
  color: #7c7c7c;
  border: 1px solid #dedede;
  border-radius: 18px;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  background: #f0f0f0;
}
footer {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: #939393;
  background: #fbfbfb;
  font-size: 10px;
  border-top: 1px solid #e0e0e0;
}
.properties {
  border-left: 1px solid #e0e0e0;
  padding: 24px 20px;
}
.properties h2 {
  font-size: 19px;
  margin: 0 0 6px;
}
.muted {
  color: #8c8c8c;
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 24px;
}
label {
  display: block;
  margin: 17px 0;
  font-size: 11px;
  color: #676767;
}
label input[type="color"] {
  display: block;
  width: 100%;
  height: 34px;
  border: 1px solid #dcdcdc;
  background: #fafafa;
  padding: 4px;
  margin-top: 8px;
  border-radius: 6px;
}
label input[type="range"] {
  display: block;
  width: 100%;
  accent-color: #ecb01a;
  margin-top: 10px;
}
label output {
  float: right;
  color: #929292;
}
.inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
input[type="checkbox"] {
  accent-color: #ecb01a;
}
input[type="number"],
select {
  display: block;
  width: 100%;
  border: 1px solid #dcdcdc;
  background: #fafafa;
  padding: 8px;
  border-radius: 6px;
  margin-top: 8px;
}
.separator {
  height: 1px;
  background: #e8e8e8;
  margin: 24px 0;
}
.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.button-grid button {
  font-size: 10px;
  padding: 8px 4px;
}
.tip {
  font-size: 10px;
  color: #999999;
  line-height: 1.7;
  margin-top: 28px;
}
details button {
  margin-top: 6px;
  font-size: 11px;
}
summary {
  cursor: pointer;
  color: #707070;
  font-size: 11px;
}
#textEditor {
  display: none;
  position: absolute;
  border: 1px dashed #ecb01a;
  background: #ffffffea;
  resize: both;
  min-width: 180px;
  min-height: 65px;
  padding: 4px;
  outline: none;
  z-index: 3;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #333333;
  color: white;
  padding: 12px 22px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}
#toast.visible {
  opacity: 1;
}
dialog {
  border: 1px solid #dcdcdc;
  border-radius: 15px;
  padding: 28px;
  width: 390px;
  box-shadow: 0 20px 100px #24242433;
}
dialog::backdrop {
  background: #24242455;
}
dialog h2 {
  font-family: Georgia;
  font-weight: 400;
  font-size: 25px;
}
dialog .actions {
  justify-content: flex-end;
  margin-top: 24px;
}
@media (max-width: 1000px) {
  main {
    grid-template-columns: 64px minmax(250px, 1fr) 195px;
  }
  .tools {
    padding: 20px 8px;
  }
  .tools .label,
  .tool-name,
  .tool-key,
  .aside-foot,
  .brand .tag {
    display: none;
  }
  #tools button {
    justify-content: center;
    padding: 10px;
  }
  .properties {
    padding: 20px 14px;
  }
  header {
    padding: 0 15px;
  }
  .actions {
    gap: 5px;
  }
  .actions button {
    font-size: 11px;
    padding: 8px;
  }
  #viewport {
    padding: 24px;
  }
  .document-bar small {
    display: none;
  }
}
@media (max-width: 650px) {
  main {
    grid-template-columns: 52px minmax(200px, 1fr);
  }
  .properties {
    display: none;
  }
  header {
    height: auto;
    min-height: 76px;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
  }
  .brand {
    font-size: 20px;
  }
  .actions {
    flex-wrap: wrap;
  }
  main {
    height: calc(100dvh - 110px);
  }
  #viewport {
    padding: 15px;
  }
  .document-bar {
    padding: 8px;
  }
  footer #hint {
    max-width: 65%;
    white-space: nowrap;
    overflow: hidden;
  }
}
/* The brush is an overlay only: it is never included in image exports. */
#brushPreview {
  display: none;
  position: absolute;
  pointer-events: none;
  border: 1px solid;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px #fff9;
  z-index: 2;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  color: #e3e3e3;
  background: #191919;
}
[data-theme="dark"] header,
[data-theme="dark"] aside {
  background: #232323;
  border-color: #393939;
}
[data-theme="dark"] .brand {
  color: #e3e3e3;
}
[data-theme="dark"] button {
  background: #2d2d2d;
  color: #dddddd;
  border-color: #474747;
}
[data-theme="dark"] button:hover {
  background: #3d3d3d;
}
[data-theme="dark"] .primary {
  background: #ecb01a;
  color: #171717;
  border-color: #ecb01a;
}
[data-theme="dark"] .primary:hover {
  background: #f3c34d;
}
[data-theme="dark"] .document-bar,
[data-theme="dark"] footer {
  background: #232323;
  border-color: #393939;
  color: #b8b8b8;
}
[data-theme="dark"] .document-bar button {
  background: transparent;
}
[data-theme="dark"] #viewport {
  background-color: #191919;
  background-image: radial-gradient(#393939 0.7px, transparent 0.7px);
}
[data-theme="dark"] #tools button {
  background: transparent;
  color: #c6c6c6;
}
[data-theme="dark"] #tools button.active {
  background: #4b3c18;
  color: #ffe5a3;
}
[data-theme="dark"] #tools button:hover {
  background: #363636;
}
[data-theme="dark"] .label,
[data-theme="dark"] .muted,
[data-theme="dark"] label,
[data-theme="dark"] summary,
[data-theme="dark"] .tip,
[data-theme="dark"] .aside-foot {
  color: #a7a7a7;
}
[data-theme="dark"] .divider,
[data-theme="dark"] .separator {
  background: #3f3f3f;
}
[data-theme="dark"] input[type="number"],
[data-theme="dark"] select,
[data-theme="dark"] label input[type="color"] {
  background: #2c2c2c;
  color: #dedede;
  border-color: #4a4a4a;
}
[data-theme="dark"] #empty {
  background: #282828f5;
  color: #e1e1e1;
}
[data-theme="dark"] #empty p,
[data-theme="dark"] #empty > span {
  color: #aeaeae;
}
[data-theme="dark"] .empty-icon {
  background: #353535;
  color: #acacac;
  border-color: #4b4b4b;
}
[data-theme="dark"] #textEditor {
  background: #232323f5;
  color: #eeeeee;
  border-color: #ecb01a;
}
[data-theme="dark"] dialog {
  background: #232323;
  color: #e3e3e3;
  border-color: #4a4a4a;
}
[hidden] {
  display: none !important;
}
.workspace .document-bar {
  justify-content: flex-end;
}
#language {
  width: auto;
  max-width: 145px;
  display: inline-block;
  margin: 0;
  padding: 8px;
  border-radius: 7px;
  background: transparent;
  color: inherit;
}
header .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
header {
  gap: 12px;
  min-height: 76px;
  height: auto;
  padding-top: 12px;
  padding-bottom: 12px;
}
body > header {
  height: auto;
  min-height: 76px;
}

button,
input[type="number"],
select {
  border-radius: 4px;
}
.empty-icon {
  border-radius: 8px;
  margin-bottom: 22px;
}
#viewport {
  background-image: none;
}
.brand > span:first-child {
  background: #ecb01a;
}
.primary {
  font-weight: 600;
}

.tool-credit {
  margin-top: auto;
  padding-top: 24px;
  color: #808080;
  font-size: 10px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.tool-credit span,
.tool-credit a {
  display: block;
}
.tool-credit a {
  color: inherit;
  text-decoration: none;
}
.tool-credit a:hover {
  color: #ecb01a;
  text-decoration: underline;
}
.app-heading {
  margin: 0;
  font-size: inherit;
}
