@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
  --primary: #B76E79;
  --primary-dark: #8B2635;
  --accent: #D4AF37;
  --accent-light: #F0E4B0;
  --text: #1a1a2e;
  --text-light: #555;
  --text-muted: #888;
  --bg: #FDFBF7;
  --bg-card: #FFFFFF;
  --bg-section: #F8F5F0;
  --border: #E8E4DF;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 48px rgba(183,110,121,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { border: none; cursor: pointer; font-family: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ====== Header / Navigation ====== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253,251,247,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links ul {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ====== Hero Section ====== */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-section) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(183,110,121,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -15%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle, rgba(212,175,55,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto 32px;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ====== Search Bar ====== */
.search-bar {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  background: var(--bg-card);
  border-radius: 100px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.search-bar input {
  flex: 1;
  border: none;
  padding: 16px 24px;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  outline: none;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar button {
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-bar button:hover {
  opacity: 0.9;
}

/* ====== Section Common ====== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 32px;
}

.section-more:hover { gap: 8px; }

/* ====== Cards Grid ====== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* ====== Shop Card ====== */
.shop-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.shop-card > a,
.artist-card > a {
  display: block;
  color: inherit;
  height: 100%;
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(183,110,121,0.2);
}

.shop-card-cover {
  height: 180px;
  background: linear-gradient(135deg, rgba(183,110,121,0.15), rgba(212,175,55,0.1));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shop-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-detail-cover {
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  background: var(--bg-section);
  border: 1px solid var(--border);
}

.shop-detail-cover img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.shop-card-cover .placeholder-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.shop-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.shop-card-body {
  padding: 20px;
}

.shop-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.shop-card-info {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.shop-card-info .district {
  color: var(--primary);
  font-weight: 500;
}

.shop-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(183,110,121,0.08);
  color: var(--primary);
  font-weight: 500;
}

.tag-gold {
  background: rgba(212,175,55,0.1);
  color: #9a7b10;
}

.shop-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.shop-card-price {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.shop-card-price strong {
  color: var(--primary-dark);
  font-size: 1rem;
}

.btn-view {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-view:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(183,110,121,0.3);
}

/* ====== Artist Card ====== */
.artist-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}

.artist-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(183,110,121,0.2);
}

.artist-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(183,110,121,0.15), rgba(212,175,55,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  overflow: hidden;
  border: 3px solid var(--bg);
  box-shadow: 0 4px 16px rgba(183,110,121,0.1);
}

.artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.artist-card .artist-title {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 4px;
}

.artist-card .artist-shop {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.artist-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.artist-stats strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
}

.artist-stats dt {
  font-size: 0.78rem;
}

.artist-stats dd {
  margin: 0;
}

.semantic-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.artist-specialties {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

/* ====== Filter Bar ====== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text-light);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.list-summary {
  margin: -8px 0 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.list-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.list-pagination a,
.list-pagination span {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 500;
}

.list-pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.list-pagination .active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.list-pagination .disabled {
  opacity: 0.45;
}

/* ====== Detail Page ====== */
.detail-header {
  padding: 100px 0 40px;
  background: linear-gradient(180deg, var(--bg-section), var(--bg));
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.detail-back:hover { color: var(--primary); }

.detail-main {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.detail-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  position: sticky;
  top: 96px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.detail-gallery-item {
  height: 120px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ====== Services List (detail page) ====== */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.service-badge {
  padding: 6px 14px;
  background: rgba(183,110,121,0.08);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ====== Contact Card ====== */
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.contact-item:last-child { border-bottom: none; }

.contact-icon {
  width: 36px;
  height: 36px;
  background: rgba(183,110,121,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ====== CTA Button ====== */
.btn-cta {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  margin-top: 20px;
  transition: var(--transition);
}

.btn-cta:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(183,110,121,0.3);
}

/* ====== About Page ====== */
.about-hero {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(135deg, rgba(183,110,121,0.05), rgba(212,175,55,0.03));
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.about-feature {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.about-feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(183,110,121,0.1), rgba(212,175,55,0.08));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.about-feature h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.about-feature p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ====== Footer ====== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  padding: 4px 0;
  color: rgba(255,255,255,0.6);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: var(--transition);
  }

  .nav-links ul {
    flex-direction: column;
    gap: 16px;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .mobile-toggle { display: flex; }

  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 24px; }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .detail-main {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }

  .filter-btn { white-space: nowrap; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; border-radius: var(--radius-md); }
  .search-bar button { border-radius: 0 0 var(--radius-md) var(--radius-md); }
}

/* ====== Animations ====== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== Empty State / Placeholder ====== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ====== Page Header (list pages) ====== */
.page-hero {
  padding: 120px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-section), var(--bg));
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-muted);
}

/* ====== Auth / Article Forms ====== */
.auth-section {
  padding: 130px 0 80px;
  background: linear-gradient(180deg, var(--bg-section), var(--bg));
}

.auth-layout {
  max-width: 520px;
  margin: 0 auto;
}

.auth-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.auth-panel h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-panel > p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  background: white;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: var(--transition);
}

.form-field input[type="file"] {
  padding: 11px 14px;
  cursor: pointer;
}

.form-field textarea {
  min-height: 220px;
  resize: vertical;
}

.form-field textarea[name="excerpt"] {
  min-height: 96px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(183,110,121,0.1);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(183,110,121,0.25);
}

.auth-message {
  min-height: 22px;
  margin-top: 18px;
  font-size: 0.92rem;
}

.auth-message.error {
  color: #b42318;
}

.auth-message.success {
  color: #027a48;
}

.auth-note {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-note a {
  color: var(--primary);
  font-weight: 600;
}

.upload-layout {
  max-width: 860px;
  margin: 0 auto;
}

.upload-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 22px;
}

.cover-preview {
  display: none;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-section);
}

.cover-preview:has(img) {
  display: block;
}

.cover-preview img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.inline-image-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-section);
  color: var(--primary-dark);
  font-weight: 600;
  white-space: nowrap;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: #fff1f0;
  color: #b42318;
  border: 1px solid #ffd5d2;
  font-weight: 600;
}

.btn-danger:hover {
  background: #ffe4e1;
}

.inline-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-image-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  padding: 5px 10px 5px 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.inline-image-chip img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.markdown-preview-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.markdown-preview-title {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-section);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.markdown-preview {
  padding: 20px 22px;
  min-height: 150px;
  color: #2c2430;
  font-size: 16px;
  line-height: 1.9;
}

.markdown-preview h1:first-child,
.markdown-preview h2:first-child,
.markdown-preview h3:first-child,
.markdown-preview h4:first-child,
.markdown-preview p:first-child {
  margin-top: 0;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4 {
  color: #7f3040;
  line-height: 1.35;
  margin: 34px 0 14px;
}

.markdown-preview h1 {
  font-size: 30px;
}

.markdown-preview h2 {
  font-size: 24px;
}

.markdown-preview h3 {
  font-size: 20px;
}

.markdown-preview h4 {
  font-size: 17px;
}

.markdown-preview p,
.markdown-preview ul,
.markdown-preview ol,
.markdown-preview blockquote {
  margin: 14px 0;
}

.markdown-preview strong {
  color: #2c2430;
  font-weight: 700;
}

.markdown-preview blockquote {
  border-left: 4px solid var(--primary);
  background: #f8f4ef;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-light);
}

.article-page {
  padding: 48px 0 80px;
  background: #f7f3ee;
  color: #2c2430;
  min-height: 100vh;
}

.article-crumb {
  max-width: 860px;
  margin: 0 auto 24px;
  color: #8b7d74;
  font-size: 14px;
}

.article-crumb a {
  color: inherit;
}

.article-shell {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 0;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 12px 40px rgba(72, 46, 58, 0.08);
}

.article-shell h1 {
  color: #7f3040;
  font-size: 34px;
  line-height: 1.3;
  margin: 0 0 14px;
}

.article-meta {
  color: #8c7e77;
  font-size: 14px;
  margin-bottom: 28px;
}

.article-cover,
.article-inline-image {
  margin: 28px 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-section);
}

.article-cover img,
.article-inline-image img {
  width: 100%;
  object-fit: cover;
}

.article-cover img {
  max-height: 430px;
}

.article-inline-image figcaption {
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: 0.86rem;
  text-align: center;
}

.article-content {
  margin-top: 0;
  color: #2c2430;
  line-height: 1.9;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  color: #7f3040;
  line-height: 1.35;
  margin: 34px 0 14px;
}

.article-content h1 {
  font-size: 30px;
  margin-top: 0;
}

.article-content h2 {
  font-size: 24px;
}

.article-content h3 {
  font-size: 20px;
}

.article-content h4 {
  font-size: 17px;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  margin: 14px 0;
}

.article-content ul,
.article-content ol {
  padding-left: 1.4rem;
}

.article-content li {
  margin: 8px 0;
}

.article-content strong {
  color: var(--text);
  font-weight: 700;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  background: #f8f4ef;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-light);
}

.article-content hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.article-content code {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.article-content a {
  color: var(--primary);
  font-weight: 600;
}

/* ====== SEO Content Blocks ====== */
.seo-copy {
  max-width: 980px;
  margin: 0 auto;
}

.seo-copy-intro {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.9;
  margin: 0 auto 24px;
  max-width: 780px;
  text-align: center;
}

.seo-copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.seo-copy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.seo-copy-card h3 {
  color: var(--text);
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.seo-copy-card p,
.seo-copy-card li {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.8;
}

.seo-copy-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.seo-copy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.seo-copy-links a {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
}

.seo-copy-links a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

@media (max-width: 900px) {
  .seo-copy-grid {
    grid-template-columns: 1fr;
  }

  .seo-copy-intro {
    text-align: left;
  }
}

/* ====== Article Management ====== */
.manage-section {
  min-height: 70vh;
}

.manage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.manage-header h1 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.manage-header p {
  color: var(--text-muted);
}

.manage-list {
  display: grid;
  gap: 18px;
}

.manage-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.manage-cover {
  width: 150px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-section);
}

.manage-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
}

.manage-body {
  min-width: 0;
}

.manage-meta,
.manage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.manage-body h2 {
  font-size: 1.15rem;
  margin: 8px 0;
}

.manage-body p {
  color: var(--text-light);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.manage-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .auth-panel,
  .article-shell {
    padding: 24px;
  }

  .article-shell h1 {
    font-size: 28px;
  }

  .inline-image-tools {
    grid-template-columns: 1fr;
  }

  .btn-secondary {
    min-height: 44px;
  }

  .manage-header,
  .manage-item {
    grid-template-columns: 1fr;
  }

  .manage-header {
    align-items: flex-start;
  }

  .manage-cover {
    width: 100%;
  }

  .manage-actions {
    justify-content: flex-start;
  }
}
