*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  font-family:Arial,Helvetica,sans-serif;
  color:#222;
  background:#fff;
  overflow:hidden;
}
.app{
  height:100vh;
  display:grid;
  grid-template-rows:38px 1fr 24px;
}
.topbar{
  height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 12px;
  border-bottom:1px solid #e3e3e3;
  background:#fff;
}
.brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  white-space:nowrap;
}
.brand-badge{
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border-radius:4px;
  background:#333;
  color:#fff;
  font-size:12px;
  font-weight:700;
}
.brand h1{
  display:inline;
  margin:0;
  font-size:18px;
  font-weight:500;
  color:#333;
}
.brand small{
  display:inline-block;
  margin-left:8px;
  color:#777;
  font-size:12px;
}
.top-actions{
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}
.workspace{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(330px,var(--left,49%)) 10px var(--mid,168px) 10px minmax(340px,1fr);
  background:#fff;
  padding:10px;
  gap:0;
}
.pane{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid #d7d7d7;
  background:#fff;
  position:relative;
}
.pane-head{
  flex:0 0 35px;
  height:35px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 7px;
  background:#5f6064;
  color:#fff;
  font-size:13px;
  line-height:1;
}
.pane-title{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}
.pane-title strong{font-weight:700}
.pane-title em{
  font-family:Georgia,"Times New Roman",serif;
  font-size:17px;
  font-weight:400;
}
.hamburger{font-size:16px}
.pane-tools{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:nowrap;
}
.tool{
  width:28px;
  height:28px;
  display:inline-grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:3px;
  background:transparent;
  color:#f4f4f4;
  font-size:15px;
  cursor:pointer;
  user-select:none;
  text-decoration:none;
}
.tool:hover{background:rgba(255,255,255,.16)}
.tool.sample{
  width:auto;
  padding:0 7px;
  font-family:Georgia,"Times New Roman",serif;
  font-style:italic;
  font-size:15px;
  color:#fff;
}
.file-tool{line-height:28px}
.editor-host{
  flex:1;
  min-height:0;
  position:relative;
  background:#fff;
}
.middle-panel{
  min-width:0;
  min-height:0;
  padding:0 10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:auto;
  background:#fff;
  border-top:1px solid #eee;
  border-bottom:1px solid #eee;
}
.middle-row.two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.middle-row.split{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:10px;
  align-items:center;
}
.middle-spacer{flex:1}
.middle-separator{
  height:1px;
  background:#eee;
  margin:2px 0;
}
.checkline{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#333;
  font-size:14px;
  cursor:pointer;
  user-select:none;
}
.checkline.wide{
  width:100%;
  justify-content:flex-start;
}
.checkline input{
  width:15px;
  height:15px;
  accent-color:#0b86d1;
}
.hint{
  margin:0 0 8px;
  color:#777;
  font-size:12px;
  line-height:1.42;
}
.preview-host{
  flex:1;
  min-height:0;
  overflow:auto;
  background:#fff;
  position:relative;
}
.frame-shell{
  width:100%;
  min-height:100%;
  background:#fff;
  margin:0 auto;
}
.frame-shell.mobile{
  width:390px;
  min-height:720px;
  margin:16px auto;
  border:8px solid #333;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 15px 40px rgba(0,0,0,.25);
}
.frame-shell.tablet{
  width:820px;
  min-height:760px;
  margin:16px auto;
  border:8px solid #333;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 15px 40px rgba(0,0,0,.25);
}
iframe{
  width:100%;
  height:100%;
  min-height:calc(100vh - 107px);
  display:block;
  border:0;
  background:#fff;
}
.frame-shell.mobile iframe{min-height:720px}
.frame-shell.tablet iframe{min-height:760px}
.resize-bar{
  cursor:col-resize;
  position:relative;
  background:#fff;
}
.resize-bar:before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:3px;
  height:58px;
  transform:translate(-50%,-50%);
  border-radius:999px;
  background:#d0d0d0;
}
.resize-bar:hover:before{background:#999}
.statusbar{
  height:24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 8px;
  border-top:1px solid #ddd;
  background:#f5f5f5;
  font-family:Consolas,"Courier New",monospace;
  color:#555;
  font-size:12px;
  overflow:hidden;
  white-space:nowrap;
}
.status-left,.status-right{
  min-width:0;
  display:flex;
  align-items:center;
  gap:20px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.btn{
  min-height:31px;
  height:31px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 12px;
  border:1px solid #d5d5d5;
  border-radius:4px;
  background:#fff;
  color:#333;
  font-family:Arial,Helvetica,sans-serif;
  font-size:13px;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  user-select:none;
}
.btn:hover{background:#f7f7f7}
.btn.dark{
  background:#333;
  border-color:#333;
  color:#fff;
}
.btn.blue{
  background:#428bca;
  border-color:#428bca;
  color:#fff;
}
.btn.green{
  background:#08c7ad;
  border-color:#08c7ad;
  color:#fff;
}
.btn.tall{
  width:100%;
  height:42px;
  font-size:15px;
}
.btn.big{
  width:100%;
  height:50px;
  font-size:20px;
}
select{
  width:100%;
  height:40px;
  border:1px solid #ddd;
  border-radius:4px;
  background:#fff;
  color:#333;
  padding:0 10px;
  font-size:14px;
}
.hidden,.hide{display:none!important}
.toast{
  position:fixed;
  z-index:50;
  left:50%;
  bottom:38px;
  transform:translateX(-50%) translateY(20px);
  opacity:0;
  pointer-events:none;
  background:#222;
  color:#fff;
  border-radius:999px;
  padding:9px 14px;
  font-size:13px;
  box-shadow:0 10px 25px rgba(0,0,0,.3);
  transition:.2s ease;
}
.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}
.modal{
  display:none;
  position:fixed;
  z-index:60;
  inset:0;
  background:rgba(0,0,0,.45);
  align-items:center;
  justify-content:center;
  padding:18px;
}
.modal.show{display:flex}
.modal-box{
  width:min(560px,100%);
  overflow:hidden;
  border:1px solid #ddd;
  border-radius:5px;
  background:#fff;
  box-shadow:0 20px 70px rgba(0,0,0,.35);
}
.modal-head{
  height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  background:#5f6064;
  color:#fff;
}
.modal-close{
  border:0;
  background:transparent;
  color:#fff;
  font-size:22px;
  cursor:pointer;
}
.modal-body{padding:14px}
.modal-body p{
  margin:0 0 10px;
  color:#777;
  font-size:12px;
  line-height:1.5;
}
.modal-body input{
  width:100%;
  height:38px;
  border:1px solid #ddd;
  border-radius:4px;
  padding:0 10px;
  font-size:14px;
}
.modal-alert{
  min-height:18px;
  margin-top:8px;
  color:#c33;
  font-size:12px;
}
.modal-foot{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:0 14px 14px;
}
@media(max-width:1000px){
  body{overflow:auto}
  .app{height:auto;min-height:100vh;grid-template-rows:auto auto 24px}
  .topbar{
    height:auto;
    align-items:flex-start;
    flex-direction:column;
    padding:8px 10px;
  }
  .top-actions{
    width:100%;
    flex-wrap:wrap;
    justify-content:flex-start;
  }
  .workspace{
    grid-template-columns:1fr;
    grid-template-rows:560px auto 560px;
    gap:10px;
    padding:8px;
  }
  .middle-panel{
    border:1px solid #ddd;
    padding:10px;
  }
  .resize-bar{display:none}
  iframe{min-height:560px}
}
