:root {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #1a243b;
  background: #f0f3f8;
  font-synthesis: none;
  --muted: #556479;
  --line: #dae1ee;
  --blue: #415bd1;
  --ink: #17233a;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button, a.button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6d88ff; outline-offset: 3px; }
button:disabled { cursor: default; }
p, h1, h2 { margin: 0; }
.topbar { border-bottom: 1px solid var(--line); background: #fafbfe; }
.topbar-content {
  min-height: 65px;
  max-width: 1250px;
  padding: 0 28px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 750; }
.brand-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
}
.brand-icon::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid #bbccff;
  border-right-color: #6f90fa;
  border-radius: 4px;
  transform: rotate(-12deg);
}
.account { display: flex; align-items: center; gap: 14px; }
.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8e0eb;
  border-radius: 24px;
  padding: 7px 12px;
  color: #4f5f76;
  background: #eef1f7;
  font-size: .875rem;
}
.connection i { width: 8px; height: 8px; background: #8191a7; border-radius: 50%; }
.connection.online { background: #e8f3ed; border-color: #cfe6d9; color: #216344; }
.connection.online i { background: #279861; }
main { max-width: 1250px; padding: 50px 28px 35px; margin: 0 auto; }
.intro { margin-bottom: 24px; }
.intro h1 { font-size: clamp(2rem, 4.5vw, 3.125rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.22; }
.intro p { color: var(--muted); margin-top: 12px; line-height: 1.65; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  color: #edf2ff;
  background: #17233a;
  border: 1px solid #283754;
  box-shadow: 0 12px 26px #24385a15;
}
.preview-header, .preview-footer {
  min-height: 54px;
  padding: 10px 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #1b2942;
  font-size: .875rem;
}
.preview-header { border-bottom: 1px solid #2d3d58; font-weight: 600; }
.preview-footer { border-top: 1px solid #2d3d58; color: #b4c3df; }
.canvas {
  min-height: 420px;
  display: grid;
  flex: 1;
  align-items: center;
  justify-items: center;
  padding: 22px;
  background-image: linear-gradient(#c7d9ff0c 1px, transparent 1px), linear-gradient(90deg, #c7d9ff0c 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
}
.canvas.dragging { box-shadow: inset 0 0 0 3px #8ea7ff; background-color: #253455; }
.empty {
  width: min(100%, 410px);
  display: flex;
  align-items: center;
  flex-direction: column;
  border: 1px dashed #60749c;
  border-radius: 14px;
  padding: 32px 18px;
  background: #19253cec;
  text-align: center;
}
.empty p { font-weight: 650; font-size: 1.23rem; margin: 25px 0 7px; }
.empty > span:not(.photo-icon) { font-size: .875rem; color: #b5c4e1; }
.photo-icon { position: relative; display: block; height: 39px; width: 48px; border: 1px solid #9bb5ff; border-radius: 7px; overflow: hidden; }
.photo-icon::before { content: ""; position: absolute; width: 8px; height: 8px; left: 9px; top: 7px; background: #b9caff; border-radius: 50%; }
.photo-icon::after {
  content: "";
  position: absolute;
  width: 33px;
  height: 29px;
  right: -6px;
  bottom: -10px;
  border: 1px solid #8ba7f5;
  border-radius: 4px;
  transform: rotate(-38deg);
}
.canvas img { max-width: 100%; max-height: 540px; object-fit: contain; box-shadow: 0 5px 24px #0005; }
.view-controls { display: flex; padding: 3px; border-radius: 9px; background: #121e32; }
.view-controls button {
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b9c9e2;
  font-size: .875rem;
  cursor: pointer;
}
.view-controls button[aria-pressed="true"] { background: #334564; color: white; }
.view-controls button:disabled { opacity: .55; cursor: default; }
.panel {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 26px #24385a0c;
}
.panel h2 { font-size: 1.32rem; letter-spacing: -.025em; }
.muted { color: var(--muted); line-height: 1.65; margin: 6px 0 19px; }
form { display: grid; gap: 12px; }
form label { font-weight: 600; font-size: .9rem; }
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c7d0e1;
  border-radius: 8px;
  color: var(--ink);
  background: #f9fafc;
}
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: center;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
}
.primary { width: 100%; background: var(--blue); color: #fff; }
.primary:hover:not(:disabled) { background: #344bbc; }
.primary:disabled { background: #e5e9f2; color: #5e6a7d; }
.secondary { margin-top: 9px; color: #3048b0; background: #eef1ff; }
.secondary:hover { background: #e2e8ff; }
.button-on-dark { margin-top: 20px; color: #eaf0ff; background: #334a7a; border-color: #6282c8; }
.button-on-dark:hover:not(:disabled) { background: #40588a; }
.button-on-dark:disabled { color: #aabbda; background: #2b3957; border-color: #465875; }
.text-button { border: 0; background: transparent; color: inherit; padding: 4px; font-size: .875rem; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.text-button:disabled { opacity: .62; text-decoration: none; }
.report { border: 1px solid #dce5fb; border-radius: 9px; background: #f3f6ff; padding: 11px 12px; margin-bottom: 16px; }
.report p { display: flex; flex-wrap: wrap; gap: 7px; font-size: .9rem; }
.report ul { margin: 7px 0 0; padding-left: 20px; line-height: 1.55; font-size: .875rem; color: #485875; overflow-wrap: anywhere; }
fieldset { padding: 0; margin: 0 0 16px; border: 0; min-inline-size: 0; display: grid; gap: 8px; }
.mode {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #dbe1ec;
  border-radius: 10px;
  cursor: pointer;
}
.mode:has(input:checked) { background: #f0f3ff; border-color: #a3b1f0; }
.mode input { margin: 5px 0 0; accent-color: var(--blue); }
.mode small { display: block; margin-top: 4px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
fieldset:disabled .mode { cursor: default; opacity: .8; }
.note, .footer { color: var(--muted); font-size: .875rem; line-height: 1.58; }
.note { margin-top: 13px; }
.footer { margin-top: 17px; }
.notice { margin-top: 14px; padding: 9px 12px; background: #fff0ed; color: #8a2a1a; border-radius: 7px; font-size: .94rem; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  main { padding: 28px 15px; }
  .topbar-content { padding: 0 15px; }
  .canvas { min-height: 280px; padding: 15px; }
  .canvas img { max-height: 400px; }
  .panel { padding: 19px; }
}
