:root {
  color: #151515;
  background: #f4f3ef;
  font-family: Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding-right: 360px;
}

main {
  display: flex;
  min-height: 100vh;
  max-width: 760px;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
}

main h1,
main h2,
main h3,
main div,
main span,
main p {
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

main h1,
main h2,
main h3 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1;
}

main p,
main div,
main span {
  max-width: 560px;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.6;
}

main [data-editor-name]:hover,
main [data-selected="true"] {
  border-color: #6857ff;
  background: rgba(104, 87, 255, 0.06);
  cursor: pointer;
}

aside {
  position: fixed;
  z-index: 10;
  top: 0;
  right: 0;
  display: flex;
  width: 360px;
  height: 100vh;
  flex-direction: column;
  border-left: 1px solid #deddd8;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.04);
}

aside header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid #e8e7e2;
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3bc977;
  box-shadow: 0 0 0 4px rgba(59, 201, 119, 0.13);
}

.element-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e7e2;
}

.element-list button {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  color: #666;
  border: 1px solid #e2e1dc;
  border-radius: 7px;
  background: #fafafa;
  text-align: left;
  cursor: pointer;
}

.element-list button:hover,
.element-list button.is-active {
  color: #4c3ce2;
  border-color: #8b7fff;
  background: #f3f1ff;
}

.element-list code {
  font-weight: 700;
}

.element-list span {
  font-size: 0.68rem;
}

form {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: 20px;
}

.selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #ecebe7;
  color: #777;
  font-size: 0.72rem;
}

.selection code {
  padding: 5px 8px;
  color: #fff;
  border-radius: 4px;
  background: #1d1d1d;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #555;
  font-size: 0.72rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 11px;
  color: #1b1b1b;
  border: 1px solid #d9d8d3;
  border-radius: 6px;
  outline: none;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6857ff;
  box-shadow: 0 0 0 3px rgba(104, 87, 255, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #aaa;
  background: #f1f1ef;
  cursor: not-allowed;
}

aside footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid #e8e7e2;
  color: #888;
  font-size: 0.7rem;
}

#save-status.has-error {
  color: #c52b2b;
}

#reset {
  padding: 7px 10px;
  color: #333;
  border: 1px solid #d9d8d3;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

#reset:hover {
  border-color: #999;
}

@media (max-width: 720px) {
  body {
    padding-right: 0;
    padding-bottom: 62vh;
  }

  main {
    min-height: 38vh;
    padding: 36px 24px;
  }

  aside {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 62vh;
    border-top: 1px solid #deddd8;
    border-left: 0;
  }
}
