* {
  box-sizing: border-box;
}

:root {
  --bg: #2d2d2d;
  --panel: #f8f1fb;
  --panel2: #f0e9f3;
  --line: #cabfd0;
  --text: #24212a;
  --muted: #776f7b;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  display: grid;
  place-items: center;
  overflow: hidden;
}

button, input, textarea {
  font: inherit;
}

.app {
  position: relative;
  width: 624px;
  height: 468px;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 18px 42px #0008;
}

.burger {
  position: absolute;
  top: 20px;
  left: 19px;
  width: 32px;
  height: 32px;
  border: 0;
  padding: 4px;
  background: transparent;
  cursor: pointer;
  z-index: 10;
}

.burger svg {
  width: 24px;
  height: 24px;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.mark {
  position: absolute;
  top: 18px;
  right: 17px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eee7f1;
  display: grid;
  place-items: center;
  opacity: .8;
}

.mark svg {
  width: 22px;
  height: 22px;
  stroke: #bdb4c3;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.menu {
  position: absolute;
  top: 52px;
  left: -10px;
  width: 220px;
  padding: 10px 0;
  background: var(--panel);
  border-radius: 15px;
  box-shadow: 0 14px 28px #0006;
  display: none;
  z-index: 20;
}

.menu.open {
  display: block;
}

.menuItem {
  width: 100%;
  height: 54px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 16px;
  display: grid;
  grid-template-columns: 28px 1fr 16px;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}

.menuItem:hover {
  background: #eee7f1;
}

.menuItem span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.menuItem svg {
  width: 23px;
  height: 23px;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.menuItem b {
  font-size: 21px;
  font-weight: 400;
}

.page {
  display: none;
  position: absolute;
  inset: 0;
  padding: 18px 54px 26px;
}

.page.show {
  display: block;
}

h1 {
  height: 42px;
  line-height: 42px;
  margin: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 400;
}

.codeScreen {
  height: 360px;
  display: grid;
  place-items: center;
}

.codeInput {
  width: 390px;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 5px 12px #0002;
}

.codeInput input {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  outline: none;
  color: var(--text);
  text-align: center;
  font-size: 24px;
  font-weight: 500;
}

.codeInput input:last-child {
  border-right: 0;
}

.scriptScreen {
  padding-top: 38px;
}

.scriptBox {
  height: 270px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  display: grid;
  place-items: center;
}

pre {
  width: 100%;
  max-height: 250px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  text-align: center;
}

code {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

textarea {
  width: 100%;
  height: 270px;
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  outline: none;
  resize: none;
  padding: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

textarea::placeholder {
  color: var(--text);
  opacity: 1;
}

.dock {
  width: 334px;
  height: 66px;
  margin: 24px auto 0;
  background: var(--panel2);
  border: 1px solid #ded4e3;
  border-radius: 34px;
  box-shadow: 0 5px 11px #0003;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.dockSmall {
  width: 180px;
  gap: 36px;
}

.dock button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 3px;
  cursor: pointer;
}

.dock button:hover {
  transform: scale(1.08);
}

.dock svg {
  width: 29px;
  height: 29px;
  stroke: var(--text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.status {
  position: absolute;
  left: 54px;
  right: 54px;
  bottom: 10px;
  min-height: 20px;
  color: #74516c;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 680px) {
  body {
    place-items: start center;
    overflow: auto;
  }

  .app {
    width: calc(100vw - 32px);
    margin-top: 16px;
  }

  .page {
    padding-left: 28px;
    padding-right: 28px;
  }

  .codeInput {
    width: 100%;
  }

  .menu {
    left: 8px;
  }
}
