/* ============================================
   Meuwoo Admin · 童话绘本 + 管理后台
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');
@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/style.css');

:root {
  --bg: #faf3e3;
  --bg-deep: #f3e6c8;
  --bg-side: #f5ead0;
  --paper: #fffaf0;
  --paper-2: #faf3e3;
  --ink: #3d2b1a;
  --ink-soft: #7a5c3d;
  --ink-faint: #b6a07e;
  --gold: #c9933a;
  --gold-soft: #e6c179;
  --gold-pale: #faecc8;
  --rose: #d18f86;
  --rose-pale: #f8e0db;
  --leaf: #7a9468;
  --leaf-deep: #4f7050;
  --leaf-pale: #e3eddc;
  --hairline: #e8d9b8;
  --hairline-soft: #f0e6cb;

  --font-hand: 'Caveat', 'LXGW WenKai', cursive;
  --font-cn-hand: 'LXGW WenKai', 'Caveat', sans-serif;
  --font-serif: 'Cormorant Garamond', 'LXGW WenKai', serif;
  --font-body: 'LXGW WenKai', 'Cormorant Garamond', serif;
  --font-mono: 'SF Mono', 'Menlo', 'Courier New', monospace;

  --ease-soft: cubic-bezier(0.34, 0.7, 0.3, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);

  --sidebar-w: 240px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,147,58,0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(122,148,104,0.04) 0%, transparent 40%);
  min-height: 100vh;
  /* clip（而非 hidden）：裁掉横向溢出但不创建滚动容器，
     否则 overflow-x:hidden 会令 overflow-y 计算为 auto，破坏侧栏 position:sticky 吸顶。 */
  overflow-x: clip;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ============== Layout ============== */
.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ============== Sidebar ============== */
.sidebar {
  background: var(--bg-side);
  border-right: 1px dashed var(--hairline);
  padding: 24px 16px 20px;
  display: flex; flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: baseline; gap: 8px;
  padding: 0 8px 22px;
  border-bottom: 1px dashed var(--hairline);
}
.sidebar-brand .en {
  font-family: var(--font-hand);
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.sidebar-brand .cn {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}
.sidebar-section {
  margin-top: 18px;
}
.sidebar-section-label {
  font-family: var(--font-hand);
  color: var(--ink-faint);
  font-size: 13px;
  padding: 0 10px 6px;
  letter-spacing: 1px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--font-cn-hand);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.2s var(--ease-soft);
  position: relative;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item .en {
  margin-left: auto;
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0;
}
.nav-item .icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--ink-soft);
}
.nav-item:hover { background: rgba(255,250,240,0.6); }
.nav-item.active {
  background: var(--paper);
  box-shadow: 0 2px 8px -4px rgba(61,43,26,0.15);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.nav-item .badge {
  background: var(--rose);
  color: white;
  font-size: 11px;
  font-family: var(--font-cn-hand);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: auto;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--hairline);
  display: flex; align-items: center; gap: 8px;
}
.sf-account {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: background 0.2s var(--ease-soft);
}
.sf-account:hover { background: var(--paper); }
.sf-gear {
  margin-left: auto;
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--ink-faint);
}
.sf-logout {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px dashed var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s var(--ease-soft);
}
.sf-logout:hover { color: var(--rose); border-color: var(--rose); border-style: solid; }
.sidebar-footer .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cn-hand);
  font-size: 15px;
  color: var(--paper);
}
.sidebar-footer .who {
  display: flex; flex-direction: column;
  line-height: 1.2;
}
.sidebar-footer .who .name {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink);
}
.sidebar-footer .who .role {
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--ink-faint);
}

/* ============== Main ============== */
.main {
  padding: 28px 36px 40px;
  max-width: 1200px;
  width: 100%;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}
.page-head h1 {
  font-family: var(--font-cn-hand);
  font-size: 28px;
  color: var(--ink);
  letter-spacing: 4px;
  font-weight: 500;
  margin: 0;
}
.page-head .en {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--gold);
  margin-left: 10px;
}
.page-head .sub {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.page-actions {
  display: flex; gap: 10px;
}

/* ============== Buttons ============== */
.btn {
  border: none;
  font-family: var(--font-cn-hand);
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.25s var(--ease-soft);
}
.btn .en { font-family: var(--font-hand); font-size: 13px; letter-spacing: 0; opacity: 0.8; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--gold) 100%);
  color: white;
  box-shadow: 0 4px 10px -4px rgba(201,147,58,0.5);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -6px rgba(201,147,58,0.55); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px dashed var(--ink-faint);
}
.btn-ghost:hover { background: var(--paper); color: var(--gold); border-color: var(--gold); }
.btn-outline {
  background: var(--paper);
  color: var(--gold);
  border: 1px solid var(--gold-soft);
}
.btn-outline:hover { background: var(--gold-pale); }
.btn-danger {
  background: var(--paper);
  color: var(--rose);
  border: 1px solid var(--rose-pale);
}
.btn-danger:hover { background: var(--rose-pale); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

/* ============== Cards ============== */
.card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px -4px rgba(61,43,26,0.08);
}
.card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.card-head h3 {
  font-family: var(--font-cn-hand);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}
.card-head .en {
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--gold);
  margin-left: 6px;
}

/* ============== Stat tiles ============== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-tile {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 14px 16px 16px;
  position: relative;
  overflow: hidden;
}
.stat-tile .label {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}
.stat-tile .label .en {
  font-family: var(--font-hand);
  color: var(--ink-faint);
  letter-spacing: 0;
  margin-left: 4px;
}
.stat-tile .value {
  font-family: var(--font-hand);
  font-size: 44px;
  color: var(--gold);
  line-height: 1;
  margin-top: 6px;
}
.stat-tile .delta {
  font-family: var(--font-cn-hand);
  font-size: 11px;
  color: var(--leaf-deep);
  margin-top: 4px;
}
.stat-tile.urgent .value { color: var(--rose); }
.stat-tile.urgent .delta { color: var(--rose); }

/* ============== Dashboard grid ============== */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Update reminder list */
.reminder-list {
  display: flex; flex-direction: column;
  gap: 10px;
}
.reminder-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--paper-2);
  border: 1px dashed var(--hairline);
  border-radius: 12px;
  transition: all 0.25s var(--ease-soft);
}
.reminder-row:hover {
  background: var(--paper);
  border-color: var(--gold-soft);
  border-style: solid;
}
.reminder-row .thumb {
  width: 42px; height: 42px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--gold-soft);
}
.reminder-row .thumb .placeholder-photo { position: absolute; inset: 4px; border-radius: inherit; }
.reminder-row .meta {
  display: flex; flex-direction: column; line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.reminder-row .meta .name {
  font-family: var(--font-cn-hand);
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 1px;
}
.reminder-row .meta .name .en { color: var(--gold); margin-left: 6px; font-family: var(--font-hand); }
.reminder-row .meta .info {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
}
.reminder-row .when {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--rose);
}
.reminder-row .when.ok { color: var(--leaf-deep); }
.reminder-row .when.warn { color: var(--gold); }

/* Activity feed */
.feed-item {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--hairline-soft);
}
.feed-item:last-child { border-bottom: none; }
.feed-time {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-faint);
  white-space: nowrap;
  width: 70px;
  flex: 0 0 70px;
}
.feed-body {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.feed-body .who { color: var(--gold); }
.feed-body .what { color: var(--ink-soft); }

/* ============== Kitten list grid ============== */
.kitten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.kitten-tile {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s var(--ease-soft);
  position: relative;
  display: flex; flex-direction: column;
  gap: 8px;
}
.kitten-tile:hover {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  box-shadow: 0 12px 24px -12px rgba(201,147,58,0.35);
}
.kitten-tile.add {
  border-style: dashed;
  border-color: var(--ink-faint);
  background: transparent;
  align-items: center; justify-content: center;
  color: var(--ink-soft);
  font-family: var(--font-cn-hand);
  font-size: 14px;
  letter-spacing: 2px;
  min-height: 240px;
}
.kitten-tile.add:hover {
  background: var(--paper);
  border-style: solid;
  border-color: var(--gold);
  color: var(--gold);
}
.kitten-tile.add .plus {
  font-family: var(--font-hand);
  font-size: 48px;
  line-height: 1;
  margin-bottom: 6px;
}
.kitten-tile .portrait-lg {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50% 48% 52% 50% / 52% 50% 50% 48%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5), inset 0 0 0 4px var(--gold-soft);
  margin-bottom: 4px;
}
.kitten-tile .portrait-lg .placeholder-photo { position: absolute; inset: 8px; border-radius: inherit; }
.kitten-tile .row1 {
  display: flex; align-items: baseline; justify-content: space-between;
}
.kitten-tile .name {
  font-family: var(--font-cn-hand);
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 2px;
}
.kitten-tile .name-en {
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--gold);
}
.kitten-tile .info {
  font-family: var(--font-cn-hand);
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.kitten-tile .row-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}
.status-pill {
  font-family: var(--font-cn-hand);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.status-pill.reserved { background: var(--gold-pale); color: var(--gold); }
.status-pill.available { background: var(--leaf-pale); color: var(--leaf-deep); }
.status-pill.adopted { background: var(--rose-pale); color: var(--rose); }
.kitten-tile .since {
  font-family: var(--font-hand);
  font-size: 12px;
  color: var(--ink-faint);
}

/* Filter chips */
.filter-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.chip {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink-soft);
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s var(--ease-soft);
}
.chip:hover { border-color: var(--gold-soft); color: var(--gold); }
.chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip .count {
  margin-left: 4px;
  font-family: var(--font-hand);
  font-size: 14px;
  opacity: 0.6;
}

/* ============== Editor layout ============== */
.editor-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  .editor-shell { grid-template-columns: 1fr; }
}
.editor-tabs {
  display: flex; flex-direction: column;
  gap: 4px;
  position: sticky; top: 24px;
  align-self: flex-start;
}
.editor-tab {
  background: transparent;
  border: none;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--font-cn-hand);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.2s var(--ease-soft);
}
.editor-tab:hover { background: var(--paper); color: var(--ink); }
.editor-tab.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 6px -3px rgba(61,43,26,0.15);
  position: relative;
}
.editor-tab.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 8px; bottom: 8px; width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.editor-tab .en {
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0;
}

.editor-body { display: flex; flex-direction: column; gap: 18px; }

/* Editor top bar */
.editor-topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.editor-topbar .back {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent; border: none;
  cursor: pointer;
}
.editor-topbar .thumb {
  width: 48px; height: 48px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: var(--gold-soft);
}
.editor-topbar .thumb .placeholder-photo { position: absolute; inset: 5px; border-radius: inherit; }
.editor-topbar .titles {
  display: flex; flex-direction: column;
  line-height: 1.2;
  flex: 1;
}
.editor-topbar .titles .name {
  font-family: var(--font-cn-hand);
  font-size: 18px;
  letter-spacing: 2px;
}
.editor-topbar .titles .name-en {
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--gold);
}
.editor-topbar .actions {
  display: flex; gap: 8px;
}

/* ============== Form controls ============== */
.field {
  display: flex; flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.field-label {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}
.field-label .en {
  font-family: var(--font-hand);
  color: var(--ink-faint);
  letter-spacing: 0;
  margin-left: 4px;
}
.input {
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-cn-hand);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease-soft);
  width: 100%;
}
.input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--paper);
}
textarea.input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Tag input */
.tag-input {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.tag-chip {
  background: var(--gold-pale);
  border: 1px solid var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-cn-hand);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
}
.tag-chip .remove {
  cursor: pointer;
  opacity: 0.6;
}
.tag-input input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-cn-hand);
  font-size: 13px;
  flex: 1;
  min-width: 100px;
  padding: 2px;
}

/* Image upload */
.image-upload {
  border: 2px dashed var(--ink-faint);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: var(--paper-2);
  transition: all 0.2s var(--ease-soft);
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink-soft);
}
.image-upload:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-pale);
}
.image-upload .plus { font-family: var(--font-hand); font-size: 36px; line-height: 1; color: var(--ink-faint); }
.image-upload:hover .plus { color: var(--gold); }
.image-upload .en {
  font-family: var(--font-hand);
  font-size: 13px;
  opacity: 0.7;
  margin-top: 2px;
}

/* Image gallery editor */
.gallery-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.gallery-edit-tile {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gold-soft);
}
.gallery-edit-tile .placeholder-photo { position: absolute; inset: 0; }
.gallery-edit-tile .ge-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(61,43,26,0.65);
  color: var(--bg);
  font-family: var(--font-cn-hand);
  font-size: 11px;
  padding: 4px 8px;
  letter-spacing: 1px;
}
.gallery-edit-tile .ge-actions {
  position: absolute; top: 6px; right: 6px;
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity 0.2s var(--ease-soft);
}
.gallery-edit-tile:hover .ge-actions { opacity: 1; }
.ge-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255,250,240,0.95);
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ge-btn:hover { background: white; color: var(--rose); }

/* Photo wall edit list (rows) */
.update-list {
  display: flex; flex-direction: column;
  gap: 10px;
}
.update-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px;
}
.update-row .urow-thumb {
  width: 60px; height: 60px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--gold-soft);
}
.update-row .urow-thumb .placeholder-photo { position: absolute; inset: 0; }
.update-row .urow-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.update-row .urow-date {
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--gold);
}
.update-row .urow-cap {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink);
  border: none; background: transparent;
  padding: 0; outline: none;
  width: 100%;
}
.update-row .urow-cap-en {
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--ink-soft);
  border: none; background: transparent;
  padding: 0; outline: none;
  width: 100%;
}
.update-row .urow-actions {
  display: flex; gap: 4px;
  align-self: flex-start;
}

/* Milestone editor */
.milestone-list {
  display: flex; flex-direction: column; gap: 8px;
  border-left: 2px dashed var(--gold-soft);
  padding-left: 16px;
  margin-left: 8px;
}
.milestone-edit {
  display: grid;
  grid-template-columns: 100px 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  position: relative;
}
.milestone-edit::before {
  content: '';
  position: absolute;
  left: -22px; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
  transform: translateY(-50%);
}
.milestone-edit .input { padding: 6px 10px; font-size: 13px; }

/* Health editor */
.health-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.health-edit-tile {
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.health-edit-tile .input { padding: 6px 8px; font-size: 13px; }

/* Link share box */
.link-box {
  background: var(--gold-pale);
  border: 1px dashed var(--gold-soft);
  border-radius: 14px;
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}
.link-box .url {
  flex: 1 1 200px;
  min-width: 0;
  background: var(--paper);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 13px;
  user-select: all;
  word-break: break-all;
}
.link-box .qr {
  width: 80px; height: 80px;
  background: white;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  position: relative;
  background-image:
    repeating-linear-gradient(0deg, var(--ink) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 8px);
  background-size: 8px 8px;
  flex: 0 0 80px;
}
.link-box .qr::after {
  content: '';
  position: absolute;
  inset: 32%;
  background: white;
}

/* Saved indicator */
.save-flash {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--leaf-deep);
  display: inline-flex;
  align-items: center; gap: 4px;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}
.save-flash.show { opacity: 1; }
.save-flash::before {
  content: '✓';
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--leaf);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px;
}

/* Placeholder shared with main site */
.placeholder-photo {
  width: 100%; height: 100%;
  background-color: var(--ph-bg, #f3e6c8);
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.4) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.4) 75%, transparent 75%, transparent),
    linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.0));
  background-size: 18px 18px, 100% 100%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.placeholder-photo::after {
  content: attr(data-label);
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(61,43,26,0.5);
  background: rgba(255,250,240,0.7);
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

/* Section subtitle */
.section-sub {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  line-height: 1.6;
}
.section-sub .en {
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--ink-faint);
  margin-left: 4px;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--ink-faint);
  font-family: var(--font-cn-hand);
  font-size: 13px;
}
.empty .en { font-family: var(--font-hand); font-size: 14px; display: block; margin-top: 2px; }

/* Responsive sidebar collapse */
@media (max-width: 720px) {
  :root { --sidebar-w: 0px; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0; bottom: 0;
    width: 260px;
    z-index: 100;
    transition: left 0.3s var(--ease-soft);
  }
  .sidebar.open { left: 0; }
  .main { padding: 18px 16px 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .kitten-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .editor-shell { grid-template-columns: 1fr; }
}

.mobile-menu {
  display: none;
  background: transparent;
  border: 1px dashed var(--ink-faint);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .mobile-menu { display: inline-flex; }
}

/* ===================================================
   Calendar
=================================================== */
.cal-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}
@media (max-width: 1000px) {
  .cal-grid { grid-template-columns: 1fr; }
}
.cal-month { padding: 20px 22px; }
.cal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.cal-nav {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
}
.cal-nav:hover { border-color: var(--gold); color: var(--gold); }
.cal-title {
  font-family: var(--font-cn-hand);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--ink);
  text-align: center;
}
.cal-title .en {
  display: block;
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0;
}
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 1px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--hairline);
}
.cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 6px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  padding: 6px;
  background: var(--paper-2);
  border: 1px solid transparent;
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-soft);
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: all 0.15s var(--ease-soft);
}
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell:not(.empty):hover { background: var(--paper); border-color: var(--hairline); }
.cal-cell.today {
  background: var(--gold-pale);
  border-color: var(--gold);
}
.cal-cell.has-events {
  background: var(--paper);
}
.cal-day-num {
  font-family: var(--font-hand);
  font-size: 14px;
  line-height: 1;
}
.cal-cell.today .cal-day-num { color: var(--gold); font-weight: 600; }
.cal-dots {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: 2px;
}
.cal-evdot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.cal-evmore {
  font-family: var(--font-hand);
  font-size: 10px;
  color: var(--ink-faint);
  line-height: 1;
}
.cal-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--hairline);
}
.legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}
.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* Upcoming list */
.cal-upcoming { align-self: flex-start; }
.upcoming-list { display: flex; flex-direction: column; gap: 10px; }
.upcoming-row {
  display: flex; gap: 12px; align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
}
.upcoming-date {
  flex: 0 0 50px;
  text-align: center;
  background: var(--paper);
  border-radius: 8px;
  padding: 4px;
}
.upcoming-date .month {
  display: block;
  font-family: var(--font-cn-hand);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}
.upcoming-date .day {
  display: block;
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}
.upcoming-body { flex: 1; min-width: 0; }
.up-title {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink);
  display: flex; align-items: center; gap: 6px;
  letter-spacing: 1px;
}
.type-pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.up-time {
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--ink-faint);
}

/* ===================================================
   Breeding / pregnancy
=================================================== */
.preg-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 22px 22px 18px;
  margin-bottom: 14px;
  background-image: radial-gradient(circle at 30% 0%, rgba(209,143,134,0.08), transparent 50%);
}
.preg-parents {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-bottom: 18px;
}
.preg-cat { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.preg-portrait {
  width: 70px; height: 70px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5), inset 0 0 0 4px var(--gold-soft);
  transition: transform 0.3s var(--ease-soft);
}
.preg-cat:hover .preg-portrait { transform: translateY(-2px); }
.preg-portrait .placeholder-photo { position: absolute; inset: 6px; border-radius: inherit; }
.preg-name {
  font-family: var(--font-cn-hand);
  font-size: 14px;
  margin-top: 6px;
  letter-spacing: 2px;
}
.preg-name span {
  font-family: var(--font-hand);
  color: var(--gold);
  font-size: 13px;
  margin-left: 4px;
  letter-spacing: 0;
}
.preg-role {
  font-family: var(--font-cn-hand);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}
.preg-x {
  font-family: var(--font-hand);
  font-size: 30px;
  color: var(--rose);
  margin-top: 4px;
}

.preg-progress { padding: 0 4px 6px; }
.preg-bar {
  height: 8px;
  background: var(--hairline);
  border-radius: 999px;
  position: relative;
  margin-bottom: 6px;
}
.preg-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 999px;
  transition: width 0.6s var(--ease-soft);
}
.preg-marker {
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.preg-marker .dot {
  width: 12px; height: 12px;
  background: white;
  border: 2px solid var(--gold);
  border-radius: 50%;
}
.preg-marker .label {
  font-family: var(--font-hand);
  font-size: 12px;
  color: var(--gold);
  margin-top: 2px;
  white-space: nowrap;
}
.preg-bar-labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 18px;
}
.preg-bar-labels strong { color: var(--rose); font-weight: 600; }

.preg-info {
  display: flex; gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--hairline);
}
.preg-info-tile { flex: 1; }
.preg-info-tile .lab {
  font-family: var(--font-cn-hand);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 1px;
}
.preg-info-tile .val {
  font-family: var(--font-cn-hand);
  font-size: 14px;
  color: var(--ink);
  margin-top: 2px;
  line-height: 1.5;
}

.litter-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .litter-timeline { grid-template-columns: 1fr; }
}
.litter-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 14px 16px;
}
.litter-date {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--gold);
}
.litter-name {
  font-family: var(--font-cn-hand);
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--ink);
  margin: 4px 0 2px;
}
.litter-parents {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
}
.litter-kittens {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 10px;
}
.lit-kit { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lit-thumb {
  width: 40px; height: 40px;
  border-radius: 50%;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5), inset 0 0 0 3px var(--gold-soft);
}
.lit-thumb .placeholder-photo { position: absolute; inset: 4px; border-radius: inherit; }
.lit-kit span {
  font-family: var(--font-cn-hand);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}

/* ===================================================
   CRM
=================================================== */
.crm-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
}
@media (max-width: 1000px) {
  .crm-grid { grid-template-columns: 1fr; }
}
.crm-list {
  display: flex; flex-direction: column; gap: 8px;
}
.crm-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-soft);
}
.crm-row:hover { border-color: var(--gold-soft); }
.crm-row.sel { border-color: var(--gold); background: var(--gold-pale); }
.crm-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cn-hand);
  font-size: 16px;
}
.crm-avatar.lg { width: 56px; height: 56px; font-size: 24px; }
.crm-meta { flex: 1; min-width: 0; }
.crm-name { font-family: var(--font-cn-hand); font-size: 14px; color: var(--ink); letter-spacing: 1px; }
.crm-info { font-family: var(--font-cn-hand); font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.crm-meta-right { text-align: right; }
.crm-stats { font-family: var(--font-cn-hand); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }

.crm-detail { align-self: flex-start; position: sticky; top: 20px; }
.crm-detail-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--hairline);
  margin-bottom: 14px;
}
.crm-detail-name { font-family: var(--font-cn-hand); font-size: 20px; letter-spacing: 3px; }
.crm-detail-meta { font-family: var(--font-cn-hand); font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.crm-detail-section { margin-bottom: 16px; }
.crm-section-title {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.crm-kittens { display: flex; gap: 12px; flex-wrap: wrap; }
.crm-kitten { display: flex; flex-direction: column; align-items: center; }
.crm-kit-thumb {
  width: 50px; height: 50px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5), inset 0 0 0 3px var(--gold-soft);
}
.crm-kit-thumb .placeholder-photo { position: absolute; inset: 4px; border-radius: inherit; }
.crm-kit-name { font-family: var(--font-cn-hand); font-size: 12px; color: var(--ink); margin-top: 4px; letter-spacing: 1px; }
.crm-kit-en { font-family: var(--font-hand); font-size: 12px; color: var(--gold); line-height: 1; }

.payment-row { background: var(--paper-2); border-radius: 10px; padding: 12px; }
.pay-line { display: flex; justify-content: space-between; margin-bottom: 4px; font-family: var(--font-cn-hand); font-size: 13px; }
.pay-label { color: var(--ink-soft); }
.pay-val { color: var(--ink); font-family: var(--font-mono, monospace); }
.pay-val.emphasis { color: var(--leaf-deep); font-weight: 600; }
.pay-bar { height: 6px; background: var(--hairline); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.pay-fill { height: 100%; background: linear-gradient(90deg, var(--leaf), var(--leaf-deep)); border-radius: 999px; }

/* ===================================================
   Finance
=================================================== */
.bar-chart {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  height: 180px;
  padding: 10px 6px 6px;
  border-bottom: 1px dashed var(--hairline);
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.bar-stack {
  display: flex; gap: 3px; align-items: flex-end;
  height: 140px;
}
.bar {
  width: 9px;
  border-radius: 3px 3px 0 0;
  transition: opacity 0.2s;
}
.bar:hover { opacity: 0.7; }
.bar.income { background: linear-gradient(180deg, var(--leaf), var(--leaf-deep)); }
.bar.expense { background: linear-gradient(180deg, #e8a59d, var(--rose)); }
.bar-label {
  font-family: var(--font-hand);
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 6px;
}

.ledger-list { display: flex; flex-direction: column; gap: 6px; }
.ledger-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.ledger-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex: 0 0 32px;
}
.ledger-row.income .ledger-icon { background: var(--leaf-pale); color: var(--leaf-deep); }
.ledger-row.expense .ledger-icon { background: var(--rose-pale); color: var(--rose); }
.ledger-body { flex: 1; }
.ledger-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink);
}
.ledger-cat {
  font-family: var(--font-cn-hand);
  font-size: 10px;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 1px 6px;
  border-radius: 999px;
}
.ledger-date {
  font-family: var(--font-hand);
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
}
.ledger-amount {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-weight: 600;
}
.ledger-amount.income { color: var(--leaf-deep); }
.ledger-amount.expense { color: var(--rose); }

/* ===================================================
   Analytics
=================================================== */
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-cn-hand);
  font-size: 13px;
}
.analytics-table th {
  text-align: left;
  font-family: var(--font-cn-hand);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
  letter-spacing: 1px;
}
.analytics-table td {
  padding: 10px;
  border-bottom: 1px dashed var(--hairline-soft);
  color: var(--ink);
  vertical-align: middle;
}
.analytics-table tr:last-child td { border-bottom: none; }
.analytics-table tbody tr:hover { background: var(--paper-2); }

.top-photo-list { display: flex; flex-direction: column; gap: 8px; }
.top-photo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.top-photo-row .rank {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-family: var(--font-hand);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 24px;
}
.top-photo-row .tp-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.top-photo-row .tp-thumb .placeholder-photo { position: absolute; inset: 0; }
.tp-body { flex: 1; min-width: 0; }
.tp-title { font-family: var(--font-cn-hand); font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-meta { font-family: var(--font-cn-hand); font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.tp-views { font-family: var(--font-hand); font-size: 15px; color: var(--gold); white-space: nowrap; }

.hours-chart {
  display: flex; align-items: flex-end; justify-content: space-between;
  height: 130px;
  padding: 8px 0 6px;
  border-bottom: 1px dashed var(--hairline);
}
.hour-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.hour-bar {
  width: 12px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-radius: 4px 4px 0 0;
}
.hour-label { font-family: var(--font-hand); font-size: 10px; color: var(--ink-faint); }

/* ===================================================
   Modal overlay (admin)
=================================================== */
.modal-overlay-admin {
  position: fixed; inset: 0;
  background: rgba(61,43,26,0.5);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===================================================
   New litter wizard
=================================================== */
.wizard {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(61,43,26,0.4);
  animation: cardSlide 0.35s var(--ease-pop);
}
@keyframes cardSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.wiz-head {
  padding: 22px 24px 16px;
  border-bottom: 1px dashed var(--hairline);
  background: var(--bg);
}
.wiz-title {
  font-family: var(--font-cn-hand);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 4px;
  text-align: center;
}
.wiz-title .en {
  display: block;
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-top: 2px;
}
.wiz-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
  margin-top: 18px;
}
.wiz-step {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  position: relative;
}
.wiz-step + .wiz-step::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--ink-faint);
  margin-right: 4px;
}
.wiz-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink-faint);
  color: var(--ink-soft);
  font-family: var(--font-hand);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.wiz-step.active .wiz-step-num {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
  box-shadow: 0 0 0 4px var(--gold-pale);
}
.wiz-step.done .wiz-step-num {
  background: var(--leaf);
  border-color: var(--leaf);
  color: white;
}
.wiz-step-label {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}
.wiz-step.active .wiz-step-label { color: var(--ink); }
.wiz-step-label .en {
  display: block;
  font-family: var(--font-hand);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0;
}
@media (max-width: 600px) {
  .wiz-steps { flex-wrap: wrap; }
  .wiz-step-label .en { display: none; }
}

.wiz-body {
  padding: 24px;
  min-height: 320px;
}
.wiz-intro {
  font-family: var(--font-cn-hand);
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  letter-spacing: 1px;
  line-height: 1.6;
}
.wiz-intro .en {
  display: block;
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* Step 1: parent picker */
.wiz-parent-pick {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 600px) { .wiz-parent-pick { grid-template-columns: 1fr; } }
.wiz-pick-col { display: flex; flex-direction: column; gap: 8px; }
.wiz-pick-label {
  font-family: var(--font-cn-hand);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 3px;
  text-align: center;
}
.wiz-pick-list { display: flex; flex-direction: column; gap: 8px; }
.wiz-pick-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--paper-2);
  border: 2px solid var(--hairline);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-soft);
}
.wiz-pick-card:hover { border-color: var(--gold-soft); }
.wiz-pick-card.on {
  border-color: var(--gold);
  background: var(--gold-pale);
  box-shadow: 0 0 0 4px rgba(201,147,58,0.15);
}
.wiz-pick-portrait {
  width: 52px; height: 52px;
  border-radius: 50%;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5), inset 0 0 0 4px var(--gold-soft);
  flex: 0 0 52px;
}
.wiz-pick-portrait .placeholder-photo { position: absolute; inset: 5px; border-radius: inherit; }
.wiz-pick-name {
  font-family: var(--font-cn-hand);
  font-size: 15px;
  letter-spacing: 2px;
}
.wiz-pick-name span {
  font-family: var(--font-hand);
  color: var(--gold);
  margin-left: 6px;
}
.wiz-pick-info {
  font-family: var(--font-cn-hand);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* Step 2: litter info */
.wiz-parents-summary {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 22px;
  padding: 14px;
  background: var(--paper-2);
  border-radius: 14px;
  border: 1px dashed var(--gold-soft);
}
.psum { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.psum-thumb {
  width: 48px; height: 48px;
  border-radius: 50%;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5), inset 0 0 0 3px var(--gold-soft);
}
.psum-thumb .placeholder-photo { position: absolute; inset: 5px; border-radius: inherit; }
.psum span { font-family: var(--font-cn-hand); font-size: 13px; letter-spacing: 1px; }
.psum-x {
  font-family: var(--font-hand);
  font-size: 26px;
  color: var(--rose);
}

/* Step 3: kitten list */
.wiz-kit-list { display: flex; flex-direction: column; gap: 12px; }
.wiz-kit-row {
  display: grid;
  grid-template-columns: 28px 56px 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}
@media (max-width: 640px) {
  .wiz-kit-row { grid-template-columns: 28px 56px 1fr; }
  .wiz-kit-row .wiz-kit-fields:last-child { grid-column: 1 / -1; }
}
.wiz-kit-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-family: var(--font-hand);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.wiz-kit-thumb {
  width: 50px; height: 50px;
  border-radius: 50%;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5), inset 0 0 0 3px var(--gold-soft);
}
.wiz-kit-thumb .placeholder-photo { position: absolute; inset: 4px; border-radius: inherit; }
.wiz-kit-fields { display: flex; flex-direction: column; gap: 6px; }
.wiz-kit-fields .input { padding: 6px 10px; font-size: 13px; }

/* Step 4: confirm */
.wiz-confirm {
  background: var(--paper-2);
  border-radius: 14px;
  padding: 16px 20px;
}
.confirm-row {
  display: flex; justify-content: space-between;
  font-family: var(--font-cn-hand);
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--hairline);
}
.confirm-row:last-of-type { border-bottom: none; }
.confirm-row .lab { color: var(--ink-soft); letter-spacing: 2px; }
.confirm-row .val { color: var(--ink); letter-spacing: 1px; }
.confirm-kittens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--hairline);
}
.confirm-kit {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper);
  border-radius: 10px;
  padding: 8px;
}
.confirm-kit-thumb {
  width: 36px; height: 36px;
  border-radius: 50%;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}
.confirm-kit-thumb .placeholder-photo { position: absolute; inset: 3px; border-radius: inherit; }
.confirm-kit-meta .cn {
  font-family: var(--font-cn-hand);
  font-size: 13px;
  letter-spacing: 1px;
}
.confirm-kit-meta .en {
  font-family: var(--font-hand);
  font-size: 12px;
  color: var(--gold);
  line-height: 1;
}
.confirm-kit-meta .g {
  font-family: var(--font-cn-hand);
  font-size: 10px;
  color: var(--ink-soft);
}

.wiz-foot {
  display: flex; justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px dashed var(--hairline);
  background: var(--bg);
}
.btn-primary:disabled {
  background: var(--ink-faint);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* ===================================================
   Bulk photo upload (in update form)
=================================================== */
.bulk-upload-zone {
  border: 2px dashed var(--gold-soft);
  border-radius: 14px;
  padding: 24px;
  background: var(--gold-pale);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-soft);
}
.bulk-upload-zone:hover {
  border-color: var(--gold);
  background: #fbe8c4;
}
.bulk-upload-zone .icon {
  font-family: var(--font-hand);
  font-size: 38px;
  color: var(--gold);
  line-height: 1;
}
.bulk-upload-zone .label {
  font-family: var(--font-cn-hand);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 2px;
  margin-top: 4px;
}
.bulk-upload-zone .hint {
  font-family: var(--font-hand);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.bulk-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.bulk-tile {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 8px;
}
.bulk-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 6px;
  background: var(--gold-soft);
}
.bulk-thumb .placeholder-photo { position: absolute; inset: 0; }
.bulk-tile input {
  width: 100%;
  border: none; background: transparent;
  font-family: var(--font-cn-hand);
  font-size: 12px;
  padding: 2px 4px;
  outline: none;
}
.bulk-tile input.date {
  font-family: var(--font-hand);
  color: var(--gold);
  font-size: 13px;
}
.bulk-tile .remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(255,250,240,0.95);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.bulk-tile:hover .remove { opacity: 1; }
.bulk-tile .remove:hover { color: var(--rose); }

/* ===================================================
   Contract tab
=================================================== */
.contract-status {
  display: flex; gap: 12px;
  background: var(--paper-2);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--hairline);
}
.contract-status-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hand);
  font-size: 22px;
  background: var(--gold-pale);
  color: var(--gold);
  flex: 0 0 48px;
}
.contract-status.signed .contract-status-icon { background: var(--leaf-pale); color: var(--leaf-deep); }
.contract-status .meta { flex: 1; }
.contract-status .title { font-family: var(--font-cn-hand); font-size: 15px; letter-spacing: 2px; }
.contract-status .desc { font-family: var(--font-cn-hand); font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.contract-preview {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 24px 26px;
  font-family: var(--font-cn-hand);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.9;
  letter-spacing: 1px;
  position: relative;
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 30px, var(--hairline-soft) 30px, var(--hairline-soft) 31px);
  background-position-y: 14px;
}
.contract-preview h4 {
  font-family: var(--font-cn-hand);
  font-size: 18px;
  text-align: center;
  letter-spacing: 4px;
  margin: 0 0 8px;
}
.contract-preview .sub-title {
  text-align: center;
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 16px;
}
.contract-preview .sig-block {
  margin-top: 24px;
  display: flex; justify-content: space-between; gap: 20px;
}
.sig-cell { flex: 1; text-align: center; }
.sig-line {
  height: 1px;
  border-bottom: 1px solid var(--ink-soft);
  margin-bottom: 4px;
  height: 32px;
  position: relative;
}
.sig-cell.signed .sig-line::after {
  content: '陈一一';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--rose);
}
.sig-cell.keeper-signed .sig-line::after {
  content: 'Amy';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--gold);
}
.sig-cell .sig-label {
  font-family: var(--font-cn-hand);
  font-size: 11px;
  color: var(--ink-soft);
}
