/* deck-comments: self-contained styles. Auto-hidden on small viewports. */
  /* === Comments overlay ===
     Toggle via .comments-on on <body>. Pins are absolutely positioned in the
     1123×631 native slide space; coordinates persist as % so they survive
     responsive `transform: scale()`. Popovers live above pins. */
  .slide .comment-pin {
    position: absolute;
    width: 22px; height: 22px; border-radius: 50% 50% 50% 0;
    transform: translate(-50%, -100%) rotate(-45deg);
    background: var(--c-primary, #0D6EFF); color: #FFFFFF;
    border: none; cursor: pointer; padding: 0;
    box-shadow: 0 4px 12px rgba(31,58,110,0.35);
    display: none; z-index: 11;
    font: 700 11px/22px 'TildaSans', 'Inter', sans-serif; text-align: center;
  }
  .slide .comment-pin > span { display: block; transform: rotate(45deg); }
  .slide .comment-pin.resolved { background: var(--c-muted); opacity: 0.7; }
  body.comments-on .slide.active .comment-pin { display: block; }
  body.comments-on .slide.active { cursor: crosshair; }
  body.comments-on .controls-bar { z-index: 25; }
  #commentsBtn.active { background: var(--c-primary, #0D6EFF); color: #FFFFFF; }
  #commentsBtn.active:hover { background: var(--c-text); }

  .comment-popover {
    position: fixed; z-index: 25;
    width: 280px; background: #FFFFFF; border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
    padding: 14px; font: 400 12px/1.5 'TildaSans', 'Inter', sans-serif; color: var(--c-text);
  }
  .comment-popover .meta {
    font: 600 10px/1 'TildaSans', 'Inter', sans-serif; color: var(--c-muted);
    letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px;
    display: flex; justify-content: space-between; gap: 8px;
  }
  .comment-popover .meta .author { color: var(--c-text); }
  .comment-popover textarea {
    width: 100%; min-height: 64px; resize: vertical;
    border: 1px solid #E0E3EA; border-radius: 4px; padding: 6px 8px;
    font: 400 12px/1.4 'TildaSans', 'Inter', sans-serif; color: var(--c-text);
    outline: none;
  }
  .comment-popover textarea:focus { border-color: var(--c-primary, #0D6EFF); }
  .comment-popover .text-display {
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  .comment-popover .actions {
    display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px;
  }
  .comment-popover .actions .spacer { flex: 1; }
  .comment-popover button {
    height: 26px; padding: 0 10px; border-radius: 4px; cursor: pointer;
    font: 600 10px/1 'TildaSans', 'Inter', sans-serif; letter-spacing: 0.06em; text-transform: uppercase;
    border: 1px solid transparent; background: transparent; color: var(--c-text);
  }
  .comment-popover button.primary { background: var(--c-primary, #0D6EFF); color: #FFFFFF; }
  .comment-popover button.primary:hover { background: var(--c-text); }
  .comment-popover button.secondary { border-color: #E0E3EA; }
  .comment-popover button.secondary:hover { background: #F4F5F8; }
  .comment-popover button.danger { color: #B83232; }
  .comment-popover button.danger:hover { background: #FCEEEE; }

  /* Comments sidebar — list of the current slide */
  .comments-sidebar {
    position: fixed; top: 70px; right: 22px;
    width: 260px; max-height: 60vh; overflow-y: auto;
    background: rgba(255,255,255,0.96); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 12px; z-index: 14;
    display: none;
    font: 400 11px/1.4 'TildaSans', 'Inter', sans-serif; color: var(--c-text);
  }
  body.comments-on .comments-sidebar { display: block; }
  .comments-sidebar h4 {
    margin: 0 0 8px; font: 700 11px/1 'TildaSans', 'Inter', sans-serif;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted);
  }
  .comments-sidebar .empty { color: var(--c-muted); font-style: italic; padding: 12px 0; text-align: center; }
  .comments-sidebar .item {
    border-top: 1px solid #ECEEF2; padding: 8px 0; cursor: pointer;
  }
  .comments-sidebar .item:first-of-type { border-top: 0; }
  .comments-sidebar .item .meta {
    font: 600 9px/1 'TildaSans', 'Inter', sans-serif; color: var(--c-muted);
    letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px;
    display: flex; justify-content: space-between; gap: 8px;
  }
  .comments-sidebar .item .meta .ix { color: var(--c-primary, #0D6EFF); }
  .comments-sidebar .item .meta .status.resolved { color: #5A8552; }
  .comments-sidebar .item .text {
    color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
  }
  .comments-sidebar .item.resolved .text { text-decoration: line-through; color: var(--c-muted); }
  @media (max-width: 900px) {
  .comments-sidebar, .comment-popover { display: none !important; }
}
  @media (max-width: 900px) {
  #commentsBtn { display: none !important; }
}
