/* Member blog media library page — override global form styles */
main.blog-media-page form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
main.blog-media-page form button {
  width: auto;
}

/* Public blog index: cards + cover (object-cover) */
main.blog-index-main {
  max-width: min(100%, 92rem);
  margin-left: auto;
  margin-right: auto;
  padding: 2rem clamp(1rem, 3vw, 2rem) 4rem;
  box-sizing: border-box;
}
.blog-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 36rem) {
  .blog-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 56rem) {
  .blog-index-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 75rem) {
  .blog-index-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 93.75rem) {
  .blog-index-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.blog-index-card {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.blog-index-card__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.blog-index-card:hover .blog-index-card__inner {
  border-color: #cbd5e1;
  box-shadow: 0 10px 40px -12px rgba(15, 23, 42, 0.15);
}
.blog-index-card:hover .blog-index-card__title {
  color: #2563eb;
}
.blog-index-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-decoration: none;
}
.blog-index-card__link:focus {
  outline: none;
}
.blog-index-card__inner:has(.blog-index-card__link:focus-visible) {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.blog-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f5f9;
}
.blog-index-card__cover.blog-card-cover {
  margin: 0;
  border-radius: 0;
  max-height: 16rem;
}
.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-index-card__body {
  position: relative;
  z-index: 0;
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.blog-index-card__title {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  text-decoration: none;
  transition: color 0.15s ease;
}
.blog-index-card__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
}
.blog-index-card__tags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.blog-index-card__tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
}
.blog-index-card__excerpt {
  margin: 0.25rem 0 0;
  color: #334155;
  line-height: 1.55;
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 56rem) {
  .blog-index-card__excerpt {
    -webkit-line-clamp: 4;
    font-size: 0.8125rem;
  }
}
/* Member blog edit page shell */
.blog-edit-main {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding: 1.25rem clamp(0.75rem, 3vw, 2rem) 5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 50%, #f1f5f9 100%);
  min-height: 50vh;
}
.blog-edit-inner {
  max-width: 56rem;
  margin: 0 auto;
}
.blog-edit-header {
  margin-bottom: 1.5rem;
}
.blog-edit-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
}
.blog-edit-back:hover {
  color: #2563eb;
  text-decoration: underline;
}
.blog-edit-header__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
}
.blog-edit-header__title-row h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}
.blog-edit-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.blog-edit-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.blog-edit-ghost-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}
.blog-edit-lead {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
  max-width: 42rem;
}
.blog-edit-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 16px -8px rgba(15, 23, 42, 0.08);
}
.blog-edit-section__head {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}
.blog-edit-section__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}
.blog-edit-section__desc {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}
.blog-edit-alert {
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  margin: 0 0 1rem;
}
.blog-edit-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.blog-edit-alert ul {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
}
.blog-edit-input,
.blog-edit-textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.45;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.blog-edit-input:hover,
.blog-edit-textarea:hover {
  border-color: #94a3b8;
}
.blog-edit-input:focus,
.blog-edit-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.blog-edit-textarea {
  resize: vertical;
  min-height: 5rem;
}
.blog-edit-field {
  margin-bottom: 0;
}
.blog-edit-field + .blog-edit-field {
  margin-top: 1rem;
}
.blog-edit-body-hint {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}
.blog-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-top: 0.25rem;
}
.blog-edit-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.35rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}
.blog-edit-submit:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.35);
}
.blog-edit-submit:active {
  transform: translateY(1px);
}
.blog-edit-submit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.35),
    0 1px 2px rgba(37, 99, 235, 0.25);
}
.blog-edit-cancel {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
}
.blog-edit-cancel:hover {
  color: #334155;
  text-decoration: underline;
}
.blog-edit-section--footer {
  padding-bottom: 0;
}
@media (min-width: 48rem) {
  .blog-edit-sticky-save {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -1.35rem;
    padding: 1rem 1.35rem 1.35rem;
    background: linear-gradient(to top, #ffffff 85%, rgba(255, 255, 255, 0));
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 0.75rem 0.75rem;
  }
}
.blog-edit-section .blog-edit-cover {
  margin-top: 0.25rem;
  border-style: dashed;
  background: #fafbfc;
}

/* Member blog editor: global.css applies max-width: 500px + centered margins to all forms */
#blog-post-form {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-sizing: border-box;
}

/* Member blog edit: title + slug row; tags + date + published row */
#blog-post-form .blog-edit-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.35rem;
}
#blog-post-form .blog-edit-row-title-slug {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-end;
  width: 100%;
}
#blog-post-form .blog-edit-row-title-slug > .blog-edit-field-title {
  flex: 1 1 18rem;
  min-width: 0;
}
#blog-post-form .blog-edit-row-title-slug > .blog-edit-field-slug {
  flex: 0 1 22rem;
  min-width: 12rem;
}
#blog-post-form .blog-edit-slug-readonly {
  padding: 0.5rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  font-size: 0.9375rem;
  color: #334155;
  word-break: break-word;
  min-height: 2.75rem;
  box-sizing: border-box;
}
#blog-post-form .blog-edit-slug-readonly code {
  font-size: 0.9em;
  color: #0f172a;
}
.blog-edit-slug-placeholder {
  color: #64748b;
  font-style: italic;
}
.blog-edit-optional {
  font-weight: 400;
  color: #94a3b8;
}
#blog-post-form .blog-edit-slug-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}
#blog-post-form .blog-edit-row-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    'tags date'
    'vis vis';
  gap: 1rem 1.25rem;
  align-items: start;
  width: 100%;
}
#blog-post-form .blog-edit-field-tags {
  grid-area: tags;
}
#blog-post-form .blog-edit-field-published-at {
  grid-area: date;
}
#blog-post-form .blog-edit-field-published-flag {
  grid-area: vis;
}
@media (max-width: 900px) {
  #blog-post-form .blog-edit-row-meta {
    grid-template-columns: 1fr;
    grid-template-areas:
      'tags'
      'date'
      'vis';
  }
}
#blog-post-form .blog-edit-field-published-flag {
  padding-top: 0.05rem;
}
#blog-post-form .blog-edit-published-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0 0;
  flex-wrap: wrap;
}
#blog-post-form .blog-edit-published-input {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
  accent-color: #2563eb;
}
#blog-post-form .blog-edit-row-meta .blog-edit-published-label {
  display: inline;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  margin: 0;
  line-height: 1.25;
  user-select: none;
}
@media (max-width: 640px) {
  #blog-post-form .blog-edit-row-title-slug > .blog-edit-field-slug {
    flex: 1 1 100%;
  }
}

/* Member blog edit: cover image */
.blog-edit-cover {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
}
.blog-cover-preview-wrap {
  margin: 0.75rem 0;
  max-width: 28rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  aspect-ratio: 16 / 9;
}
.blog-cover-preview-wrap[hidden] {
  display: none !important;
}
.blog-cover-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
}
.blog-edit-cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
}
.blog-edit-cover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-family: inherit;
}
.blog-edit-cover-btn:hover {
  background: #f1f5f9;
}
.blog-edit-cover-btn--upload {
  cursor: pointer;
}
.blog-edit-cover-btn--clear {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff;
}
.blog-edit-cover-btn--clear:hover {
  background: #fef2f2;
}

/* Single post: large card layout + readable typography */
.blog-post-page {
  max-width: min(100%, 52rem);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
  box-sizing: border-box;
}
.blog-post-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px -16px rgba(15, 23, 42, 0.12);
}
.blog-post-card__topbar {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(to bottom, #fafbfc, #ffffff);
}
.blog-post-back {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}
.blog-post-back:hover {
  text-decoration: underline;
}
.blog-post-hero.blog-post-card__hero {
  margin: 0;
  border-radius: 0;
  max-height: min(70vh, 42rem);
  aspect-ratio: 16 / 9;
  background: #0f172a;
}
.blog-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.blog-post-card__content {
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 5vw, 2.75rem);
  max-width: 48rem;
  margin: 0 auto;
}
.blog-post-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.blog-post-meta {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #64748b;
}
.blog-post-meta--with-read {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}
.blog-post-meta__sep {
  color: #cbd5e1;
  font-weight: 500;
}
.blog-post-read-time {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}
.blog-post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1.35rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
}
.blog-post-share__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.blog-post-share__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.blog-post-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.45rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.blog-post-share__btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.blog-post-share__btn--fb:hover {
  background: #eff6ff;
  color: #1877f2;
  border-color: #bfdbfe;
}
.blog-post-share__btn--x:hover {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.blog-post-share__btn--in:hover {
  background: #e0f2fe;
  color: #0a66c2;
  border-color: #7dd3fc;
}
.blog-post-share__btn--copy {
  border-color: #94a3b8;
}
.blog-post-tags {
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.blog-post-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
}
.blog-post-lead {
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 3px solid #94a3b8;
  font-size: 1.125rem;
  line-height: 1.65;
  color: #475569;
  font-weight: 500;
}
.blog-post-body.blog-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #1e293b;
}
.blog-post-body.blog-body > *:first-child {
  margin-top: 0;
}
.blog-post-body.blog-body p {
  margin: 0 0 1.25em;
}
.blog-post-body.blog-body h2,
.blog-post-body.blog-body h3,
.blog-post-body.blog-body h4 {
  margin: 1.75em 0 0.65em;
  line-height: 1.3;
  color: #0f172a;
  font-weight: 700;
}
.blog-post-body.blog-body h2 {
  font-size: 1.45rem;
}
.blog-post-body.blog-body h3 {
  font-size: 1.2rem;
}
.blog-post-body.blog-body ul,
.blog-post-body.blog-body ol {
  margin: 0 0 1.25em;
  padding-left: 1.35em;
}
.blog-post-body.blog-body blockquote {
  margin: 1.25em 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}

/* Blog post body (matches TinyMCE content_style + public view) */
.blog-body img.blog-img-float-left {
  float: left;
  margin: 0 12px 12px 0;
  max-width: 45%;
}
.blog-body img.blog-img-float-right {
  float: right;
  margin: 0 0 12px 12px;
  max-width: 45%;
}
.blog-body img.blog-img-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}
.blog-body img.blog-img-full {
  display: block;
  width: 100%;
  max-width: 100%;
}
.blog-body img.blog-img-border {
  border: 3px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px;
  box-sizing: border-box;
  background: #ffffff;
}
.blog-body::after {
  content: "";
  display: table;
  clear: both;
}

/* TinyMCE image library modal (Sample_Code BlogMediaPickerModal behavior) */
.blog-media-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100050;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.55);
}
.blog-media-modal.is-open {
  display: flex;
}
.blog-media-modal__panel {
  background: #fff;
  color: #0f172a;
  border-radius: 0.75rem;
  max-width: 42rem;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.blog-media-modal__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.blog-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .blog-media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.blog-media-tile {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.blog-media-tile__thumb {
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
}
.blog-media-tile__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.blog-media-tile__actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem;
  align-items: center;
}
.blog-media-tile__actions button {
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
}
.blog-media-btn-insert {
  background: #2563eb;
  color: #fff;
}
.blog-media-btn-del {
  background: transparent;
  color: #b91c1c;
}

/* Blog media library: details modal (full preview + usages) */
.blog-media-details-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100050;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.55);
}
.blog-media-details-modal.is-open {
  display: flex;
}
.blog-media-details-modal__panel {
  background: #fff;
  color: #0f172a;
  border-radius: 0.75rem;
  max-width: min(100%, 40rem);
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.blog-media-details-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.blog-media-details-modal__h {
  margin: 0;
  font-size: 1.15rem;
}
.blog-media-details-modal__close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.blog-media-details-modal__err {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}
.blog-media-details-modal__loading {
  text-align: center;
  padding: 2rem;
  color: #64748b;
}
.blog-media-details-modal__preview {
  margin-bottom: 1rem;
  text-align: center;
  background: #0f172a;
  border-radius: 0.5rem;
  padding: 0.75rem;
}
.blog-media-details-modal__preview img {
  max-width: 100%;
  max-height: min(70vh, 36rem);
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}
.blog-media-details-modal__meta {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.blog-media-details-modal__meta dt {
  font-weight: 600;
  color: #475569;
  margin: 0;
}
.blog-media-details-modal__meta dd {
  margin: 0.15rem 0 0;
  color: #334155;
  word-break: break-all;
}
.blog-media-details-modal__sub {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #475569;
}
.blog-media-details-modal__usages {
  margin: 0;
  padding-left: 1.2rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.55;
}
.blog-media-details-modal__usages a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.blog-media-details-modal__usages a:hover {
  text-decoration: underline;
}
.blog-media-details-usage-meta {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 400;
}
.blog-media-details-modal__nousage {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

/* Member blog admin: post list table */
.blog-admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.blog-admin-table {
  width: 100%;
  min-width: 50rem;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: #334155;
}
.blog-admin-table thead tr {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
}
.blog-admin-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  white-space: nowrap;
}
.blog-admin-table td {
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
}
.blog-admin-table tbody tr:last-child td {
  border-bottom: none;
}
.blog-admin-table tbody tr:hover td {
  background: #fafbfc;
}
.blog-admin-table__title {
  display: block;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
.blog-admin-table__slug {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.blog-admin-cell-body--title-hover {
  position: relative;
  cursor: default;
}
.blog-admin-tags-tooltip {
  display: none;
  min-width: 12rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.55rem 0.65rem 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.08),
    0 10px 24px -8px rgba(15, 23, 42, 0.18);
}
.blog-admin-tags-tooltip.blog-admin-tags-tooltip--open {
  display: block;
  position: fixed;
  z-index: 100000;
  margin: 0;
}
.blog-admin-tags-tooltip__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}
.blog-admin-tags-tooltip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.blog-admin-tag {
  display: inline-block;
  margin: 0.15rem 0.25rem 0 0;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
}
.blog-admin-table__empty {
  color: #94a3b8;
}
.blog-admin-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.blog-admin-badge--published {
  background: #dcfce7;
  color: #166534;
}
.blog-admin-badge--draft {
  background: #f3f4f6;
  color: #4b5563;
}
.blog-admin-table__date {
  font-size: 0.8125rem;
  color: #64748b;
  white-space: nowrap;
}
.blog-admin-table th.blog-admin-table__views,
.blog-admin-table td.blog-admin-table__views {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.blog-admin-views-trigger {
  cursor: pointer;
  color: #1d4ed8;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  border-radius: 4px;
}
.blog-admin-views-trigger:hover {
  color: #1e40af;
  background: #eff6ff;
}
.blog-admin-views-trigger:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Blog admin: view history modal */
.blog-view-history-modal {
  position: fixed;
  inset: 0;
  z-index: 110000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.blog-view-history-modal[hidden] {
  display: none !important;
}
.blog-view-history-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}
.blog-view-history-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  max-height: min(90vh, 40rem);
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
}
.blog-view-history-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.blog-view-history-modal__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}
/* Reset global.css `button` (padding, gold bg) — keep a compact icon control */
.blog-view-history-modal__close {
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 2.25rem;
  width: 2.25rem;
  max-width: 2.25rem;
  min-height: 2.25rem;
  height: 2.25rem;
  max-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.blog-view-history-modal__close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
.blog-view-history-modal__close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.blog-view-history-modal__subtitle {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.4;
  word-break: break-word;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.blog-view-history-modal__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.blog-view-history-modal__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}
.blog-view-history-modal__select {
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  background: #fff;
  min-width: 12rem;
}
.blog-view-history-modal__custom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.blog-view-history-modal__custom[hidden] {
  display: none !important;
  margin-top: 0;
  padding: 0;
  border: none;
}
.blog-view-history-modal__date-label {
  font-size: 0.8rem;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.blog-view-history-modal__date-input {
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  font-family: inherit;
}
.blog-view-history-modal__apply-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 0.45rem;
  cursor: pointer;
}
.blog-view-history-modal__apply-btn:hover {
  background: #1d4ed8;
}
.blog-view-history-modal__meta {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  color: #334155;
  font-weight: 500;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.blog-view-history-modal__status {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
  min-height: 1.25rem;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.blog-view-history-modal__empty {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  text-align: center;
  padding: 2rem 1rem;
}
.blog-view-history-modal__chart-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.65rem 0.35rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
}
.blog-view-history-chart {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 0.35rem 0.15rem 0.25rem;
  box-sizing: border-box;
}
.blog-view-history-chart__col {
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  /* Same total layout per column: fixed track + fixed axis row so bars line up */
}
.blog-view-history-chart__col-inner {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  box-sizing: border-box;
  padding-top: 1.15rem;
  border-bottom: 2px solid #94a3b8;
  background: #fff;
  border-radius: 4px 4px 0 0;
}
.blog-view-history-chart__value {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1e40af;
  line-height: 1;
  pointer-events: none;
}
.blog-view-history-chart__bar {
  width: 100%;
  flex-shrink: 0;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(to top, #1d4ed8, #60a5fa);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  min-height: 3px;
  transition: filter 0.12s ease;
}
.blog-view-history-chart__col:hover .blog-view-history-chart__bar {
  filter: brightness(1.06);
}
.blog-view-history-chart__label {
  flex-shrink: 0;
  height: 1.35rem;
  min-height: 1.35rem;
  max-height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 0.65rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #475569;
}
.blog-view-history-chart__label--tick {
  color: #cbd5e1;
  font-weight: 600;
}
.blog-admin-table th.blog-admin-table__actions,
.blog-admin-table td.blog-admin-table__actions {
  text-align: right;
  width: 1%;
}
.blog-admin-table__action-btns {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.blog-admin-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.25;
}
.blog-admin-btn--edit {
  background: #eff6ff;
  color: #1d4ed8;
}
.blog-admin-btn--edit:hover {
  background: #dbeafe;
}
.blog-admin-btn--delete {
  background: #fef2f2;
  color: #b91c1c;
}
.blog-admin-btn--delete:hover {
  background: #fee2e2;
}
main .blog-admin-table-wrap form.blog-admin-delete-form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: inline;
  box-shadow: none;
}
main .blog-admin-table-wrap form.blog-admin-delete-form button {
  width: auto;
}

@media (max-width: 768px) {
  .blog-admin-table-wrap {
    border: none;
    background: transparent;
    box-shadow: none;
    overflow-x: visible;
  }
  .blog-admin-table {
    min-width: 0;
    display: block;
  }
  .blog-admin-table thead {
    display: none;
  }
  .blog-admin-table tbody {
    display: block;
  }
  .blog-admin-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
  .blog-admin-table tbody tr:hover td {
    background: transparent;
  }
  .blog-admin-table td {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.25rem 0.75rem;
    padding: 0.5rem 0;
    border: none;
    align-items: start;
  }
  .blog-admin-table td::before {
    content: attr(data-label);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding-top: 0.2rem;
    grid-column: 1;
  }
  .blog-admin-table .blog-admin-cell-body {
    grid-column: 2;
    min-width: 0;
  }
  .blog-admin-table td.blog-admin-table__actions {
    display: block;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid #f1f5f9;
  }
  .blog-admin-table td.blog-admin-table__actions::before {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
  }
  .blog-admin-table td.blog-admin-table__actions .blog-admin-cell-body {
    width: 100%;
  }
  .blog-admin-table__action-btns {
    justify-content: flex-start;
    width: 100%;
  }
}
