/* 蓝尊猫咪 · LAN ZUN CATS —— 影院级图鉴
   深色电影感：暖黑底色 + 琥珀光 + 全屏照片 hero。
   注意：所有类名、ID 均与 HTML/JS 保持一致，只改样式，不改结构。
   动效（Lenis / GSAP）由 app.js 接入，全部带降级：CDN 失败时页面照常显示。 */

:root {
  color-scheme: dark;
  --paper: #14100d;
  --paper-soft: #1c1611;
  --card: #1e1813;
  --panel: #211a13;
  --input: #241c15;
  --ink: #f5ede2;
  --ink-soft: #ddd2bf;
  --muted: #a89880;
  --faint: #7d6f5c;
  --line: #3a2e22;
  --line-soft: #2c2318;
  --amber: #e8a04c;
  --amber-dark: #f0b269;
  --amber-soft: #3a2a1a;
  --amber-glow: rgba(232, 160, 76, 0.16);
  --leaf: #9db08a;
  --leaf-dark: #b9c9a4;
  --leaf-soft: #2e3a26;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 10px 26px rgba(0, 0, 0, 0.5), 0 30px 64px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --radius-lg: 22px;
  --serif: Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    radial-gradient(38rem 26rem at 88% -6%, rgba(232, 160, 76, 0.09), transparent 62%),
    radial-gradient(30rem 24rem at -8% 108%, rgba(157, 176, 138, 0.08), transparent 62%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(232, 160, 76, 0.32); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(58, 46, 34, 0.9);
  background: rgba(20, 16, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, #d9a05f 42%, var(--leaf) 100%);
  opacity: 0.9;
}

.header-inner,
.page-shell,
.site-footer { width: min(1200px, calc(100% - 40px)); margin: auto; }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid rgba(232, 160, 76, 0.35); border-radius: 13px;
  background: linear-gradient(145deg, #3a2a1a, #241c15);
  font-size: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-text { min-width: 0; }
.brand-title { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.2; white-space: nowrap; letter-spacing: 0.02em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.16em; white-space: nowrap; }
.header-nav { display: flex; align-items: center; gap: 8px; }

.nav-link,
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  border: 1px solid transparent; border-radius: 999px; padding: 8px 15px; cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.nav-link { color: #c9bba4; font-size: 14px; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.nav-link.active { background: rgba(255, 255, 255, 0.08); color: var(--ink); box-shadow: var(--shadow-sm); }
.button { background: var(--panel); border-color: var(--line); color: var(--ink); font-size: 14px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.button:hover { border-color: #6b5a45; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button:active { transform: translateY(0); }
.button.primary {
  background: linear-gradient(135deg, #f0a952, #d9822e);
  color: #1c1410; border-color: transparent;
  box-shadow: 0 8px 20px rgba(217, 130, 46, 0.35);
}
.button.primary:hover { background: linear-gradient(135deg, #f5b566, #cf7a28); box-shadow: 0 10px 24px rgba(217, 130, 46, 0.42); }
.button.danger { color: #f0a196; border-color: #5a2e28; background: #2a1a16; }
.button.danger:hover { background: #331d18; border-color: #7a3a30; }
.button.small { min-height: 31px; padding: 4px 11px; font-size: 12px; }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 首页 Hero：全屏照片 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(60rem 40rem at 70% 0%, rgba(232, 160, 76, 0.16), transparent 60%),
    radial-gradient(40rem 30rem at 10% 100%, rgba(157, 176, 138, 0.1), transparent 60%),
    linear-gradient(160deg, #2b2118, #14100d 70%);
}
.hero-media { position: absolute; inset: -10% 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; font-size: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 16, 13, 0.42) 0%, rgba(20, 16, 13, 0.08) 42%, rgba(20, 16, 13, 0.88) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  width: min(1200px, calc(100% - 40px)); margin: auto;
  padding: 120px 0 110px;
}
.hero-kicker {
  margin: 0 0 14px; color: var(--amber); font-size: 13px; font-weight: 700; letter-spacing: 0.22em;
  display: flex; align-items: center; gap: 12px;
}
.hero-kicker::after {
  content: ""; width: 52px; height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
}
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 700; color: #fff;
  font-size: clamp(44px, 8vw, 96px); line-height: 1.06; letter-spacing: -0.01em;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
}
.hero-highlight {
  background: linear-gradient(transparent 64%, rgba(232, 160, 76, 0.42) 64%, rgba(232, 160, 76, 0.42) 94%, transparent 94%);
  padding: 0 4px;
}
.hero-content > p:not(.hero-kicker):not(.hero-scroll) {
  max-width: 620px; margin: 22px 0 0; color: rgba(245, 237, 226, 0.85);
  font-size: 16.5px; line-height: 1.75; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
.hero-scroll { margin: 44px 0 0; color: var(--muted); font-size: 12px; letter-spacing: 0.16em; }
.hero-scroll span { display: inline-block; color: var(--amber); animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ---------- 筛选面板：毛玻璃 ---------- */

.filter-panel {
  position: relative; z-index: 3; margin: -56px 0 30px; padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 22px;
  background: rgba(30, 24, 19, 0.72); box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, 0.7fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) auto;
  gap: 10px; align-items: end;
}

.field label,
.form-field label { display: block; margin-bottom: 6px; color: #b8a98d; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.field input, .field select, .form-field input, .form-field select, .form-field textarea, .search-box input {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 13px;
  padding: 9px 13px; outline: none; background: var(--input); color: var(--ink);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.field input:hover, .field select:hover, .form-field input:hover, .form-field select:hover, .form-field textarea:hover { border-color: #54432e; }
.form-field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .form-field input:focus, .form-field select:focus,
.form-field textarea:focus, .search-box input:focus {
  border-color: var(--amber); box-shadow: 0 0 0 4px rgba(232, 160, 76, 0.14);
}
.search-field input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a89880' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
  padding-left: 38px;
}
.search-field input::placeholder { color: var(--faint); }
input[type="date"] { color: var(--ink-soft); color-scheme: dark; }

/* ---------- 照片墙 ---------- */

.result-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 18px; }
.result-meta h2, .section-title { margin: 0; font-size: 23px; font-family: var(--serif); font-weight: 700; letter-spacing: 0.01em; }
.result-meta h2::before { content: "🐾"; margin-right: 8px; font-size: 17px; vertical-align: 1px; }
.result-count {
  color: var(--muted); font-size: 13px; white-space: nowrap;
  padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
}
.cat-grid { columns: 4; column-gap: 22px; padding-bottom: 48px; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cat-card {
  display: block; position: relative; overflow: hidden; break-inside: avoid; margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: card-in 0.55s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.cat-grid .cat-card:nth-child(2) { animation-delay: 0.05s; }
.cat-grid .cat-card:nth-child(3) { animation-delay: 0.1s; }
.cat-grid .cat-card:nth-child(4) { animation-delay: 0.15s; }
.cat-grid .cat-card:nth-child(5) { animation-delay: 0.2s; }
.cat-grid .cat-card:nth-child(6) { animation-delay: 0.25s; }
.cat-grid .cat-card:nth-child(7) { animation-delay: 0.3s; }
.cat-grid .cat-card:nth-child(8) { animation-delay: 0.35s; }
.cat-grid .cat-card:nth-child(9) { animation-delay: 0.4s; }
.cat-grid .cat-card:nth-child(10) { animation-delay: 0.45s; }
.cat-grid .cat-card:nth-child(11) { animation-delay: 0.5s; }
.cat-grid .cat-card:nth-child(12) { animation-delay: 0.55s; }
.cat-card:hover {
  transform: perspective(900px) rotateX(2deg) rotateY(-3deg) translateY(-5px);
  box-shadow: var(--shadow-lg); border-color: rgba(232, 160, 76, 0.4);
}
.cat-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.cat-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(145deg, #3a2f24, #241c15); }
/* 错落排布：照片比例按位置错开（正方形 / 竖构图 / 宽幅），墙面自然高低起伏 */
.cat-grid .cat-card:nth-child(4n + 2) .cat-photo { aspect-ratio: 1 / 1; }
.cat-grid .cat-card:nth-child(4n + 3) .cat-photo { aspect-ratio: 4 / 5; }
.cat-grid .cat-card:nth-child(8n + 5) .cat-photo { aspect-ratio: 16 / 10; }
.cat-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(10, 8, 6, 0.4) 100%);
  opacity: 0; transition: opacity 0.3s ease;
}
.cat-card:hover .cat-photo::after { opacity: 1; }
.cat-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.22, 0.8, 0.3, 1); }
.cat-card:hover .cat-photo img { transform: scale(1.09); }
.photo-placeholder, .empty-photo {
  width: 100%; height: 100%; display: grid; place-items: center; color: #8a7a63;
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.07), transparent 42%), linear-gradient(145deg, #3a2f24, #241c15);
  font-size: 44px;
}
.cat-id {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(10, 8, 6, 0.62); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.cat-card-info { padding: 16px 18px 17px; }
.cat-card-info h3 { margin: 0; font-size: 21px; font-family: var(--serif); font-weight: 700; letter-spacing: 0.01em; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #d8c3a5; font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.tag.coat { background: var(--leaf-soft); color: var(--leaf-dark); border-color: rgba(157, 176, 138, 0.25); }
.cat-date { margin: 11px 0 0; color: var(--muted); font-size: 12.5px; }
.cat-date::before { content: "📅 "; font-size: 11px; }

/* ---------- 详情页 ---------- */

.detail-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 56px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-soft); transition: all 0.18s ease; }
.breadcrumbs a::before { content: "←"; color: var(--amber); font-weight: 700; }
.breadcrumbs a:hover { color: var(--amber-dark); border-color: #54432e; box-shadow: var(--shadow-sm); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 30px; margin-top: 22px; align-items: start; }
.gallery-main {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  background: #2a211a; box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .empty-photo { font-size: 64px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery-thumb {
  position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; padding: 0;
  border: 2px solid transparent; border-radius: 14px; cursor: pointer; background: #2a211a;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.gallery-thumb:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232, 160, 76, 0.2); }
.gallery-thumb .cover-label {
  position: absolute; right: 4px; bottom: 4px; padding: 2px 5px; border-radius: 5px;
  background: rgba(10, 8, 6, 0.65); color: #fff; font-size: 9px; letter-spacing: 0.04em;
}

.profile-card, .story-card {
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: var(--radius-lg);
  background: rgba(30, 24, 19, 0.92); box-shadow: var(--shadow);
}
.profile-card { padding: 28px; margin-bottom: 20px; }
.profile-id {
  display: inline-block; margin: 0 0 8px; padding: 4px 11px; border-radius: 999px;
  background: var(--amber-soft); color: var(--amber-dark); font-size: 12px; font-weight: 700; letter-spacing: 0.09em;
}
.profile-card h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; font-family: var(--serif); font-weight: 700; letter-spacing: 0.01em; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.profile-tags .tag { padding: 5px 11px; font-size: 12.5px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-top: 24px; }
.profile-item { min-width: 0; padding-top: 11px; border-top: 1px solid #2c2318; }
.profile-item.full { grid-column: 1 / -1; }
.profile-label { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.profile-value { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 15px; line-height: 1.65; }
.story-card { padding: 24px 28px; }
.story-card h2 { margin: 0 0 14px; font-size: 21px; font-family: var(--serif); font-weight: 700; }
.story-card h2:not(:first-child) { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.story-text, .notes-text { color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.95; }
.story-text::first-letter {
  font-family: var(--serif); font-size: 2.4em; font-weight: 700; color: var(--amber);
  float: left; line-height: 0.9; margin: 4px 9px 0 0;
}
.muted-text { color: var(--muted); font-style: italic; }

/* 留言 */
.comments-card {
  margin-top: 20px; padding: 24px 28px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: var(--radius-lg);
  background: rgba(30, 24, 19, 0.92); box-shadow: var(--shadow);
}
.comments-card h2 { margin: 0 0 6px; font-size: 21px; font-family: var(--serif); font-weight: 700; }
.comments-hint { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.comment-list { display: grid; gap: 12px; margin-bottom: 20px; }
.comment { padding: 15px 17px; border: 1px solid #2c2318; border-radius: 16px; background: rgba(255, 255, 255, 0.03); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.comment-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: #a89880; }
.comment-meta strong { color: var(--ink-soft); font-size: 13px; }
.comment-meta strong::before { content: "🐾"; margin-right: 6px; font-size: 12px; }
.comment-message { margin: 9px 0 0; color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.comment-form { display: grid; gap: 13px; }
.comment-form .button { justify-self: start; padding-left: 22px; padding-right: 22px; }

/* ---------- 页脚 ---------- */

.site-footer {
  min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 18px 0;
}
.site-footer .footer-paw { opacity: 0.7; font-size: 15px; }

/* ---------- 通用状态 ---------- */

.loading { column-span: all; padding: 52px 0; text-align: center; color: var(--muted); font-size: 14px; }
.loading::after { content: "🐾"; display: block; margin-top: 10px; font-size: 22px; opacity: 0.5; animation: floaty 2.4s ease-in-out infinite alternate; }
@keyframes floaty {
  from { translate: 0 0; }
  to { translate: 0 -9px; }
}
.empty-state {
  column-span: all; padding: 46px 24px; border: 1.5px dashed #4a3d2e;
  border-radius: 22px; background: rgba(30, 24, 19, 0.6); text-align: center;
}
.empty-state strong { display: block; margin-bottom: 7px; font-size: 19px; font-family: var(--serif); }
.empty-state strong::before { content: "🐾 "; }
.empty-state span { color: var(--muted); font-size: 14px; }
.status-message { display: none; margin: 12px 0; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.status-message.show { display: block; animation: card-in 0.3s ease both; }
.status-message.info { color: #cfe3b8; background: #22301f; border-left: 3px solid var(--leaf); }
.status-message.error { color: #f2b8ae; background: #3a1d18; border-left: 3px solid #c05a4a; }

/* ---------- 管理中心 ---------- */

.admin-shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 56px; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.admin-header h1 { margin: 0; font-size: clamp(26px, 4vw, 36px); font-family: var(--serif); font-weight: 700; letter-spacing: 0.01em; }
.admin-header p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.admin-grid { display: grid; grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
.panel {
  overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 22px;
  background: rgba(30, 24, 19, 0.94); box-shadow: var(--shadow);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.panel-header h2, .panel-header h3 { margin: 0; font-size: 17px; font-family: var(--serif); font-weight: 700; }
.panel-body { padding: 20px; }
.panel-body + .panel-body { border-top: 1px solid var(--line); }
.search-box { padding: 13px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.search-box input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a89880' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center; padding-left: 38px;
}
.admin-list { max-height: min(64vh, 700px); overflow: auto; padding: 10px; scrollbar-width: thin; scrollbar-color: #4a3d2e transparent; }
.admin-list::-webkit-scrollbar { width: 8px; }
.admin-list::-webkit-scrollbar-thumb { background: #4a3d2e; border-radius: 8px; }
.admin-list::-webkit-scrollbar-track { background: transparent; }
.admin-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px;
  padding: 8px 11px; border: 1px solid transparent; border-radius: 15px; background: transparent;
  cursor: pointer; text-align: left; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.admin-item:hover { background: rgba(255, 255, 255, 0.04); }
.admin-item.active { border-color: rgba(232, 160, 76, 0.55); background: rgba(232, 160, 76, 0.08); box-shadow: var(--shadow-sm); }
.admin-item-photo {
  flex: 0 0 auto; width: 48px; height: 48px; overflow: hidden; border-radius: 12px;
  background: linear-gradient(145deg, #3a2f24, #241c15); display: grid; place-items: center;
  color: #8a7a63; font-size: 20px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.admin-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-item-main { display: flex; flex-direction: column; min-width: 0; justify-content: center; }
.admin-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14.5px; }
.admin-item-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; margin-top: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field.full, .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.selected-profile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 18px; border: 1px solid #4a3a26; border-radius: 14px;
  background: linear-gradient(135deg, #33261a, #241c15);
}
.selected-profile strong { display: block; font-size: 15px; }
.selected-profile span { color: var(--muted); font-size: 12px; }
.photo-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.photo-toolbar label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.photo-toolbar input[type="file"] {
  min-height: 40px; max-width: 100%; padding: 7px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--input); font-size: 13px; color: var(--ink-soft);
}
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 15px; }
.photo-item { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.photo-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.photo-item-image { position: relative; aspect-ratio: 4 / 3; background: #2a211a; }
.photo-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cover-badge {
  position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(157, 176, 138, 0.95), rgba(79, 97, 60, 0.95)); color: #fff; font-size: 11px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px; padding: 9px; }
.hint { margin: 9px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

/* ---------- 弹窗 ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(8, 6, 4, 0.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-backdrop.show { display: flex; animation: fade-in 0.2s ease both; }
.modal-backdrop.show .modal { animation: pop 0.26s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
.modal { width: min(440px, 100%); padding: 24px; border-radius: 20px; background: #241c15; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.08); }
.modal h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 20px; font-weight: 700; }
.modal p { margin: 0 0 20px; color: var(--muted); line-height: 1.65; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 登录 ---------- */

.auth-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background-image:
    radial-gradient(26rem 20rem at 18% 12%, rgba(232, 160, 76, 0.13), transparent 65%),
    radial-gradient(24rem 20rem at 86% 88%, rgba(157, 176, 138, 0.12), transparent 65%);
}
.auth-card {
  position: relative; width: min(430px, 100%); padding: 30px 28px; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px; background: rgba(30, 24, 19, 0.96); box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: card-in 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.auth-card::before {
  content: "🐾"; position: absolute; right: -14px; top: -22px; font-size: 110px;
  opacity: 0.06; transform: rotate(18deg); pointer-events: none;
}
.auth-brand { position: relative; text-align: center; margin-bottom: 20px; }
.auth-brand span {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px;
  border-radius: 16px; background: linear-gradient(145deg, #3a2a1a, #241c15);
  border: 1px solid rgba(232, 160, 76, 0.3); font-size: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.auth-brand h1 { margin: 0; font-size: 26px; font-family: var(--serif); font-weight: 700; }
.auth-brand p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.auth-submit { width: 100%; margin-top: 8px; min-height: 46px; font-size: 15px; }
.auth-back { display: block; margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.auth-back:hover { color: var(--amber-dark); }
.form-field + .form-field { margin-top: 14px; }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-form .search-field, .filter-form .filter-actions { grid-column: 1 / -1; }
  .detail-layout, .admin-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 68vh; }
  .hero-content { padding: 90px 0 96px; }
  .cat-grid { columns: 3; }
}

@media (max-width: 760px) {
  .cat-grid { columns: 2; column-gap: 16px; }
  .cat-card { margin-bottom: 16px; }
}

@media (max-width: 620px) {
  .page-shell, .detail-shell, .admin-shell, .site-footer, .header-inner { width: min(100% - 24px, 1200px); }
  .hero { min-height: 62vh; }
  .hero-content { padding: 72px 0 88px; }
  .hero-content > p:not(.hero-kicker):not(.hero-scroll) { font-size: 15px; }
  .filter-panel { margin-top: -36px; padding: 13px; border-radius: 20px; }
  .header-inner { min-height: 60px; }
  .brand-mark { width: 34px; height: 34px; font-size: 17px; }
  .brand-title { font-size: 17px; }
  .brand-sub { display: none; }
  .header-nav { gap: 5px; }
  .nav-link, .button { min-height: 35px; padding: 6px 11px; font-size: 13px; }
  .filter-form { grid-template-columns: 1fr; }
  .filter-actions .button { width: 100%; }
  .result-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .cat-grid { columns: 1; }
  .profile-card, .story-card, .comments-card { padding: 20px; border-radius: 20px; }
  .profile-grid { grid-template-columns: 1fr; }
  .gallery-main { border-radius: 19px; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-header .button { width: 100%; }
  .panel-header, .panel-body, .search-box { padding-left: 14px; padding-right: 14px; }
  .form-actions { justify-content: stretch; }
  .form-actions .button { flex: 1; }
  .selected-profile { align-items: flex-start; flex-direction: column; }
  .photo-toolbar input[type="file"] { width: 100%; }
  .admin-photos { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
  .auth-brand h1 { font-size: 23px; }
  .header-nav .button { min-height: 32px; }
  .site-footer { flex-direction: column; gap: 4px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------- 养护页 ---------- */

.hero-care { min-height: 52vh; }
.hero-care .hero-content { padding: 84px 0 72px; }
.hero-care h1 { font-size: clamp(36px, 5.5vw, 62px); }
.care-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.care-chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 8, 6, 0.45); color: var(--ink-soft); font-size: 13px;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  transition: all 0.18s ease;
}
.care-chip:hover { border-color: rgba(232, 160, 76, 0.6); color: var(--amber-dark); transform: translateY(-1px); }

.care-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 56px; }
.care-section-head { margin-bottom: 22px; }
.care-section-head h2 { margin: 0; font-size: clamp(26px, 4vw, 34px); font-family: var(--serif); font-weight: 700; }
.care-section-head h2::before { content: "🐾"; margin-right: 9px; font-size: 20px; vertical-align: 2px; }
.care-section-head p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; }
#care, #recipes, .care-category { scroll-margin-top: 88px; }

.care-category {
  margin: 34px 0 16px; padding-left: 13px; border-left: 3px solid var(--amber);
  font-size: 20px; font-family: var(--serif); font-weight: 700; letter-spacing: 0.01em;
}
.care-category:first-of-type { margin-top: 6px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide-card {
  padding: 21px 22px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 18px;
  background: rgba(30, 24, 19, 0.92); box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.guide-card:hover { transform: translateY(-3px); border-color: rgba(232, 160, 76, 0.35); box-shadow: var(--shadow); }
.guide-card h4 { margin: 0 0 9px; font-size: 17.5px; font-family: var(--serif); font-weight: 700; color: var(--amber-dark); }
.guide-card p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }

#recipes { margin-top: 54px; padding-top: 40px; border-top: 1px solid var(--line); }
.care-note {
  margin: 0 0 20px; padding: 13px 16px; border-radius: 14px; border-left: 3px solid var(--amber);
  background: rgba(232, 160, 76, 0.09); color: #e8cfa5; font-size: 13.5px; line-height: 1.7;
}
.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.recipe-card {
  padding: 23px 24px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 20px;
  background: rgba(30, 24, 19, 0.92); box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.recipe-card:hover { transform: translateY(-3px); border-color: rgba(232, 160, 76, 0.35); box-shadow: var(--shadow); }
.recipe-card h4 { margin: 0; font-size: 20px; font-family: var(--serif); font-weight: 700; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0 0; }
.recipe-meta span {
  padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07); color: #d8c3a5; font-size: 12px;
}
.recipe-intro { margin: 12px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.recipe-card h5 { margin: 16px 0 7px; color: var(--amber-dark); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; }
.recipe-card ul, .recipe-card ol { margin: 0; padding-left: 19px; color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.recipe-card li::marker { color: var(--amber); }
.recipe-tip { margin: 15px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; line-height: 1.65; }
.care-source { margin: 26px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.6; }

/* ---------- 首页养护入口 ---------- */

.home-care {
  margin: 6px 0 48px; padding: 26px 28px; border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  background:
    radial-gradient(24rem 14rem at 90% 0%, rgba(232, 160, 76, 0.12), transparent 65%),
    rgba(30, 24, 19, 0.92);
  box-shadow: var(--shadow-sm);
}
.home-care-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.home-care-head h2 { margin: 0; font-size: 23px; font-family: var(--serif); font-weight: 700; }
.home-care-head h2::before { content: "🐾"; margin-right: 8px; font-size: 17px; vertical-align: 1px; }
.home-care-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.home-care-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.home-care-card {
  display: block; padding: 18px 20px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.home-care-card:hover { transform: translateY(-3px); border-color: rgba(232, 160, 76, 0.45); box-shadow: var(--shadow); }
.home-care-emoji { font-size: 24px; }
.home-care-card strong { display: block; margin-top: 8px; font-size: 17px; font-family: var(--serif); font-weight: 700; }
.home-care-card span:not(.home-care-emoji) { display: block; margin-top: 5px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .guide-grid, .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-care { min-height: 46vh; }
  .hero-care .hero-content { padding: 70px 0 60px; }
}

@media (max-width: 620px) {
  .guide-grid, .recipe-grid, .home-care-links { grid-template-columns: 1fr; }
  .hero-care { min-height: 40vh; }
  .hero-care .hero-content { padding: 56px 0 52px; }
  .home-care { padding: 20px; }
  .care-shell { padding-top: 26px; }
}
