:root {
  --bg: #f2efe8;
  --paper: #fcfbf8;
  --ink: #1f252c;
  --muted: #6b7280;
  --line: #d8d0c3;
  --accent: #4b3a2a;
  --accent-soft: #7a6047;
  --shadow: rgba(27, 23, 18, 0.12);
}

html {
  font-size: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  background: radial-gradient(circle at top, #f8f6f0 0%, var(--bg) 56%);
}

.hero {
  position: relative;
  min-height: 40vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #f9f7f2;
  background:
    linear-gradient(to bottom, rgba(9, 16, 24, 0.32), rgba(9, 16, 24, 0.78)),
    linear-gradient(130deg, #233443 0%, #4a2d27 55%, #193a34 100%);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1), transparent 32%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 19px);
}

.hero-content {
  position: relative;
  max-width: 980px;
  padding: 36px 20px;
}

.hero-portrait {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(170px, 18vw, 260px);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  opacity: 0.5;
  filter: saturate(0.72) contrast(0.9);
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 45%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 62%);
  z-index: 2;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: soft-light;
  -webkit-mask-image: radial-gradient(ellipse at 58% 50%, rgba(0, 0, 0, 1) 36%, rgba(0, 0, 0, 0.72) 56%, rgba(0, 0, 0, 0.2) 76%, transparent 100%);
  mask-image: radial-gradient(ellipse at 58% 50%, rgba(0, 0, 0, 1) 36%, rgba(0, 0, 0, 0.72) 56%, rgba(0, 0, 0, 0.2) 76%, transparent 100%);
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 1.2rem;
  opacity: 0.95;
  font-weight: 600;
}

.hero h1 {
  margin: 0.35rem 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.subtitle {
  margin: 0.25rem auto 1.25rem;
  max-width: 740px;
  line-height: 1.48;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  opacity: 1;
}

h2,
h3,
h4,
.title,
.modal-info h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.admin-link,
.admin-logout {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
}

.admin-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.admin-badge {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 0.77rem;
  letter-spacing: 0.04em;
}

.admin-logout {
  cursor: pointer;
}

.layout {
  max-width: 1280px;
  margin: 18px auto 42px;
  padding: 0 18px;
  display: grid;
  gap: 18px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 34px var(--shadow);
  padding: clamp(18px, 2.4vw, 28px);
}

.intro h2,
.context h2 {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: #2d241b;
}

.intro p {
  margin: 0;
  line-height: 1.82;
  font-size: 1.15rem;
  color: #3d3d3d;
}

.intro-art {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d8cfbf;
  margin: 0 0 14px;
  box-shadow: 0 8px 18px rgba(28, 23, 17, 0.1);
  opacity: 0.95;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.context-grid article {
  background: #f7f2e8;
  border: 1px solid #e6dbcb;
  border-radius: 12px;
  padding: 14px;
}

.context-art {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid #ddd1bf;
  box-shadow: 0 8px 18px rgba(28, 23, 17, 0.1);
  margin-bottom: 10px;
}

.context-grid h3 {
  margin: 0 0 6px;
  color: #4b3728;
  font-size: 1.06rem;
  font-weight: 700;
}

.context-grid p {
  margin: 0;
  line-height: 1.55;
  color: #544d43;
}

.legacy-bio h2 {
  margin: 0 0 10px;
}

.legacy-bio p {
  margin: 0 0 12px;
  line-height: 1.78;
  color: #3f3a33;
}

.legacy-bio h3 {
  margin: 16px 0 10px;
  color: #3d2b1e;
  font-weight: 700;
}

.press-quotes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.press-quotes blockquote {
  margin: 0;
  padding: 14px 14px 12px;
  border-left: 3px solid #8f7256;
  background: #f6efe2;
  border-radius: 10px;
  color: #453b31;
}

.press-quotes blockquote p {
  margin: 0 0 10px;
  line-height: 1.65;
}

.press-quotes cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: #5c4230;
  letter-spacing: 0.03em;
}

.gallery-header {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
}

.gallery-header h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: #2d241b;
}

.toolbar input {
  width: 100%;
  max-width: 460px;
  border: 1px solid #d4c7b4;
  border-radius: 999px;
  padding: 11px 15px;
  font: inherit;
  background: #fffdf8;
}

.gallery-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.frame-card {
  background: #f7f5f0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #cbb9a3;
  box-shadow: 0 10px 22px rgba(27, 23, 18, 0.17);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.image-wrap {
  position: relative;
  background: #ece7de;
}

.image-btn {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transform: scale(1.002);
  filter: saturate(1) contrast(1);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.image-tools {
  position: absolute;
  right: 10px;
  top: 10px;
  display: flex;
  gap: 6px;
  opacity: 0.66;
  transition: opacity 0.25s ease;
}

.tool {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(15, 15, 15, 0.68);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.92rem;
}

.image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.13) 42%,
      rgba(255, 255, 255, 0) 62%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
}

.meta {
  padding: 12px 13px 14px;
  background: #f8f3ea;
  border-top: 1px solid #e2d8ca;
}

.title {
  margin: 0;
  color: #31241b;
  font-size: 1.3rem;
}

.desc {
  margin: 0.44rem 0 0;
  color: #5f5548;
  font-size: 0.93rem;
}

.frame-card:hover {
  transform: translateY(-5px);
  border-color: #947251;
  box-shadow: 0 18px 34px rgba(27, 23, 18, 0.24);
}

.frame-card:hover .image {
  transform: scale(1.05);
  filter: saturate(1.04) contrast(1.03);
}

.frame-card:hover .image-wrap::after {
  transform: translateX(132%);
}

.frame-card:hover .image-tools {
  opacity: 1;
}

body.no-scroll {
  overflow: hidden;
}

.modal {
  border: none;
  width: min(1800px, 98vw);
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #f9f5ec;
  max-height: 94vh;
  /* hidden by default, native behavior */
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(11, 16, 23, 0.84);
}

.modal.image-only {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

/* ... buttons ... */

.close-btn {
  position: absolute;
  right: 12px;
  top: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.84);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
}

.nav-btn {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 4;
}

.prev-btn {
  left: 12px;
}

.next-btn {
  right: 12px;
}

.modal-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  /* Slightly wider left column for visuals */
  overflow-y: auto;
  background: #f8f2e6;
  height: 100%;
}

.modal-visuals {
  display: flex;
  flex-direction: column;
  background: #f8f2e6;
}

.modal.image-only .modal-content {
  grid-template-columns: 1fr;
  height: 100vh;
  max-height: none;
  /* Fullscreen mode handles its own overflow */
}

.modal-image-wrap {
  position: relative;
  overflow: hidden;
  display: block;
  /* Standard block for stability */
  background: #f8f2e6;
  /* Match modal content bg */
  min-height: 400px;
}

.modal.image-only .modal-image-wrap {
  height: 100vh;
}

.modal-content img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  object-fit: contain;
}

/* Orientation classes no longer needed for primary layout */
.modal-content img.fit-width,
.modal-content img.fit-height {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
}

.modal-image-wrap.zoomed {
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: grab;
}

.modal-image-wrap.zoomed img {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: unset;
}

.modal-image-wrap.zoomed.panning {
  cursor: grabbing;
}

/* ── Centered action bar under description ── */
.image-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 20px 0;
  margin: 20px auto 0;
  width: 100%;
}

.control-btn {
  background: none;
  border: none;
  color: #9b8a7a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: color 0.2s, transform 0.2s;
  text-decoration: none;
}

.control-btn:hover {
  color: #5a402d;
  transform: scale(1.12);
}

.control-btn svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}

/* Like: heart + number, same visual weight */
.control-btn.like-btn {
  gap: 6px;
  font-size: 1.8rem;
  line-height: 1;
}

.control-btn .like-count {
  font-size: 1.15rem;
  font-weight: 600;
  color: inherit;
}

.control-btn.like-btn.liked {
  color: #e11d48;
}

/* Toast notification for share-copy fallback */
.modal-share-toast {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 10;
  pointer-events: none;
  animation: toastFade 2s forwards;
}

@keyframes toastFade {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  10% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.floating-source-controls {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
  background: rgba(0, 0, 0, 0.67);
  color: #fff;
  border-radius: 999px;
  padding: 6px 8px 6px 10px;
}

.floating-source-controls[hidden] {
  display: none !important;
}

.floating-source-controls span {
  font-size: 0.78rem;
  font-weight: 700;
}

.floating-source-controls button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 9px;
  cursor: pointer;
  font-size: 0.77rem;
}

.modal-info {
  padding: 22px;
  background: #f8f2e6;
  border-left: 1px solid #e2d7c6;
}

.modal-info h3 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  color: #2b2118;
}

.modal-info>p {
  margin: 0 0 10px;
  color: #5b5248;
  line-height: 1.5;
}

.modal-info dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 12px;
}

.modal-info dt {
  font-weight: 700;
  color: #5a402d;
}

.modal-info dd {
  margin: 0;
  color: #3f3730;
}

.modal-admin-controls {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(93, 62, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-admin-controls p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.modal-admin-controls button {
  border: 0;
  border-radius: 8px;
  background: #334155;
  color: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

.modal-narrative {
  padding: 16px 22px 22px;
  border-top: 1px solid #e2d7c6;
  background: #f6ecda;
}

.modal-narrative h4 {
  margin: 0 0 8px;
  color: #4c3222;
  letter-spacing: 0.02em;
}

.modal-narrative p {
  margin: 0;
  line-height: 1.75;
  color: #453a31;
}

.modal.image-only .modal-info,
.modal.image-only .modal-narrative {
  display: none;
}

@media (max-width: 920px) {
  .hero-portrait {
    width: 150px;
    right: -4px;
    opacity: 0.42;
  }

  .context-grid {
    grid-template-columns: 1fr;
  }

  .press-quotes {
    grid-template-columns: 1fr;
  }

  .modal-content {
    grid-template-columns: 1fr;
  }

  .modal-info {
    border-left: 0;
    border-top: 1px solid #e2d7c6;
  }

  .modal-image-wrap {
    min-height: 0;
  }

  .nav-btn {
    top: 240px;
  }
}

@media (max-width: 680px) {
  .hero-portrait {
    display: none;
  }
}

.likes-container {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.like-btn {
  background: #faf7f2;
  border: 1px solid #e2d7c6;
  border-radius: 20px;
  cursor: pointer;
  padding: 4px 12px;
  font-size: 1.05rem;
  font-family: inherit;
  color: #c7503a;
  transition: all 0.2s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  box-sizing: border-box;
}

.like-btn:hover {
  transform: scale(1.05);
  border-color: #c7503a;
}

.like-btn.liked,
.like-btn:active {
  color: #e11d48;
}

.like-count,
.comment-indicator-count {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4a3a2a;
}

.modal-likes {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2d7c6;
  width: fit-content;
  margin-top: 12px;
}

.big-heart {
  font-size: 1.8rem;
}

@media (min-width: 1024px) {
  /* Removed override that was crushing global scale */
}

/* Fix for gallery grid items */
/* Fix for gallery grid items */
/* Fix for gallery grid items */
.artwork {
  background: #ffffff;
  border-radius: 8px;
  /* Restored for normal users */
  overflow: hidden;
  /* Restored for normal users */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
  border: 1px solid #e5e7eb;
}

/* Admin Mode Overrides for Frame Simulation */
body[data-is-admin="true"] .artwork {
  border-radius: 0;
  overflow: visible;
}

.artwork:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.artwork img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #f3f4f6;
}

.artwork-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 12px 16px 4px;
  gap: 10px;
}

.artwork h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artwork-dims {
  font-size: 0.82rem;
  color: #6b7280;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dim-icon {
  font-size: 0.9rem;
  color: #9ca3af;
}

.artwork p {
  margin: 0 16px 16px;
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.5;
  flex-grow: 1;
}

.artwork button {
  margin: 0 16px 16px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  transition: all 0.2s;
}

.artwork button:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

/* Frame Simulation - ONLY IN ADMIN MODE */
body[data-is-admin="true"] .framed-art {
  position: relative;
  box-sizing: border-box;
  /* Finer border (8px) - Darker wood */
  border: 8px solid #3e2723;
  /* Gradient effect: Darker wood texture */
  border-image: linear-gradient(135deg, #5d4037 0%, #281a14 100%) 1;

  /* Dark Gold Matting (Sub-frame) using padding */
  padding: 1px;
  background-color: #856d35;
  /* Dark Gold/Bronze */

  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 10px 24px rgba(0, 0, 0, 0.4);

  border-radius: 0 !important;
  display: flex;
  cursor: pointer;
}

body[data-is-admin="true"] .framed-art img {
  display: block;
  width: 100%;
  height: auto;
  flex-grow: 1;
  object-fit: cover;
  aspect-ratio: 4/3;
  /* Remove border, padding handles it now */
  border: none;
  border-radius: 0 !important;

  /* Inner shadow to sink image slightly */
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

/* CONTEXT IMAGES (Public Gallery) */
.modal-context-images {
  padding: 24px 20px;
  text-align: left;
}

.modal-info .modal-context-images {
  margin-top: 20px;
  padding: 20px 0 0 0;
  border-top: 1px solid #e2d7c6;
}

.modal-visuals .modal-context-images {
  border-top: 1px solid #e2d7c6;
}

.modal-context-images h4 {
  margin: 0 0 12px;
  color: #4c3222;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.context-grid-public {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
}

.context-thumb-public {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, border-color 0.2s;
  background: #eee;
}

.context-thumb-public:hover {
  transform: scale(1.05);
  border-color: #d6ccbf;
}

.context-thumb-public.active {
  border-color: #4c3222;
}

.context-thumb-public img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Comments / Libro de Visitas ─────────────────────────────────── */

.artwork-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 0 16px 16px;
}

.artwork-footer .like-btn {
  margin: 0;
  align-self: center;
  background: #faf7f2;
  border: 1px solid #e2d7c6;
  border-radius: 20px;
  cursor: pointer;
  padding: 4px 12px;
  font-size: 1.05rem;
  font-family: inherit;
  color: #c7503a;
  transition: all 0.2s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  box-sizing: border-box;
}

.comment-indicator {
  background: #faf7f2;
  border: 1px solid #e2d7c6;
  border-radius: 20px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 1.05rem;
  color: #7a6b5a;
  line-height: 1;
  cursor: default;
  margin: 0;
  height: 32px;
  box-sizing: border-box;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.gallery-footer {
  text-align: center;
  padding: 40px 20px 32px;
  margin-top: 0;
  color: #9b8a7a;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}

.gallery-footer .footer-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, #c8b9a6, transparent);
  margin: 0 auto 20px;
}

.gallery-footer p {
  margin: 0;
}

.gallery-footer a {
  color: #5a402d;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.gallery-footer a:hover {
  color: #7a5b3e;
}

/* ── Comments Section ────────────────────────────────────────────── */

.comments-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(90, 64, 45, 0.1);
}

.comments-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #5a402d;
  letter-spacing: 0.02em;
}

.comments-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.comments-list::-webkit-scrollbar {
  width: 4px;
}

.comments-list::-webkit-scrollbar-thumb {
  background: #d4c5b0;
  border-radius: 4px;
}

/* Individual comment card */
.comment-card {
  padding: 12px 0;
  border-bottom: 1px solid rgba(90, 64, 45, 0.06);
  animation: commentIn 0.3s ease;
}

.comment-card:last-child {
  border-bottom: none;
}

@keyframes commentIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.comment-nick {
  font-weight: 700;
  color: #4c3222;
  font-size: 1.05rem;
}

.comment-date {
  font-size: 0.88rem;
  color: #9b8a7a;
  font-style: italic;
}

.comment-body {
  color: #5f5548;
  font-size: 1.02rem;
  line-height: 1.5;
  margin: 0;
}

.comments-empty {
  color: #9b8a7a;
  font-size: 0.95rem;
  font-style: italic;
  padding: 8px 0;
}

/* Comment form */
.comment-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(90, 64, 45, 0.08);
}

.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-form input,
.comment-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid #e2d7c6;
  border-radius: 8px;
  background: #fff;
  color: #3d2e1e;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  width: 100%;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: #b8a48e;
  box-shadow: 0 0 0 3px rgba(148, 114, 81, 0.08);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: #b8a48e;
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.comment-form-hint {
  font-size: 0.75rem;
  color: #b8a48e;
}

.comment-submit {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 24px;
  border: none;
  border-radius: 999px;
  background: #5a402d;
  color: #f9f5ec;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.comment-submit:hover {
  background: #7a5b3e;
  transform: translateY(-1px);
}

.comment-submit:active {
  transform: translateY(0);
}

.comment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comment-error {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #c0392b;
}

.comment-success {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #27ae60;
}
