/* Blog-style COMMENTS gate */
.comments-section {
  margin: 1.5rem auto 2rem;
  max-width: 640px;
  padding: 0 16px;
  box-sizing: border-box;
  text-align: left;
}

.comments-heading {
  margin: 0 0 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 700;
}

.comments-gate {
  padding: 1rem 0 0.5rem;
}

.comments-gate-hint {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.comments-gate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.comments-unlock-input {
  position: relative;
  z-index: 1;
  min-width: 12rem;
  max-width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
  color: #eee;
  pointer-events: auto;
}

.comments-gate-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.comments-gate-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.comments-unlock-error {
  margin: 0.5rem 0 0;
  color: #ff8a80;
  font-size: 13px;
}

.comments-section .lazy-opt-placeholder {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* Legacy details fold (homepage artalk conf) */
.site-comments-fold {
  margin: 1.25rem auto 1.75rem;
  max-width: 920px;
  padding: 0 15px;
  border: 1px dashed #ddd;
  box-sizing: border-box;
}

.site-comments-fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 0.9rem;
  color: #666;
  font-size: 0.9rem;
  user-select: none;
}

.site-comments-fold > summary::-webkit-details-marker {
  display: none;
}

.site-comments-fold > summary::before {
  content: "▸ ";
  color: #999;
}

.site-comments-fold[open] > summary::before {
  content: "▾ ";
}

.site-comments-fold[open] > summary {
  border-bottom: 1px solid #eee;
}

.site-comments-fold #Comments {
  padding: 0.85rem 0.9rem 1rem;
}

.site-comments-fold .lazy-opt-placeholder {
  margin: 0;
  color: #999;
  font-size: 0.85rem;
}

/* Blue prefs panel */
.blue-prefs-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.blue-prefs-fab:hover {
  background: rgba(40, 40, 40, 0.9);
}

.blue-prefs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.45);
}

.blue-prefs-panel {
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 10001;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: #1e1e1e;
  color: #eee;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.blue-prefs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.blue-prefs-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.blue-prefs-close {
  border: 0;
  background: transparent;
  color: #aaa;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.blue-prefs-hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: #999;
  line-height: 1.4;
}

.blue-prefs-advanced {
  margin: 0;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.5rem 0.5rem;
}

.blue-prefs-advanced-summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: #bbb;
  padding: 0.25rem 0.1rem;
  user-select: none;
}

.blue-prefs-advanced-summary::-webkit-details-marker {
  display: none;
}

.blue-prefs-advanced-summary::before {
  content: "▸ ";
  color: #888;
}

.blue-prefs-advanced[open] > .blue-prefs-advanced-summary::before {
  content: "▾ ";
}

.blue-prefs-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.blue-prefs-item input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.blue-prefs-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.blue-prefs-item-text strong {
  font-size: 0.9rem;
  color: #f2f2f2;
}

.blue-prefs-item-text small {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.35;
}

.blue-prefs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.blue-prefs-btn {
  flex: 1 1 auto;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #ddd;
  font-size: 0.8rem;
  cursor: pointer;
}

.blue-prefs-btn-primary {
  border-color: #5b9bd5;
  color: #9ec9f0;
}

.blue-prefs-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Light pages (links): next-screen comments */
html.page-scroll-lock {
  overflow: hidden;
}

.comments-page:not(:empty) {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 14vh 0 3rem;
  will-change: transform;
}

.comments-page--light {
  background: rgba(255, 255, 255, 0.32);
}

.comments-page--light .comments-section {
  padding: 0 16px;
}

.comments-page--light .comments-heading {
  color: rgba(0, 0, 0, 0.72);
}

.comments-page--light .comments-gate-hint {
  color: rgba(0, 0, 0, 0.55);
}

.comments-page--light .comments-unlock-input {
  border-color: rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.95);
  color: #222;
}

.comments-page--light .comments-gate-btn {
  border-color: rgba(0, 0, 0, 0.35);
  color: rgba(0, 0, 0, 0.75);
}

.comments-page--light .comments-gate-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111;
}

.comments-page--light .comments-unlock-error {
  color: #c62828;
}

.comments-page--light .lazy-opt-placeholder {
  color: rgba(0, 0, 0, 0.5);
}
