.chpc {margin:1em 0; font-size:inherit; line-height:1.5;}
.chpc [hidden] {display:none!important;}
.chpc .chpc-list {list-style:none; margin:0; padding:0; border:1px solid rgba(128,128,128,.35); border-radius:8px; overflow:hidden;}
.chpc .chpc-row {display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; margin:0; list-style:none;}
.chpc .chpc-row + .chpc-row {border-top:1px solid rgba(128,128,128,.25);}
.chpc .chpc-info {flex:1; min-width:0;}
.chpc .chpc-code {display:block; overflow-wrap:anywhere; user-select:text;}
.chpc .chpc-reward {display:block; font-size:.9em; overflow-wrap:anywhere;}
.chpc .chpc-copy, .chpc .chpc-reset {font-family:inherit; cursor:pointer; font-size:13px; line-height:1.3; border-radius:6px; min-height:40px; padding:8px 10px; white-space:nowrap;}
.chpc .chpc-copy {background:#DC3900; color:#fff; border:1px solid #DC3900; flex-shrink:0; box-sizing:border-box; width:144px; min-width:144px; max-width:100%; min-height:36px; font-size:12px; font-weight:600; text-align:center;}
.chpc .chpc-copy:hover {background:#B93200; border-color:#B93200; color:#fff;}
.chpc .chpc-done .chpc-copy {background:transparent; color:inherit; border-color:#DC3900;}
.chpc .chpc-done .chpc-code {text-decoration:line-through;}
.chpc .chpc-toolbar {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; font-size:.9em;}
.chpc .chpc-reset {background:transparent; color:inherit; border:1px solid rgba(128,128,128,.5);}
.chpc .chpc-copy:focus-visible, .chpc .chpc-reset:focus-visible {outline:2px solid currentColor; outline-offset:3px;}
.chpc .chpc-message {display:block; margin-top:6px; font-size:.9em;}
@media (max-width:380px) {.chpc .chpc-row {padding:9px; gap:8px;} .chpc .chpc-copy {padding:7px; font-size:12px;}}

/* Native lists keep their existing HTML, list markers and inline formatting. */
.chpc-native .chpc-native-row {display:list-item; list-style:inherit; padding:0; margin:0 0 .45em; border:0;}
.chpc-native .chpc-native-row + .chpc-native-row {border:0;}
.chpc-native .chpc-native-code {display:inline;}
.chpc-native .chpc-native-row .chpc-copy {display:inline-block; margin-inline-start:.6em; vertical-align:middle; white-space:nowrap;}

/* 1.0.3: keep native list markers and original inline text; reserve a fixed
 * right-hand column for buttons. No changes to the saved article HTML. */
.chpc.chpc-native .chpc-native-row {
  position:relative; box-sizing:border-box; min-height:36px;
  padding:7px 158px 7px 0; margin:0 0 5px;
  overflow-wrap:anywhere;
}
.chpc.chpc-native .chpc-native-row .chpc-copy {
  position:absolute; inset-inline-end:0; top:50%; transform:translateY(-50%);
  margin:0; width:144px; min-width:144px; max-width:100%;
  white-space:nowrap; padding:7px 6px;
}
.chpc .chpc-copy:not([hidden]):not(:disabled):hover {
  background:#B93200; border-color:#B93200; color:#fff;
}
.chpc .chpc-done .chpc-copy:not([hidden]):not(:disabled):not(:hover) {
  background:transparent; color:inherit; border-color:#DC3900;
}
/* 1.0.4: compact touch-friendly icon column on phones. */
@media (max-width:600px) {
  .chpc.chpc-native > ul, .chpc.chpc-native > ol {
    padding-inline-start:1.15em; margin-inline-start:0;
  }
  .chpc.chpc-native .chpc-native-row {
    min-height:44px; padding:5px 54px 5px 0; margin:0 0 5px;
  }
  .chpc.chpc-native .chpc-native-row .chpc-copy {
    position:absolute; inset-inline-end:0; top:50%; transform:translateY(-50%);
    margin:0;
  }
  .chpc:not(.chpc-native) .chpc-row {flex-wrap:nowrap; gap:10px; padding:9px;}
  .chpc:not(.chpc-native) .chpc-info {flex:1; min-width:0;}
  .chpc .chpc-row .chpc-copy:not([hidden]) {
    box-sizing:border-box; display:flex; align-items:center; justify-content:center;
    width:44px; min-width:44px; max-width:44px;
    height:44px; min-height:44px; padding:0;
    font-size:0; line-height:1; flex:0 0 44px;
  }
  .chpc .chpc-row .chpc-copy::before {
    content:""; display:block; width:20px; height:20px;
    background:currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .chpc .chpc-done .chpc-copy::before {
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
  }
  .chpc .chpc-toolbar {gap:6px; font-size:.85em; margin-bottom:8px;}
  .chpc .chpc-reset {font-size:11px; min-height:44px; padding:5px 8px;}
}
