.comments-backdrop {
  position: fixed;
  z-index: 29;
  inset: 0;
  border: 0;
  background: rgba(11, 25, 21, .52);
  backdrop-filter: blur(3px);
}

.comments-panel {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: min(430px, 94vw);
  height: 100%;
  padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
  color: #173427;
  background: #eff9e9;
  box-shadow: 18px 0 44px rgba(8, 28, 20, .32);
  transform: translateX(-105%);
  transition: transform .25s ease;
}

.comments-panel.open { transform: translateX(0); }

.comments-header,
.comments-account,
.signed-in,
.comment-form-footer,
.comment-heading {
  display: flex;
  align-items: center;
}

.comments-header { justify-content: space-between; gap: 12px; }
.comments-header h2 { margin: 0; font-size: 1.35rem; }

.comments-close,
.comment-delete {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.comments-close { color: #173427; font-size: 2rem; line-height: 1; }
.comments-account { margin: 18px 0 12px; }

.google-login,
#google-logout,
#comment-submit {
  border: 0;
  border-radius: 12px;
  font: 800 .86rem/1 inherit;
  cursor: pointer;
}

.google-login {
  width: 100%;
  padding: 13px 16px;
  color: #23372d;
  background: #fff;
  box-shadow: 0 4px 16px rgba(30, 68, 48, .13);
}

.signed-in { width: 100%; justify-content: space-between; gap: 10px; font-size: .84rem; }
#google-logout { padding: 8px 11px; color: #eaf7e9; background: #486d52; }

.comment-form {
  padding: 12px;
  border-radius: 16px;
  background: #dcefd2;
}

.comment-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 78px;
  padding: 11px;
  border: 2px solid #a8cc98;
  border-radius: 12px;
  outline: none;
  color: #173427;
  background: #fff;
  font: 600 .92rem/1.4 inherit;
}

.comment-form textarea:focus { border-color: #4d8b55; }
.comment-form-footer { justify-content: space-between; margin-top: 8px; color: #56705e; font-size: .72rem; }
#comment-submit { padding: 10px 14px; color: #fff; background: #315f3b; }
#comment-submit:disabled { opacity: .55; cursor: wait; }
.comment-status { min-height: 20px; margin: 10px 2px; color: #765228; font-size: .78rem; }
.comments-list { display: grid; gap: 10px; }

.comment-card {
  padding: 12px 13px;
  border: 1px solid #c8dfbd;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(29, 65, 45, .08);
}

.comment-heading { gap: 9px; }
.comment-heading > div { display: grid; gap: 1px; }
.comment-heading strong { font-size: .83rem; }
.comment-heading time { color: #789080; font-size: .66rem; }

.comment-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: #5f955e;
  font-weight: 900;
}

.comment-delete { margin-left: auto; padding: 5px; font-size: .9rem; }
.comment-card p { margin: 10px 1px 1px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.4; }
.comments-empty { margin: 26px 10px; text-align: center; color: #68816e; font-size: .86rem; }

@media (prefers-reduced-motion: reduce) {
  .comments-panel { transition: none; }
}
