﻿:root {
  --paper: #f0ebe3;
  --ink: #1e1a18;
  --wine: #8f2d1f;
  --ochre: #bb8743;
  --slate: #2f3f4f;
  --line: rgba(30, 26, 24, 0.2);
}

* {
  box-sizing: border-box;
}

input,
select,
textarea,
button {
  font: inherit;
  max-width: 100%;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 80% 0%, rgba(143, 45, 31, 0.2), transparent 60%),
    radial-gradient(800px 500px at 20% 100%, rgba(47, 63, 79, 0.24), transparent 60%),
    var(--paper);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: none;
}

img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
  height: auto;
}

p,
h1,
h2,
h3,
h4,
li,
a {
  overflow-wrap: anywhere;
}

.glow {
  position: fixed;
  z-index: 0;
  width: 42vw;
  height: 42vw;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0.28;
}

.glow-a {
  top: -10vw;
  left: -8vw;
  background: rgba(187, 135, 67, 0.45);
  animation: floatA 14s ease-in-out infinite alternate;
}

.glow-b {
  right: -12vw;
  bottom: -14vw;
  background: rgba(47, 63, 79, 0.45);
  animation: floatB 16s ease-in-out infinite alternate;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(30, 26, 24, 0.08) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
  opacity: 0.18;
  animation: grainShift 5s steps(8) infinite;
}

.site-header,
.content-container,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: none;
  margin: 0;
  padding: 28px 20px 12px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.tag {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--slate);
}

.brand h1 {
  margin: 6px 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.9;
  font-weight: 600;
  animation: inkIn 1s ease-out both;
}

.brand-intro {
  margin: 0;
  max-width: 48ch;
  color: #3d3733;
  line-height: 1.7;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.content-container {
  max-width: none;
  margin: 0;
  padding: 10px 20px 60px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.posts-page {
  display: block;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  padding: 20px;
  background: #f8f4ec;
  transition: transform 240ms ease, box-shadow 240ms ease;
  min-width: 0;
}

.panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(20, 15, 12, 0.1);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.panel-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-family: "Cormorant Garamond", serif;
}

.panel-head span {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--slate);
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.post-cover {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.post-cover.placeholder {
  display: grid;
  place-items: center;
  height: 120px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #5b524a;
  background: linear-gradient(135deg, rgba(187, 135, 67, 0.26), rgba(47, 63, 79, 0.2));
}

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

.post-meta {
  margin: 0;
  font-size: 13px;
  color: #4f4741;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.post-title {
  margin: 8px 0;
  font-size: 23px;
  font-family: "Cormorant Garamond", serif;
}
.post-title a {
  color: inherit;
  text-decoration: none;
}

.post-title a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}


.post-excerpt {
  margin: 0;
  line-height: 1.8;
  color: #2d2926;
}

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

.page-btn {
  border: 1px solid var(--line);
  padding: 8px 14px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.58);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.page-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.page-info {
  font-size: 14px;
  color: #4f4741;
}

.category-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.category-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.category-list em {
  font-style: normal;
  color: var(--wine);
}

.about-text,
.side-empty {
  margin: 0;
  line-height: 1.9;
}

.empty-state {
  border: 1px dashed var(--line);
  padding: 24px;
  background: rgba(255, 255, 255, 0.5);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.empty-state p {
  margin: 0;
  line-height: 1.8;
}

.site-footer {
  max-width: none;
  margin: 0;
  padding: 0 20px 36px;
  font-size: 13px;
  color: #4e463f;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes inkIn {
  from {
    opacity: 0;
    letter-spacing: 0.08em;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    letter-spacing: normal;
    transform: translateY(0);
  }
}

@keyframes floatA {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(5vw, 3vw) scale(1.14);
  }
}

@keyframes floatB {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-4vw, -2vw) scale(1.12);
  }
}

@keyframes grainShift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(10px, -8px);
  }
}

@media (max-width: 980px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    flex-direction: column;
  }

  .site-nav {
    padding-top: 0;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-cover,
  .post-cover.placeholder {
    height: 180px;
  }

  .glow {
    width: 70vw;
    height: 70vw;
  }
}

@media (max-width: 480px) {
  .site-header,
  .content-container,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-nav {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

.about-page {
  display: grid;
  gap: 14px;
}

.artist-archive-page .panel {
  background:
    linear-gradient(155deg, rgba(255,255,255,0.84), rgba(245,239,229,0.82)),
    radial-gradient(420px 160px at 90% 12%, rgba(196, 177, 148, 0.14), transparent 72%);
}

.artist-profile {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.artist-photo-frame {
  margin: 0;
  border: 1px solid rgba(86, 70, 52, 0.22);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  padding: 10px;
  box-shadow: 0 12px 30px rgba(26, 22, 18, 0.13);
}

.artist-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(86, 70, 52, 0.24);
  filter: saturate(0.94) contrast(1.02);
}

.artist-photo-frame figcaption {
  margin-top: 8px;
  display: grid;
  gap: 5px;
}

.artist-no {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #5b4e44;
}

.artist-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #74665b;
}

.artist-profile-meta h2 {
  margin: 4px 0 6px;
}

.artist-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.artist-role-tags span {
  border: 1px solid rgba(86, 70, 52, 0.25);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.72);
}

.artist-intro {
  margin: 12px 0;
  line-height: 1.9;
}

.artist-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.artist-facts div {
  border: 1px solid rgba(86, 70, 52, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.64);
}

.artist-facts dt {
  font-size: 12px;
  color: #66574c;
}

.artist-facts dd {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.artist-skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.artist-skill-card {
  border: 1px solid rgba(86, 70, 52, 0.2);
  border-radius: 14px;
  background: rgba(255,255,255,0.74);
  padding: 12px;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.artist-skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(30, 26, 22, 0.12);
  border-color: rgba(143,45,31,0.38);
}

.skill-no {
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #6d6054;
}

.artist-skill-card h3 {
  margin: 0;
  font-size: 22px;
  font-family: "Cormorant Garamond", serif;
}

.artist-skill-card p {
  margin: 8px 0 0;
  line-height: 1.7;
  font-size: 13px;
}

.artist-timeline {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 26px;
}

.artist-timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(123, 54, 43, 0.22), rgba(62, 58, 52, 0.5), rgba(123,54,43,0.22));
}

.artist-timeline-item {
  position: relative;
}

.artist-timeline-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7b362b;
  box-shadow: 0 0 0 4px rgba(123, 54, 43, 0.16);
}

.artist-year {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.09em;
  color: #685c52;
}

.artist-timeline-card {
  border: 1px solid rgba(86, 70, 52, 0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.74);
  padding: 10px 12px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.artist-timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 26, 22, 0.11);
}

.artist-timeline-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
}

.artist-timeline-card p {
  margin: 6px 0 0;
  line-height: 1.75;
}

.artist-toolbox {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.artist-toolbox span {
  border: 1px solid rgba(86, 70, 52, 0.2);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  background: rgba(255,255,255,0.76);
  font-weight: 600;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.artist-toolbox span:hover {
  transform: translateY(-2px);
  border-color: rgba(143,45,31,0.36);
  box-shadow: 0 8px 16px rgba(31, 26, 22, 0.11);
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.contact-list li {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.contact-list a {
  color: var(--ink);
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-list a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.56);
}

@media (max-width: 860px) {
  .artist-profile {
    grid-template-columns: 1fr;
  }

  .artist-photo-frame {
    max-width: 260px;
  }

  .artist-facts {
    grid-template-columns: 1fr;
  }

  .artist-skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artist-toolbox {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .artist-skill-grid {
    grid-template-columns: 1fr;
  }

  .artist-toolbox {
    grid-template-columns: 1fr;
  }

  .contact-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

.admin-wrap {
  min-height: 100vh;
  display: block;
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.admin-panel {
  width: 100%;
  max-width: none;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
}

.admin-form input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.8);
}

.admin-form button {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
}

.admin-error {
  margin: 0 0 10px;
  color: #a22a22;
  background: rgba(162, 42, 34, 0.08);
  border: 1px solid rgba(162, 42, 34, 0.25);
  padding: 8px 10px;
}

.admin-success {
  margin: 0 0 10px;
  color: #1d6d35;
  background: rgba(29, 109, 53, 0.08);
  border: 1px solid rgba(29, 109, 53, 0.28);
  padding: 8px 10px;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.metric-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  padding: 10px;
}

.metric-card h3 {
  margin: 0;
  font-size: 14px;
}

.metric-card p {
  margin: 8px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  color: var(--wine);
}

.recent-posts {
  margin: 10px 0 18px;
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.recent-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.recent-list p {
  margin: 4px 0 0;
  color: #4f4741;
  font-size: 13px;
}

.recent-list time {
  color: #4f4741;
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .recent-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

.admin-filter {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-filter input,
.admin-filter select,
.admin-filter button {
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.8);
}

.admin-filter button {
  background: var(--ink);
  color: #fff;
}

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px dashed var(--line);
  text-align: left;
  padding: 10px 8px;
  vertical-align: middle;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-actions a,
.admin-actions button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 5px 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
}

.admin-actions form {
  margin: 0;
}

@media (max-width: 860px) {
  .admin-filter {
    grid-template-columns: 1fr;
  }
}

.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.8);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-list-inline {
  margin: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  border: 1px solid var(--line);
  padding: 4px 10px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.archive-year-list {
  display: grid;
  gap: 16px;
}

.archive-year-block {
  border-left: 3px solid var(--ochre);
  padding-left: 12px;
}

.archive-year {
  margin: 0 0 10px;
  font-size: 30px;
  font-family: "Cormorant Garamond", serif;
}

.archive-month-block {
  margin-bottom: 10px;
}

.archive-month {
  margin: 0 0 6px;
  font-size: 16px;
  color: #4f4741;
}

.archive-item-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.archive-item-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
}

.archive-item-list a {
  color: var(--ink);
  text-decoration: none;
}

.archive-item-list time {
  color: #4f4741;
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .archive-item-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

.upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-row input[type="file"] {
  max-width: 100%;
}

.markdown-body {
  line-height: 1.85;
}

.markdown-body pre {
  overflow-x: auto;
  padding: 12px;
  background: #111827;
  border-radius: 8px;
}

.markdown-body code {
  font-family: Consolas, "Courier New", monospace;
}

.markdown-body blockquote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 4px solid var(--ochre);
  background: rgba(187, 135, 67, 0.12);
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.markdown-body img {
  max-width: 100%;
  border-radius: 6px;
}

.markdown-body pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
  tab-size: 2;
  margin: 12px 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(120, 120, 120, 0.25);
}

.markdown-body pre code.hljs {
  display: block;
  min-width: max-content;
  line-height: 1.55;
}

/* Light theme */
.markdown-body pre,
.markdown-body pre code.hljs {
  background: #f6f8fa;
  color: #1f2328;
}

.markdown-body .hljs-keyword,
.markdown-body .hljs-selector-tag,
.markdown-body .hljs-literal {
  color: #b42318;
}

.markdown-body .hljs-string,
.markdown-body .hljs-attr,
.markdown-body .hljs-title.class_ {
  color: #0a7a3e;
}

.markdown-body .hljs-number,
.markdown-body .hljs-symbol,
.markdown-body .hljs-bullet {
  color: #175cd3;
}

.markdown-body .hljs-comment,
.markdown-body .hljs-quote {
  color: #57606a;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  .markdown-body pre,
  .markdown-body pre code.hljs {
    background: #0f172a;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
  }

  .markdown-body .hljs-keyword,
  .markdown-body .hljs-selector-tag,
  .markdown-body .hljs-literal {
    color: #fda4af;
  }

  .markdown-body .hljs-string,
  .markdown-body .hljs-attr,
  .markdown-body .hljs-title.class_ {
    color: #86efac;
  }

  .markdown-body .hljs-number,
  .markdown-body .hljs-symbol,
  .markdown-body .hljs-bullet {
    color: #93c5fd;
  }

  .markdown-body .hljs-comment,
  .markdown-body .hljs-quote {
    color: #94a3b8;
  }
}

.zoomable-image {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 12, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox img {
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 640px) {
  .image-lightbox {
    padding: 10px;
  }

  .image-lightbox img {
    max-height: calc(100vh - 36px);
  }
}

.comment-section {
  margin-top: 24px;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.8);
}

.comment-form button {
  width: fit-content;
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
}

.comment-item {
  border-bottom: 1px dashed var(--line);
  padding: 10px 0;
}

.honeypot {
  position: absolute;
  left: -99999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.like-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
}

.like-btn[data-liked="1"] {
  opacity: 0.75;
}

.copy-link-btn {
  min-width: 88px;
}

.copy-link-status {
  min-height: 1.2em;
  color: #1d6d35;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .site-header,
  .content-container,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .panel {
    padding: 16px;
  }

  .post-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .admin-table {
    min-width: 700px;
  }
}

@media (max-width: 560px) {
  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    width: 100%;
  }

  .site-nav a {
    display: inline-flex;
    justify-content: center;
    border: 1px solid var(--line);
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.58);
  }

  .post-meta {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination .page-btn {
    width: 100%;
  }

  .page-info {
    text-align: center;
  }

  .panel-head h2 {
    font-size: 24px;
  }

  .admin-actions {
    gap: 6px;
  }

  .admin-actions a,
  .admin-actions button {
    min-height: 34px;
  }

  .admin-table {
    min-width: 620px;
  }

  .upload-row {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-row button {
    width: 100%;
  }

  .check-row {
    align-items: flex-start;
  }

  .like-wrap {
    flex-wrap: wrap;
    align-items: center;
  }
}

/* Theme System */
:root {
  --bg-main:
    radial-gradient(1200px 500px at 80% 0%, rgba(143, 45, 31, 0.2), transparent 60%),
    radial-gradient(800px 500px at 20% 100%, rgba(47, 63, 79, 0.24), transparent 60%),
    var(--paper);
  --panel-bg: rgba(255, 255, 255, 0.45);
  --panel-bg-strong: rgba(255, 255, 255, 0.62);
  --text-muted: #4f4741;
}

body {
  background: var(--bg-main);
}

.panel { background: var(--panel-bg); }
.post-card { background: var(--panel-bg-strong); }
.post-meta,
.page-info { color: var(--text-muted); }

.theme-toggle-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 10000;
  border: 1px solid var(--line);
  background: var(--panel-bg-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  min-height: 38px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(20, 15, 12, 0.2);
}

[data-theme="dark"] {
  --paper: #0f1115;
  --ink: #e8e4db;
  --wine: #f3a28f;
  --ochre: #d7b382;
  --slate: #9eb3c6;
  --line: rgba(232, 228, 219, 0.2);
  --bg-main:
    radial-gradient(1200px 500px at 80% 0%, rgba(190, 104, 84, 0.22), transparent 60%),
    radial-gradient(800px 500px at 20% 100%, rgba(86, 109, 131, 0.26), transparent 60%),
    #0f1115;
  --panel-bg: rgba(22, 26, 33, 0.72);
  --panel-bg-strong: rgba(25, 30, 38, 0.84);
  --text-muted: #c3bcb0;
}

[data-theme="dark"] .brand-intro,
[data-theme="dark"] .post-excerpt,
[data-theme="dark"] .about-text,
[data-theme="dark"] .side-empty,
[data-theme="dark"] .timeline-period,
[data-theme="dark"] .timeline-item p,
[data-theme="dark"] .recent-list p,
[data-theme="dark"] .recent-list time,
[data-theme="dark"] .archive-item-list time {
  color: #d2ccc2;
}

[data-theme="dark"] .site-nav a,
[data-theme="dark"] .social-list a,
[data-theme="dark"] .tag-chip,
[data-theme="dark"] .archive-item-list a,
[data-theme="dark"] .admin-actions a,
[data-theme="dark"] .admin-actions button,
[data-theme="dark"] .page-btn {
  color: #f1ece3;
}

[data-theme="dark"] .admin-filter input,
[data-theme="dark"] .admin-filter select,
[data-theme="dark"] .admin-form input,
[data-theme="dark"] .admin-form textarea,
[data-theme="dark"] .admin-form select,
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea {
  background: rgba(24, 28, 35, 0.9);
  color: #f1ece3;
}

[data-theme="dark"] .site-nav a::after {
  background: #f1ece3;
}

@media (max-width: 560px) {
  .theme-toggle-btn {
    right: 10px;
    bottom: 10px;
    padding: 9px 12px;
  }
}



/* Admin visual refresh + motion */
.admin-page {
  background:
    radial-gradient(900px 400px at 0% -10%, rgba(143, 45, 31, 0.2), transparent 60%),
    radial-gradient(1000px 480px at 100% 0%, rgba(47, 63, 79, 0.22), transparent 64%),
    var(--paper);
}

.admin-page .admin-wrap {
  padding-top: 16px;
}

.admin-page .admin-panel {
  border-radius: 16px;
  backdrop-filter: blur(2px);
  box-shadow: 0 16px 42px rgba(18, 18, 18, 0.14);
}

.admin-page .panel-head h2 {
  letter-spacing: 0.01em;
}

.admin-page .metric-card {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.admin-page .metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.admin-page .metric-card p {
  animation: statPulse 2.8s ease-in-out infinite;
}

.admin-page .admin-table tbody tr {
  transition: background-color 180ms ease;
}

.admin-page .admin-table tbody tr:hover {
  background: rgba(187, 135, 67, 0.12);
}

.admin-page .admin-actions a,
.admin-page .admin-actions button,
.admin-page .admin-form button,
.admin-page .admin-filter button,
.admin-page .page-btn {
  position: relative;
  overflow: hidden;
}

.admin-page .admin-actions a::before,
.admin-page .admin-actions button::before,
.admin-page .admin-form button::before,
.admin-page .admin-filter button::before,
.admin-page .page-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.35) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 360ms ease;
}

.admin-page .admin-actions a:hover::before,
.admin-page .admin-actions button:hover::before,
.admin-page .admin-form button:hover::before,
.admin-page .admin-filter button:hover::before,
.admin-page .page-btn:hover::before {
  transform: translateX(120%);
}

@keyframes statPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@media (max-width: 980px) {
  .admin-page .admin-panel {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-page .metric-card p,
  .admin-page .admin-actions a::before,
  .admin-page .admin-actions button::before,
  .admin-page .admin-form button::before,
  .admin-page .admin-filter button::before,
  .admin-page .page-btn::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Home artistic hero */
.home-layout {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
}

.home-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.34)),
    radial-gradient(640px 280px at 20% 25%, rgba(187,135,67,0.26), transparent 65%),
    radial-gradient(640px 320px at 90% 70%, rgba(47,63,79,0.22), transparent 65%);
  overflow: hidden;
}

.hero-kicker {
  margin: 0;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--slate);
}

.hero-copy h2 {
  margin: 10px 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.02;
}

.hero-copy p {
  margin: 0;
  max-width: 56ch;
  line-height: 1.9;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-art {
  position: relative;
  min-height: 220px;
}

.shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(0.2px);
  animation: drift 10s ease-in-out infinite;
}

.shape-a {
  width: 180px;
  height: 180px;
  top: 8px;
  left: 18px;
  background: radial-gradient(circle at 25% 25%, rgba(143,45,31,0.86), rgba(143,45,31,0.2));
}

.shape-b {
  width: 140px;
  height: 140px;
  top: 96px;
  right: 18px;
  background: radial-gradient(circle at 30% 30%, rgba(47,63,79,0.86), rgba(47,63,79,0.2));
  animation-delay: -1.8s;
}

.shape-c {
  width: 80px;
  height: 80px;
  top: 12px;
  right: 88px;
  background: radial-gradient(circle at 30% 30%, rgba(187,135,67,0.95), rgba(187,135,67,0.35));
  animation-delay: -3.2s;
}

.shape-d {
  width: 210px;
  height: 16px;
  left: 20px;
  bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(30,26,24,0.08), rgba(30,26,24,0.38), rgba(30,26,24,0.08));
  animation: sweep 4.6s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

@keyframes sweep {
  0%, 100% { transform: scaleX(0.92); opacity: 0.65; }
  50% { transform: scaleX(1.05); opacity: 1; }
}

.category-list a {
  color: var(--ink);
  text-decoration: none;
}

.category-list a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 980px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 160px;
  }
}

@media (max-width: 560px) {
  .home-hero {
    padding: 16px;
  }

  .hero-copy h2 {
    font-size: clamp(26px, 8vw, 38px);
  }

  .hero-actions .page-btn {
    width: 100%;
  }
}

[data-theme="dark"] .home-hero {
  background:
    linear-gradient(135deg, rgba(27,33,42,0.78), rgba(18,23,31,0.58)),
    radial-gradient(640px 280px at 20% 25%, rgba(243,162,143,0.14), transparent 65%),
    radial-gradient(640px 320px at 90% 70%, rgba(158,179,198,0.14), transparent 65%);
}

/* Contact postcard redesign */
.contact-postcard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.08fr);
  gap: 16px;
  align-items: start;
}

.contact-copy h2 {
  margin: 6px 0 10px;
}

.contact-desc {
  margin: 0 0 14px;
  line-height: 1.9;
}

.contact-topics,
.contact-socials {
  border: 1px solid rgba(88, 73, 57, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.contact-topics + .contact-socials {
  margin-top: 10px;
}

.contact-topics h3,
.contact-socials h3 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #63574d;
}

.contact-topics ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.postcard-social-list a {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.postcard-social-list a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(26, 22, 18, 0.11);
}

.postcard-form-wrap {
  position: relative;
}

.postcard-form-card {
  position: relative;
  border: 1px solid rgba(88, 73, 57, 0.24);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(165deg, rgba(251, 247, 238, 0.95), rgba(245, 238, 225, 0.92));
  box-shadow: 0 16px 30px rgba(26, 22, 18, 0.12);
  overflow: hidden;
}

.postcard-form-card .stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px dashed rgba(114, 68, 46, 0.42);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(210, 131, 102, 0.32), rgba(218, 176, 106, 0.2));
  color: #694a35;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.paper-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 33px,
    rgba(142, 128, 108, 0.24) 34px
  );
}

.postcard-form-card .panel-head,
.postcard-form,
.postcard-form-card .admin-error {
  position: relative;
  z-index: 1;
}

.postcard-form {
  display: grid;
  gap: 12px;
}

.postcard-form label {
  display: grid;
  gap: 6px;
}

.postcard-form label span {
  font-size: 13px;
  color: #695d53;
  letter-spacing: 0.05em;
}

.postcard-form input,
.postcard-form textarea {
  border: 0;
  border-bottom: 1px solid rgba(88, 73, 57, 0.38);
  border-radius: 8px 8px 2px 2px;
  background: rgba(255, 255, 255, 0.5);
  padding: 9px 10px;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.postcard-form input:focus,
.postcard-form textarea:focus {
  border-bottom-color: rgba(122, 45, 35, 0.7);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(122, 45, 35, 0.08);
}

.postcard-form button {
  border: 1px solid rgba(59, 47, 36, 0.3);
  border-radius: 11px;
  padding: 11px 14px;
  background: linear-gradient(145deg, #2f3f4f, #22313f);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

.postcard-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(26, 22, 18, 0.16);
}

.postcard-form button:disabled,
.postcard-form button.is-loading {
  opacity: 0.82;
  cursor: wait;
  transform: none;
}

.contact-success-card {
  border: 1px solid rgba(75, 114, 71, 0.35);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(155deg, rgba(240, 255, 240, 0.85), rgba(233, 248, 233, 0.8));
}

.contact-success-card h3 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
}

.contact-success-card p {
  margin: 0 0 12px;
}

@media (max-width: 920px) {
  .contact-postcard-layout {
    grid-template-columns: 1fr;
  }
}

/* Guestbook sticky wall */
.guestbook-wall-page {
  display: grid;
  gap: 14px;
}

.guestbook-intro {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.86), rgba(245,238,226,0.82)),
    radial-gradient(520px 160px at 94% 12%, rgba(209,190,159,0.18), transparent 72%);
}

.guestbook-intro h2 {
  margin: 6px 0 8px;
}

.guestbook-intro p {
  margin: 0;
  line-height: 1.9;
}

.guestbook-compose-card {
  position: relative;
  border: 1px solid rgba(94, 78, 60, 0.22);
  background:
    linear-gradient(160deg, rgba(249, 244, 233, 0.96), rgba(242, 234, 219, 0.9));
}

.guestbook-compose-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 88px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(155, 177, 187, 0.55), rgba(181, 201, 208, 0.5));
  transform: rotate(6deg);
  opacity: 0.65;
}

.guestbook-note-form {
  display: grid;
  gap: 10px;
}

.guestbook-note-form label {
  display: grid;
  gap: 6px;
}

.guestbook-note-form label span {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #6a5d52;
}

.guestbook-note-form input,
.guestbook-note-form textarea {
  border: 1px solid rgba(100, 84, 67, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 11px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.guestbook-note-form input:focus,
.guestbook-note-form textarea:focus {
  border-color: rgba(126, 56, 44, 0.5);
  box-shadow: 0 0 0 2px rgba(126, 56, 44, 0.08);
}

.guestbook-note-form button {
  justify-self: start;
  border: 1px solid rgba(74, 60, 47, 0.3);
  border-radius: 11px;
  padding: 10px 15px;
  background: linear-gradient(145deg, #3e4d5c, #2f3f4f);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.guestbook-note-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 16px rgba(28, 24, 20, 0.14);
}

.guestbook-wall {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.84), rgba(245,239,228,0.8));
}

.note-wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.note-card {
  position: relative;
  border: 1px solid rgba(100, 84, 67, 0.2);
  border-radius: 12px;
  padding: 14px 12px 12px;
  min-height: 160px;
  box-shadow: 0 10px 20px rgba(26, 22, 18, 0.12);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.note-card:hover {
  transform: translateY(-3px) rotate(0deg);
  box-shadow: 0 14px 24px rgba(26, 22, 18, 0.16);
  border-color: rgba(126, 56, 44, 0.34);
}

.note-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: "Cormorant Garamond", serif;
}

.note-card p {
  margin: 0;
  line-height: 1.78;
  white-space: pre-wrap;
}

.note-card time {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #6b5f55;
}

.note-tape {
  position: absolute;
  top: -8px;
  left: 16px;
  width: 56px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(171,190,197,0.62), rgba(197,212,216,0.55));
}

.note-tilt-1 { transform: rotate(-1.2deg); background: linear-gradient(155deg, #fff9d8, #f8efbf); }
.note-tilt-2 { transform: rotate(1.1deg); background: linear-gradient(155deg, #f9f3ff, #ece2f8); }
.note-tilt-3 { transform: rotate(-0.6deg); background: linear-gradient(155deg, #eefaf5, #ddf0e9); }
.note-tilt-4 { transform: rotate(1.6deg); background: linear-gradient(155deg, #fff4eb, #f7e4d4); }
.note-tilt-5 { transform: rotate(-1.5deg); background: linear-gradient(155deg, #eef5ff, #dee9f6); }

.note-empty-card {
  border: 1px dashed rgba(102, 87, 71, 0.35);
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(255,255,255,0.74), rgba(245,238,227,0.72));
  padding: 18px;
  text-align: center;
  color: #685b50;
}

@media (max-width: 980px) {
  .note-wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .note-wall-grid {
    grid-template-columns: 1fr;
  }
}

/* Search lab redesign */
.search-lab-page {
  display: grid;
  gap: 14px;
}

.search-hero-panel {
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.88), rgba(245,238,226,0.84)),
    radial-gradient(580px 200px at 50% 0%, rgba(211, 190, 156, 0.22), transparent 72%);
}

.search-hero-panel h2 {
  margin: 8px 0 6px;
}

.search-subtitle {
  margin: 0 auto 14px;
  max-width: 64ch;
  line-height: 1.85;
}

.search-lab-form {
  width: min(860px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
}

.search-lab-form input {
  border: 1px solid rgba(99, 82, 63, 0.24);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 17px;
  background: rgba(255,255,255,0.8);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.search-lab-form input:focus {
  border-color: rgba(123, 55, 43, 0.48);
  box-shadow: 0 0 0 3px rgba(123, 55, 43, 0.08);
}

.search-lab-form button {
  border: 1px solid rgba(58, 46, 35, 0.32);
  border-radius: 12px;
  background: linear-gradient(145deg, #2f3f4f, #22313f);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.search-lab-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 16px rgba(26, 22, 18, 0.14);
}

.hot-keywords {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.hot-keywords > span {
  font-size: 12px;
  letter-spacing: 0.09em;
  color: #675b50;
}

.hot-keyword-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hot-keyword-btn {
  border: 1px solid rgba(89, 75, 60, 0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.74);
  padding: 7px 12px;
  cursor: pointer;
  color: #352f2a;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hot-keyword-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 55, 43, 0.42);
  box-shadow: 0 8px 14px rgba(26, 22, 18, 0.12);
}

.search-loading {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #65584e;
}

.loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7b362b;
  animation: searchPulse 1.1s infinite ease-in-out;
}

.loading-dot:nth-child(2) { animation-delay: 0.15s; }
.loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes searchPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.search-result-panel {
  background: linear-gradient(160deg, rgba(255,255,255,0.86), rgba(245,239,228,0.82));
}

.search-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.search-result-card {
  border: 1px solid rgba(95, 80, 64, 0.2);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  padding: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.search-result-card:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 55, 43, 0.35);
  box-shadow: 0 12px 20px rgba(26, 22, 18, 0.12);
}

.search-result-card h3 {
  margin: 0;
  font-size: 24px;
  font-family: "Cormorant Garamond", serif;
}

.search-result-card h3 a {
  color: #1f1b18;
  text-decoration: none;
}

.search-result-card h3 a:hover {
  color: #7b362b;
}

.search-meta-row {
  margin: 8px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #665a50;
}

.search-tags-row {
  margin: 9px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-tag {
  border: 1px solid rgba(96, 81, 64, 0.22);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: rgba(248, 244, 237, 0.84);
}

.search-state-card {
  border: 1px dashed rgba(95, 80, 64, 0.34);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  background: linear-gradient(155deg, rgba(255,255,255,0.68), rgba(245,238,226,0.72));
}

.search-state-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
}

.search-state-card p {
  margin: 8px 0 0;
}

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

@media (max-width: 560px) {
  .search-lab-form {
    grid-template-columns: 1fr;
  }
}

/* Categories index page */
.category-index-page {
  display: grid;
  gap: 14px;
}

.category-index-hero {
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.88), rgba(245,238,226,0.84)),
    radial-gradient(540px 180px at 50% 0%, rgba(205, 185, 150, 0.2), transparent 72%);
}

.category-index-hero h2 {
  margin: 8px 0 6px;
}

.category-index-hero p {
  margin: 0;
  line-height: 1.85;
}

.category-index-grid-panel {
  background: linear-gradient(165deg, rgba(255,255,255,0.86), rgba(246,239,228,0.8));
}

.category-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.category-index-card {
  position: relative;
  border: 1px solid rgba(98, 82, 63, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.76);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-index-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(27, 23, 20, 0.13);
  border-color: rgba(123, 55, 43, 0.38);
}

.shape-badge {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 10px;
  transition: transform 220ms ease;
}

.category-index-card:hover .shape-badge {
  transform: translateY(-2px) scale(1.08);
}

.category-index-card h3 {
  margin: 0;
  font-size: 26px;
  font-family: "Cormorant Garamond", serif;
}

.en-subtitle {
  margin: 4px 0 7px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #6f6155;
  text-transform: uppercase;
}

.category-desc {
  margin: 0;
  line-height: 1.72;
  min-height: 66px;
}

.category-count {
  margin: 10px 0 12px;
  color: #5c4f44;
}

.category-count strong {
  font-size: 18px;
  color: #2e2722;
}

.category-index-card .page-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.category-index-empty {
  border: 1px dashed rgba(98, 82, 63, 0.34);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(155deg, rgba(255,255,255,0.66), rgba(245,238,226,0.7));
}

.category-index-empty h3 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
}

.category-index-empty p {
  margin: 0;
}

.category-index-card.color-1 .shape-badge { background: linear-gradient(145deg, #ecd3be, #d6b597); }
.category-index-card.color-2 .shape-badge { background: linear-gradient(145deg, #cddce9, #a7bfd4); border-radius: 50%; }
.category-index-card.color-3 .shape-badge { background: linear-gradient(145deg, #f2e3ba, #dec58b); clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%); }
.category-index-card.color-4 .shape-badge { background: linear-gradient(145deg, #d4e5da, #a5cab2); border-radius: 8px; }
.category-index-card.color-5 .shape-badge { background: linear-gradient(145deg, #e9d5cf, #d0aa9f); clip-path: ellipse(50% 42% at 50% 50%); }
.category-index-card.color-6 .shape-badge { background: linear-gradient(145deg, #dbd8eb, #bcb6db); transform: rotate(8deg); }

@media (max-width: 980px) {
  .category-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .category-index-grid {
    grid-template-columns: 1fr;
  }
}

/* Home redesign: artist notebook */
.home-layout {
  grid-template-columns: minmax(0, 1.58fr) minmax(290px, 1fr);
  gap: 16px;
}

.notebook-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  gap: 20px;
  padding: 28px;
  border: 1px solid rgba(98, 82, 60, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(128deg, rgba(251,247,239,0.94), rgba(246,240,229,0.9)),
    radial-gradient(980px 460px at 8% 10%, rgba(209,184,144,0.3), transparent 66%),
    radial-gradient(780px 420px at 92% 86%, rgba(190,201,210,0.28), transparent 68%);
  position: relative;
  overflow: hidden;
}

.notebook-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(61, 52, 46, 0.2) 0.65px, transparent 0.65px);
  background-size: 4px 4px;
}

.notebook-copy { position: relative; z-index: 1; }
.notebook-copy h2 { margin-top: 8px; }
.hero-subtitle {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: "Cormorant Garamond", serif;
  color: #4d433b;
}

.notebook-actions .page-btn { transition: transform 180ms ease, box-shadow 180ms ease; }
.notebook-actions .page-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(34, 30, 26, 0.16);
}

.notebook-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 12px;
  align-content: center;
  position: relative;
  z-index: 1;
}

.floating-card {
  border-radius: 16px;
  border: 1px solid rgba(106, 88, 67, 0.22);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(41, 32, 24, 0.12);
  padding: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.floating-card:hover {
  transform: translateY(-3px) rotate(-0.25deg);
  box-shadow: 0 16px 32px rgba(37, 31, 24, 0.18);
}

.floating-card h4 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
}

.floating-card p { margin: 0; font-size: 13px; line-height: 1.65; color: #534a43; }
.sketch-note { grid-column: 1 / 2; grid-row: 1 / 3; background: linear-gradient(160deg, rgba(255,255,255,0.88), rgba(249,242,231,0.75)); }
.color-chip { grid-column: 2 / 3; grid-row: 1 / 2; background: linear-gradient(150deg, rgba(255,255,255,0.84), rgba(237,237,235,0.72)); }
.artwork-thumb { grid-column: 1 / 3; grid-row: 3 / 4; background: linear-gradient(150deg, rgba(255,255,255,0.86), rgba(234,233,228,0.72)); }
.handwritten-tag {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  background: rgba(73, 63, 55, 0.85);
  color: #f5eee1;
}
.handwritten-tag em {
  display: block;
  font-family: "Caveat", "Comic Sans MS", cursive;
  font-style: normal;
  font-size: 25px;
  transform: rotate(-2deg);
  line-height: 1.2;
}

.chip-row { display: flex; gap: 8px; }
.chip-row span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--chip);
  border: 1px solid rgba(43, 38, 32, 0.16);
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.thumb-grid span {
  height: 64px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(240,233,221,0.85), rgba(217,223,226,0.75)),
    repeating-linear-gradient(45deg, rgba(83,74,66,0.1), rgba(83,74,66,0.1) 6px, transparent 6px, transparent 12px);
}

.category-strip-panel { grid-column: 1 / -1; }
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid rgba(84, 73, 61, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  color: #2f2a25;
  background: rgba(255, 255, 255, 0.78);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.category-pill em {
  font-style: normal;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(47, 63, 79, 0.12);
  padding: 2px 7px;
}
.category-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 45, 31, 0.42);
  box-shadow: 0 7px 18px rgba(34, 30, 26, 0.12);
}

.archive-panel .post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.archive-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(84, 73, 61, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}
.archive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(28, 25, 22, 0.14);
  border-color: rgba(143, 45, 31, 0.35);
}
.archive-card .post-title a { color: #1f1b18; text-decoration: none; }
.archive-card .post-title a:hover { color: #7e382c; }
.archive-card .post-cover.placeholder {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: #61574d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.archive-tone-1 { background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(248,242,231,0.86)); }
.archive-tone-2 { background: linear-gradient(160deg, rgba(252,252,251,0.92), rgba(239,242,244,0.82)); }
.archive-tone-3 { background: linear-gradient(160deg, rgba(250,246,239,0.92), rgba(243,235,223,0.84)); }
.archive-tone-4 { background: linear-gradient(160deg, rgba(247,249,250,0.94), rgba(236,241,244,0.84)); }
.archive-size-1 .post-cover { min-height: 180px; }
.archive-size-2 .post-cover { min-height: 220px; filter: grayscale(8%); }
.archive-size-3 .post-cover { min-height: 170px; filter: grayscale(18%); }

.archive-empty-card {
  border: 1px solid rgba(95, 83, 70, 0.22);
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(155deg, rgba(255,255,255,0.84), rgba(245,239,229,0.82));
}
.archive-empty-card h3 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
}
.archive-empty-card p { margin: 0 0 14px; }

.home-side-stack .status-panel { background: linear-gradient(160deg, rgba(255,255,255,0.86), rgba(242,238,230,0.8)); }
.status-grid {
  display: grid;
  gap: 10px;
}
.status-grid article {
  border: 1px solid rgba(82, 71, 59, 0.2);
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.status-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(28, 25, 22, 0.12);
  border-color: rgba(143, 45, 31, 0.35);
}
.status-grid h4 {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #665a4f;
}
.status-grid p { margin: 0; line-height: 1.75; }
.status-links a {
  color: #2f2a25;
  text-decoration: none;
  margin-right: 12px;
}
.status-links a:hover { color: #7e382c; }

@media (max-width: 980px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
  .notebook-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .notebook-art {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .sketch-note,
  .color-chip,
  .artwork-thumb,
  .handwritten-tag {
    grid-column: auto;
    grid-row: auto;
  }
  .archive-panel .post-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-layout { gap: 12px; }
  .notebook-hero { padding: 16px; border-radius: 16px; }
  .hero-subtitle { font-size: 16px; }
  .notebook-actions .page-btn { width: 100%; }
  .thumb-grid span { height: 52px; }
  .category-strip { gap: 8px; }
  .category-pill { padding: 7px 10px; }
}

/* UIUXProMax admin redesign */
.admin-page {
  background:
    radial-gradient(1400px 560px at -10% -12%, rgba(187, 135, 67, 0.24), transparent 62%),
    radial-gradient(1200px 680px at 108% -2%, rgba(47, 63, 79, 0.24), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 45%),
    var(--paper);
}

.admin-page .admin-panel {
  border: 1px solid rgba(30, 26, 24, 0.14);
  background: linear-gradient(165deg, rgba(255,255,255,0.78), rgba(255,255,255,0.48));
  box-shadow: 0 24px 55px rgba(12, 12, 12, 0.13);
  border-radius: 20px;
}

.admin-page .panel-head {
  border-bottom: 1px solid rgba(30, 26, 24, 0.12);
}

.admin-page .panel-head span {
  padding: 3px 9px;
  border: 1px solid rgba(30, 26, 24, 0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
}

.admin-quick-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-quick-btn {
  border: 1px solid rgba(30, 26, 24, 0.16);
  border-radius: 14px;
  padding: 14px 14px 13px;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255,255,255,0.78), rgba(255,255,255,0.5));
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.admin-quick-btn strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 23px;
  line-height: 1.05;
}

.admin-quick-btn span {
  margin-top: 7px;
  display: block;
  font-size: 13px;
  color: #514a44;
}

.admin-quick-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
  border-color: rgba(143, 45, 31, 0.42);
}

.admin-bottom-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-page .page-btn,
.admin-page .admin-actions a,
.admin-page .admin-actions button,
.admin-page .admin-form button:not(.ql-toolbar button):not(.ql-picker-label):not(.ql-picker-item),
.admin-page .admin-filter button {
  border-radius: 10px;
  border: 1px solid rgba(30, 26, 24, 0.2);
  background: linear-gradient(140deg, rgba(255,255,255,0.84), rgba(255,255,255,0.58));
  color: var(--ink);
  font-weight: 600;
}

.admin-page .admin-filter button,
.admin-page .admin-form button:not(.ql-toolbar button):not(.ql-picker-label):not(.ql-picker-item) {
  background: linear-gradient(140deg, #2f3f4f, #22313f);
  color: #fff;
  border-color: rgba(17, 24, 32, 0.5);
}

.admin-page .admin-filter input,
.admin-page .admin-filter select,
.admin-page .admin-form input,
.admin-page .admin-form textarea,
.admin-page .admin-form select {
  border-radius: 10px;
  border: 1px solid rgba(30, 26, 24, 0.2);
}

.admin-page .admin-table {
  border-radius: 12px;
  overflow: hidden;
}

.admin-page .admin-table thead th {
  background: rgba(47, 63, 79, 0.12);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-page .admin-table tbody tr {
  transition: transform 160ms ease, background-color 160ms ease;
}

.admin-page .admin-table tbody tr:hover {
  transform: translateX(2px);
  background: rgba(187, 135, 67, 0.13);
}

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

@media (max-width: 560px) {
  .admin-bottom-links .page-btn {
    width: 100%;
  }
}

[data-theme="dark"] .admin-page .admin-panel {
  background: linear-gradient(165deg, rgba(22,28,35,0.86), rgba(18,23,30,0.72));
  border-color: rgba(222, 215, 202, 0.14);
}

[data-theme="dark"] .admin-page .panel-head span {
  background: rgba(18, 23, 30, 0.7);
}

[data-theme="dark"] .admin-quick-btn {
  background: linear-gradient(145deg, rgba(25,32,41,0.9), rgba(20,26,34,0.75));
  border-color: rgba(222, 215, 202, 0.2);
}

[data-theme="dark"] .admin-quick-btn span {
  color: #c8c1b6;
}

[data-theme="dark"] .admin-page .page-btn,
[data-theme="dark"] .admin-page .admin-actions a,
[data-theme="dark"] .admin-page .admin-actions button,
[data-theme="dark"] .admin-page .admin-form button:not(.ql-toolbar button):not(.ql-picker-label):not(.ql-picker-item) {
  background: linear-gradient(140deg, rgba(27,35,45,0.9), rgba(21,28,36,0.8));
  border-color: rgba(222, 215, 202, 0.2);
}

/* Rich text editor */
.rich-editor {
  min-height: 320px;
  border: 1px solid rgba(30, 26, 24, 0.2);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

#editorToolbar {
  border: 1px solid rgba(30, 26, 24, 0.2);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: rgba(255, 255, 255, 0.9);
}

#editorToolbar #insertImageBtn {
  border: 1px solid rgba(30, 26, 24, 0.2);
  border-radius: 8px;
  padding: 4px 10px;
  background: linear-gradient(140deg, #2f3f4f, #22313f);
  color: #fff;
  cursor: pointer;
}

#editorToolbar #undoBtn,
#editorToolbar #redoBtn,
#editorToolbar #insertTableBtn,
#editorToolbar #shortcutBtn {
  border: 1px solid rgba(30, 26, 24, 0.2);
  border-radius: 8px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  cursor: pointer;
}

/* prevent admin global button styles from corrupting quill toolbar */
.admin-page .ql-toolbar button:not(.editor-action-btn),
.admin-page .ql-toolbar .ql-picker-label,
.admin-page .ql-toolbar .ql-picker-item {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: inherit !important;
  font-weight: 400 !important;
  min-height: auto !important;
}

.admin-page .ql-toolbar button:not(.editor-action-btn):hover,
.admin-page .ql-toolbar button:not(.editor-action-btn):focus,
.admin-page .ql-toolbar button:not(.editor-action-btn).ql-active {
  background: transparent !important;
}

/* Admin posts split layout */
.admin-posts-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-posts-sidebar {
  position: sticky;
  top: 14px;
}

.admin-filter.admin-filter-stacked {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid rgba(30, 26, 24, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.admin-filter.admin-filter-stacked label {
  display: grid;
  gap: 6px;
}

.admin-filter.admin-filter-stacked label span {
  font-size: 12px;
  color: #5a524b;
}

.admin-filter.admin-filter-stacked .page-btn {
  width: 100%;
}

.admin-posts-main {
  min-width: 0;
}

.admin-posts-main .admin-table-wrap {
  max-width: 100%;
  border: 1px solid rgba(30, 26, 24, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  max-height: 68vh;
  overflow: auto;
}

.admin-posts-main .admin-table {
  min-width: 980px;
}

.admin-posts-main .admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(2px);
}

.admin-posts-main .admin-table th:first-child,
.admin-posts-main .admin-table td:first-child {
  min-width: 50px;
}

.admin-posts-main .admin-table th:nth-child(2),
.admin-posts-main .admin-table td:nth-child(2) {
  min-width: 260px;
}

.filter-group {
  border: 1px solid rgba(30, 26, 24, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.66);
}

.filter-group summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

.bulk-actions {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.bulk-actions select {
  min-width: 180px;
}

.admin-posts-main .admin-table td:first-child,
.admin-posts-main .admin-table th:first-child {
  text-align: center;
}

.bulk-delete-btn {
  border: 1px solid rgba(105, 31, 24, 0.5) !important;
  background: linear-gradient(140deg, #8f2d1f, #5e1d15) !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 22px rgba(94, 29, 21, 0.32);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.bulk-delete-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 26px rgba(94, 29, 21, 0.36);
}

.back-dashboard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(30, 26, 24, 0.2);
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.62));
  box-shadow: 0 8px 18px rgba(22, 18, 15, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.back-dashboard-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 45, 31, 0.35);
  box-shadow: 0 12px 22px rgba(22, 18, 15, 0.19);
}

[data-theme="dark"] .back-dashboard-btn {
  border-color: rgba(222, 215, 202, 0.25);
  background: linear-gradient(145deg, rgba(29,35,45,0.92), rgba(22,28,36,0.78));
  color: #e7dfd2;
}

.admin-feature-panel {
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.85), rgba(255,255,255,0.62));
}

.admin-chip-row {
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-host {
  position: relative;
  padding-right: 34px;
}

.dot-badge {
  position: absolute;
  right: 8px;
  top: 6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #b62922;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.card-surface {
  border-radius: 14px;
  border: 1px solid rgba(30, 26, 24, 0.14);
  background: rgba(255,255,255,0.56);
}

.toast-wrap {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 10020;
  display: grid;
  gap: 8px;
}

.toast-item {
  min-width: 160px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: 0 12px 24px rgba(0,0,0,0.22);
}

.toast-item.is-show {
  opacity: 1;
  transform: translateY(0);
}

.toast-item.is-ok {
  background: linear-gradient(145deg, #2b6f44, #1e5a35);
}

.toast-item.is-error {
  background: linear-gradient(145deg, #9b2a23, #6e1c17);
}

@media (max-width: 1024px) {
  .admin-posts-layout {
    grid-template-columns: 1fr;
  }

  .admin-posts-sidebar {
    position: static;
  }

  .admin-posts-main .admin-table-wrap {
    max-height: none;
  }
}

.ql-editor {
  min-height: 280px;
  font-size: 16px;
  line-height: 1.8;
}

.ql-editor p,
.ql-editor li {
  color: var(--ink);
}

.ql-editor .ql-font-song,
.markdown-body .ql-font-song { font-family: "SimSun", "Songti SC", serif; }
.ql-editor .ql-font-hei,
.markdown-body .ql-font-hei { font-family: "SimHei", "Microsoft YaHei", sans-serif; }
.ql-editor .ql-font-kai,
.markdown-body .ql-font-kai { font-family: "KaiTi", "STKaiti", serif; }
.ql-editor .ql-font-serif,
.markdown-body .ql-font-serif { font-family: "Noto Serif SC", "Times New Roman", serif; }
.ql-editor .ql-font-sans,
.markdown-body .ql-font-sans { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.ql-editor .ql-font-mono,
.markdown-body .ql-font-mono { font-family: "Consolas", "Courier New", monospace; }

.markdown-body .ql-size-12px { font-size: 12px; }
.markdown-body .ql-size-14px { font-size: 14px; }
.markdown-body .ql-size-16px { font-size: 16px; }
.markdown-body .ql-size-18px { font-size: 18px; }
.markdown-body .ql-size-22px { font-size: 22px; }
.markdown-body .ql-size-28px { font-size: 28px; }
.markdown-body .ql-size-36px { font-size: 36px; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="song"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="song"]::before { content: "宋体"; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="hei"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="hei"]::before { content: "黑体"; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="kai"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="kai"]::before { content: "楷体"; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { content: "衬线"; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="sans"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="sans"]::before { content: "无衬线"; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="mono"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="mono"]::before { content: "等宽"; }

/* Category page distinct visual language */
.category-layout {
  display: grid;
  gap: 18px;
}

.category-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  border: 1px solid rgba(30, 26, 24, 0.14);
  border-radius: 20px;
  padding: 18px;
  background:
    radial-gradient(460px 220px at 8% 20%, rgba(187,135,67,0.18), transparent 68%),
    radial-gradient(460px 240px at 95% 75%, rgba(47,63,79,0.16), transparent 70%),
    linear-gradient(145deg, rgba(255,255,255,0.78), rgba(255,255,255,0.58));
}

.category-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5f564f;
}

.category-hero-copy h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.95;
}

.category-hero-copy p {
  margin: 12px 0 0;
  max-width: 46ch;
}

.category-meta-badges {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.category-meta-badges span,
.category-meta-badges a {
  border: 1px solid rgba(30, 26, 24, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255,255,255,0.72);
}

.category-hero-art {
  position: relative;
  min-height: 200px;
}

.blob {
  position: absolute;
  border-radius: 999px;
  animation: drift 8s ease-in-out infinite;
}

.blob-a {
  width: 180px;
  height: 180px;
  left: 14px;
  top: 8px;
  background: radial-gradient(circle at 28% 30%, rgba(143,45,31,0.9), rgba(143,45,31,0.2));
}

.blob-b {
  width: 132px;
  height: 132px;
  right: 24px;
  top: 68px;
  animation-delay: -1.6s;
  background: radial-gradient(circle at 30% 30%, rgba(47,63,79,0.9), rgba(47,63,79,0.2));
}

.blob-c {
  width: 72px;
  height: 72px;
  right: 130px;
  top: 14px;
  animation-delay: -2.8s;
  background: radial-gradient(circle at 30% 30%, rgba(187,135,67,0.95), rgba(187,135,67,0.32));
}

.category-feed {
  border-radius: 16px;
}

.category-timeline {
  display: grid;
  gap: 12px;
}

.category-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
}

.category-item time {
  font-size: 12px;
  color: #6e655d;
  padding-top: 8px;
}

.category-item-card {
  border: 1px solid rgba(30, 26, 24, 0.13);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.82), rgba(255,255,255,0.62));
}

.category-item-card .post-title a,
.category-item-card .post-title a:visited,
.category-list a,
.category-list a:visited {
  color: var(--ink);
}

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

@media (max-width: 620px) {
  .category-item {
    grid-template-columns: 1fr;
  }

  .category-item time {
    padding-top: 0;
  }
}

/* Mobile-first enhancement patch */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .site-header,
  .content-container,
  .site-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-header {
    gap: 10px;
    padding-top: 16px;
  }

  .brand h1 {
    font-size: clamp(30px, 11vw, 44px);
  }

  .brand-intro {
    font-size: 14px;
    line-height: 1.65;
  }

  .site-nav {
    width: 100%;
    gap: 8px;
  }

  .site-nav a {
    border: 1px solid rgba(30, 26, 24, 0.16);
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.52);
    font-size: 13px;
    line-height: 1.2;
  }

  .site-nav a::after {
    display: none;
  }

  .panel {
    padding: 14px;
    border-radius: 14px;
  }

  .panel-head h2 {
    font-size: clamp(22px, 7.5vw, 30px);
  }

  .post-card {
    padding: 10px;
    border-radius: 12px;
    gap: 10px;
  }

  .post-cover,
  .post-cover.placeholder {
    height: 150px;
    border-radius: 10px;
  }

  .post-title {
    font-size: 22px;
  }

  .post-meta {
    font-size: 12px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .page-btn,
  .admin-form button,
  .admin-filter button,
  .admin-actions a,
  .admin-actions button,
  .back-dashboard-btn,
  .bulk-delete-btn {
    min-height: 42px;
  }

  .admin-wrap {
    padding-bottom: 20px;
  }

  .admin-panel {
    border-radius: 14px;
  }

  .admin-form {
    gap: 10px;
  }

  .admin-form input,
  .admin-form textarea,
  .admin-form select,
  .admin-filter input,
  .admin-filter select {
    min-height: 42px;
    font-size: 15px;
  }

  .admin-posts-layout {
    gap: 10px;
  }

  .admin-posts-sidebar {
    position: static;
  }

  .admin-filter.admin-filter-stacked {
    padding: 10px;
    gap: 8px;
  }

  .bulk-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .bulk-actions > * {
    width: 100%;
  }

  .admin-table-wrap {
    border-radius: 12px;
  }

  .admin-table {
    min-width: 720px;
    font-size: 13px;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 7px;
    white-space: nowrap;
  }

  .admin-actions {
    display: grid;
    grid-auto-flow: row;
    gap: 6px;
  }

  #editorToolbar {
    padding: 6px 4px;
    overflow-x: auto;
    white-space: nowrap;
  }

  #editorToolbar .ql-formats {
    margin-right: 6px;
  }

  .rich-editor {
    min-height: 240px;
  }

  .ql-editor {
    min-height: 220px;
    font-size: 15px;
  }

  .toast-wrap {
    right: 10px;
    left: 10px;
    bottom: 12px;
  }

  .toast-item {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .site-nav a {
    font-size: 12px;
    padding: 6px 9px;
  }

  .post-title {
    font-size: 20px;
  }

  .admin-table {
    min-width: 660px;
  }
}

/* Fine-tuned responsive pass */
@media (max-width: 900px) {
  /* 1) Home Hero */
  .home-hero {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 12px;
    border-radius: 14px;
  }

  .hero-copy h2 {
    letter-spacing: -0.01em;
    line-height: 1.06;
    max-width: 14ch;
  }

  .hero-copy p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.75;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-actions .page-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-art {
    min-height: 128px;
    border-radius: 12px;
    overflow: hidden;
  }

  .shape-a { width: 120px; height: 120px; top: 6px; left: 8px; }
  .shape-b { width: 92px; height: 92px; top: 52px; right: 8px; }
  .shape-c { width: 52px; height: 52px; top: 6px; right: 56px; }
  .shape-d { width: 150px; left: 8px; bottom: 8px; }

  /* 2) Post detail typography */
  .posts-page .panel > .panel-head h2 {
    max-width: 100%;
    line-height: 1.1;
  }

  .like-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: center;
  }

  .like-wrap .page-btn {
    width: 100%;
    justify-content: center;
  }

  #likeCount,
  .copy-link-status {
    grid-column: 1 / -1;
    font-size: 13px;
  }

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

  .tag-chip {
    font-size: 12px;
    padding: 6px 10px;
  }

  .post-content.markdown-body {
    font-size: 15px;
    line-height: 1.85;
    word-break: break-word;
  }

  .markdown-body h1,
  .markdown-body h2,
  .markdown-body h3 {
    line-height: 1.2;
    margin-top: 1.1em;
  }

  .markdown-body pre {
    margin-left: -2px;
    margin-right: -2px;
    border-radius: 10px;
    font-size: 12px;
  }

  .markdown-body blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 10px 12px;
  }

  .comment-form {
    display: grid;
    gap: 10px;
  }

  .comment-form input,
  .comment-form textarea {
    min-height: 42px;
  }

  /* 3) Admin posts table */
  .admin-posts-main .admin-table-wrap {
    border-radius: 12px;
    overflow: auto;
  }

  .admin-posts-main .admin-table {
    min-width: 980px;
    font-size: 13px;
  }

  .admin-posts-main .admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .admin-posts-main .admin-table th:nth-child(2),
  .admin-posts-main .admin-table td:nth-child(2) {
    position: sticky;
    left: 38px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.9);
  }

  .admin-posts-main .admin-table th:first-child,
  .admin-posts-main .admin-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 6;
    background: rgba(255, 255, 255, 0.94);
  }

  .admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .admin-actions a,
  .admin-actions button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
  }
}

[data-theme="dark"] .admin-posts-main .admin-table th:nth-child(2),
[data-theme="dark"] .admin-posts-main .admin-table td:nth-child(2) {
  background: rgba(24, 31, 40, 0.95);
}

[data-theme="dark"] .admin-posts-main .admin-table th:first-child,
[data-theme="dark"] .admin-posts-main .admin-table td:first-child {
  background: rgba(20, 26, 35, 0.98);
}

/* Quill toolbar final fix */
#editorToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

#editorToolbar .ql-formats {
  margin-right: 0;
}

.ql-snow .ql-picker.ql-font,
.ql-snow .ql-picker.ql-size {
  min-width: 108px;
}

.ql-snow .ql-picker-label {
  padding-left: 10px;
  padding-right: 22px;
}

.ql-snow .ql-picker.ql-font .ql-picker-label::before {
  content: "Sans Serif";
}

.ql-snow .ql-picker.ql-size .ql-picker-label::before {
  content: "16";
}

#editorToolbar .editor-action-btn,
#editorToolbar #insertImageBtn,
#editorToolbar #undoBtn,
#editorToolbar #redoBtn,
#editorToolbar #insertTableBtn,
#editorToolbar #shortcutBtn,
#editorToolbar #previewBtn {
  width: auto !important;
  min-width: 54px !important;
  height: 32px !important;
  line-height: 1 !important;
  padding: 0 10px !important;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: none !important;
}

#editorToolbar .editor-action-btn:hover,
#editorToolbar .editor-action-btn:focus-visible,
#editorToolbar #insertImageBtn:hover,
#editorToolbar #insertTableBtn:hover,
#editorToolbar #previewBtn:hover,
#editorToolbar #shortcutBtn:hover {
  background: #f8fafc !important;
  border-color: rgba(100, 116, 139, 0.65) !important;
  color: #0f172a !important;
}

#editorToolbar #insertImageBtn {
  background: #24364d !important;
  color: #fff !important;
  border-color: #24364d !important;
}

#editorToolbar #insertImageBtn:hover,
#editorToolbar #insertImageBtn:focus-visible {
  background: #1e2e42 !important;
  border-color: #1e2e42 !important;
  color: #fff !important;
}

[data-theme="dark"] #editorToolbar .editor-action-btn,
[data-theme="dark"] #editorToolbar #insertTableBtn,
[data-theme="dark"] #editorToolbar #previewBtn,
[data-theme="dark"] #editorToolbar #shortcutBtn {
  background: #18202b !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] #editorToolbar #insertImageBtn {
  background: #31445e !important;
  border-color: #31445e !important;
  color: #f8fafc !important;
}

.image-size-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft, rgba(15, 23, 42, 0.12));
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-bg, #fff) 82%, #f1f5f9);
}

.image-size-controls span {
  font-size: 13px;
  color: var(--text-dim, #64748b);
}

.image-size-controls button {
  min-height: 30px;
  padding: 4px 10px;
}

.image-size-controls input[type="number"] {
  width: 86px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-soft, rgba(15, 23, 42, 0.18));
}

.editor-preview-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}

.editor-preview-modal.is-open {
  display: block;
}

.editor-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.editor-preview-panel {
  position: relative;
  width: min(1100px, calc(100vw - 32px));
  height: min(86vh, 920px);
  margin: max(24px, 4vh) auto;
  background: var(--panel-bg, #fff);
  border: 1px solid var(--border-soft, rgba(15, 23, 42, 0.12));
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3);
  display: grid;
  grid-template-rows: auto 1fr;
}

.editor-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft, rgba(15, 23, 42, 0.12));
  background: color-mix(in srgb, var(--panel-bg, #fff) 88%, var(--brand-2, #f3f4f6));
}

.editor-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-device-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-soft, rgba(15, 23, 42, 0.14));
  background: color-mix(in srgb, var(--panel-bg, #fff) 82%, #eef2f7);
}

.editor-device-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-dim, #5f6b7a);
  font-size: 13px;
  cursor: pointer;
}

.editor-device-btn.is-active {
  background: var(--brand-ink, #1e293b);
  color: #fff;
}

.editor-preview-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.88), rgba(226, 232, 240, 0.8));
}

.preview-frame-shell {
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
  transition: width 0.24s ease;
}

.preview-frame-shell.device-desktop {
  width: min(100%, 1200px);
}

.preview-frame-shell.device-tablet {
  width: min(100%, 820px);
}

.preview-frame-shell.device-mobile {
  width: min(100%, 430px);
}

.preview-frame-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  min-height: 65vh;
}

@media (max-width: 768px) {
  .editor-preview-panel {
    width: calc(100vw - 12px);
    height: calc(100vh - 16px);
    margin: 8px auto;
    border-radius: 12px;
  }
  .editor-preview-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .editor-preview-actions {
    width: 100%;
    justify-content: space-between;
  }
  .editor-preview-body {
    padding: 10px;
  }
  .preview-frame-shell.device-desktop,
  .preview-frame-shell.device-tablet,
  .preview-frame-shell.device-mobile {
    width: 100%;
  }
}

/* Advanced article editor */
.editor-toolbar-shell {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(30, 26, 24, 0.14);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(248, 242, 234, 0.92)),
    radial-gradient(circle at top right, rgba(210, 187, 160, 0.18), transparent 40%);
}

.editor-toolbar-group {
  border: 1px solid rgba(30, 26, 24, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(84, 61, 34, 0.06);
  overflow: hidden;
}

.editor-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #2f241f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.editor-group-toggle::after {
  content: "+";
  font-size: 16px;
  line-height: 1;
  color: #7c675a;
}

.editor-toolbar-group.is-open .editor-group-toggle::after {
  content: "-";
}

.editor-group-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
}

.editor-toolbar-group:not(.is-open) .editor-group-panel {
  display: none;
}

.editor-toolbar-shell .ql-formats {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: 0 !important;
}

.editor-toolbar-shell .ql-picker {
  border-radius: 10px;
  background: rgba(252, 249, 244, 0.98);
}

.editor-toolbar-shell .editor-action-btn,
.editor-toolbar-shell .ql-toolbar button:not(.editor-group-toggle):not(.editor-action-btn),
.editor-toolbar-shell .ql-picker-label {
  min-height: 38px !important;
  border-radius: 10px !important;
}

.editor-toolbar-shell .editor-action-primary {
  background: linear-gradient(135deg, #2e4052, #1f3140) !important;
  color: #fff !important;
  border-color: rgba(18, 28, 38, 0.5) !important;
}

.editor-toolbar-shell .editor-action-btn:hover,
.editor-toolbar-shell .editor-group-toggle:hover {
  transform: translateY(-1px);
}

.editor-callout,
.figure-note-card,
.artwork-meta-card,
.materials-board {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(183, 152, 124, 0.2);
  background: linear-gradient(180deg, rgba(255, 249, 241, 0.96), rgba(250, 243, 235, 0.92));
  box-shadow: 0 14px 30px rgba(125, 96, 66, 0.08);
}

.editor-callout strong,
.figure-note-card strong,
.artwork-meta-card h3,
.materials-board h3 {
  display: inline-block;
  margin-bottom: 8px;
}

.post-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e4052, #1f3140);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
}

.art-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.art-gallery-grid > div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(30, 26, 24, 0.1);
}

.art-gallery-grid img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 8px;
}

.process-timeline {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.process-timeline > div {
  position: relative;
  padding: 14px 16px 14px 22px;
  border-left: 3px solid rgba(205, 165, 125, 0.7);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 251, 245, 0.92);
}

.process-timeline > div::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #caa27d;
  box-shadow: 0 0 0 4px rgba(202, 162, 125, 0.18);
}

.task-checklist {
  margin: 16px 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(183, 152, 124, 0.38);
  background: rgba(255, 250, 244, 0.88);
  list-style: none;
}

.task-checklist li + li {
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .editor-toolbar-shell {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .editor-toolbar-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .editor-toolbar-shell {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .art-gallery-grid {
    grid-template-columns: 1fr;
  }
}

[data-theme="dark"] .editor-toolbar-shell {
  background: linear-gradient(180deg, rgba(25, 29, 36, 0.96), rgba(20, 24, 31, 0.94));
  border-color: rgba(255, 244, 230, 0.1);
}

[data-theme="dark"] .editor-toolbar-group {
  background: rgba(30, 35, 43, 0.92);
  border-color: rgba(255, 244, 230, 0.08);
}

[data-theme="dark"] .editor-group-toggle {
  color: #efe3d6;
}

[data-theme="dark"] .editor-callout,
[data-theme="dark"] .figure-note-card,
[data-theme="dark"] .artwork-meta-card,
[data-theme="dark"] .materials-board,
[data-theme="dark"] .process-timeline > div,
[data-theme="dark"] .art-gallery-grid > div {
  background: rgba(27, 32, 40, 0.9);
  border-color: rgba(230, 198, 166, 0.16);
}

[data-theme="dark"] .task-checklist {
  background: rgba(27, 32, 40, 0.9);
  border-color: rgba(230, 198, 166, 0.22);
}

.markdown-body img[data-align="left"] {
  margin-left: 0;
  margin-right: auto;
}

.markdown-body img[data-align="center"] {
  margin-left: auto;
  margin-right: auto;
}

.markdown-body img[data-align="right"] {
  margin-left: auto;
  margin-right: 0;
}

.markdown-body img[data-size="small"] { width: 32%; }
.markdown-body img[data-size="medium"] { width: 52%; }
.markdown-body img[data-size="large"] { width: 74%; }
.markdown-body img[data-size="full"] { width: 100%; }

.markdown-body .note-block,
.markdown-body .art-block {
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(183, 152, 124, 0.2);
  background: linear-gradient(180deg, rgba(255, 249, 241, 0.96), rgba(250, 243, 235, 0.92));
  box-shadow: 0 14px 30px rgba(125, 96, 66, 0.08);
}

.markdown-body .note-block strong,
.markdown-body .art-block strong,
.markdown-body .art-block > strong {
  display: inline-block;
  margin-bottom: 8px;
}

.markdown-body .note-block.note-warning {
  background: linear-gradient(180deg, rgba(255, 245, 232, 0.96), rgba(254, 237, 220, 0.94));
  border-color: rgba(223, 155, 88, 0.28);
}

.markdown-body .art-block-artwork {
  border-left: 4px solid #caa27d;
}

.markdown-body .art-block-inspiration {
  border-left: 4px solid #8ca1b5;
}

.markdown-body .art-block-palette {
  border-left: 4px solid #d7a678;
}

.markdown-body .art-block-prompt {
  border-left: 4px solid #748ca5;
}

.markdown-body .art-block-tools {
  border-left: 4px solid #b98c62;
}

.markdown-body .anchor-marker,
.markdown-body .toc-placeholder,
.markdown-body .read-more-divider {
  margin: 18px 0;
  padding: 12px 16px;
  border-radius: 14px;
  text-align: center;
  color: #6c584a;
  background: rgba(247, 241, 233, 0.92);
  border: 1px dashed rgba(183, 152, 124, 0.34);
}

.markdown-body .read-more-divider span::before,
.markdown-body .read-more-divider span::after {
  content: "·";
  margin: 0 8px;
}

[data-theme="dark"] .markdown-body .note-block,
[data-theme="dark"] .markdown-body .art-block,
[data-theme="dark"] .markdown-body .anchor-marker,
[data-theme="dark"] .markdown-body .toc-placeholder,
[data-theme="dark"] .markdown-body .read-more-divider {
  background: rgba(27, 32, 40, 0.9);
  border-color: rgba(230, 198, 166, 0.18);
  color: #dccdbf;
}

/* Admin shell redesign */
.admin-shell-page {
  background:
    radial-gradient(circle at top left, rgba(221, 203, 181, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(252, 248, 241, 0.98), rgba(246, 239, 231, 0.98));
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid rgba(30, 26, 24, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.95), rgba(246, 238, 227, 0.94)),
    radial-gradient(circle at top right, rgba(214, 187, 158, 0.16), transparent 35%);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
}

.admin-sidebar-brand h1 {
  margin: 6px 0;
  font-size: clamp(1.8rem, 2vw, 2.5rem);
}

.admin-sidebar-kicker,
.admin-topbar-kicker,
.admin-card-kicker,
.admin-hero-kicker {
  margin: 0;
  color: #776353;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}

.admin-sidebar-brand span,
.admin-topbar-user span {
  color: var(--text-dim, #64748b);
  font-size: 14px;
}

.admin-sidebar-nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar-nav a,
.admin-sidebar-footer a,
.admin-ghost-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(30, 26, 24, 0.08);
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.is-active,
.admin-sidebar-footer a:hover,
.admin-ghost-btn:hover,
.admin-ghost-btn.is-active {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(166, 132, 101, 0.24);
}

.admin-sidebar-nav a em {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  background: #2f4254;
  color: #fff;
}

.admin-sidebar-footer {
  display: grid;
  gap: 8px;
}

.admin-shell-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 12px;
  backdrop-filter: blur(10px);
  background: rgba(248, 243, 236, 0.85);
  border-bottom: 1px solid rgba(30, 26, 24, 0.06);
}

.admin-topbar-left,
.admin-topbar-right,
.admin-head-actions,
.admin-inline-upload,
.admin-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-topbar h2 {
  margin: 4px 0 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.admin-topbar-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(30, 26, 24, 0.08);
}

.admin-topbar-user {
  text-align: right;
}

.admin-shell-content {
  padding: 24px 28px 40px;
}

.admin-stage {
  display: grid;
  gap: 18px;
}

.admin-hero-card,
.admin-section-card,
.admin-surface-card {
  border-radius: 24px;
  border: 1px solid rgba(30, 26, 24, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.94), rgba(250, 244, 236, 0.92)),
    radial-gradient(circle at top right, rgba(215, 189, 160, 0.12), transparent 32%);
  box-shadow: 0 24px 60px rgba(126, 98, 69, 0.08);
}

.admin-hero-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}

.admin-hero-card h3,
.admin-card-head h3,
.admin-settings-block h4 {
  margin: 6px 0 10px;
}

.admin-overview-grid,
.admin-card-grid,
.admin-quick-grid.refined,
.admin-pill-grid {
  display: grid;
  gap: 16px;
}

.admin-overview-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-overview-card,
.admin-pill-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(30, 26, 24, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.admin-overview-card span,
.admin-pill-card span {
  display: block;
  color: #786759;
  font-size: 13px;
}

.admin-overview-card strong,
.admin-pill-card strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.admin-card-grid {
  grid-template-columns: 1.1fr 1fr;
}

.admin-card-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-surface-card,
.admin-section-card {
  padding: 22px;
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-card-head.split {
  align-items: center;
}

.admin-mini-metric {
  margin: 10px 0 0;
  line-height: 1.7;
}

.admin-list-clean li {
  border-bottom: 1px dashed rgba(30, 26, 24, 0.08);
}

.admin-list-clean li:last-child {
  border-bottom: 0;
}

.admin-pill-grid,
.admin-quick-grid.refined {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-pill-card,
.admin-quick-btn {
  text-decoration: none;
  color: inherit;
}

.admin-table-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.admin-table-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.admin-table-main,
.admin-form-grid {
  min-width: 0;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.admin-form-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(30, 26, 24, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

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

.admin-settings-block {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(30, 26, 24, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.admin-avatar-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.admin-bulk-toolbar {
  margin-bottom: 14px;
}

.admin-table-refined thead th {
  white-space: nowrap;
}

.admin-status-pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(47, 66, 84, 0.12);
  color: #294054;
  font-size: 12px;
}

.admin-mobile-toggle {
  display: none;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.15fr minmax(320px, 420px);
  gap: 22px;
}

.admin-login-artboard,
.admin-login-card {
  border-radius: 28px;
  border: 1px solid rgba(30, 26, 24, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.94), rgba(250, 244, 236, 0.92)),
    radial-gradient(circle at top right, rgba(215, 189, 160, 0.12), transparent 32%);
  box-shadow: 0 24px 60px rgba(126, 98, 69, 0.08);
}

.admin-login-artboard {
  padding: 34px;
}

.admin-login-card {
  padding: 28px;
}

.admin-login-kicker {
  margin: 0 0 8px;
  color: #776353;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

.admin-login-artboard h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.admin-login-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.admin-login-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(30, 26, 24, 0.08);
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1300;
}

.auth-modal.is-open {
  display: block;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.55);
  backdrop-filter: blur(5px);
}

.auth-modal-panel {
  position: relative;
  width: min(560px, calc(100vw - 24px));
  margin: 6vh auto;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(30, 26, 24, 0.1);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(247, 240, 231, 0.96));
  box-shadow: 0 30px 80px rgba(26, 18, 12, 0.22);
}

.auth-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.auth-modal-close {
  border: 1px solid rgba(30, 26, 24, 0.12);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 8px 12px;
}

.auth-modal-form {
  display: grid;
  gap: 12px;
}

.auth-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions .js-open-auth-modal {
  border: 1px solid rgba(47, 63, 79, 0.18);
  background: rgba(47, 63, 79, 0.08);
}

.admin-usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 18px;
}

.admin-usage-grid > * {
  min-width: 0;
}

.admin-usage-picker {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admin-usage-picker label {
  min-width: 0;
}

.admin-usage-picker select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-usage-picker option,
.admin-usage-picker select {
  white-space: nowrap;
}

.admin-usage-picker .side-empty,
.admin-usage-picker label span,
.admin-usage-kpi strong,
.usage-chart-item span,
.usage-chart-item strong,
.usage-chart {
  overflow-wrap: anywhere;
}

.admin-usage-kpis {
  display: grid;
  gap: 10px;
}

.admin-usage-kpi {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(30, 26, 24, 0.08);
}

.admin-usage-kpi span {
  color: #776353;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-usage-kpi strong {
  font-size: 18px;
}

.usage-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 220px;
  min-width: 0;
  overflow: hidden;
  padding-right: 4px;
}

.usage-chart-item {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-self: stretch;
  min-width: 0;
}

.usage-chart-bar-wrap {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 4px;
}

.usage-chart-bar {
  width: 100%;
  min-height: 8px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, rgba(143, 45, 31, 0.92), rgba(187, 135, 67, 0.9));
  box-shadow: 0 8px 18px rgba(143, 45, 31, 0.18);
}

.usage-chart-item strong {
  font-size: 14px;
}

.usage-chart-item span {
  font-size: 12px;
  color: #776353;
}

@media (max-width: 640px) {
  .auth-modal-panel {
    margin: 12px auto;
    width: calc(100vw - 16px);
    padding: 14px;
    border-radius: 18px;
  }

  .auth-modal-head {
    flex-direction: column;
  }

  .auth-modal-actions {
    justify-content: stretch;
  }

  .auth-modal-actions button {
    flex: 1 1 0;
  }

  .admin-usage-grid {
    grid-template-columns: 1fr;
  }

  .usage-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .admin-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-card-grid,
  .admin-card-grid-wide,
  .admin-pill-grid,
  .admin-quick-grid.refined,
  .admin-login-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    width: min(320px, 86vw);
    z-index: 40;
    transition: transform 0.24s ease;
  }
  .admin-shell.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }
  .admin-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(30, 26, 24, 0.1);
    background: rgba(255, 255, 255, 0.72);
  }
  .admin-topbar {
    padding: 18px 16px 12px;
  }
  .admin-shell-content {
    padding: 18px 16px 34px;
  }
  .admin-table-shell,
  .admin-form-grid,
  .admin-card-grid,
  .admin-card-grid-wide,
  .admin-pill-grid,
  .admin-quick-grid.refined,
  .admin-login-shell {
    grid-template-columns: 1fr;
  }
  .admin-table-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .admin-hero-card,
  .admin-topbar,
  .admin-topbar-left,
  .admin-topbar-right {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

[data-theme="dark"] .admin-shell-page,
[data-theme="dark"] .admin-login-page {
  background: linear-gradient(180deg, rgba(17, 22, 28, 0.98), rgba(12, 16, 21, 0.99));
}

[data-theme="dark"] .admin-sidebar,
[data-theme="dark"] .admin-topbar,
[data-theme="dark"] .admin-hero-card,
[data-theme="dark"] .admin-section-card,
[data-theme="dark"] .admin-surface-card,
[data-theme="dark"] .admin-overview-card,
[data-theme="dark"] .admin-pill-card,
[data-theme="dark"] .admin-form-card,
[data-theme="dark"] .admin-settings-block,
[data-theme="dark"] .admin-login-artboard,
[data-theme="dark"] .admin-login-card,
[data-theme="dark"] .admin-sidebar-nav a,
[data-theme="dark"] .admin-sidebar-footer a,
[data-theme="dark"] .admin-ghost-btn,
[data-theme="dark"] .admin-topbar-badge,
[data-theme="dark"] .admin-login-tags span,
[data-theme="dark"] .admin-mobile-toggle {
  background: rgba(27, 33, 41, 0.9);
  border-color: rgba(230, 198, 166, 0.12);
}

[data-theme="dark"] .admin-sidebar-nav a:hover,
[data-theme="dark"] .admin-sidebar-nav a.is-active,
[data-theme="dark"] .admin-sidebar-footer a:hover,
[data-theme="dark"] .admin-ghost-btn:hover,
[data-theme="dark"] .admin-ghost-btn.is-active {
  background: rgba(36, 43, 52, 0.96);
}

[data-theme="dark"] .admin-status-pill {
  background: rgba(151, 185, 214, 0.14);
  color: #cbd7e3;
}

/* quick fixes: home list + cover crop modal */
.post-list.post-list-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.post-list.post-list-single .post-card {
  width: 100%;
}

.cover-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.cover-crop-modal.is-open {
  display: flex;
}

.cover-crop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 18, 0.62);
}

.cover-crop-panel {
  position: relative;
  width: min(680px, calc(100vw - 24px));
  border-radius: 16px;
  border: 1px solid rgba(90, 80, 72, 0.25);
  background: #f8f4ea;
  box-shadow: 0 24px 48px rgba(16, 14, 12, 0.25);
  padding: 14px;
}

.cover-crop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cover-crop-body {
  border: 1px solid rgba(90, 80, 72, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: #ede6d8;
}

.cover-crop-canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}

.cover-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .cover-crop-panel {
    width: calc(100vw - 12px);
    padding: 10px;
  }
}

/* brand icons */
.brand {
  position: relative;
  padding-left: 72px;
}

.brand-logo {
  position: absolute;
  top: 2px;
  left: 0;
  width: 56px;
  height: 56px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(63, 53, 44, 0.2);
  box-shadow: 0 10px 20px rgba(33, 27, 22, 0.14);
  background: #f8f3ea;
}

.admin-sidebar-logo,
.admin-login-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid rgba(74, 64, 55, 0.22);
  box-shadow: 0 10px 20px rgba(23, 19, 15, 0.14);
  background: #f8f3ea;
}

.admin-login-logo {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  margin-bottom: 10px;
}

/* fixed article editor viewport */
.admin-page .tiptap-admin-editor .tiptap-editor-surface {
  height: 560px !important;
  max-height: 560px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: 12px;
}

.admin-page .tiptap-admin-editor .tiptap-editor-surface .ProseMirror {
  min-height: 900px !important;
}

@media (max-width: 900px) {
  .admin-page .tiptap-admin-editor .tiptap-editor-surface {
    height: 460px !important;
    max-height: 460px !important;
  }

  .brand {
    padding-left: 62px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }
}

/* awesome-design-md inspired front polish */
.atelier-rail {
  grid-column: 1 / -1;
  border-radius: 18px;
  border: 1px solid rgba(92, 78, 61, 0.2);
  background:
    linear-gradient(140deg, rgba(255,255,255,0.88), rgba(244,238,227,0.78)),
    radial-gradient(980px 420px at 8% 8%, rgba(213, 190, 157, 0.24), transparent 65%);
  overflow: hidden;
}

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

.atelier-card {
  position: relative;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(82, 71, 59, 0.18);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(30, 24, 19, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.atelier-card::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(90, 76, 61, 0.2);
  opacity: 0.9;
}

.atelier-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(27, 21, 17, 0.14);
  border-color: rgba(133, 58, 44, 0.4);
}

.atelier-kicker {
  margin: 0 0 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  color: #6c6258;
}

.atelier-card h3 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  line-height: 1.05;
}

.atelier-card p {
  margin: 0;
  line-height: 1.75;
}

.atelier-card.tone-a {
  background: linear-gradient(155deg, rgba(255,255,255,0.9), rgba(247,240,226,0.82));
}

.atelier-card.tone-b {
  background: linear-gradient(155deg, rgba(252,252,251,0.9), rgba(235,241,244,0.82));
}

.atelier-card.tone-c {
  background: linear-gradient(155deg, rgba(250,246,239,0.9), rgba(242,236,228,0.82));
}

.post-list.post-list-single .post-card {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  align-items: stretch;
}

.post-list.post-list-single .post-cover {
  height: 100%;
  min-height: 180px;
}

.post-list.post-list-single .post-body {
  padding: 12px 14px;
}

.post-list.post-list-single .post-title {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4.8vw, 42px);
  line-height: 1.02;
}

.post-list.post-list-single .post-excerpt {
  font-size: 16px;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .atelier-grid {
    grid-template-columns: 1fr;
  }

  .post-list.post-list-single .post-card {
    grid-template-columns: 1fr;
  }

  .post-list.post-list-single .post-cover {
    min-height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atelier-card,
  .post-list.post-list-single .post-card {
    transition: none !important;
  }
}
