.comments-panel {
  position: fixed; z-index: 45; right: 0; top: var(--bar-h); bottom: 0; width: 340px;
  padding: 24px; background: #1c1c1c; border-left: 1px solid var(--line);
  overflow-y: auto; color: #eee; font-size: 14px; line-height: 1.5;
}
.comments-panel[hidden], .comment-editor[hidden] { display: none; }
.comments-panel h2 { font-size: 20px; margin: 0 0 8px; }
.comments-panel p { color: #b9bec7; margin: 0 0 18px; }
.comments-panel button, .comments-file-notice a {
  border: 1px solid #515151; border-radius: 6px; background: #292929;
  padding: 8px 12px; color: #eee; font: inherit; text-decoration: none;
}
.comments-panel button:hover { background: #383838; }
.comments-panel button:disabled { opacity: .5; cursor: wait; }
.comments-panel button.primary { background: #f3ecdf; color: #222; border-color: #f3ecdf; }
.comments-panel .comments-status { font-size: 12px; color: #b9bec7; }
.comments-panel .comments-status.error { color: #ffb59d; }
.comment-editor { border-block: 1px solid var(--line); padding: 18px 0; margin-bottom: 20px; }
.comment-editor label { display: block; margin-bottom: 10px; font-weight: 600; }
.comment-editor textarea {
  width: 100%; min-height: 115px; resize: vertical; border: 1px solid #777; border-radius: 7px;
  padding: 12px; background: #111; color: white; font: 14px/1.5 var(--sans);
}
.comment-actions { display: flex; gap: 8px; margin-top: 10px; }
.comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.comment-card { padding: 14px; border: 1px solid #444; border-radius: 9px; background: #242424; }
.comment-card.selected { border-color: #edd8aa; }
.comment-card.resolved { opacity: .7; }
.comment-card .comment-location { border: 0; padding: 0; background: none; text-align: left; font-weight: 600; color: #edd8aa; }
.comment-card p { white-space: pre-wrap; overflow-wrap: anywhere; color: #eee; margin: 12px 0; }
.comment-card small { display: block; color: #aaa; font-size: 11px; }
.comment-card .comment-resolve { font-size: 12px; margin-top: 12px; }
.comment-pin {
  position: absolute; z-index: 100; width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  border: 2px solid #fff; box-shadow: 0 2px 7px #0008; background: #e7cb91; color: #242424;
  font: 600 12px var(--sans); transform-origin: center;
  transform: translate(-50%, -50%) scale(calc(1 / var(--canvas-scale, 1)));
}
.comment-pin[aria-pressed="true"] { background: #fff; outline: 3px solid #bd9357; }
.comment-pin.resolved { background: #aaa; }
body:not(.review-open) .comment-pin, body.export .comment-pin, body.export .comments-panel { display: none; }
body.review-open .viewport { right: 340px; }
body.review-open .frame { cursor: crosshair; }
body.review-open .frame-body iframe, body.review-open .frame-body video { pointer-events: none; }
.comments-file-notice { line-height: 1.7; }
.comments-file-notice code { display: block; white-space: normal; overflow-wrap: anywhere; margin: 12px 0; }
@media (max-width: 1500px) {
  .bar-sub, .site-field { display: none; }
  .bar { gap: 12px; }
}
@media (max-width: 760px) {
  .bar-brand { display: none; }
  .bar-controls { gap: 5px; }
  #reset { display: none; }
  .bar { padding-inline: 8px; gap: 6px; }
  .bar-sections { min-width: 0; flex: 1; }
  .bar-controls { flex-shrink: 0; }
  .bar-controls button { padding-inline: 7px; }
  .hint { max-width: 90vw; width: max-content; text-align: center; }
  .comments-panel { width: 100%; height: 42vh; top: auto; padding: 16px; border-left: 0; border-top: 1px solid var(--line); }
  body.review-open .viewport { right: 0; bottom: 42vh; }
}
