:root,
[data-theme='light'] {
  --bg: #edf3fb;
  --bg-glow: #dbe8f8;
  --bg-end: #d4e2f4;
  --ink: #0b1c2e;
  --muted: #4a6280;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --card: #f8fbff;
  --border: #c5d4e8;
  --input-bg: #ffffff;
  --font: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: 'Avenir Next', 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --bg: #0a1628;
  --bg-glow: #132840;
  --bg-end: #07101c;
  --ink: #e8eef7;
  --muted: #8fa3b8;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --card: #111f33;
  --border: #243447;
  --input-bg: #0d1a2b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 22%, var(--bg)) 0%,
      var(--bg-glow) 18%,
      var(--bg) 42%,
      var(--bg-end) 100%
    );
  color: var(--ink);
  font-family: var(--font);
  min-height: 100%;
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 10;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    backdrop-filter 160ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bottom-nav {
  display: none;
}

.more-page {
  display: grid;
  gap: 1.5rem;
}

.more-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}

.more-group[hidden] {
  display: none;
}

.more-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.more-group-title {
  margin: 0;
  padding: 0.85rem 1.1rem 0.55rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.more-link-list li + li,
.more-group-title + .more-link-list li:first-child {
  border-top: 1px solid var(--border);
}

.more-link {
  display: block;
  padding: 0.95rem 1.1rem;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.more-link:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--bg) 55%, var(--card));
}

.settings-page {
  display: grid;
  gap: 1.25rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.settings-label {
  margin: 0 0 0.25rem;
  font-family: var(--sans);
  font-size: 1rem;
}

.settings-row .btn {
  flex-shrink: 0;
}

.settings-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
}

.settings-check input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.settings-check:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

html[data-welcome-hidden] [data-welcome] {
  display: none;
}

.welcome {
  position: relative;
  padding: 1.15rem 2.85rem 1.2rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.welcome-title {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
}

.welcome p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.welcome-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.welcome-close:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-family: var(--sans);
  color: var(--ink);
}

.brand-home {
  flex-shrink: 0;
  line-height: 0;
  color: inherit;
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}

.brand-title:hover {
  color: var(--accent);
}

.brand-subtitle {
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--muted);
}

.brand-social {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.1rem;
}

.brand-social a {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
}

.brand-social a:hover {
  color: var(--accent);
}

.brand-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, var(--bg));
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.header-nav a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--card) 88%, var(--bg));
}

.header-nav a[aria-current='page'],
.header-nav a[aria-current='page']:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-switcher:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.theme-switcher .theme-icon-sun {
  display: block;
}

.theme-switcher .theme-icon-moon {
  display: none;
}

[data-theme='dark'] .theme-switcher .theme-icon-sun {
  display: none;
}

[data-theme='dark'] .theme-switcher .theme-icon-moon {
  display: block;
}

.user-avatar-link {
  display: block;
  line-height: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color 160ms ease;
}

.user-avatar-link:hover {
  border-color: var(--accent);
}

.user-avatar {
  width: 36px;
  height: 36px;
  object-fit: cover;
  display: block;
}

.user-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  background: var(--accent);
  text-decoration: none;
  border: 2px solid var(--border);
}

.user-avatar-fallback:hover {
  color: white;
  border-color: var(--accent-hover);
}

.site-main {
  width: min(720px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
}

.site-footer {
  width: 100%;
  margin: 2rem 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}

h1,
h2 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

.page-hero {
  margin-bottom: 2rem;
}

.page-hero-image {
  display: grid;
  gap: 1rem;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

.longevity-page .page-hero h1 {
  margin-bottom: 0.4rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}

.post-list-featured {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0;
}

.post-list-featured .post-card,
.post-card-compact {
  padding: 0.55rem;
  overflow: hidden;
}

.post-list-featured .post-card picture,
.post-list-featured .post-card-image {
  float: none;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 0 0.5rem;
}

.post-list-featured .post-card-title {
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-list-more {
  margin: 1.5rem 0 0;
}

.post-card {
  display: block;
  overflow: auto;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.post-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--card) 88%, var(--bg));
}

.post-card picture,
.post-card-image {
  float: left;
  width: 140px;
  height: 140px;
  aspect-ratio: 1;
  margin: 0 1rem 0.5rem 0;
  background: color-mix(in srgb, var(--bg) 70%, var(--border));
  border-radius: 10px;
  overflow: hidden;
  object-fit: cover;
  display: block;
}

.post-card picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

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

.post-card-body > * + * {
  margin-top: 0.35rem;
}

.post-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.post-card:hover .post-card-title {
  color: var(--accent);
}

.post-card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 520px) {
  .post-list-featured {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-card {
    padding: 0.7rem;
  }

  .post-card picture,
  .post-card-image {
    width: 96px;
    height: 96px;
    margin: 0 0.75rem 0.4rem 0;
  }

  .post-list-featured .post-card picture,
  .post-list-featured .post-card-image {
    width: 100%;
    height: auto;
    margin: 0 0 0.5rem;
  }

  .post-card-title {
    font-size: 1.05rem;
  }

  .post-list-featured .post-card-title {
    font-size: 0.85rem;
  }
}

.meta {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: color-mix(in srgb, var(--card) 80%, var(--bg));
  font-family: var(--sans);
  font-size: 0.9rem;
  text-decoration: none;
}

.prose {
  line-height: 1.7;
}

.prose img,
.prose picture {
  max-width: 100%;
  height: auto;
}

.prose picture img {
  width: 100%;
  height: auto;
}

.article-feature {
  width: 100%;
  border-radius: 12px;
  margin: 0 0 1rem;
}

.article-feature img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.prose pre,
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.prose pre {
  overflow: auto;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.prose :not(pre) > code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
}

.prose figure {
  margin: 1.25rem 0;
}

.prose figcaption {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.about-intro {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.about-intro h1 {
  margin-bottom: 0.35rem;
}

.about-intro .lead {
  margin: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1.5rem 0;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  background: var(--accent);
  color: white !important;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

.btn:disabled,
.btn-secondary:disabled,
.btn-secondary:disabled:hover {
  opacity: 0.55;
  cursor: default;
  border-color: var(--border);
  color: var(--muted) !important;
}

textarea,
input[type='email'],
input[type='text'] {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--ink);
}

.comments {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.comments li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 1.15rem;
}

.comment-avatar {
  width: 36px;
  height: 36px;
}

.comment-photo,
.comment-photo-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--accent);
}

.comment-photo.is-hidden,
.comment-photo-fallback.is-hidden {
  display: none !important;
}

.comment-photo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
}

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

.comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.comment-delete {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  cursor: pointer;
}

.comment-delete:hover {
  color: #e11d48;
}

.confirm-modal {
  margin: auto;
  width: min(28rem, calc(100% - 2rem));
  padding: 1.25rem 1.3rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 18px 40px color-mix(in srgb, #000 22%, transparent);
}

.confirm-modal::backdrop {
  background: color-mix(in srgb, #061018 55%, transparent);
}

.confirm-modal h2 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 1.15rem;
}

.comment-delete-preview {
  margin: 1rem 0;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 8rem;
  overflow: auto;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.profile-page {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.profile-page-signin {
  justify-items: center;
  text-align: center;
}

.profile-page-signin h1 {
  justify-self: stretch;
  text-align: left;
}

.profile-signin {
  margin: 0.5rem 0 0;
}

.profile-photo {
  width: min(220px, 100%);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
}

.profile-photo-fallback {
  width: 220px;
  aspect-ratio: 1;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 4rem;
  font-weight: 700;
  color: white;
  background: var(--accent);
}

.profile-details {
  margin: 0;
  display: grid;
  gap: 1rem;
  font-family: var(--sans);
}

.profile-details dt {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.profile-details dd {
  margin: 0;
  font-size: 1.1rem;
}

.profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.profile-heading h1 {
  margin: 0;
}

.profile-heading .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.profile-roles .tag-chip {
  padding: 0.2rem 0.55rem;
  font-size: 0.85rem;
}

.template-home,
.template-landing,
.template-prose {
  display: grid;
  gap: 1.5rem;
}

.template-prose {
  width: min(680px, 100%);
  margin: 0 auto;
}

/* Below Tailwind `sm` (640px): bottom tab navigation */
@media (max-width: 639px) {
  .header-nav {
    display: none;
  }

  .site-main {
    width: min(720px, calc(100% - 3rem));
    margin-bottom: 5.5rem;
  }

  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.1rem;
    padding: 0.35rem 0.4rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item.is-active {
    color: var(--accent);
  }

  .bottom-nav-icon {
    display: grid;
    place-items: center;
    height: 1.4rem;
  }
}

.cookie-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-consent.is-open {
  display: flex;
}

.cookie-consent-title {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 1rem;
}

.cookie-consent-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-consent-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

@media (max-width: 639px) {
  .cookie-consent {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(4.6rem + env(safe-area-inset-bottom));
    width: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions .btn {
    flex: 1;
    text-align: center;
  }
}

html[data-cookie-consent] .cookie-consent,
.cookie-consent[hidden] {
  display: none;
}

.admin-users-page {
  display: grid;
  gap: 1.25rem;
}

.admin-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.admin-user-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.admin-user-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.admin-user-photo,
.admin-user-photo-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--accent);
}

.admin-user-photo.is-hidden,
.admin-user-photo-fallback.is-hidden {
  display: none !important;
}

.admin-user-photo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-weight: 700;
  color: white;
}

.admin-user-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.admin-user-name {
  font-family: var(--sans);
  font-size: 1.05rem;
}

.admin-user-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--sans);
}

.admin-user-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.admin-user-roles-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-user-roles-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-user-roles-chips .tag-chip {
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
}

.admin-comments-page {
  display: grid;
  gap: 1.25rem;
}

.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-filter-btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.admin-filter-btn:hover,
.admin-filter-btn.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.admin-comment-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.admin-comment-body {
  margin: 0.55rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.tag-chip.status-pending {
  background: color-mix(in srgb, #f59e0b 18%, var(--card));
}

.tag-chip.status-approved {
  background: color-mix(in srgb, var(--accent) 22%, var(--card));
}

.tag-chip.status-rejected {
  background: color-mix(in srgb, #f43f5e 16%, var(--card));
}

.btn-danger {
  background: transparent;
  color: #e11d48 !important;
  border: 1px solid color-mix(in srgb, #e11d48 45%, var(--border));
}

.btn-danger:hover {
  border-color: #e11d48;
}

.btn-danger:disabled,
.btn-danger:disabled:hover {
  opacity: 0.55;
  cursor: default;
  color: var(--muted) !important;
  border-color: var(--border);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.roles-modal {
  margin: auto;
  width: min(28rem, calc(100% - 2rem));
  padding: 1.25rem 1.3rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 18px 40px color-mix(in srgb, #000 22%, transparent);
}

.roles-modal::backdrop {
  background: color-mix(in srgb, #061018 55%, transparent);
}

.roles-modal h2 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 1.15rem;
}

.roles-fields {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.roles-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

