:root {
  --accent: #2f6fde; --accent-d: #2459b8; --accent-l: #eaf1fd;
  --text: #1d2433; --muted: #6b7488; --line: #e4e8f0; --line-2: #d3d9e5;
  --bg: #f3f5f9; --panel: #ffffff; --danger: #d0342f; --ok: #2e9d5b;
  --radius: 8px; --shadow: 0 8px 28px rgba(26, 40, 80, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button {
  font: inherit; cursor: pointer; border: 1px solid var(--line-2); background: #fff; color: var(--text);
  border-radius: 7px; padding: 6px 11px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .4; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--accent-d); color: #fff; }
button.ghost { border-color: transparent; background: transparent; }
button.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
button.icon-only { padding: 6px; }
.ui-ico { flex-shrink: 0; display: block; }
input, textarea, select {
  font: inherit; border: 1px solid var(--line-2); border-radius: 7px; padding: 7px 9px; width: 100%; background: #fff; color: inherit;
}
select { width: auto; padding: 6px 8px; cursor: pointer; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(47, 111, 222, .18); border-color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); min-height: 1.2em; margin: 4px 0; }
.hint { color: var(--muted); font-size: 12px; margin: 0; }
.spacer { flex: 1; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.brand { font-weight: 700; font-size: 17px; color: var(--text); display: inline-flex; align-items: center; gap: 8px; letter-spacing: .2px; }
.brand.big { font-size: 26px; }
.logo { display: inline-flex; color: #fff; background: linear-gradient(135deg, #3b7bf0, #2251c4); border-radius: 9px; padding: 4px; box-shadow: 0 3px 10px rgba(47, 95, 208, .3); }
.logo.small { border-radius: 7px; padding: 3px; margin: 0 2px 0 4px; }

/* 登录 */
.auth { min-height: 100%; display: flex; align-items: center; justify-content: center; gap: 64px; padding: 32px;
  background: radial-gradient(1200px 600px at 10% 0%, #e6eefc 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #e7f6f1 0%, transparent 55%), var(--bg); }
.auth-hero { max-width: 420px; }
.tagline { font-size: 18px; color: #3d4659; margin: 14px 0 22px; }
.features { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; color: #3d4659; }
.features li { display: flex; align-items: center; gap: 10px; }
.features li span { color: var(--accent); background: var(--accent-l); border-radius: 8px; padding: 5px; display: inline-flex; }
.hero-art { width: 100%; max-width: 380px; }
.card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-card { width: 360px; max-width: 100%; padding: 30px; display: flex; flex-direction: column; gap: 13px; }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card label { display: flex; flex-direction: column; gap: 5px; color: #44506a; font-size: 13px; }
.auth-card button.primary { justify-content: center; padding: 9px; }
.tabs { display: flex; gap: 4px; background: #eef1f7; border-radius: 9px; padding: 3px; }
.tab { flex: 1; border: none; background: transparent; justify-content: center; }
.tab.active { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* 列表 */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.list-main { max-width: 1120px; margin: 0 auto; padding: 28px; }
.list-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.list-title { margin: 0; font-size: 20px; }
.map-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.map-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s, transform .15s; }
.map-card:hover { border-color: #bccbea; box-shadow: var(--shadow); transform: translateY(-1px); }
.map-thumb { display: block; height: 120px; background: linear-gradient(135deg, #f5f8fe, #eef3fb); border-bottom: 1px solid var(--line); }
.map-thumb svg { width: 100%; height: 100%; display: block; }
.map-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.map-title { font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; word-break: break-all; }
.map-title:hover { color: var(--accent); }
.card-actions { display: flex; gap: 6px; }
.card-actions button { padding: 3px 9px; font-size: 12px; }
.ai-tag { display: inline-block; font-size: 11px; color: #7b5cd6; background: #f1ecfd; border-radius: 4px; padding: 0 5px; margin-left: 4px; }

/* 编辑器 */
.editor { position: fixed; inset: 0; display: flex; flex-direction: column; }
.toolbar {
  display: flex; align-items: center; gap: 4px; padding: 6px 10px; background: #fff; border-bottom: 1px solid var(--line);
  flex-shrink: 0; min-height: 52px; overflow-x: auto; overflow-y: visible;
}
.tb-group { display: flex; gap: 2px; }
.tools { display: flex; align-items: center; gap: 4px; }
.mobile-only { display: none !important; }
.toolbar button.tb.icon-only span { display: none; }
.toolbar button.tb.menu-on { background: var(--accent-l); color: var(--accent); }
.toolbar button.tb { border-color: transparent; background: transparent; padding: 5px 8px; flex-direction: column; gap: 2px; font-size: 11px; color: #3d4659; border-radius: 7px; min-width: 40px; }
.toolbar button.tb.icon-only { flex-direction: row; padding: 7px; min-width: 0; }
.toolbar button.tb:hover:not(:disabled) { background: #f0f4fb; color: var(--accent); }
.toolbar button.tb.on { background: var(--accent-l); color: var(--accent); }
.toolbar .sep { width: 1px; height: 26px; background: var(--line); margin: 0 6px; flex-shrink: 0; }
.title-input { width: 200px; flex-shrink: 0; font-weight: 600; font-size: 15px; border-color: transparent; }
.title-input:hover { border-color: var(--line-2); }
.save-status { font-size: 12px; color: var(--muted); white-space: nowrap; padding-left: 4px; }
.save-status[data-state="error"], .save-status[data-state="conflict"] { color: var(--danger); }
.save-status[data-state="saved"] { color: var(--ok); }
.menu-wrap { position: relative; }
.menu { position: fixed; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; display: flex; flex-direction: column; min-width: 170px; }
.menu button { border: none; justify-content: flex-start; padding: 8px 10px; }
.menu button:hover { background: #f0f4fb; }

.workspace { flex: 1; display: flex; min-height: 0; }
.canvas { position: relative; flex: 1; overflow: hidden; background: #f5f7fb; outline: none; cursor: default; }
.canvas::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(60, 80, 120, .13) 1px, transparent 1px); background-size: 22px 22px; }
.canvas.dark::before { background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); }
.canvas.panning { cursor: grabbing; }
.canvas.dragging { cursor: move; }
.canvas svg { position: relative; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.mm-node, .mm-fold, .mm-mark, .mm-boundary { cursor: pointer; }
.mm-mark:hover path { opacity: 1; stroke-width: 1.8; }
.node-editor {
  position: absolute; z-index: 5; resize: none; overflow: hidden; margin: 0;
  border: 2px solid #ff9a1f; background: #fff; color: var(--text); white-space: pre; box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.node-editor:focus { outline: none; border-color: #ff9a1f; }
.edit-done { position: absolute; z-index: 6; padding: 8px 14px; min-height: 40px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 4px 14px rgba(26, 40, 80, .2); }
.tools-hint { display: none; }
.zoombar { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 2px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; box-shadow: 0 2px 10px rgba(26, 40, 80, .08); z-index: 4; }
.zoombar button { border: none; padding: 6px; }
.zoombar button:hover { background: #f0f4fb; }
.zoom-label { min-width: 52px; justify-content: center; font-size: 12px; }
.canvas-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(29, 36, 51, .88); color: #fff; padding: 7px 14px; border-radius: 8px; font-size: 13px; z-index: 6; pointer-events: none; }
.conflict-bar {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10;
  background: #fff4e5; border: 1px solid #ffc677; border-radius: 8px; padding: 10px 14px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}

/* 右侧面板 */
.panel { width: 290px; flex-shrink: 0; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-tabs { display: flex; padding: 6px 6px 0; gap: 2px; border-bottom: 1px solid var(--line); }
.panel-tabs button { flex: 1; border: none; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; padding: 8px 4px; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.panel-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.panel-tabs button:hover { background: #f5f7fb; }
.panel-body { flex: 1; overflow-y: auto; padding: 4px 16px 20px; }
.panel h4 { margin: 16px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .5px; }
.pane-empty { margin: 30px 0; text-align: center; color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 6px; align-items: center; }
button.wide { width: 100%; justify-content: center; margin-top: 18px; }
button.toggle.on { background: var(--accent-l); border-color: var(--accent); color: var(--accent); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.swatches .row { margin-top: 6px; }
.sw { width: 100%; aspect-ratio: 1; padding: 0; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .1); justify-content: center; position: relative; }
.sw:hover { transform: scale(1.08); }
.sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw.auto { background: repeating-linear-gradient(45deg, #fff 0 4px, #eef1f6 4px 8px); font-size: 10px; color: var(--muted); }
.sw.custom { overflow: hidden; background: conic-gradient(#e5484d, #f5a524, #2f9e6a, #2f6fde, #8e4ec6, #e5484d); }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: none; }
.shape-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.shape-list button { flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 11px; color: #3d4659; }
.shape-list button.on { border-color: var(--accent); background: var(--accent-l); color: var(--accent); }
.icon-group h4 { margin-top: 14px; }
.icon-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.icon-grid button { padding: 5px; justify-content: center; border-color: transparent; border-radius: 8px; }
.icon-grid button:hover { background: #f0f4fb; border-color: var(--line-2); }
.icon-grid button.on { background: var(--accent-l); border-color: var(--accent); }
.theme-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-card { flex-direction: column; padding: 6px; gap: 5px; font-size: 12px; border-radius: 10px; }
.theme-card svg { width: 100%; height: auto; border-radius: 6px; display: block; border: 1px solid rgba(0, 0, 0, .06); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47, 111, 222, .2); color: var(--accent); }
.seg { display: flex; background: #eef1f7; border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: none; background: transparent; justify-content: center; padding: 5px; }
.seg button.on { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
#note-input { resize: vertical; line-height: 1.6; min-height: 160px; }

/* 弹窗 */
.dialog { border: none; border-radius: 14px; padding: 24px; width: 560px; max-width: calc(100vw - 32px); box-shadow: 0 10px 40px rgba(0, 0, 0, .2); }
.dialog::backdrop { background: rgba(20, 30, 50, .35); }
.dialog h2 { margin: 0 0 14px; font-size: 18px; }
.dialog label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; color: #44506a; }
.dialog textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.keys { border-collapse: collapse; width: 100%; font-size: 13px; }
.keys td { padding: 6px; border-bottom: 1px solid #eef1f7; vertical-align: top; }
.keys td:first-child { white-space: nowrap; color: var(--accent); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

@media (max-width: 1100px) { .toolbar button.tb:not(.icon-only) span { display: none; } .toolbar button.tb { min-width: 0; flex-direction: row; padding: 7px; } }
@media (max-width: 900px) { .auth-hero { display: none; } }
@media (max-width: 760px) {
  .panel { position: absolute; right: 0; top: 52px; bottom: 0; z-index: 20; box-shadow: -8px 0 24px rgba(0, 0, 0, .12); }
  .title-input { width: 120px; }
  .save-status { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 14px; }
  .list-main { padding: 14px; }
}
@media (max-width: 640px) { #me { display: none; } .brand { white-space: nowrap; } }

/* 结构菜单 */
.struct-menu { width: 318px; padding: 10px; gap: 8px; }
.struct-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 2px; }
.struct-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.menu .struct-card { flex-direction: column; justify-content: center; gap: 4px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 11px; color: #3d4659; }
.menu .struct-card:hover { border-color: #b8c7ea; background: #f6f8fd; }
.menu .struct-card.on { border-color: var(--accent); background: var(--accent-l); color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.struct-card svg { display: block; }
.struct-dirs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.struct-dirs[hidden] { display: none; }
.struct-dir-btns { display: flex; gap: 4px; }
.menu .struct-dir-btns button { border: 1px solid var(--line); padding: 4px 10px; border-radius: 6px; font-size: 12px; justify-content: center; }
.menu .struct-dir-btns button.on { border-color: var(--accent); background: var(--accent-l); color: var(--accent); }
.struct-tip { font-size: 11px; color: var(--muted); line-height: 1.5; padding: 0 2px; }

/* 字体选择器 */
.font-picker { position: relative; margin-bottom: 8px; }
.font-btn { width: 100%; justify-content: space-between; padding: 7px 10px; font-size: 14px; }
.font-btn::after { content: ''; border: 4.5px solid transparent; border-top-color: #7a8399; margin-top: 4px; }
.font-btn.on { border-color: var(--accent); }
.font-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 340px; overflow: auto;
  background: #fff; border: 1px solid var(--line-2); border-radius: 9px; box-shadow: 0 10px 28px rgba(20, 30, 60, .16); padding: 4px; }
.font-group { font-size: 11px; color: var(--muted); padding: 8px 8px 3px; letter-spacing: .5px; }
.font-item { width: 100%; border: none; background: transparent; display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; padding: 6px 8px; border-radius: 6px; text-align: left; }
.font-item:hover { background: #f1f4fa; }
.font-item.on { background: #e8efff; color: var(--accent); }
.font-name { font-size: 15px; white-space: nowrap; }
.font-sample { font-size: 13px; color: #7a8399; white-space: nowrap; }
.font-item.missing .font-name { color: #9aa3b5; }
.font-item.missing .font-sample { font-size: 11px; color: #b0b7c6; }

/* AI 制图、导入文件 */
.wide-dialog { width: 640px; }
#ai-form textarea { font-family: inherit; font-size: 14px; line-height: 1.6; }
#ai-mode { margin: -6px 0 12px; }
.drop { align-items: center; justify-content: center; text-align: center; gap: 6px !important; padding: 26px 16px; border: 1.5px dashed var(--line-2);
  border-radius: 12px; background: #f8fafd; cursor: pointer; color: var(--text) !important; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-l); }
.drop-ico { color: var(--accent); }
.drop .hint { max-width: 460px; }
.busy-line { display: inline-flex; align-items: center; gap: 8px; }
.busy-line::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-l); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#ai-mode { color: #9a6a12; }
#ai-mode.online { color: var(--ok); }
.dialog label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; }
.dialog label.check input { width: auto; }

.keys-h { font-size: 14px; margin: 16px 0 6px; }

/* ===== 手机（竖屏窄屏，或横屏的触屏小设备）：工具栏放到底部、面板变底部抽屉、菜单变底部弹出 ===== */
@media (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .toolbar { overflow: visible; min-height: 50px; padding: 6px 8px; gap: 6px; padding-top: max(6px, env(safe-area-inset-top)); }
  .toolbar > .logo, .toolbar > .spacer, .save-status { display: none; }
  .title-input { flex: 1; width: auto; min-width: 0; font-size: 16px; }
  .tools {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: #fff; border-top: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden; gap: 0; padding: 3px 4px calc(3px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(26, 40, 80, .06); scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .tools::-webkit-scrollbar { display: none; }
  /* 还能横滑时：边缘渐隐 + 箭头按钮。不能用 mask-image 做渐隐：它会把工具栏里弹出的菜单也一起遮掉 */
  .tools-hint:not([hidden]) {
    display: flex; position: fixed; z-index: 26; bottom: env(safe-area-inset-bottom); height: 56px; width: 46px; min-height: 0; padding: 0;
    align-items: center; border: none; border-radius: 0; color: var(--accent); font-size: 24px; line-height: 1;
    pointer-events: none; /* 渐隐部分不挡手指：照样能按住滑动、点到下面的按钮 */
  }
  .tools-hint > span {
    pointer-events: auto; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding-bottom: 2px;
    border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(26, 40, 80, .18);
  }
  .tools-hint.right { right: 0; justify-content: flex-end; padding-right: 4px; background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 60%); }
  .tools-hint.left { left: 0; justify-content: flex-start; padding-left: 4px; background: linear-gradient(to left, rgba(255, 255, 255, 0), #fff 60%); }
  .tools .tb-group { gap: 0; }
  .tools .sep { height: 30px; margin: 0 3px; }
  .mobile-only { display: inline-flex !important; }
  .toolbar .tools button.tb, .toolbar .tools button.tb.icon-only { flex-direction: column; min-width: 54px; min-height: 50px; padding: 4px 6px; gap: 2px; font-size: 11px; flex-shrink: 0; }
  .toolbar .tools button.tb span { display: inline; white-space: nowrap; }
  .workspace { margin-bottom: calc(57px + env(safe-area-inset-bottom)); }
  .zoombar { right: 10px; bottom: 10px; }
  .zoombar button { padding: 9px; }
  .menu, .struct-menu {
    position: fixed !important; left: 8px !important; right: 8px; top: auto !important; width: auto !important;
    bottom: calc(64px + env(safe-area-inset-bottom)); max-height: 65vh; overflow-y: auto; border-radius: 14px; z-index: 40;
  }
  .menu button { padding: 12px 12px; font-size: 15px; }
  .panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: calc(57px + env(safe-area-inset-bottom)); width: auto; height: min(52vh, 480px);
    z-index: 24; border-left: none; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(20, 30, 60, .16);
  }
  .panel-tabs button { padding: 10px 4px; font-size: 13px; }
  .panel-body { padding: 4px 14px 16px; }
  .dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 18px; }
  .dialog input, .dialog textarea, .dialog select, .panel input, .panel textarea, .panel select { font-size: 16px; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions button { flex: 1 1 auto; min-height: 44px; justify-content: center; }
  .canvas-hint { top: 10px; max-width: calc(100vw - 24px); white-space: normal; text-align: center; }
  .conflict-bar { bottom: 70px; width: calc(100vw - 24px); flex-wrap: wrap; }
}
/* 横屏触屏小设备：面板放右侧，免得挡住整个画布 */
@media (pointer: coarse) and (max-height: 520px) and (min-width: 600px) {
  .panel { left: auto; top: 0; width: 320px; height: auto; border-radius: 16px 0 0 0; }
}
/* 列表页、登录页手机适配 */
@media (max-width: 640px) {
  .list-actions { flex-wrap: wrap; gap: 8px; }
  .list-actions .list-title { flex: 1 0 100%; }
  .list-actions > .spacer { display: none; }
  .list-actions > button { flex: 1 1 calc(50% - 8px); justify-content: center; min-height: 44px; }
  .map-list { grid-template-columns: 1fr; }
  .auth-card input { font-size: 16px; }
}
/* 触屏：按钮、色块加大，方便手指点 */
@media (pointer: coarse) {
  button, select, .auth-card input { min-height: 40px; }
  .swatches { gap: 6px; }
  .swatches > * { min-height: 0; min-width: 0; }
  .font-item { padding: 10px 8px; }
  .map-list button { min-height: 36px; }
}
