/* ------------------------------------------------------------------
   5KEPINDOU 拼豆 Studio
------------------------------------------------------------------- */
:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e9f0;
  --line-strong: #cbd5e1;
  --violet: #7c3aed;
  --violet-dark: #6d28d9;
  --fuchsia: #d946ef;
  --soft: #f8fafc;
  --violet-soft: #f5f3ff;
  --green: #059669;
  --red: #dc2626;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--violet-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 顶部栏 ---------------- */
.studio-topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  position: relative;
  z-index: 20;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right { margin-left: auto; }
.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  flex: none;
}
.studio-brand:hover { text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 5px); gap: 2px; }
.brand-mark i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.topbar-divider { width: 1px; height: 20px; background: var(--line); flex: none; }
.studio-title { font-size: 13px; font-weight: 600; color: #475569; flex: none; }
.project-name {
  font-size: 12px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  max-width: 210px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.quota-badge {
  font-size: 11px;
  color: var(--violet-dark);
  background: var(--violet-soft);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}
.quota-badge.warn { background: #fff7ed; color: #b45309; }
.quota-badge.user { background: #ecfdf5; color: var(--green); }
.topbar-link { font-size: 12px; color: #475569; white-space: nowrap; }
.topbar-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.topbar-btn:hover { border-color: #c4b5fd; }
.topbar-btn.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--violet), var(--fuchsia));
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.2);
}
.topbar-btn:disabled { opacity: 0.55; cursor: progress; }
.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 7px;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--soft); }
.member-dot { background: #fef3c7; color: #b45309; border-radius: 999px; padding: 1px 5px; font-size: 9px; }
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  z-index: 50;
}
.user-dropdown a, .user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 12px;
  color: #334155;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--soft); text-decoration: none; }
.user-dropdown button { color: var(--red); }

/* ---------------- 主体布局 ---------------- */
.studio-shell {
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 330px;
  min-height: 0;
}
.studio-shell.source-hidden { grid-template-columns: minmax(0, 1fr) 330px; }
.studio-shell.source-hidden .source-panel { display: none; }
.studio-main { min-width: 0; display: flex; flex-direction: column; min-height: 0; }

/* 左侧原图对照 */
.source-panel {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 12px;
  min-height: 0;
}
.source-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.source-panel-head h2 { margin: 0; font-size: 12px; color: #334155; }
.source-image-box {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #f8fafc;
  background-image: linear-gradient(45deg, #eef2f7 25%, transparent 25%, transparent 75%, #eef2f7 75%), linear-gradient(45deg, #eef2f7 25%, transparent 25%, transparent 75%, #eef2f7 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  padding: 6px;
}
.source-image-box img {
  display: none;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.12));
}
.source-image-box.has-image img { display: block; }
.source-image-box.has-image #sourcePlaceholder { display: none; }
.source-image-box p { margin: 0; padding: 10px; color: #94a3b8; font-size: 11px; line-height: 1.6; text-align: center; }
.source-panel .btn-ghost { width: 100%; padding: 7px 9px; }
.source-panel .field-hint { margin: 0; overflow-wrap: anywhere; }

.studio-toolbar {
  min-height: 46px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 5px 12px;
  overflow-x: auto;
  flex: none;
}
.tool-group { display: flex; align-items: center; gap: 4px; flex: none; }
.tool-group + .tool-group { border-left: 1px solid var(--line); padding-left: 12px; }
.tool-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tool-btn:hover { background: var(--soft); }
.tool-btn.active { background: var(--violet-soft); color: var(--violet-dark); border-color: #ddd6fe; }
.tool-btn.icon { width: 28px; height: 28px; padding: 0; font-size: 16px; line-height: 1; }
.brush-size { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.brush-size select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 2px 3px;
  font-size: 11px;
  color: var(--ink);
}
.active-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-strong);
  display: inline-block;
  margin-left: 3px;
}
.active-color-label {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #94a3b8;
}
.zoom-label { font-size: 11px; color: var(--muted); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.check-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #475569; white-space: nowrap; }
.check-inline input { accent-color: var(--violet); }

.canvas-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: #f8fafc;
  background-image: radial-gradient(#dbe3ee 0.7px, transparent 0.7px);
  background-size: 16px 16px;
}
.canvas-empty {
  width: min(100%, 430px);
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 38px 26px;
  text-align: center;
  color: var(--muted);
}
.empty-icon { color: #a78bfa; display: flex; justify-content: center; margin-bottom: 10px; }
.canvas-empty h1 { margin: 0; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.canvas-empty p { margin: 9px auto 0; font-size: 12px; line-height: 1.75; max-width: 330px; }
.empty-actions { display: flex; justify-content: center; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.empty-note { margin-top: 18px !important; font-size: 11px !important; color: #94a3b8 !important; }
.canvas-stage {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
  line-height: 0;
  position: relative;
}
.canvas-stage canvas { display: block; border-radius: 6px; touch-action: none; }
.canvas-stage[data-tool="brush"] canvas,
.canvas-stage[data-tool="eraser"] canvas,
.canvas-stage[data-tool="bucket"] canvas { cursor: crosshair; }
.canvas-stage[data-tool="picker"] canvas { cursor: copy; }

.studio-statusbar {
  height: 30px;
  flex: none;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
}
.status-mode { color: var(--violet-dark); font-weight: 600; }
.status-hint { margin-left: auto; color: #94a3b8; white-space: nowrap; }

/* ---------------- 右侧面板 ---------------- */
.studio-panel {
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; padding: 0 12px; }
.panel-tab {
  border: 0;
  background: none;
  padding: 13px 12px 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.panel-tab.active { color: var(--violet-dark); border-bottom-color: var(--violet); }
.panel-body { overflow-y: auto; padding: 0 16px 26px; flex: 1; min-height: 0; }
.panel-section { padding: 16px 0; border-bottom: 1px solid #f1f5f9; }
.panel-section:last-child { border-bottom: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-head h2 { margin: 0; font-size: 13px; letter-spacing: -0.01em; }
.field-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; color: #475569; letter-spacing: 0.02em; }
.field-hint { margin: 4px 0 0; font-size: 11px; color: #94a3b8; line-height: 1.55; }
.select, .input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
  font-size: 12px;
  outline: none;
}
.select:focus, .input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.14); }
.size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.size-grid .field-label { margin: 0; }
.size-grid .input { margin-top: 5px; }
.check-line { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11px; color: #475569; }
.check-line input, .switch-line input { accent-color: var(--violet); }
.board-row { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.board-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
}
.board-btn:hover { border-color: #c4b5fd; }
.board-btn.active { background: var(--violet-soft); border-color: #ddd6fe; color: var(--violet-dark); }
.switch-line { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #475569; }
.range-label { display: flex; justify-content: space-between; align-items: center; margin: 11px 0 4px; font-size: 11px; color: #475569; }
.range-label:first-of-type { margin-top: 4px; }
.range-label span { color: var(--violet-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.range { width: 100%; accent-color: var(--violet); height: 18px; }
.text-btn { border: 0; background: none; color: var(--violet-dark); font-size: 11px; font-weight: 600; padding: 0; }
.export-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cloud-box { margin-top: 12px; border: 1px solid #ede9fe; background: #faf5ff; border-radius: 10px; padding: 10px; }
.cloud-box .field-hint { margin: 0 0 7px; color: #6d28d9; }
.btn-cloud { width: 100%; border: 0; border-radius: 8px; background: var(--violet); color: #fff; padding: 8px; font-size: 12px; font-weight: 700; }
.btn-cloud:hover { background: var(--violet-dark); }
.text-link { display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 600; }

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--violet), var(--fuchsia));
  box-shadow: 0 7px 16px rgba(124, 58, 237, 0.2);
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn-ghost { border: 1px solid var(--line); background: #fff; color: #334155; }
.btn-ghost:hover { border-color: #c4b5fd; text-decoration: none; }
.btn-primary:disabled, .btn-ghost:disabled { opacity: 0.55; cursor: progress; }

/* ---------------- 调色板 ---------------- */
.palette-top { padding: 14px 0 10px; position: sticky; top: 0; background: #fff; z-index: 2; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 5px; max-height: 44vh; overflow-y: auto; padding: 2px 2px 8px; }
.palette-swatch {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.palette-swatch i {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--swatch, #ccc);
  border: 1px solid rgba(15, 23, 42, 0.12);
}
.palette-swatch span { font-size: 8px; line-height: 1.2; color: #64748b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.palette-swatch.active { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.18); }
.palette-swatch:hover { border-color: #c4b5fd; }
.used-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.used-colors { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.used-row {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  border-radius: 6px;
  padding: 5px 6px;
  text-align: left;
  color: #334155;
}
.used-row:hover { background: var(--soft); }
.used-row.active { background: var(--violet-soft); }
.used-row i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(15, 23, 42, 0.12); flex: none; }
.used-row .u-code { width: 44px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; color: var(--muted); flex: none; }
.used-row .u-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.used-row .u-count { font-size: 10px; color: #94a3b8; font-variant-numeric: tabular-nums; }

/* ---------------- 弹窗 ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(100%, 400px);
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  text-align: center;
}
.modal-card h2 { margin: 0 0 8px; font-size: 18px; }
.modal-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-actions a { flex: 1; }
.modal-close { border: 0; background: none; color: #94a3b8; font-size: 11px; margin-top: 13px; }
.preview-card {
  width: min(96vw, 880px);
  max-height: 92vh;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}
.preview-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.preview-head h2 { margin: 0; font-size: 15px; }
.icon-btn { border: 0; background: var(--soft); border-radius: 50%; width: 28px; height: 28px; font-size: 18px; line-height: 1; color: #475569; }
#previewImage { max-width: 100%; max-height: calc(92vh - 130px); object-fit: contain; border-radius: 8px; background: #f8fafc; margin: 0 auto; }
.preview-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 12px; }

.studio-toast {
  position: fixed;
  left: 50%;
  bottom: 44px;
  z-index: 90;
  transform: translate(-50%, 8px);
  max-width: min(90vw, 480px);
  background: #0f172a;
  color: #f8fafc;
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  text-align: center;
}
.studio-toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* 拖拽进入提示（拖到画布区域时） */
#studio-drop {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 3px dashed var(--violet);
  background: rgba(124, 58, 237, 0.08);
  pointer-events: none;
  display: none;
}
#studio-drop.active { display: block; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .studio-shell { grid-template-columns: 190px minmax(0, 1fr) 300px; }
  .studio-shell.source-hidden { grid-template-columns: minmax(0, 1fr) 300px; }
  .project-name { max-width: 130px; }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  .studio-topbar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .studio-title, .topbar-divider { display: none; }
  .project-name { display: none; }
  .topbar-right { gap: 6px; flex-wrap: wrap; }
  .studio-shell { display: block; height: auto; }
  .studio-shell.source-hidden { display: block; }
  .source-panel { display: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .studio-shell:not(.source-hidden) .source-panel { display: flex; }
  .source-panel-head { width: 100%; }
  .source-image-box { width: 120px; height: 110px; flex: none; }
  .source-panel .field-hint { flex: 1; min-width: 140px; }
  .source-panel .btn-ghost { width: auto; }
  .studio-main { height: 64vh; }
  .studio-panel { border-left: 0; border-top: 1px solid var(--line); height: auto; }
  .panel-body { overflow: visible; padding-bottom: 30px; }
  .canvas-scroll { padding: 14px; }
  .palette-grid { max-height: 300px; }
  .studio-statusbar .status-hint { display: none; }
}
@media (max-width: 560px) {
  .topbar-btn { padding: 6px 8px; font-size: 11px; }
  .quota-badge { font-size: 10px; }
  .studio-toolbar { gap: 8px; padding: 5px 8px; }
  .tool-group + .tool-group { padding-left: 8px; }
  .canvas-empty { padding: 28px 18px; }
  .studio-main { height: 58vh; }
  .export-row { grid-template-columns: 1fr; }
}

/* ---------------- 原创空白画板 ---------------- */
.topbar-gallery { font-weight: 600; }
#topbarSaveDesign { border-color: #c4b5fd; color: var(--violet-dark); }
#topbarSaveDesign:disabled { opacity: 0.5; }
.empty-actions-three { flex-wrap: wrap; }
.design-status {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f1f5f9;
  color: #64748b;
  white-space: nowrap;
}
.design-status.draft { background: #fef3c7; color: #b45309; }
.design-status.published { background: #dcfce7; color: #15803d; }
.design-save-row { grid-template-columns: 1fr 1fr; }
#designLoginLink, #galleryLink { display: block; margin-top: 7px; font-size: 11px; }
#designSaveHint { margin-top: 8px; }

.blank-modal {
  width: min(100%, 540px);
  max-height: 92vh;
  overflow-y: auto;
  text-align: left;
  padding: 20px;
}
.blank-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.blank-modal-head h2 { margin: 0 0 4px; }
.blank-modal-head p { margin: 0; }
.blank-group-label {
  margin: 15px 0 7px !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8 !important;
}
#blankPresets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
#blankBoardPresets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }

.blank-presets button {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  border-radius: 9px;
  padding: 8px 4px 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.blank-presets button span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 500;
  color: #94a3b8;
}
.blank-presets button:hover { border-color: #c4b5fd; }
.blank-presets button.active { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-dark); }
.blank-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.blank-custom label { font-size: 11px; color: #64748b; }
.blank-custom .input { margin-top: 4px; }
.blank-modal .field-label { margin-top: 9px; }
.blank-modal .select, .blank-modal .input { width: 100%; margin-top: 4px; }
.form-error {
  margin: 10px 0 0 !important;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c !important;
  font-size: 12px !important;
}
.blank-modal .modal-actions { justify-content: flex-end; }
.blank-modal .modal-actions button { flex: 0 0 auto; min-width: 110px; }
.source-panel.is-blank .source-image-box { background-image: none; background: #f8fafc; }
.source-panel.is-blank #sourcePlaceholder { max-width: 160px; white-space: pre-line; }

@media (max-width: 1180px) {
  .topbar-gallery { display: none; }
}
@media (max-width: 900px) {
  .blank-modal { max-height: calc(100vh - 30px); }
}
@media (max-width: 560px) {
  #blankPresets, #blankBoardPresets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blank-custom { grid-template-columns: 1fr; }
  .design-save-row { grid-template-columns: 1fr; }
  .blank-modal .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .blank-modal .modal-actions button { min-width: 0; }
}
/* 游客权限提示 */
.guest-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 13px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 11px;
  line-height: 1.5;
}
.guest-notice a {
  flex: none;
  font-weight: 700;
  color: #b45309;
  white-space: nowrap;
}
.guest-notice a:hover { text-decoration: underline; }