/* ===== 全局变量 ===== */
:root {
  /* 槐花配色：乳白花序 + 新绿枝叶 */
  --primary: #7a9e6a;
  --primary-dark: #5a7d4e;
  --primary-light: #e4efd9;
  --accent: #dce8c8;
  --bg: #f4f8ef;
  --card-bg: #fefffc;
  --border: #d4e4c8;
  --text: #2f3a2c;
  --text-muted: #6d8268;
  --success: #6a9e72;
  --warning: #c4b06a;
  --danger: #c97a6a;
  --shadow: 0 4px 20px rgba(90, 125, 78, 0.1);
  --radius: 16px;
}

/* ===== 重置与基础 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部导航 ===== */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 14px rgba(74, 110, 64, 0.28);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  color: white;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand .icon { font-size: 22px; }

.navbar-links { display: flex; gap: 8px; }

.navbar-links a {
  color: rgba(255,255,255,0.85);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.2s;
}

.navbar-links a:hover,
.navbar-links a.active {
  background: rgba(255,255,255,0.2);
  color: white;
  text-decoration: none;
}

/* ===== 主容器 ===== */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ===== 卡片 ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .icon { font-size: 20px; }

/* ===== 表单元素 ===== */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: #fdf6f9;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201, 122, 155, 0.15);
  background: white;
}

.form-input::placeholder { color: #c4a0b0; }

/* ===== 上传区域 ===== */
.upload-zone {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f0f6ea;
  position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: #fce8f0;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon { font-size: 42px; margin-bottom: 12px; }

.upload-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.upload-hint { font-size: 13px; color: #c4a0b0; }

/* ===== 图片预览 ===== */
.preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.preview-item {
  position: relative;
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.55);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.preview-remove:hover { background: var(--danger); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(201, 122, 155, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 122, 155, 0.45);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-light);
}

.btn-success {
  background: linear-gradient(135deg, #6dbe8f 0%, #4da870 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(109, 190, 143, 0.35);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(109, 190, 143, 0.45);
}

.btn-warning {
  background: linear-gradient(135deg, #f0b060 0%, #d89040 100%);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #e07070 0%, #c05050 100%);
  color: white;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 12px;
  width: 100%;
}

/* ===== 识别结果区域 ===== */
.recognition-section { margin-top: 20px; }

.recognition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.recognition-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.recognition-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.flower-set-group { margin-bottom: 20px; }

.flower-set-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--primary-light);
}

.flower-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flower-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s;
  user-select: none;
}

.flower-chip input[type="checkbox"] { display: none; }

.flower-chip:hover { border-color: var(--primary); background: #f0f6ea; }

.flower-chip.checked {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.flower-chip.checked::before {
  content: "✓";
  font-size: 12px;
  color: var(--primary);
}

/* ===== AI 状态 ===== */
.ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.ai-status.loading {
  background: #f0f4ff;
  color: #4060cc;
  border: 1px solid #c0d0f0;
}

.ai-status.success {
  background: #f0faf4;
  color: #3a8a5a;
  border: 1px solid #a0d0b0;
}

.ai-status.error {
  background: #fff0f0;
  color: #c04040;
  border: 1px solid #f0b0b0;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #c0d0f0;
  border-top-color: #4060cc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 提示/徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: #d8f5e8; color: #2e7d50; }
.badge-count { background: var(--primary); color: white; }

/* ===== 成功提示弹窗 ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #2e2e2e;
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { background: #2e7d50; }
.toast.error { background: #c04040; }

/* ===== 管理页面 - 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label { font-size: 13px; color: var(--text-muted); }

/* ===== 管理页面 - 数据表格 ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

.data-table th {
  background: linear-gradient(135deg, #f5dde8 0%, #eed0dc 100%);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 12px 14px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th:first-child { text-align: center; }

.data-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--primary-light);
  vertical-align: middle;
}

.data-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.data-table tr:hover td { background: #fdf5f8; }
.data-table tr:last-child td { border-bottom: none; }

.cell-check { color: var(--success); font-size: 16px; }
.cell-empty { color: #ddd; font-size: 12px; }

/* ===== 操作栏 ===== */
.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.action-bar .flex-1 { flex: 1; }

/* ===== 设置弹窗 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: 18px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

.modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 52px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-desc { font-size: 14px; }

/* ===== 成员行操作 ===== */
.member-actions { display: flex; gap: 6px; justify-content: center; }

/* ===== 分割线 ===== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ===== 信息栏 ===== */
.info-bar {
  background: #f8f0f4;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.info-bar .info-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ===== 视图切换 tabs ===== */
.view-tabs {
  display: flex;
  gap: 4px;
  background: rgba(212, 228, 198, 0.5);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.view-tab {
  flex: 1;
  padding: 11px 16px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.view-tab.active {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 2px 10px rgba(90, 125, 78, 0.16);
}

/* ===== 过滤栏 ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-bar input {
  flex: 1;
  min-width: 200px;
}

.filter-bar .filter-bar-input-wrap {
  flex: 1;
  min-width: 200px;
}
.filter-bar .filter-bar-input-wrap .form-input {
  width: 100%;
}

/* ===== 成员标签 ===== */
.member-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  margin: 3px;
}

/* 花坊兑换参考：成员角标 = 拥有记录里未列入花坊图鉴子集的花名种数 */
.member-tag-extracount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid rgba(123, 48, 96, 0.45);
  font-size: 11px;
  font-weight: 700;
  color: #7b3060;
  line-height: 1;
  cursor: default;
}

.th-subhint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.member-tag-muted {
  background: #f0e8ec;
  color: #a08090;
  font-weight: 500;
}

/* ===== 花卉胶囊（小标签） ===== */
.flower-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  margin: 3px;
  background: #f0f6ea;
  color: var(--primary-dark);
  border: 1px solid var(--primary-light);
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
  vertical-align: middle;
}

.flower-pill-missing {
  background: #fdf6e8;
  color: #b08040;
  border-color: #f0d8a0;
}

.flower-pill-selected {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
  font-weight: 600;
}

.flower-pill-clickable {
  cursor: pointer;
  background: white;
  color: var(--text);
  border-color: var(--border);
  transition: all 0.15s;
}

.flower-pill-clickable:hover {
  border-color: var(--primary);
  background: #f0f6ea;
  color: var(--primary-dark);
}

.pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  margin-left: 2px;
  font-weight: 700;
  line-height: 1;
}

.pill-remove:hover {
  background: var(--danger);
  color: white;
}

.flower-pill-box {
  min-height: 50px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

/* ===== 成员操作 ===== */
.member-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

/* ===== 搜索结果区域 ===== */
.search-mode { animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.input-with-clear {
  position: relative;
}
.input-with-clear .form-input {
  padding-right: 36px;
}
.input-clear-btn {
  display: none;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.input-clear-btn:hover {
  color: var(--primary);
  background: rgba(245, 221, 232, 0.6);
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fbf5 0%, #eef5e8 100%);
  border-radius: 12px;
  margin-bottom: 8px;
}

.result-summary.search-flower-summary {
  grid-template-columns: auto 1fr 1fr;
  align-items: center;
  gap: 16px;
}

.search-flower-summary-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(234, 173, 200, 0.65);
  background: #fff;
  display: block;
}

.search-flower-summary-thumb-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px dashed rgba(234, 173, 200, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #c9a8b8;
  background: rgba(255, 255, 255, 0.65);
}

/* 按花搜人结果：标题行配图 + 花名；桌面端保留统计条 */
.search-flower-result-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px !important;
}
.search-flower-result-heading .search-flower-summary-thumb,
.search-flower-result-heading .search-flower-summary-thumb-placeholder {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.search-flower-result-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.search-flower-stats-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}
.search-flower-owners-block {
  margin-top: 16px;
}

.result-stat {
  text-align: center;
}

.result-stat-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.result-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.result-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 12px;
  background: #fafafa;
  border-radius: 10px;
  min-height: 50px;
}

.empty-state-small {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px;
  background: #fafafa;
  border-radius: 10px;
}

.badge-warning {
  background: #fdf0d8;
  color: #b08040;
}

/* ===== 把按钮型 flower-chip 也支持 ===== */
button.flower-chip {
  border: 1.5px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

button.flower-chip:hover {
  border-color: var(--primary);
  background: #f0f6ea;
  color: var(--primary-dark);
}

/* ===== 花名纠错页 ===== */
.pair-card {
  padding: 22px;
}

.pair-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.pair-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
}

.pair-side {
  display: flex;
  flex-direction: column;
  background: #fdf6f9;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.pair-flower-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
  word-break: break-all;
  line-height: 1.5;
}

.char-diff {
  background: #fff0d0;
  color: #c06000;
  border-radius: 4px;
  padding: 0 2px;
  margin: 0 1px;
  font-weight: 700;
}

.pair-owners {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
}

.pair-owner-list {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  min-height: 50px;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-content: flex-start;
}

.member-tag-overlap {
  background: #fff0d0 !important;
  color: #c06000 !important;
  border: 1px solid #f0c060;
  position: relative;
}

.member-tag-overlap::after {
  content: "⚠";
  margin-left: 4px;
  font-size: 10px;
}

.pair-merge-btn {
  margin-top: auto;
}

.pair-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 4px;
  min-width: 120px;
}

.pair-vs {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  background: white;
  border: 2px solid var(--primary-light);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pair-overlap-warn {
  background: #fff0d0;
  color: #b06000;
  border: 1px solid #f0c060;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
}

/* ===== 响应式 ===== */
@media (max-width: 800px) {
  .pair-grid {
    grid-template-columns: 1fr;
  }
  .pair-middle {
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 0;
  }
  .pair-vs {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .navbar { padding: 0 16px; }
  .navbar-brand { font-size: 16px; }
  .container, .container-wide { padding: 20px 16px 50px; }
  .card { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-lg { font-size: 15px; }
  .action-bar { gap: 8px; }
  .result-summary { padding: 12px; }
  .search-flower-stats-bar {
    display: none;
  }
  .search-flower-result-heading .search-flower-summary-thumb,
  .search-flower-result-heading .search-flower-summary-thumb-placeholder {
    width: 48px;
    height: 48px;
  }
  .search-flower-owners-block {
    margin-top: 8px;
  }
  .result-stat-num { font-size: 22px; }
}

/* ========== 柒月星之花坊 · 只读花册 ========== */
body.gallery-readonly {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background-color: #eef4e8;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%237a9e6a' fill-opacity='0.07'%3E%3Ccircle cx='28' cy='32' r='5'/%3E%3Ccircle cx='22' cy='38' r='4.2'/%3E%3Ccircle cx='34' cy='38' r='4.2'/%3E%3Ccircle cx='28' cy='42' r='3.6'/%3E%3Ccircle cx='88' cy='78' r='4.5'/%3E%3Ccircle cx='82' cy='84' r='3.8'/%3E%3Ccircle cx='94' cy='84' r='3.8'/%3E%3Ccircle cx='88' cy='88' r='3.2'/%3E%3C/g%3E%3Cg stroke='%238fad7a' stroke-opacity='0.06' stroke-width='1.2' fill='none'%3E%3Cpath d='M60 8 Q62 20 60 28'/%3E%3Cpath d='M8 92 Q18 88 26 92'/%3E%3Cpath d='M100 24 Q108 32 100 40'/%3E%3C/g%3E%3Ccircle cx='60' cy='60' r='1.2' fill='%23a8c494' fill-opacity='0.12'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 110% 70% at 50% -15%, rgba(220, 232, 200, 0.62), transparent 52%),
    radial-gradient(ellipse 75% 55% at 100% 40%, rgba(228, 239, 217, 0.48), transparent 48%),
    radial-gradient(ellipse 65% 50% at 0% 85%, rgba(232, 241, 224, 0.52), transparent 45%),
    linear-gradient(180deg, #f8fbf4 0%, #eef4e8 45%, #e8f0e2 100%);
  background-size: 120px 120px, auto, auto, auto, auto;
  background-attachment: fixed, fixed, fixed, fixed, scroll;
}

/* 角落大朵槐花装饰 */
body.gallery-readonly::before,
body.gallery-readonly::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
}

body.gallery-readonly::before {
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  top: 72px;
  right: -4%;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='%23fafdf6' fill-opacity='0.9' stroke='%23c5d9b5' stroke-width='0.6' stroke-opacity='0.5'%3E%3Ccircle cx='100' cy='72' r='18'/%3E%3Ccircle cx='78' cy='92' r='15'/%3E%3Ccircle cx='122' cy='92' r='15'/%3E%3Ccircle cx='88' cy='108' r='13'/%3E%3Ccircle cx='112' cy='108' r='13'/%3E%3Ccircle cx='100' cy='98' r='12'/%3E%3C/g%3E%3Cpath d='M100 118 v52' stroke='%23a8c494' stroke-width='3' stroke-linecap='round' opacity='0.35'/%3E%3Cellipse cx='100' cy='168' rx='28' ry='10' fill='%238fad7a' fill-opacity='0.12'/%3E%3C/svg%3E");
}

body.gallery-readonly::after {
  width: min(36vw, 260px);
  height: min(36vw, 260px);
  bottom: 8%;
  left: -6%;
  opacity: 0.16;
  transform: rotate(-18deg) scaleX(-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='%23f6faf0' fill-opacity='0.85' stroke='%23b8d4a8' stroke-width='0.5' stroke-opacity='0.45'%3E%3Ccircle cx='100' cy='80' r='14'/%3E%3Ccircle cx='84' cy='94' r='11'/%3E%3Ccircle cx='116' cy='94' r='11'/%3E%3Ccircle cx='100' cy='102' r='10'/%3E%3C/g%3E%3Cpath d='M100 112 v40' stroke='%239bb88a' stroke-width='2.5' stroke-linecap='round' opacity='0.3'/%3E%3C/svg%3E");
}

body.gallery-readonly .gallery-navbar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(128deg, #9bb88a 0%, #6d8f62 46%, #5a7a50 100%);
  box-shadow: 0 4px 24px rgba(74, 110, 64, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  height: 64px;
  z-index: 100;
}

body.gallery-readonly .gallery-navbar-deco {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(72%, 520px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-content: center;
  gap: 4px 10px;
  padding-right: 14px;
  pointer-events: none;
  z-index: 0;
}

body.gallery-readonly .gallery-navbar-deco::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Ccircle cx='12' cy='12' r='3' fill='%23fff' fill-opacity='0.12'/%3E%3Ccircle cx='36' cy='28' r='2.5' fill='%23fffef9' fill-opacity='0.1'/%3E%3Ccircle cx='28' cy='8' r='2' fill='%23fafdf6' fill-opacity='0.14'/%3E%3C/svg%3E");
  background-size: 56px 56px;
  opacity: 0.9;
}

body.gallery-readonly .gallery-navbar-deco .nav-bloom {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  opacity: 0.58;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.15));
}

body.gallery-readonly .gallery-navbar-deco .nav-bloom-1 { width: 36px; height: 36px; opacity: 0.52; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-2 { width: 30px; height: 30px; margin-top: -8px; opacity: 0.62; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-3 { width: 24px; height: 24px; margin-top: 6px; opacity: 0.48; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-4 { width: 42px; height: 42px; opacity: 0.65; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-5 { width: 22px; height: 22px; margin-top: -6px; opacity: 0.45; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-6 { width: 32px; height: 32px; opacity: 0.55; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-7 { width: 20px; height: 20px; margin-top: 4px; opacity: 0.5; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-8 { width: 28px; height: 28px; opacity: 0.58; }
body.gallery-readonly .gallery-navbar-deco .nav-bloom-9 { width: 18px; height: 18px; margin-top: -10px; opacity: 0.42; }

body.gallery-readonly .gallery-brand,
body.gallery-readonly .gallery-navbar-meta {
  position: relative;
  z-index: 1;
}

/* 花瓣飘落 */
.gallery-petals {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
}

.gallery-petals .petal {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, rgba(255, 254, 249, 0.95) 0%, rgba(240, 248, 232, 0.75) 100%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.65), 0 1px 2px rgba(122, 158, 106, 0.15);
  opacity: 0;
  animation: gallery-petal-fall linear infinite;
  will-change: transform, opacity;
}

.gallery-petals .petal::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  top: -2px;
  left: 2px;
}

.gallery-petals .petal-1 { left: 4%;  --dur: 11s; --delay: 0s;   --drift: 32px;  --rot: 220deg; --sz: 11px; }
.gallery-petals .petal-2 { left: 12%; --dur: 13s; --delay: 1.2s; --drift: -26px; --rot: 280deg; --sz: 9px;  }
.gallery-petals .petal-3 { left: 20%; --dur: 10s; --delay: 2.5s; --drift: 38px;  --rot: 200deg; --sz: 13px; }
.gallery-petals .petal-4 { left: 28%; --dur: 12s; --delay: 0.6s; --drift: -34px; --rot: 320deg; --sz: 10px; }
.gallery-petals .petal-5 { left: 36%; --dur: 11s; --delay: 3.8s; --drift: 22px;  --rot: 240deg; --sz: 12px; }
.gallery-petals .petal-6 { left: 44%; --dur: 14s; --delay: 1.8s; --drift: -28px; --rot: 300deg; --sz: 9px;  }
.gallery-petals .petal-7 { left: 52%; --dur: 10s; --delay: 4.5s; --drift: 26px;  --rot: 260deg; --sz: 11px; }
.gallery-petals .petal-8 { left: 60%; --dur: 13s; --delay: 2.2s; --drift: -20px; --rot: 190deg; --sz: 10px; }
.gallery-petals .petal-9 { left: 68%; --dur: 12s; --delay: 5s;   --drift: 36px;  --rot: 340deg; --sz: 8px;  }
.gallery-petals .petal-10 { left: 76%; --dur: 11s; --delay: 0.9s; --drift: -18px; --rot: 210deg; --sz: 12px; }
.gallery-petals .petal-11 { left: 84%; --dur: 13s; --delay: 3.2s; --drift: 24px;  --rot: 250deg; --sz: 9px;  }
.gallery-petals .petal-12 { left: 92%; --dur: 10s; --delay: 6s;   --drift: -32px; --rot: 310deg; --sz: 11px; }
.gallery-petals .petal-13 { left: 7%;  --dur: 12s; --delay: 4s;   --drift: 20px;  --rot: 230deg; --sz: 8px;  }
.gallery-petals .petal-14 { left: 17%; --dur: 11s; --delay: 7s;   --drift: -24px; --rot: 270deg; --sz: 12px; }
.gallery-petals .petal-15 { left: 25%; --dur: 13s; --delay: 1.5s; --drift: 30px;  --rot: 195deg; --sz: 10px; }
.gallery-petals .petal-16 { left: 33%; --dur: 10s; --delay: 5.5s; --drift: -22px; --rot: 330deg; --sz: 9px;  }
.gallery-petals .petal-17 { left: 41%; --dur: 12s; --delay: 2.8s; --drift: 28px;  --rot: 215deg; --sz: 11px; }
.gallery-petals .petal-18 { left: 49%; --dur: 11s; --delay: 6.5s; --drift: -30px; --rot: 285deg; --sz: 10px; }
.gallery-petals .petal-19 { left: 57%; --dur: 13s; --delay: 0.4s; --drift: 18px;  --rot: 205deg; --sz: 12px; }
.gallery-petals .petal-20 { left: 65%; --dur: 10s; --delay: 4.2s; --drift: -26px; --rot: 295deg; --sz: 8px;  }
.gallery-petals .petal-21 { left: 73%; --dur: 12s; --delay: 7.5s; --drift: 34px;  --rot: 245deg; --sz: 11px; }
.gallery-petals .petal-22 { left: 81%; --dur: 11s; --delay: 2s;   --drift: -16px; --rot: 325deg; --sz: 9px;  }
.gallery-petals .petal-23 { left: 89%; --dur: 13s; --delay: 5.8s; --drift: 22px;  --rot: 255deg; --sz: 10px; }
.gallery-petals .petal-24 { left: 96%; --dur: 10s; --delay: 3.5s; --drift: -28px; --rot: 275deg; --sz: 12px; }

.gallery-petals .petal {
  width: var(--sz, 10px);
  height: var(--sz, 10px);
  animation-duration: var(--dur, 16s);
  animation-delay: var(--delay, 0s);
}

@keyframes gallery-petal-fall {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(0deg);
    opacity: 0;
  }
  6% {
    opacity: 0.78;
  }
  80% {
    opacity: 0.55;
  }
  100% {
    transform: translate3d(var(--drift, 20px), 108vh, 0) rotate(var(--rot, 260deg));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-petals {
    display: none;
  }
}

body.gallery-readonly .gallery-brand {
  gap: 12px;
}

body.gallery-readonly .gallery-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

body.gallery-readonly .gallery-brand-mark svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}

body.gallery-readonly .gallery-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

body.gallery-readonly .gallery-brand-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

body.gallery-readonly .gallery-brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.88);
}

body.gallery-readonly .gallery-meta-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.06em;
}

body.gallery-readonly .gallery-container {
  position: relative;
  z-index: 0;
  padding-top: 24px;
}

body.gallery-readonly .gallery-intro-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 20px 26px !important;
  background: linear-gradient(145deg, rgba(255, 255, 252, 0.94) 0%, rgba(241, 248, 234, 0.9) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 228, 200, 0.9);
  box-shadow: 0 8px 32px rgba(90, 125, 78, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.gallery-readonly .gallery-intro-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='2' fill='%237a9e6a' fill-opacity='0.08'/%3E%3C/svg%3E");
  background-size: 24px 24px;
  opacity: 0.7;
  pointer-events: none;
}

body.gallery-readonly .gallery-intro-card::after {
  content: "✿";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  line-height: 1;
  color: rgba(122, 158, 106, 0.12);
  pointer-events: none;
}

body.gallery-readonly .gallery-intro-bar {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  text-align: center;
}

body.gallery-readonly .gallery-intro-line {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

body.gallery-readonly #mainContent > .stats-grid {
  gap: 14px;
  margin-bottom: 22px;
}

body.gallery-readonly #mainContent .stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 250, 242, 0.88) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 228, 200, 0.85);
  border-radius: 14px;
  padding: 18px 12px;
  box-shadow: 0 4px 18px rgba(90, 125, 78, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.2s, box-shadow 0.2s;
}

body.gallery-readonly #mainContent .stat-card::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 232, 200, 0.45) 0%, transparent 70%);
  pointer-events: none;
}

body.gallery-readonly #mainContent .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(90, 125, 78, 0.12);
}

body.gallery-readonly #mainContent .stat-number {
  color: var(--primary-dark);
  font-size: 30px;
}

body.gallery-readonly #mainContent > .view-tabs {
  background: rgba(255, 255, 252, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 228, 200, 0.75);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 22px !important;
  box-shadow: 0 4px 16px rgba(90, 125, 78, 0.06);
}

body.gallery-readonly #mainContent .view-tab.active {
  color: var(--primary-dark);
  font-weight: 700;
}

body.gallery-readonly #mainContent .card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 228, 200, 0.88);
  background: linear-gradient(168deg, rgba(255, 255, 252, 0.95) 0%, rgba(248, 252, 244, 0.9) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(90, 125, 78, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.gallery-readonly #mainContent .card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 100% 0%, rgba(220, 232, 200, 0.35), transparent 68%);
  pointer-events: none;
}

body.gallery-readonly #mainContent .card-title {
  color: var(--primary-dark);
  border-bottom: 1px solid var(--primary-light);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

body.gallery-readonly #mainContent .form-input {
  border-color: var(--border);
  background: #fefffc;
}

body.gallery-readonly #mainContent .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 158, 106, 0.2);
}

body.gallery-readonly #mainContent .flower-chip:hover {
  background: #eef5e6;
}

body.gallery-readonly #mainContent .flower-chip:active,
body.gallery-readonly #mainContent .flower-chip:focus-visible {
  outline: 2px solid var(--primary-light);
}

body.gallery-readonly #mainContent .member-tag {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid rgba(122, 158, 106, 0.25);
}

body.gallery-readonly #mainContent .data-table th {
  background: linear-gradient(180deg, #f2f8ec 0%, #e8f2e0 100%);
  color: var(--primary-dark);
}

body.gallery-readonly #mainContent .data-table tbody tr:hover {
  background: #f6faf2;
}

body.gallery-readonly .ai-status.loading {
  background: #f0f6ea;
  border-color: var(--border);
  color: var(--primary-dark);
}

body.gallery-readonly .spinner {
  border-color: var(--primary-light);
  border-top-color: var(--primary-dark);
}

body.gallery-readonly .search-flower-summary-thumb {
  border-color: rgba(122, 158, 106, 0.45);
}

body.gallery-readonly .search-flower-summary-thumb-placeholder {
  border-color: rgba(122, 158, 106, 0.5);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.75);
}

body.gallery-readonly .search-flower-result-card {
  border-color: rgba(212, 228, 200, 0.9);
  background: linear-gradient(165deg, rgba(255, 255, 252, 0.96) 0%, rgba(246, 250, 242, 0.92) 100%);
  box-shadow: 0 8px 26px rgba(90, 125, 78, 0.09);
}

@media (max-width: 640px) {
  body.gallery-readonly .gallery-navbar {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
    gap: 4px 8px;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  body.gallery-readonly .gallery-navbar-deco {
    width: 62%;
    padding-right: 8px;
    gap: 2px 6px;
  }

  body.gallery-readonly .gallery-navbar-deco .nav-bloom-1 { width: 28px; height: 28px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-2 { width: 24px; height: 24px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-3 { width: 20px; height: 20px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-4 { width: 30px; height: 30px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-5 { width: 18px; height: 18px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-6 { width: 26px; height: 26px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-7 { width: 16px; height: 16px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-8 { width: 22px; height: 22px; }
  body.gallery-readonly .gallery-navbar-deco .nav-bloom-9 { width: 14px; height: 14px; }

  .gallery-petals .petal-19,
  .gallery-petals .petal-20,
  .gallery-petals .petal-21,
  .gallery-petals .petal-22,
  .gallery-petals .petal-23,
  .gallery-petals .petal-24 {
    display: none;
  }

  body.gallery-readonly .gallery-brand-title {
    font-size: 16px;
    letter-spacing: 0.05em;
  }

  body.gallery-readonly .gallery-brand-sub {
    font-size: 10px;
  }

  body.gallery-readonly .gallery-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  body.gallery-readonly .gallery-brand-mark svg {
    width: 26px;
    height: 26px;
  }

  body.gallery-readonly .gallery-navbar-meta {
    width: 100%;
    justify-content: flex-start;
  }

  body.gallery-readonly .gallery-meta-pill {
    font-size: 10px;
    padding: 3px 9px;
  }

  body.gallery-readonly .gallery-container {
    padding: 10px 10px max(36px, env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  body.gallery-readonly::before {
    width: 200px;
    height: 200px;
    top: 56px;
    right: -20%;
    opacity: 0.14;
  }

  body.gallery-readonly::after {
    width: 160px;
    height: 160px;
    opacity: 0.12;
  }

  body.gallery-readonly .gallery-intro-card {
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
  }

  body.gallery-readonly .gallery-intro-card::after {
    font-size: 28px;
    right: 8px;
    opacity: 0.1;
  }

  body.gallery-readonly .gallery-intro-line {
    font-size: 12px;
    line-height: 1.5;
  }

  body.gallery-readonly #mainContent > .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
  }

  body.gallery-readonly #mainContent .stat-card {
    padding: 8px 4px 10px;
    border-radius: 10px;
  }

  body.gallery-readonly #mainContent .stat-number {
    font-size: 17px;
    margin-bottom: 2px;
  }

  body.gallery-readonly #mainContent .stat-label {
    font-size: 9px;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  body.gallery-readonly #mainContent > .view-tabs {
    gap: 4px;
    padding: 3px;
    margin-bottom: 12px !important;
    border-radius: 10px;
  }

  body.gallery-readonly #mainContent .view-tab {
    padding: 8px 6px;
    font-size: 12px;
    min-width: 0;
  }

  body.gallery-readonly #mainContent .card {
    padding: 14px 12px;
    margin-bottom: 12px;
  }

  body.gallery-readonly #mainContent .card-title {
    font-size: 15px;
    margin-bottom: 12px;
  }

  body.gallery-readonly #mainContent .form-input {
    font-size: 15px;
    padding: 10px 12px;
  }

  body.gallery-readonly #mainContent .flower-checkbox-grid {
    gap: 6px;
  }

  body.gallery-readonly #mainContent .flower-chip {
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 8px;
  }

  body.gallery-readonly #mainContent .member-tag {
    font-size: 11px;
    padding: 4px 7px;
    margin: 2px;
    max-width: 100%;
    word-break: break-all;
  }

  body.gallery-readonly #mainContent .flower-pill {
    font-size: 11px;
    padding: 5px 9px;
    margin: 2px;
    word-break: break-word;
  }

  body.gallery-readonly #mainContent .search-flower-stats-bar {
    display: none;
  }
  body.gallery-readonly #mainContent .search-flower-result-heading {
    margin-bottom: 10px !important;
  }
  body.gallery-readonly #mainContent .search-flower-owners-block {
    margin-top: 6px;
  }

  body.gallery-readonly #mainContent .result-stat-num {
    font-size: 18px !important;
  }

  body.gallery-readonly #mainContent .result-stat-label {
    font-size: 11px;
  }

  body.gallery-readonly #mainContent .result-section-title {
    font-size: 13px;
  }

  body.gallery-readonly #mainContent .data-table {
    font-size: 11px;
  }

  body.gallery-readonly #mainContent .data-table th,
  body.gallery-readonly #mainContent .data-table td {
    padding: 8px 6px;
  }

  body.gallery-readonly #mainContent .data-table td:first-child {
    white-space: normal;
    max-width: 42vw;
  }

  body.gallery-readonly #mainContent .filter-bar {
    margin-bottom: 10px;
  }

  body.gallery-readonly .ai-status {
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* 花坊立绘（与 static/style.css 同步） */
.workshop-grid-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}
.workshop-grid-cell {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.workshop-grid-cell-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #f8f4f6;
  display: block;
}
.workshop-grid-cell-chk {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin: 8px 0 6px;
  color: var(--text-muted);
}
.workshop-grid-name { font-size: 13px; padding: 8px 10px; }
.workshop-row-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  vertical-align: middle;
  background: #faf5f8;
}
.workshop-row-thumb-placeholder {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ccc;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.flower-name-with-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flower-table-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #faf5f8;
}
.flower-table-thumb-placeholder {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px dashed var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #c9b8c4;
  background: #fafafa;
}
