* {
  box-sizing:border-box;
}
:root {
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",Meiryo,sans-serif;
  color:#232832;
  background:#fff;
  --ink:#273c97;
  --border:#dce0e8;
}
body {
  margin:0;
}
header,.brand,.actions,.workbar,.workfoot,.colorrow,.check {
  display:flex;
  align-items:center;
}
header {
  height:72px;
  padding:0 26px;
  justify-content:space-between;
  border-bottom:1px solid var(--border);
}
.brand,.actions {
  gap:12px;
}
.mark {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:9px;
  background:var(--ink);
  color:#fff;
  font:bold 25px serif;
  box-shadow:inset 0 -4px 0 #0002;
}
h1 {
  font-size:21px;
  letter-spacing:.035em;
  margin:0;
}
h2 {
  font-size:16px;
  margin:0 0 14px;
}
button,select,input,textarea {
  font:inherit;
}
button,select,input:not([type=range],[type=checkbox]),textarea {
  border:1px solid #cdd3df;
  border-radius:7px;
  background:white;
  color:inherit;
}
button,select {
  cursor:pointer;
}
button {
  padding:9px 12px;
  font-size:14px;
  font-weight:600;
}
button:hover {
  background:#f3f5fb;
}
button:disabled {
  opacity:.45;
  cursor:default;
}
button.primary {
  background:var(--ink);
  color:white;
  padding:11px 19px;
  border:0;
}
.wide {
  width:100%;
  margin-top:9px;
}
.link {
  border:0;
  padding:2px 0;
  background:none;
  color:var(--ink);
  font-size:13px;
}
.remove {
  color:#85494a;
  margin-top:24px;
}
small,.workfoot {
  color:#596377;
  font-size:12px;
}
main {
  display:grid;
  grid-template-columns:minmax(190px,230px) minmax(280px,1fr) minmax(245px,295px);
  min-height:calc(100dvh - 72px);
}
aside {
  padding:22px 20px;
  min-width:0;
}
section {
  border-top:1px solid var(--border);
  margin-top:22px;
  padding-top:20px;
}
.stack {
  display:grid;
  gap:6px;
}
.stack button {
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  min-width:0;
  overflow:hidden;
}
.stack button span:last-child {
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
}
.layer {
  border-color:transparent;
  background:#f6f7fa;
}
.layer[aria-pressed=true] {
  background:#eaf0ff;
  border-color:#a9b6e5;
  color:var(--ink);
}
.type-symbol {
  font:600 17px Georgia;
  color:#66728d;
}
.sample {
  display:grid;
  place-items:center;
  width:38px;
  min-width:38px;
  height:29px;
  border-radius:4px;
  background:#222d47;
  font:900 21px serif;
}
.workspace {
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#ebedf2;
  border-inline:1px solid var(--border);
}
.workbar,.workfoot {
  justify-content:space-between;
  padding:13px 22px;
}
.workbar {
  background:#f7f8fa;
  border-bottom:1px solid var(--border);
}
.workbar h2 {
  margin:0;
}
.workbar select {
  width:auto;
  margin:0;
  font-size:13px;
  padding-block:6px;
}
.stage {
  flex:1;
  display:grid;
  place-items:center;
  padding:24px 20px;
  background-image:radial-gradient(#cdd2dd .85px,transparent .85px);
  background-size:12px 12px;
}
.frame {
  width:100%;
  display:grid;
  place-items:center;
}
canvas {
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:min(76dvh,820px);
  touch-action:none;
  cursor:grab;
}
.canvas-surface {
  position:relative;
  max-width:100%;
  min-width:0;
  box-shadow:0 8px 25px #1b26462e;
}
#selection {
  position:absolute;
  border:1px dashed white;
  outline:1px solid #315ed4;
  pointer-events:none;
}
.snap-guide {
  position:absolute;
  background:#ff54ad;
  box-shadow:0 0 1px #471732;
  pointer-events:none;
}
#guideX {
  top:0;
  bottom:0;
  width:1px;
}
#guideY {
  left:0;
  right:0;
  height:1px;
}
canvas:not(:focus) + #selection {
  display:none;
}
canvas:active {
  cursor:grabbing;
}
.workfoot {
  background:#f7f8fa;
  border-top:1px solid var(--border);
}
label {
  display:block;
  margin:10px 0;
  font-size:14px;
}
select,input:not([type=checkbox],[type=color]),textarea {
  width:100%;
  padding:8px;
  margin-top:5px;
}
textarea {
  resize:vertical;
}
select {
  appearance:none;
  padding-right:26px;
  background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23596578' stroke-width='1.7'/%3E%3C/svg%3E") no-repeat right 9px center;
}
input[type=range],input[type=checkbox] {
  accent-color:var(--ink);
}
input[type=color] {
  width:38px;
  height:30px;
  padding:2px;
  cursor:pointer;
}
output {
  float:right;
  color:#657087;
}
.stroke {
  display:grid;
  grid-template-columns:1.25fr 1fr;
  gap:12px;
  align-items:end;
}
.stroke label {
  margin:6px 0;
}
.stroke input {
  display:block;
  margin-top:5px;
}
.stroke input[type=color] {
  width:100%;
  height:35px;
}
.colorrow {
  justify-content:space-between;
}
.check {
  gap:6px;
}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,canvas:focus-visible {
  outline:3px solid #8a9ee9;
  outline-offset:2px;
}
[hidden] {
  display:none!important;
}
@media(min-width:740px) {
  main {
    height:calc(100dvh - 72px);
  }
  aside {
    overflow:auto;
  }
  .stage {
    min-height:0;
  }
}
@media(max-width:739px) {
  main {
    grid-template-columns:200px 1fr;
  }
  .right {
    grid-column:1/-1;
    border-top:1px solid var(--border);
  }
  canvas {
    max-height:62dvh;
  }
}
@media(max-width:620px) {
  header {
    height:60px;
    padding:0 12px;
  }
  .actions {
    gap:4px;
  }
  .actions small {
    max-width:92px;
    font-size:11px;
  }
  .brand {
    gap:6px;
  }
  h1 {
    font-size:17px;
  }
  button.primary {
    font-size:13px;
    padding:9px;
  }
  main {
    display:flex;
    flex-direction:column;
  }
  .workspace {
    order:-1;
  }
  .stage {
    padding:12px;
  }
  canvas {
    max-height:51dvh;
  }
  .left,.right {
    padding:18px;
  }
  .workbar,.workfoot {
    padding:8px 14px;
  }
}
@media(min-width:740px) and (max-width:949px) {
  main {
    grid-template-columns:160px minmax(200px,1fr) 224px;
  }
  aside {
    padding:18px 12px;
  }
  .workbar,.workfoot {
    padding:10px;
  }
  .workfoot {
    flex-wrap:wrap;
    gap:4px;
  }
  .stage {
    padding:10px;
  }
}
