:root {
  --cream: #fbf7ff;
  --paper: #fffaff;
  --white: #ffffff;
  --blush: #c9b6e4;
  --wine: #8b6fb3;
  --clay: #d8a7c7;
  --cocoa: #3f3450;
  --taupe: #7b6f8f;
  --sage: #7fa58d;
  --border: rgba(77, 53, 43, .10);
  --border-strong: rgba(77, 53, 43, .18);
  --text-soft: rgba(77, 53, 43, .82);
  --text-prose: rgba(77, 53, 43, .86);
  --primary-soft: rgba(183, 110, 121, .12);
  --primary-hover: rgba(183, 110, 121, .11);
  --paper-glass: rgba(255, 250, 244, .94);
  --white-soft: rgba(255, 255, 255, .45);
  --shadow: 0 18px 55px rgba(77, 53, 43, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, var(--primary-soft), transparent 32rem), linear-gradient(180deg, var(--paper), var(--cream));
  color: var(--cocoa);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blush); outline-offset: 3px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.header { position: sticky; top: 0; z-index: 20; background: var(--paper-glass); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand, .serif { font-family: Georgia, "Times New Roman", serif; }
.brand { color: var(--wine); font-weight: 700; font-size: clamp(1.35rem, 3vw, 2rem); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 10px 12px; border-radius: 8px; font-size: .93rem; font-weight: 650; color: var(--cocoa); }
.nav a:hover { background: var(--primary-hover); }
.mobile-toggle { display: none; border: 1px solid var(--border); background: var(--white); color: var(--wine); font-size: 1.35rem; border-radius: 8px; width: 44px; height: 44px; align-items: center; justify-content: center; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; padding: 64px 0; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; border-radius: 999px; background: var(--white); box-shadow: 0 4px 20px rgba(77,53,43,.08); padding: 7px 12px; color: var(--wine); font-weight: 750; font-size: .9rem; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--wine); line-height: 1.05; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.55rem; }
.lead { color: var(--text-soft); line-height: 1.8; font-size: 1.08rem; }
.btn, .actions a, .actions button, table button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; border-radius: 8px; font-weight: 750; border: 1px solid transparent; cursor: pointer; background: var(--white); color: var(--wine); }
.btn { min-height: 44px; padding: 10px 16px; }
.btn-primary { background: var(--wine); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--cocoa); }
.btn-secondary { background: var(--white); color: var(--wine); border-color: var(--primary-soft); }
.btn-danger, .danger { background: rgba(163,32,32,.08); color: #a32020; border-color: rgba(163,32,32,.22); }
.btn-approve { background: rgba(127,165,141,.16); color: #3e7750; border-color: rgba(127,165,141,.35); }
.btn-small { min-height: 36px; padding: 7px 11px; font-size: .86rem; }
.actions a:hover, .actions button:hover, .btn:hover { transform: translateY(-1px); }
.hero-img, .cover, .image-card { border-radius: 10px; object-fit: cover; box-shadow: var(--shadow); background: var(--cream); }
.hero-img { width: 100%; aspect-ratio: 4/5; }
.section { padding: 58px 0; }
.band { background: var(--white-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { border: 1px solid var(--border); background: var(--white); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:hover { border-color: var(--blush); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card h3 { overflow-wrap: anywhere; }
.cover { width: 100%; aspect-ratio: 3/4; }
.post-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--cream); }
.meta { color: var(--taupe); font-size: .86rem; display: flex; gap: 10px; flex-wrap: wrap; }
.pill, .status-badge { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; background: var(--primary-soft); color: var(--wine); padding: 5px 9px; font-size: .78rem; font-weight: 750; line-height: 1.15; }
.status-draft { background: rgba(123,111,143,.12); color: var(--taupe); }
.status-pending, .status-scheduled { background: rgba(216,167,199,.18); color: #8b4f78; }
.status-published, .status-completed, .status-active { background: rgba(127,165,141,.16); color: #3e7750; }
.status-archived, .status-paused { background: rgba(123,111,143,.12); color: #665b78; }
.status-danger, .status-abandoned, .status-inactive { background: rgba(163,32,32,.09); color: #a32020; }
.status-reading, .status-favorite { background: rgba(139,111,179,.14); color: var(--wine); }
.stars { color: var(--clay); letter-spacing: 1px; white-space: nowrap; }
.form-panel { border: 1px solid var(--border); background: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: 22px; }
.form-grid { display: grid; gap: 14px; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 28px; }
.field label, label.field { display: grid; gap: 6px; font-size: .9rem; font-weight: 750; color: var(--cocoa); }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 12px; background: var(--white); color: var(--cocoa); }
input:focus, select:focus, textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.prose { line-height: 1.85; color: var(--text-prose); }
.prose h2 { margin-top: 30px; font-size: 2rem; }
.prose blockquote { margin: 24px 0; border-left: 4px solid var(--blush); background: var(--paper); padding: 14px 18px; font-family: Georgia, serif; font-size: 1.3rem; color: var(--wine); }
.footer { margin-top: 70px; background: var(--cocoa); color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; padding: 42px 0; }
.footer a { display: block; margin: 8px 0; color: rgba(255,250,244,.82); }
.visitor-counter { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 12px; background: rgba(255,255,255,.08); color: rgba(255,250,244,.86); font-size: .86rem; font-weight: 700; }
.visitor-counter strong { font-family: Georgia, serif; font-size: 1.08rem; color: var(--paper); }
.notice { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; background: rgba(116,134,107,.14); color: var(--sage); font-weight: 750; }
.error { background: rgba(190, 20, 20, .10); color: #9b1c1c; }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--cream); }
.sidebar { background: var(--cocoa); color: var(--paper); padding: 22px 14px; }
.sidebar .nav-group { margin-top: 18px; }
.sidebar .nav-title { margin: 18px 12px 7px; color: rgba(255,250,244,.58); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.sidebar a { display: flex; padding: 11px 12px; border-radius: 8px; color: rgba(255,250,244,.86); font-weight: 700; }
.sidebar a:hover { background: rgba(255,255,255,.10); }
.sidebar a.active { background: rgba(255,255,255,.15); color: #fff; }
.admin-main { padding: 24px; overflow-x: hidden; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: var(--white); }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid rgba(77,53,43,.10); vertical-align: top; }
th { font-size: .78rem; color: var(--taupe); text-transform: uppercase; background: rgba(247,240,231,.72); }
tbody tr:hover { background: var(--primary-hover); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.stat { border-radius: 10px; background: var(--white); border: 1px solid rgba(77,53,43,.10); padding: 18px; box-shadow: var(--shadow); }
.stat strong { display: block; font-family: Georgia, serif; color: var(--wine); font-size: 2.2rem; margin-top: 8px; }
.empty-state { border: 1px dashed var(--border-strong); background: var(--white-soft); border-radius: 10px; padding: 22px; color: var(--taupe); }
@media (max-width: 900px) {
  .hero, .grid-2, .grid-3, .grid-4, .footer-grid, .admin-layout { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .nav { display: none; width: 100%; padding-bottom: 12px; }
  .nav.open { display: grid; }
  .mobile-toggle { display: inline-flex; }
  .header-inner { flex-wrap: wrap; }
  .section-head { align-items: start; flex-direction: column; }
  .sidebar { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1180px); }
  h1 { font-size: clamp(2.15rem, 12vw, 3.1rem); }
  .hero { padding: 38px 0; gap: 28px; }
  .section { padding: 42px 0; }
  .admin-main { padding: 16px; }
  .stats { grid-template-columns: 1fr; }
  .actions a, .actions button { width: 100%; }
  .footer { margin-top: 42px; }
}
