.entry-comments .comments-list > li { margin-block:var(--ripro-comment-gap,20px); }
.entry-comments .ripro-comment-challenge input { max-width:100px; }
.entry-comments .ripro-comment-message { overflow-wrap:anywhere; }
.entry-comments [hidden] { display:none !important; }

#comments.entry-comments.ripro-comment-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--ripro-pagination-list-gap,10px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none
}
#comments.ripro-comment-blocks .ripro-comment-list-panel,
#comments.ripro-comment-blocks #respond {
  min-width: 0;
  padding: var(--ripro-comment-block-padding,24px);
  background: var(--ripro-surface,var(--ri-body-bg));
  border: 0;
  border-radius: var(--ripro-radius,0);
  margin: 0
}
#comments.ripro-comment-blocks .comments-list #respond {
  margin-top: var(--ripro-comment-block-gap,20px)
}
#comments.ripro-comment-blocks #respond .rpp-note {
  margin-bottom: 0
}

/* All appearance tokens and the two device-specific dimensions belong to the style center. */
.rce-editor,.rce-dialog {
  color: var(--ripro-text,var(--ri-body-color));
  background: var(--ripro-surface,var(--ri-body-bg));
  border: 1px solid var(--ripro-border,var(--ri-border-color));
  border-radius: var(--ripro-radius,0);
  font: inherit;
  box-sizing: border-box
}
.rce-editor *,.rce-dialog * {
  box-sizing: border-box
}
.rce-editor {
  margin-bottom: 14px;
  min-width: 0;
  overflow-wrap: anywhere
}
.rce-editor:focus-within {
  border-color: var(--ripro-primary)
}
.rce-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 5px 8px;
  background: var(--ripro-background);
  border-bottom: 1px solid var(--ripro-border)
}
.rce-toolbar button,.rce-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--ripro-muted);
  border-radius: var(--ripro-radius,0);
  font: inherit;
  cursor: pointer
}
.rce-toolbar button:hover,.rce-toolbar button[aria-expanded=true],.rce-tabs button[aria-pressed=true] {
  color: var(--ripro-primary);
  background: var(--ripro-surface)
}
.rce-toolbar button:focus-visible,.rce-editor button:focus-visible,.rce-dialog button:focus-visible {
  outline: 2px solid var(--ripro-primary);
  outline-offset: 2px
}
.rce-toolbar button:nth-child(2),.rce-toolbar button:nth-child(5) {
  margin-right: 8px
}
.rce-columns {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr)
}
#comments #respond .rce-editor #comment {
  width: 100%;
  min-width: 0;
  min-height: var(--ripro-comment-editor-height,164px);
  padding: var(--ripro-comment-editor-padding,14px);
  margin: 0;
  background: var(--ripro-surface);
  color: var(--ripro-text);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  resize: vertical;
  font: inherit;
  line-height: 1.8
}
#comments #respond .rce-editor #comment:focus {
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--ripro-primary)
}
.rce-preview-wrap {
  min-width: 0;
  padding: var(--ripro-comment-editor-padding,14px);
  border-left: 1px solid var(--ripro-border)
}
.rce-preview-label {
  display: block;
  text-align: right;
  color: var(--ripro-muted);
  font-size: var(--ripro-small-size,12px);
  margin-bottom: 5px
}
.rce-preview {
  overflow-wrap: anywhere;
  line-height: 1.8
}
.rce-preview a {
  color: var(--ripro-primary)
}
.rce-preview ul,.rce-preview ol {
  margin: 5px 0;
  padding-left: 22px
}
.rce-preview blockquote,#comments .comment-content blockquote {
  margin: 6px 0;
  padding: 4px 12px;
  border-left: 3px solid var(--ripro-border);
  background: var(--ripro-background);
  color: var(--ripro-muted)
}
.rce-empty {
  color: var(--ripro-muted)
}
.rce-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 12px;
  border-top: 1px solid var(--ripro-border);
  background: var(--ripro-background);
  font-size: var(--ripro-small-size,12px);
  color: var(--ripro-muted)
}
.rce-count {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-left: auto
}
.rce-tabs {
  display: none;
  border-bottom: 1px solid var(--ripro-border);
  gap: 12px;
  padding: 0 8px
}
.rce-tabs button[aria-pressed=true] {
  box-shadow: inset 0 -2px var(--ripro-primary)
}
.rce-popover {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border-bottom: 1px solid var(--ripro-border);
  background: var(--ripro-background)
}
.rce-popover button,.rce-dialog button {
  border: 1px solid var(--ripro-border);
  border-radius: var(--ripro-radius,0);
  background: var(--ripro-surface);
  color: var(--ripro-text);
  padding: 6px 10px;
  font: inherit;
  cursor: pointer
}
.rce-popover label {
  font-size: var(--ripro-small-size,12px)
}
#comments .rce-popover #rce-link {
  flex: 1;
  width: auto;
  min-width: 140px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--ripro-border);
  border-radius: var(--ripro-radius,0);
  background: var(--ripro-surface);
  color: var(--ripro-text)
}
.rce-dialog {
  width: 400px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  padding: 24px;
  overflow: auto;
  box-shadow: var(--ripro-shadow);
  margin: auto
}
.rce-dialog::backdrop {
  background: rgb(0 0 0 / 40%)
}
.rce-dialog [hidden] {
  display: none!important
}
.rce-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px
}
.rce-dialog-heading h2 {
  font-size: var(--ripro-font-size,15px);
  font-weight: 500;
  margin: 0
}
.rce-dialog-heading [data-rce-close] {
  border: 0;
  padding: 0 5px;
  font-size: 24px;
  line-height: 1.5;
  color: var(--ripro-muted)
}
.rce-dialog #rce-dialog-description,.rce-captcha-help {
  font-size: var(--ripro-small-size,12px);
  color: var(--ripro-muted);
  margin: 0 0 16px
}
.rce-dialog label {
  display: block;
  font-size: var(--ripro-font-size,14px);
  margin-bottom: 6px
}
.rce-captcha-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px
}
.rce-dialog #rce-captcha-answer {
  width: 138px;
  min-width: 0;
  max-width: 100%;
  height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--ripro-border);
  border-radius: var(--ripro-radius,0);
  background: var(--ripro-surface);
  color: var(--ripro-text);
  font: inherit
}
.rce-dialog #rce-captcha-answer:focus {
  outline: 2px solid var(--ripro-primary);
  outline-offset: 1px
}
.rce-dialog .rce-image {
  width: 138px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ripro-background)
}
.rce-image img {
  display: block;
  width: 138px;
  height: 42px;
  max-width: 100%
}
.rce-captcha-row>button:last-child {
  font-size: var(--ripro-small-size,12px);
  padding: 0;
  border: 0;
  color: var(--ripro-muted)
}
.rce-dialog #rce-captcha-error {
  margin: 8px 0;
  color: var(--ripro-danger,var(--ripro-text));
  font-size: var(--ripro-small-size,12px);
  overflow-wrap: anywhere
}
.rce-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap
}
.rce-dialog .rce-confirm {
  background: var(--ripro-primary);
  border-color: var(--ripro-primary);
  color: var(--ripro-on-primary);
  padding: 8px 16px
}
.rce-dialog button:disabled {
  opacity: .55;
  cursor: wait
}
@media(max-width:767px) {
  #comments.entry-comments .comments-list { padding-left:0; }
  #comments.entry-comments .comments-list > .comment,
  #comments.entry-comments .comments-list .children .comment { margin:0; padding-block:var(--ripro-comment-padding-y,12px); }
  #comments.entry-comments .comments-list .comment .ripro-comment-layout { gap:var(--ripro-comment-gap-inline,8px); }
  #comments.entry-comments .comments-list .comment .ripro-comment-layout .comment-author img.avatar { width:var(--ripro-comment-avatar,28px); height:var(--ripro-comment-avatar,28px); }
  #comments.entry-comments .comments-list .comment .ripro-comment-layout .comment-content { margin-top:var(--ripro-comment-content-gap,4px); font-size:var(--ripro-comment-body-size,14px); line-height:1.55; }
  #comments.entry-comments .comments-list .comment .ripro-comment-layout .comment-meta { margin-top:var(--ripro-comment-actions-gap,6px); gap:4px; flex-wrap:wrap; }
  #comments.entry-comments .comments-list .comment .ripro-comment-layout .ripro-comment-votes { display:contents; }
  #comments.entry-comments .comments-list .ripro-comment-votes button { min-width:44px; min-height:44px; padding:0 6px; border:0; background:transparent; gap:6px; }
  #comments.entry-comments .comments-list .ripro-comment-vote-message:empty { display:none; }
  #comments.entry-comments .comments-list .ripro-comment-vote-message:not(:empty) { flex-basis:100%; order:2; }
  #comments.entry-comments .comments-list .comment .ripro-comment-layout .comment-reply-link { margin-left:auto; min-width:44px; min-height:44px; justify-content:center; }
  #comments.entry-comments .comments-list .comment .children { margin-left:var(--ripro-comment-reply-indent,26px); }
  #comments.entry-comments .comments-list .comment .children .children { margin-left:0; }
  #comments.ripro-comment-blocks {
    gap: var(--ripro-pagination-list-gap,10px)
  }
  #comments.ripro-comment-blocks .ripro-comment-list-panel,
  #comments.ripro-comment-blocks #respond {
    padding: var(--ripro-comment-block-padding,16px)
  }
  .rce-columns {
    display: block
  }
  .rce-tabs {
    display: flex
  }
  .rce-preview-wrap {
    display: none;
    border: 0;
    min-height: var(--ripro-comment-editor-height,150px)
  }
  .rce-editor.is-preview .rce-preview-wrap {
    display: block
  }
  #comments #respond .rce-editor.is-preview #comment {
    display: none
  }
  .rce-toolbar {
    gap: 0;
    padding: 4px
  }
  .rce-toolbar button {
    min-width: 36px;
    min-height: 44px;
    padding: 7px
  }
  .rce-toolbar button:nth-child(2),.rce-toolbar button:nth-child(5) {
    margin-right: 3px
  }
  #comments #respond .rce-editor #comment {
    font-size: 16px
  }
  .rce-dialog {
    padding: 18px
  }
  .rce-dialog button,.rce-tabs button {
    min-height: 44px
  }
  .rce-dialog #rce-captcha-answer {
    height: 44px;
    font-size: 16px;
    width: 124px
  }
  .rce-dialog .rce-image {
    min-height: 44px;
    width: 124px;
    height: 44px
  }
  .rce-dialog .rce-image img {
    width: 124px;
    height: auto
  }
}

/* The comment pager is an independent surface, shared by desktop and mobile. */
#comments.ripro-comment-blocks .ripro-comment-pagination{width:100%;min-width:0;margin:0}
#comments.ripro-comment-blocks .ripro-comment-pagination .ripro-pagination{margin:0}
#comments .ripro-comment-floor{color:var(--ripro-muted);font-size:var(--ripro-small-size,12px);font-weight:400;margin-inline-end:6px}

/* Actions remain visible; spacing follows the central device-specific settings. */
#comments .comments-list .ripro-comment-votes{margin-top:0}
#comments .comments-list .ripro-comment-votes button,
#comments .comments-list .comment .ripro-comment-layout .comment-reply-link{min-height:28px;padding:0 6px;border:0;background:transparent}
#comments .comments-list .comment-meta button:focus-visible,
#comments .comments-list .comment-meta a:focus-visible{outline:2px solid var(--ripro-primary);outline-offset:2px}
@media (max-width:767px),(pointer:coarse){
  #comments .comments-list .ripro-comment-votes button,
  #comments .comments-list .comment .ripro-comment-layout .comment-reply-link{min-width:44px;min-height:44px}
}
/* Replies load only after an explicit click; common controls use center tokens. */
#comments .ripro-replies{margin-top:var(--ripro-comment-actions-gap,6px);min-width:0}
#comments .ripro-replies>.children{margin-top:var(--ripro-pagination-list-gap,10px)}
#comments .ripro-replies [hidden]{display:none!important}
#comments .ripro-replies-toggle,#comments .ripro-replies-more{display:inline-flex;align-items:center;gap:5px;max-width:calc(100% - var(--ripro-comment-avatar,40px) - var(--ripro-comment-gap-inline,12px));margin-inline-start:calc(var(--ripro-comment-avatar,40px) + var(--ripro-comment-gap-inline,12px));padding:0;min-height:28px;border:0;border-radius:0;background:transparent;color:var(--ripro-primary);font:inherit;font-size:var(--ripro-small-size,12px);text-align:start;cursor:pointer;white-space:normal;overflow-wrap:anywhere}
#comments .ripro-replies-toggle::before{content:'⌄';display:inline-block;flex:none}
#comments .ripro-replies-toggle[aria-expanded=true]::before{content:'⌃'}
#comments .ripro-replies-toggle:disabled,#comments .ripro-replies-more:disabled{color:var(--ripro-muted);cursor:wait}
#comments .ripro-replies-toggle:focus-visible,#comments .ripro-replies-more:focus-visible{outline:2px solid var(--ripro-primary);outline-offset:2px}
#comments .ripro-replies-message{color:var(--ripro-muted);font-size:var(--ripro-small-size,12px);margin:var(--ripro-comment-actions-gap,6px) 0 0 calc(var(--ripro-comment-avatar,40px) + var(--ripro-comment-gap-inline,12px))}
@media(max-width:767px),(pointer:coarse){#comments .ripro-replies-toggle,#comments .ripro-replies-more{min-height:44px}}
