/* Contador de caracteres / palavras — shared widget */
.article .global ul li::before { display: none; }

  .global {
    display: flex;
    flex-wrap: wrap;
    box-shadow: 0 0 0 1px var(--dica-border), 0 12px 32px var(--dica-shadow);
    border-radius: 16px;
    margin-bottom: 24px;
    background: var(--dica-surface);
    color: var(--dica-body);
    overflow: hidden;
  }

  .globalinner {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .cdc-intro {
    margin-bottom: 12px;
  }

  .cdc-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--dica-border);
    background: var(--dica-surface-soft);
    color: var(--dica-body);
    font-size: 0.92rem;
    line-height: 1.45;
    hyphens: none;
    -webkit-hyphens: none;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .cdc-privacy svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    fill: var(--dica-action);
    max-width: none;
  }

  .cdc-privacy strong {
    color: var(--dica-ink);
  }

  .cdc-privacy-short {
    display: none;
  }

  .cdc-limit-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 0;
    background: var(--dica-surface-soft);
  }

  .cdc-limit-bar label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dica-ink);
    margin: 0;
  }

  .cdc-limit-label {
    white-space: nowrap;
  }

  .cdc-limit-bar input[type="number"] {
    width: 110px;
    padding: 8px 10px;
    border: 1px solid var(--dica-border);
    border-radius: 8px;
    background: var(--dica-surface);
    color: var(--dica-ink);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
  }

  .cdc-limit-bar input[type="number"]:focus {
    border-color: var(--dica-action);
    box-shadow: 0 0 0 3px var(--dica-action-soft);
  }

  .cdc-remaining {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dica-muted);
    background: var(--dica-surface);
    border: 1px solid var(--dica-border);
    white-space: nowrap;
  }

  .cdc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 16px 14px;
    border-bottom: 1px solid var(--dica-border);
    background: var(--dica-surface-soft);
  }

  .cdc-preset {
    appearance: none;
    border: 1px solid var(--dica-border);
    background: var(--dica-surface);
    color: var(--dica-body);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    flex: none;
  }

  .cdc-preset:hover {
    border-color: var(--dica-action-border);
    background: var(--dica-action-soft);
    color: var(--dica-ink);
  }

  .cdc-preset.is-active {
    background: var(--dica-action);
    border-color: var(--dica-action);
    color: #fff;
  }

  .cdc-platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--dica-border);
    background: var(--dica-surface);
  }

  .cdc-platform {
    border: 1px solid var(--dica-border);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--dica-surface-soft);
    cursor: pointer;
    text-align: left;
    color: inherit;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .cdc-platform:hover {
    border-color: var(--dica-action-border);
  }

  .cdc-platform.is-active {
    border-color: var(--dica-action);
    box-shadow: 0 0 0 2px var(--dica-action-soft);
  }

  .cdc-platform-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .cdc-platform-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--dica-ink);
    line-height: 1.25;
  }

  .cdc-platform-count {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--dica-muted);
    white-space: nowrap;
  }

  .cdc-platform-count.is-ok { color: #0f7a3f; }
  .cdc-platform-count.is-warn { color: #9a6700; }
  .cdc-platform-count.is-over { color: #b42318; }

  html[data-theme="dark"] .cdc-platform-count.is-ok { color: #6ee7a8; }
  html[data-theme="dark"] .cdc-platform-count.is-warn { color: #F5C400; }
  html[data-theme="dark"] .cdc-platform-count.is-over { color: #fca5a5; }

  .cdc-platform-track {
    height: 6px;
    border-radius: 999px;
    background: var(--dica-border);
    overflow: hidden;
  }

  .cdc-platform-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #0f7a3f;
    transition: width 0.18s ease, background-color 0.18s ease;
  }

  .cdc-platform-fill.is-warn { background: #e5a500; }
  .cdc-platform-fill.is-over { background: #b42318; }

  .cdc-sticky {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 10040;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 24px);
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--dica-surface-raised);
    color: var(--dica-ink);
    border: 1px solid var(--dica-border);
    box-shadow: 0 10px 28px var(--dica-shadow);
    font-size: 0.88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
  }

  @media screen and (max-width: 890px) {
    .cdc-sticky.is-visible {
      display: inline-flex;
    }
  }

  .cdc-sticky-sep {
    color: var(--dica-muted);
    font-weight: 500;
  }

  .cdc-sticky-limit {
    color: var(--dica-action);
    font-weight: 700;
  }

  .cdc-sticky-limit.is-over {
    color: #b42318;
  }

  html[data-theme="dark"] .cdc-sticky-limit.is-over {
    color: #fca5a5;
  }

  .cdc-density-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  .cdc-density-meta {
    font-size: 0.78rem;
    color: var(--dica-muted);
    font-weight: 600;
  }

  .cdc-density-more {
    display: none;
    width: calc(100% - 24px);
    margin: 4px 12px 12px;
    padding: 10px 12px;
    border: 1px solid var(--dica-border);
    border-radius: 10px;
    background: var(--dica-surface);
    color: var(--dica-action);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
  }

  .cdc-density-more:hover {
    background: var(--dica-action-soft);
  }

  .cdc-density-more.is-visible {
    display: block;
  }

  #keyword-list ul li span:nth-child(2),
  #keyword-list ul li span:nth-child(3) {
    text-align: right;
    min-width: 48px;
  }

  #keyword-list .cdc-density-empty {
    padding: 14px 10px 18px;
    color: var(--dica-muted);
    font-size: 0.88rem;
    text-align: center;
  }

  .cdc-sms {
    display: none;
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--dica-border);
    background: var(--dica-surface-soft);
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--dica-body);
  }

  .cdc-sms.is-visible {
    display: block;
  }

  .cdc-sms strong {
    color: var(--dica-ink);
  }

  .cdc-sms-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--dica-action-soft);
    color: var(--dica-action);
    border: 1px solid var(--dica-action-border);
  }

  .cdc-sms-badge.is-ucs {
    background: rgba(180, 35, 24, 0.1);
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.25);
  }

  html[data-theme="dark"] .cdc-sms-badge.is-ucs {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
  }

  .cdc-autosave {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 16px;
    border-bottom: 0;
    background: transparent;
    font-size: 0.8rem;
    color: var(--dica-muted);
  }

  .cdc-autosave strong {
    color: var(--dica-ink);
    font-weight: 600;
  }

  .cdc-autosave-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .cdc-autosave button {
    border: 1px solid var(--dica-border);
    background: var(--dica-surface-soft);
    color: var(--dica-body);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
  }

  .cdc-autosave button:hover {
    border-color: var(--dica-action-border);
    background: var(--dica-action-soft);
    color: var(--dica-ink);
  }

  .cdc-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 8px 14px;
    border-top: 1px solid var(--dica-border);
    background: var(--dica-surface-soft);
    font-size: 0.8rem;
    color: var(--dica-body);
  }

  .cdc-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--dica-ink);
    user-select: none;
  }

  .cdc-options input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--dica-action);
    cursor: pointer;
  }

  .cdc-options-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
  }

  .cdc-options button {
    border: 1px solid var(--dica-border);
    background: var(--dica-surface);
    color: var(--dica-ink);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
  }

  .cdc-options button:hover {
    border-color: var(--dica-action-border);
    background: var(--dica-action-soft);
  }

  .cdc-empty {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    text-align: center;
    pointer-events: none;
    color: var(--dica-muted);
    background: linear-gradient(180deg, transparent 0%, var(--dica-surface) 30%, var(--dica-surface) 100%);
  }

  .cdc-empty.is-visible {
    display: flex;
  }

  .cdc-empty p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dica-body);
    max-width: 280px;
    line-height: 1.4;
  }

  .cdc-empty button {
    pointer-events: auto;
    border: 1px solid var(--dica-action-border);
    background: var(--dica-action-soft);
    color: var(--dica-action);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
  }

  .cdc-empty button:hover {
    background: var(--dica-action);
    color: #fff;
    border-color: var(--dica-action);
  }

  .cdc-empty-hint {
    font-size: 0.75rem;
    opacity: 0.85;
    max-width: 320px;
    line-height: 1.35;
  }

  .paper {
    position: relative;
  }

  .cdc-editor-wrap {
    position: relative;
  }

  .cdc-method-note {
    margin: 0;
    padding: 10px 16px 14px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--dica-muted);
    background: var(--dica-surface);
    border-top: 1px solid var(--dica-border);
  }

  .cdc-method-note strong {
    color: var(--dica-ink);
  }

  #footerpart {
    flex-wrap: wrap;
    gap: 8px;
  }

  #footerpart .cdc-copy-stats {
    margin-left: auto;
    border: 1px solid var(--dica-border);
    background: var(--dica-surface);
    color: var(--dica-ink);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
  }

  #footerpart .cdc-copy-stats:hover {
    border-color: var(--dica-action-border);
    background: var(--dica-action-soft);
  }

  .cdc-related {
    margin: 8px 0 28px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--dica-border);
    background: var(--dica-surface-soft);
  }

  .cdc-related h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--dica-ink);
  }

  .cdc-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cdc-related-list a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--dica-border);
    background: var(--dica-surface);
    color: var(--dica-ink);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }

  .cdc-related-list a:hover {
    border-color: var(--dica-action-border);
    background: var(--dica-action-soft);
  }

  .cdc-compare-handoff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--dica-action-border, var(--dica-border));
    background: var(--dica-action-soft, var(--dica-surface));
  }

  .cdc-compare-handoff-main {
    flex: 1 1 200px;
    min-width: 0;
  }

  .cdc-compare-handoff-title {
    display: block;
    margin: 0 0 4px;
    font-size: 0.92rem;
    color: var(--dica-ink);
  }

  .cdc-compare-handoff .cdc-preset {
    flex: none;
    background: var(--dica-action);
    border-color: var(--dica-action);
    color: #fff;
  }

  .cdc-compare-handoff .cdc-preset:hover {
    filter: brightness(1.05);
    color: #fff;
    background: var(--dica-action);
    border-color: var(--dica-action);
  }

  .cdc-compare-handoff-hint {
    display: block;
    font-size: 0.82rem;
    color: var(--dica-muted);
    line-height: 1.4;
  }

  .cdc-compare-handoff-hint a {
    color: var(--dica-action);
    font-weight: 600;
  }

  /* FAQ: shared /css/accordion.css */

  .cdc-stat-value.is-soft {
    font-size: 0.95rem !important;
  }

  .cdc-remaining.is-ok {
    color: #0f7a3f;
    background: rgba(15, 122, 63, 0.1);
    border-color: rgba(15, 122, 63, 0.28);
  }

  .cdc-remaining.is-warn {
    color: #9a6700;
    background: rgba(245, 196, 0, 0.18);
    border-color: rgba(154, 103, 0, 0.3);
  }

  .cdc-remaining.is-over {
    color: #b42318;
    background: rgba(180, 35, 24, 0.1);
    border-color: rgba(180, 35, 24, 0.28);
  }

  html[data-theme="dark"] .cdc-remaining.is-ok {
    color: #6ee7a8;
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
  }

  html[data-theme="dark"] .cdc-remaining.is-warn {
    color: #F5C400;
    background: rgba(245, 196, 0, 0.12);
    border-color: rgba(245, 196, 0, 0.32);
  }

  html[data-theme="dark"] .cdc-remaining.is-over {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
  }

  #statistic {
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--dica-border);
    width: 100%;
  }

  .cdc-stats-primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
  }

  .cdc-stats-secondary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .cdc-meta-row {
    display: contents;
  }

  .cdc-section-label {
    display: none;
  }

  .cdc-stat {
    text-align: center;
    padding: 8px 6px;
    border-radius: 8px;
    background: var(--dica-surface-soft);
    border: 1px solid var(--dica-border);
  }

  .cdc-stat--primary {
    padding: 10px 8px;
    background: var(--dica-action-soft);
    border-color: var(--dica-action-border);
  }

  .cdc-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dica-ink);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
  }

  .cdc-stat--primary .cdc-stat-value {
    font-size: 1.55rem;
    letter-spacing: -0.02em;
  }

  .cdc-stat-label {
    display: block;
    margin-top: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dica-muted);
  }

  .cdc-stat-label small {
    display: block;
    margin-top: 1px;
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--dica-body);
  }

  #textArea {
    border: none;
    resize: vertical;
    padding: 20px 16px;
    outline: none;
    height: 280px;
    min-height: 220px;
    width: 100%;
    box-sizing: border-box;
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
    line-height: 1.7em;
    background: var(--dica-surface);
    color: var(--dica-ink);
    font-size: 17.5px;
  }

  #textArea::placeholder {
    color: var(--dica-muted);
    opacity: 0.85;
  }

  #footerpart {
    border-top: 1px solid var(--dica-border);
    border-bottom: 1px solid var(--dica-border);
    padding: 10px 14px;
    min-height: 52px;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--dica-surface-soft);
    flex-wrap: wrap;
    gap: 8px;
  }

  #footerpart ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px 18px;
  }

  #footerpart ul li {
    font-size: 14px;
    color: var(--dica-muted);
    padding: 0;
    margin: 0;
  }

  #footerpart ul li span {
    color: var(--dica-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .keyword-global {
    background: var(--dica-surface-soft);
    border-top: 1px solid var(--dica-border);
  }

  .keyword-top {
    align-items: center;
    justify-content: space-between;
    padding: 16px 12px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .order {
    display: inline-block;
    margin: 0;
    color: var(--dica-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.065em;
    padding-left: 4px;
  }

  .keyword-top ul {
    background-color: var(--dica-surface);
    border-radius: 8px;
    border: 1px solid var(--dica-border);
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  .keyword-top ul li {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0;
    border-right: 1px solid var(--dica-border);
    margin: 0;
    position: relative;
  }

  .keyword-top ul li:last-child {
    border-right: 0;
  }

  .keyword-top input[type="radio"] {
    height: 100%;
    width: 100%;
    opacity: 0;
    position: absolute;
    inset: 0;
    cursor: pointer;
    margin: 0;
  }

  .keyword-top label {
    display: block;
    text-align: center;
    cursor: pointer;
    background-color: transparent;
    color: var(--dica-body);
    padding: 7px 12px;
    font-weight: 600;
  }

  .keyword-top input[type="radio"]:checked + label {
    background-color: var(--dica-action);
    color: #fff;
  }

  .paper {
    width: 100%;
  }

  .paper .modal {
    position: relative;
    background-color: var(--dica-surface-raised);
    border: 1px solid var(--dica-border);
    border-radius: 10px;
    padding: 12px 28px 12px 12px;
    box-shadow: 0 8px 24px var(--dica-shadow);
    margin: 12px 12px 0;
    width: min(60%, 420px);
    min-width: 280px;
  }

  .paper .modal input {
    margin-right: 10px;
    padding: 6px 4px;
    width: 38%;
    font-size: 90%;
    border-radius: 0;
    height: 28px;
    border: 0;
    border-bottom: 1px solid var(--dica-border);
    background: transparent;
    color: var(--dica-ink);
  }

  .paper .modal input:focus {
    border-bottom-width: 2px;
    border-bottom-color: var(--dica-action);
    outline: none;
  }

  .modal {
    display: none;
  }

  .modal.visible {
    display: block;
  }

  #closeBtn,
  #cdc-affix-close,
  #cdc-prompt-close {
    color: #fff;
    font-weight: 600;
    border-radius: 5px;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    background-color: #b42318;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    line-height: 1;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
  }

  #cdc-affix-apply,
  #cdc-prompt-apply {
    font-weight: 700;
    border-radius: 6px;
    border: 2px solid var(--dica-action);
    min-width: 40px;
    height: 28px;
    line-height: 1;
    text-align: center;
    color: var(--dica-action);
    background: transparent;
    cursor: pointer;
    padding: 0 8px;
  }

  #replaceBtn {
    font-weight: 700;
    border-radius: 6px;
    border: 2px solid var(--dica-action);
    width: 32px;
    height: 28px;
    line-height: 1;
    text-align: center;
    color: var(--dica-action);
    background: transparent;
    cursor: pointer;
  }

  #keyword-list {
    padding: 8px 12px 14px;
    max-height: 298px;
    overflow: auto;
    margin-top: 8px;
  }

  #showWords {
    display: block;
    margin: 0;
  }

  #keyword-list ul li:nth-child(2n+1) {
    background-color: var(--dica-surface);
  }

  #keyword-list ul li {
    font-size: 0.75rem;
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    max-width: 100%;
    border-radius: 6px;
  }

  #keyword-list ul li span:first-child {
    width: 70%;
    word-break: break-word;
  }

  #keyword-list ul li span {
    font-size: 0.9rem;
    color: var(--dica-body);
    font-weight: 600;
  }

  .editbar {
    align-items: center;
    border-radius: 0;
    display: inline-flex;
    margin: 0;
    padding: 8px 2px;
    white-space: nowrap;
    background-color: var(--dica-surface-soft);
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .editbar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .botao-global {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    position: relative;
    user-select: none;
    padding: 0 10px;
    height: 28px;
    color: var(--dica-body);
    line-height: 20px;
    list-style: none;
    font-size: 0.875rem;
    cursor: pointer;
    margin: 0;
    border-right: 1px solid var(--dica-border);
  }

  .botao-global svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    max-width: none;
  }

  .botao-global button {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border: 0;
    padding: 0;
  }

  .botao-global button.is-copied {
    color: #0f7a3f;
  }

  html[data-theme="dark"] .botao-global button.is-copied {
    color: #6ee7a8;
  }

  .botao-global label {
    cursor: pointer;
    line-height: 15px;
  }

  .botao-global select {
    padding: 2px 8px;
    font-size: 87%;
    border: 1px solid var(--dica-border);
    border-radius: 6px;
    background: var(--dica-surface);
    color: var(--dica-ink);
  }

  #file-input {
    display: none;
  }

  .editbarwrapper {
    width: 100%;
    white-space: nowrap;
    align-items: center;
    display: inline-flex;
    justify-content: flex-start;
    background-color: var(--dica-surface-soft);
    border-top: 1px solid var(--dica-border);
    border-bottom: 1px solid var(--dica-border);
  }

  .dropdown {
    position: relative;
    display: inline-block;
    line-height: 18px;
    border-right: 1px solid var(--dica-border);
  }

  .dropdown-btn {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236b7280" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"></path></g></svg>');
    background-size: 18px;
    background-position: right 8px center;
    background-repeat: no-repeat;
    padding: 0 28px 0 12px;
    line-height: 28px;
    font-size: 80%;
    font-weight: 600;
    color: var(--dica-ink);
    background-color: transparent;
    border: 0;
    cursor: pointer;
  }

  .dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    z-index: 5;
    background-color: var(--dica-surface-raised);
    min-width: 260px;
    max-width: min(92vw, 320px);
    max-height: min(70vh, 440px);
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 10px 28px var(--dica-shadow);
    border: 1px solid var(--dica-border);
    border-radius: 10px;
    scrollbar-width: thin;
  }

  .dropdown-content .cdc-tool-group {
    display: block;
    padding: 8px 12px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dica-muted);
    background: var(--dica-surface-soft);
    border-bottom: 1px solid var(--dica-border);
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .dropdown-content button {
    padding: 9px 12px;
    display: block;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 0.82rem;
    border: 0;
    border-bottom: 1px solid var(--dica-border);
    background: transparent;
    color: var(--dica-ink);
    box-sizing: border-box;
  }

  .dropdown-content button:last-child {
    border-bottom: 0;
  }

  .dropdown-content button:hover {
    background-color: var(--dica-action-soft);
  }

  .dropdown-content button[data-goto] {
    color: var(--dica-action, #1B4F9C);
    font-weight: 650;
  }

  .dropdown-content button[data-goto]::after {
    content: " →";
    opacity: 0.55;
    font-weight: 700;
  }

  .dropdown-content.show {
    display: block;
    margin-top: 4px;
  }

  /* Desktop: 2-column tools menu */
  @media screen and (min-width: 701px) {
    .dropdown-content {
      min-width: 480px;
      width: min(92vw, 520px);
      max-width: min(92vw, 520px);
      max-height: min(75vh, 520px);
    }

    .dropdown-content.show {
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-content: start;
      /* vertical divider between columns */
      background-image: linear-gradient(var(--dica-border), var(--dica-border));
      background-size: 1px 100%;
      background-position: center top;
      background-repeat: no-repeat;
      background-color: var(--dica-surface-raised);
    }

    .dropdown-content .cdc-tool-group {
      grid-column: 1 / -1;
      background: var(--dica-surface-soft);
    }

    .dropdown-content button {
      width: auto;
      min-width: 0;
    }
  }

  .paper .modal.cdc-affix-modal input,
  .paper .modal.cdc-prompt-modal input {
    width: 58%;
    max-width: 280px;
  }

  .paper .modal.cdc-prompt-modal {
    display: none;
  }

  .paper .modal.cdc-prompt-modal.visible {
    display: block;
  }

  .cdc-prompt-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dica-ink);
    margin: 0 0 8px;
  }

  .cdc-toast-host {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: min(92vw, 360px);
  }

  .cdc-toast {
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    border: 1px solid transparent;
  }

  .cdc-toast.show {
    opacity: 1;
    transform: translateY(0);
  }

  .cdc-toast.success {
    color: #0f7a3f;
    background: #ecfdf3;
    border-color: rgba(15, 122, 63, 0.25);
  }

  .cdc-toast.error {
    color: #b42318;
    background: #fef3f2;
    border-color: rgba(180, 35, 24, 0.22);
  }

  .cdc-toast.info {
    color: var(--dica-ink);
    background: var(--dica-surface-raised);
    border-color: var(--dica-border);
  }

  html[data-theme="dark"] .cdc-toast.success {
    color: #6ee7a8;
    background: #123024;
    border-color: rgba(110, 231, 168, 0.28);
  }

  html[data-theme="dark"] .cdc-toast.error {
    color: #fca5a5;
    background: #3a1515;
    border-color: rgba(252, 165, 165, 0.28);
  }

  /* Desktop polish */
  @media screen and (min-width: 701px) {
    .cdc-intro {
      margin-bottom: 14px;
      color: var(--dica-body);
      line-height: 1.55;
    }

    .cdc-privacy {
      margin-bottom: 16px;
    }

    .global {
      margin-bottom: 28px;
    }

    #statistic {
      padding: 12px 14px 10px;
      border-bottom: 0;
    }

    .cdc-stats-primary {
      gap: 8px;
      margin-bottom: 8px;
    }

    .cdc-stats-secondary {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
    }

    .cdc-stat {
      padding: 7px 6px;
      border-radius: 8px;
    }

    .cdc-stat--primary {
      padding: 8px 8px;
    }

    .cdc-stat--primary .cdc-stat-value {
      font-size: 1.45rem;
    }

    .cdc-stat-value {
      font-size: 0.98rem;
    }

    .cdc-stat-label {
      font-size: 0.62rem;
    }

    .editbarwrapper {
      justify-content: flex-start;
    }

    #textArea {
      height: 340px;
      min-height: 280px;
    }

    .cdc-meta-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px 16px;
      padding: 10px 16px;
      border-top: 1px solid var(--dica-border);
      background: var(--dica-surface-soft);
    }

    .cdc-meta-row .cdc-limit-bar,
    .cdc-meta-row .cdc-autosave {
      border: 0;
      background: transparent;
      padding: 0;
      margin: 0;
      min-height: 0;
    }

    .cdc-meta-row .cdc-limit-bar {
      flex: 1 1 auto;
      justify-content: flex-start;
    }

    .cdc-meta-row .cdc-autosave {
      flex: 0 1 auto;
      justify-content: flex-end;
    }

    .cdc-limit-label::after {
      content: " de caracteres";
    }

    .cdc-presets {
      padding: 12px 16px 16px;
      gap: 8px;
      border-bottom: 1px solid var(--dica-border);
    }

    .cdc-section-label {
      display: block;
      width: 100%;
      padding: 12px 16px 0;
      margin: 0;
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--dica-muted);
      background: var(--dica-surface-soft);
      border-top: 1px solid var(--dica-border);
    }

    .cdc-platforms {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      padding-top: 8px;
    }

    #footerpart {
      background: var(--dica-surface-soft);
    }
  }

  @media screen and (min-width: 900px) {
    .cdc-platforms {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  /* -- Mobile redesign -- */
  @media screen and (max-width: 700px) {
    .cdc-intro {
      display: none;
    }

    .cdc-privacy {
      margin: 0 0 10px;
      padding: 8px 12px;
      font-size: 0.82rem;
      align-items: center;
      gap: 8px;
      line-height: 1.3;
    }

    .cdc-privacy svg {
      width: 16px;
      height: 16px;
      margin-top: 0;
    }

    .cdc-privacy-full {
      display: none;
    }

    .cdc-privacy-short {
      display: inline;
      font-weight: 600;
      color: var(--dica-ink);
    }

    .global {
      margin-left: -6px;
      margin-right: -6px;
      margin-bottom: 16px;
      border-radius: 14px;
    }

    #statistic {
      padding: 10px;
      border-bottom: 0;
    }

    .cdc-stats-primary {
      gap: 8px;
      margin-bottom: 8px;
    }

    .cdc-stats-secondary {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
    }

    .cdc-stat {
      padding: 8px 4px;
      border-radius: 10px;
    }

    .cdc-stat--primary {
      padding: 12px 6px;
    }

    .cdc-stat--primary .cdc-stat-value {
      font-size: 1.65rem;
    }

    .cdc-stat-value {
      font-size: 0.95rem;
    }

    .cdc-stat-label {
      font-size: 0.62rem;
      letter-spacing: 0.04em;
      margin-top: 2px;
    }

    .cdc-stat-label small {
      font-size: 0.9em;
    }

    /* Hide lower-priority tiles on narrow screens; still in footer */
    .cdc-stats-secondary .cdc-stat:nth-child(n+5) {
      display: none;
    }

    .cdc-meta-row {
      display: contents;
    }

    .cdc-section-label {
      display: none;
    }

    .editbarwrapper {
      border-bottom: 0;
      border-top: 1px solid var(--dica-border);
    }

    .dropdown-btn {
      font-size: 0.72rem;
      padding: 0 26px 0 10px;
      line-height: 32px;
    }

    .editbar {
      padding: 6px 2px;
    }

    .botao-global {
      padding: 0 8px;
      height: 32px;
    }

    .botao-global svg {
      width: 20px;
      height: 20px;
    }

    .paper {
      border-top: 1px solid var(--dica-border);
    }

    #textArea {
      height: 42vh;
      min-height: 180px;
      max-height: 360px;
      padding: 14px 12px;
      font-size: 16px; /* avoid iOS zoom */
      line-height: 1.55;
    }

    .cdc-limit-bar {
      flex-wrap: nowrap;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      border-top: 1px solid var(--dica-border);
    }

    .cdc-limit-bar label {
      flex: 1 1 auto;
      flex-wrap: nowrap;
      min-width: 0;
      gap: 6px;
      font-size: 0.78rem;
    }

    .cdc-limit-bar input[type="number"] {
      width: 88px;
      min-width: 72px;
      padding: 7px 8px;
      font-size: 0.9rem;
    }

    .cdc-remaining {
      flex: 0 0 auto;
      min-height: 32px;
      padding: 5px 10px;
      font-size: 0.75rem;
      max-width: 42%;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .cdc-presets {
      flex-wrap: nowrap;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      gap: 6px;
      padding: 8px 12px 12px;
      border-bottom: 1px solid var(--dica-border);
    }

    .cdc-presets::-webkit-scrollbar {
      display: none;
    }

    .cdc-preset {
      padding: 7px 11px;
      font-size: 0.74rem;
    }

    .cdc-autosave {
      padding: 6px 12px;
      font-size: 0.72rem;
      gap: 6px;
    }

    .cdc-autosave button {
      padding: 4px 8px;
      font-size: 0.7rem;
    }

    #footerpart {
      padding: 10px 12px;
      min-height: 0;
    }

    #footerpart ul {
      gap: 6px 12px;
    }

    #footerpart ul li {
      font-size: 12.5px;
    }

    .cdc-platforms {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding: 10px 12px;
    }

    .cdc-platform {
      padding: 8px 10px;
      border-radius: 10px;
    }

    .cdc-platform-name,
    .cdc-platform-count {
      font-size: 0.7rem;
    }

    .cdc-sms {
      padding: 10px 12px;
      font-size: 0.8rem;
    }

    .keyword-top {
      padding: 12px 10px 0;
      gap: 8px;
    }

    .order {
      font-size: 0.68rem;
    }

    .keyword-top ul li {
      font-size: 0.58rem;
    }

    .keyword-top label {
      padding: 6px 8px;
    }

    .cdc-related {
      margin: 4px 0 20px;
      padding: 12px;
      border-radius: 12px;
    }

    .cdc-related h3 {
      font-size: 0.92rem;
      margin-bottom: 10px;
    }

    .cdc-related-list {
      flex-wrap: nowrap;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      gap: 6px;
      padding-bottom: 2px;
    }

    .cdc-related-list::-webkit-scrollbar {
      display: none;
    }

    .cdc-related-list a {
      flex: none;
      padding: 7px 11px;
      font-size: 0.78rem;
    }

    .paper .modal {
      margin: 10px 8px 0;
      width: calc(100% - 16px);
      min-width: 0;
      padding: 10px 28px 10px 10px;
    }

    .cdc-sticky {
      bottom: calc(10px + env(safe-area-inset-bottom, 0px));
      font-size: 0.8rem;
      padding: 8px 12px;
      max-width: calc(100vw - 20px);
    }
  }

  @media screen and (max-width: 380px) {
    .cdc-stats-secondary {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cdc-stats-secondary .cdc-stat:nth-child(n+5) {
      display: block;
    }

    .cdc-limit-label {
      display: none;
    }

    .cdc-limit-bar input[type="number"] {
      width: 100%;
      flex: 1;
    }

    .cdc-platforms {
      grid-template-columns: 1fr;
    }
  }
