/* 编辑面板：工具风格，和小程序本身的梦幻风区分开 */
#editor { display: none; width: 360px; height: min(844px, calc(100vh - 40px)); flex: none; flex-direction: column;
  background: rgba(24,18,44,.92); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; color: #e9e4f7; font-size: 13px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4); }
body.editor-open #editor { display: flex; }
#editor-fab { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; z-index: 50;
  background: linear-gradient(135deg, #ff7eb3, #9d8bff); color: #fff; font-size: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
@media (max-width: 900px) {
  #editor { position: fixed; left: 8px; right: 8px; bottom: 8px; width: auto; height: 62vh; z-index: 49; }
  #editor-fab { bottom: auto; top: 42%; right: 0; width: 30px; height: 46px; border-radius: 14px 0 0 14px; font-size: 15px; opacity: .85; }
}
.ed-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.ed-head b { font-size: 15px; }
.ed-status { font-size: 11px; color: #8fe3b0; }
.ed-status.warn { color: #ffcf6e; }
.ed-close { margin-left: auto; color: #aaa; font-size: 20px; line-height: 1; }
.ed-tabs { display: flex; gap: 4px; padding: 0 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ed-tabs button { flex: 1; padding: 6px 0; border-radius: 8px; font-size: 12px; color: #b7aed3; }
.ed-tabs button.on { background: rgba(255,126,179,.18); color: #ff9ac8; font-weight: 700; }
.ed-body { flex: 1; overflow-y: auto; padding: 10px 16px; scrollbar-width: thin; }
.ed-body h4 { font-size: 12px; color: #9d8bff; margin: 14px 0 6px; }
.ed-tip { font-size: 11.5px; color: #9a91b8; line-height: 1.6; margin: 4px 0 8px; }
.ed-row { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 8px; margin: 7px 0; }
.ed-row span { color: #cfc8e6; font-size: 12px; }
.ed-row input[type=range] { width: 100%; accent-color: #ff7eb3; }
.ed-row input[type=number], .ed-row input[type=text], .ed-row input[type=time], .ed-row select {
  width: 100%; min-width: 64px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff; border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12px; }
.ed-row input[type=number] { width: 64px; }
.ed-row:has(input[type=text]), .ed-row:has(select), .ed-row:has(input[type=time]) { grid-template-columns: 112px 1fr; }
.ed-row input[type=color] { width: 44px; height: 26px; border: 0; background: none; padding: 0; }
.ed-row code { font-size: 11px; color: #9a91b8; }
.ed-col { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.ed-col span { font-size: 11.5px; color: #9a91b8; }
.ed-col input, .ed-col textarea { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 12.5px; resize: vertical; }
.ed-switch { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: rgba(157,139,255,.12); font-size: 12.5px; cursor: pointer; }
.ed-switch input { accent-color: #ff7eb3; width: 16px; height: 16px; }
.ed-imgs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ed-imgs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.18); }
.ed-imgs button:hover { border-color: #ff9ac8; }
.ed-imgs img { width: 44px; height: 44px; object-fit: contain; }
.ed-imgs span { font-size: 10.5px; color: #b7aed3; }
.ed-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-btns button { padding: 7px 12px; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 12px; }
.ed-foot { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.ed-foot button { flex: 1; padding: 9px 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #cfc8e6; font-size: 12.5px; }
.ed-foot .ed-save { background: linear-gradient(90deg, #ff7eb3, #9d8bff); color: #fff; font-weight: 700; }
.ed-admin { display: block; text-align: center; font-size: 12px; color: #9d8bff; padding: 0 0 12px; text-decoration: none; }

/* 编辑态下给可改的东西描个虚线框 */
body.editing-text #screen [data-t] { outline: 1.5px dashed rgba(255,126,179,.85); outline-offset: 2px; border-radius: 4px; cursor: text; }
body.editing-text #screen [data-t]:focus { outline-style: solid; background: rgba(255,255,255,.85); color: #3b2d5a; }
body.editing-img #screen [data-img] { outline: 2px dashed rgba(157,139,255,.95); outline-offset: 2px; cursor: copy; }
