:root {
  color-scheme: dark;
  --bg: #060713;
  --panel: #101225;
  --line: #2a2d45;
  --text: #f7f7fb;
  --muted: #9da3ba;
  --accent: #6c5cf6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button {
  font: inherit;
  cursor: pointer;
}
.user-page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
}
.user-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 28, .94);
}
.user-page-brand {
  display: flex;
  min-width: 0;
}
.user-page-brand img {
  width: 172px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}
.user-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.user-page-status {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-page-actions button {
  height: 38px;
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.user-page-actions button:hover:not(:disabled) {
  border-color: var(--accent);
}
#userPageSaveBtn {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.user-page-workspace {
  min-height: 0;
  position: relative;
  background: #f7f8ff;
}
.user-page-frame,
.user-page-editor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.user-page-editor {
  display: none;
  resize: none;
  padding: 22px;
  border: 0;
  outline: 0;
  background: #0d1022;
  color: #f7f7fb;
  font: 14px/1.65 Consolas, "SFMono-Regular", monospace;
}
.user-page-workspace.is-editing .user-page-frame {
  display: none;
}
.user-page-workspace.is-editing .user-page-editor {
  display: block;
}
@media(max-width: 640px) {
  .user-page-shell {
    grid-template-rows: 112px minmax(0, 1fr);
  }
  .user-page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .user-page-brand img {
    width: 150px;
    height: 46px;
  }
  .user-page-actions {
    width: 100%;
  }
  .user-page-status {
    margin-right: auto;
  }
  .user-page-actions button {
    min-width: 62px;
    height: 34px;
    font-size: 13px;
  }
}
