:root {
    --dcd-red: var(--dce-red, #ed1c24);
    --dcd-ink: #15171c;
    --dcd-muted: #667085;
    --dcd-line: #e4e7ec;
    --dcd-soft: #f7f8fa;
    --dcd-white: #fff;
    --dcd-radius: 18px;
}

.dce-svg { display: inline-block; width: 22px; height: 22px; vertical-align: middle; }
.dce-debate-page { width: min(1120px, calc(100% - 32px)); margin: 30px auto 60px; color: var(--dcd-ink); font-family: inherit; }
.dce-debate-hero { display: flex; align-items: center; gap: 22px; padding: 34px; border-top: 4px solid var(--dcd-red); border-radius: var(--dcd-radius); background: var(--dcd-ink); color: #fff; }
.dce-debate-brand-icon { display: grid; flex: 0 0 76px; width: 76px; height: 76px; place-items: center; border-radius: 24px; background: var(--dcd-red); }
.dce-debate-brand-icon .dce-svg { width: 44px; height: 44px; }
.dce-debate-hero span { color: #ff8b90; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.dce-debate-page .dce-debate-hero h1 { margin: 4px 0 6px; color: #fff !important; font-size: clamp(30px, 4vw, 50px); line-height: 1; }
.dce-debate-page .dce-debate-hero p { max-width: 720px; margin: 0; color: #d0d5dd !important; font-size: 16px; }
.dce-debate-page-active .td-page-title,
.dce-debate-page-active .tdb-title-text,
.dce-debate-page-active h1.entry-title,
.dce-debate-page-active .entry-title.td-page-title { display: none !important; }
.dce-debate-notice { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0; padding: 15px 18px; border: 1px solid #fedf89; border-radius: 12px; background: #fffaeb; color: #7a2e0e; }
.dce-debate-notice .dce-svg { flex: 0 0 22px; }
.dce-debate-notice p { margin: 0; font-size: 13px; line-height: 1.5; }

.dce-debate-rooms { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0; padding-bottom: 8px; overflow: visible; }
.dce-debate-rooms a { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 8px; min-height: 44px; padding: 5px 13px; border: 1px solid var(--dcd-line); border-radius: 999px; background: #fff; color: #344054; font-size: 13px; font-weight: 700; text-decoration: none; transition: .18s ease; }
.dce-debate-rooms a:hover { border-color: #f69da1; color: var(--dcd-red); }
.dce-debate-rooms a.is-active { border-color: var(--dcd-red); background: var(--dcd-red); color: #fff; }
.dce-room-initial { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #fff0f1; color: var(--dcd-red); font-size: 11px; }
.dce-debate-rooms a.is-active .dce-room-initial { background: rgba(255,255,255,.2); color: #fff; }

.dce-live-chat { position: relative; overflow: hidden; border: 1px solid var(--dcd-line); border-radius: var(--dcd-radius); background: #fff; box-shadow: 0 18px 50px rgba(16,24,40,.08); }
.dce-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; border-bottom: 1px solid var(--dcd-line); }
.dce-chat-head > div > span:not(.dce-live-dot) { color: var(--dcd-red); font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.dce-live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 5px rgba(18,183,106,.12); animation: dcd-pulse 1.8s infinite; }
.dce-live-dot.is-closed { background: #98a2b3; box-shadow: none; animation: none; }
@keyframes dcd-pulse { 50% { box-shadow: 0 0 0 9px rgba(18,183,106,0); } }
.dce-chat-head h2 { margin: 7px 0 5px; color: var(--dcd-ink); font-size: 23px; line-height: 1.2; }
.dce-chat-head p { max-width: 720px; margin: 0; color: var(--dcd-muted); font-size: 13px; line-height: 1.5; }
.dce-rules-button { min-height: 38px; padding: 0 14px; border: 1px solid var(--dcd-line); border-radius: 9px; background: #fff; color: #344054; font-weight: 700; cursor: pointer; }
.dce-chat-rules { margin: 0; padding: 17px 26px; border-bottom: 1px solid #fedf89; background: #fffaeb; }
.dce-chat-rules strong { color: #7a2e0e; }
.dce-chat-rules ul { display: grid; gap: 5px; margin: 9px 0 0 18px; padding: 0; color: #7a2e0e; font-size: 12px; }
.dce-chat-status { min-height: 32px; padding: 8px 26px; border-bottom: 1px solid var(--dcd-line); background: var(--dcd-soft); color: var(--dcd-muted); font-size: 11px; }
.dce-chat-status.is-online { color: #027a48; }
.dce-chat-status.is-error { background: #fef3f2; color: #b42318; }
.dce-chat-status.is-success { background: #ecfdf3; color: #027a48; }
.dce-chat-status.is-pending { background: #fffaeb; color: #b54708; }

.dce-chat-messages { min-height: 360px; max-height: 580px; padding: 22px 26px; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(#fff, #fcfcfd); }
.dce-chat-empty { display: grid; min-height: 280px; place-content: center; gap: 5px; color: var(--dcd-muted); text-align: center; }
.dce-chat-empty strong { color: #344054; font-size: 16px; }
.dce-chat-empty span { font-size: 13px; }
.dce-chat-message { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 11px; max-width: 800px; margin-bottom: 18px; }
.dce-chat-message.is-mine { margin-left: auto; }
.dce-message-avatar { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: #fff0f1; color: #c7121a; font-size: 11px; font-weight: 900; }
.dce-message-body { min-width: 0; padding: 11px 14px; border: 1px solid var(--dcd-line); border-radius: 4px 14px 14px; background: #fff; box-shadow: 0 3px 11px rgba(16,24,40,.04); }
.dce-chat-message.is-mine .dce-message-body { border-color: #ffc9cc; background: #fff7f7; }
.dce-chat-message.is-pending .dce-message-body { border-style: dashed; background: #fffaeb; }
.dce-message-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dce-message-head strong { color: #1d2939; font-size: 13px; }
.dce-message-head time { color: #98a2b3; font-size: 10px; }
.dce-moderator-badge { display: inline-grid; margin-left: 6px; padding: 2px 5px; border-radius: 5px; background: var(--dcd-red); color: #fff; font-size: 9px; }
.dce-message-content { margin: 6px 0 0; color: #344054; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.dce-reply-mark { margin-top: 6px; color: #667085; font-size: 10px; }
.dce-pending-label { display: block; margin-top: 8px; color: #b54708; font-size: 10px; font-weight: 700; }
.dce-message-actions { display: flex; gap: 12px; margin-top: 7px; }
.dce-message-actions button { padding: 0; border: 0; background: none; color: #667085; font-size: 10px; cursor: pointer; }
.dce-message-actions button:hover { color: var(--dcd-red); }
.dce-message-reactions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; margin-top: -8px; }
.dce-emote-button { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 3px 7px; border: 1px solid var(--dcd-line); border-radius: 999px; background: #fff; cursor: pointer; transition: .15s ease; }
.dce-emote-button:hover,
.dce-emote-button.is-selected { border-color: #f58e93; background: #fff4f4; }
.dce-own-emote { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--dcd-ink); color: #fff; font-size: 11px; font-weight: 900; font-family: Arial, sans-serif; }
.dce-own-emote-boa-pergunta { background: #175cd3; }
.dce-own-emote-interessante { background: #b54708; }
.dce-own-emote-pensando { background: #6941c6; }
.dce-own-emote-respeito { background: #027a48; }
.dce-emote-count { min-width: 6px; color: #475467; font-size: 10px; font-weight: 700; }

.dce-reply-preview { padding: 8px 26px; border-top: 1px solid var(--dcd-line); background: #f9fafb; color: #475467; font-size: 11px; cursor: pointer; }
.dce-chat-compose { padding: 15px 18px 17px; border-top: 1px solid var(--dcd-line); background: #fff; }
.dce-chat-compose textarea { display: block; box-sizing: border-box; width: 100%; min-height: 72px; padding: 12px 14px; resize: vertical; border: 1px solid #d0d5dd; border-radius: 12px; background: #fff; color: #101828; font: inherit; font-size: 14px; outline: none; }
.dce-chat-compose textarea:focus { border-color: var(--dcd-red); box-shadow: 0 0 0 3px rgba(237,28,36,.1); }
.dce-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 10px; }
.dce-compose-actions > span { color: #98a2b3; font-size: 10px; }
.dce-compose-actions button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 17px; border: 0; border-radius: 10px; background: var(--dcd-red); color: #fff; font-weight: 800; cursor: pointer; }
.dce-compose-actions button:disabled { opacity: .55; cursor: wait; }
.dce-compose-actions .dce-svg { width: 18px; height: 18px; }
.dce-chat-login { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 18px 22px; border-top: 1px solid var(--dcd-line); background: #fff; }
.dce-chat-login > .dce-svg { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: #fff0f1; color: var(--dcd-red); }
.dce-chat-login strong,
.dce-chat-login p { display: block; margin: 0; }
.dce-chat-login p { margin-top: 3px; color: var(--dcd-muted); font-size: 11px; }
.dce-chat-login a { padding: 10px 16px; border-radius: 9px; background: var(--dcd-red); color: #fff; font-weight: 800; text-decoration: none; }
.dce-chat-closed { display: flex; align-items: center; gap: 13px; padding: 18px 22px; border-top: 1px solid var(--dcd-line); background: #f9fafb; }
.dce-chat-closed > .dce-svg { flex: 0 0 38px; width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: #eaecf0; color: #475467; }
.dce-chat-closed strong,
.dce-chat-closed p { display: block; margin: 0; }
.dce-chat-closed p { margin-top: 3px; color: var(--dcd-muted); font-size: 11px; }
.dce-debate-open-control { margin-top: 10px; }

.dce-debate-profile-entry { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 22px 0; padding: 20px 22px; border: 1px solid #ffd0d2; border-left: 4px solid var(--dcd-red); border-radius: 14px; background: #fffafa; }
.dce-debate-profile-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: var(--dcd-red); color: #fff; }
.dce-debate-profile-icon .dce-svg { width: 30px; height: 30px; }
.dce-debate-profile-entry span { color: var(--dcd-red); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.dce-debate-profile-entry h2 { margin: 3px 0 4px; font-size: 22px; }
.dce-debate-profile-entry p { margin: 0; color: var(--dcd-muted); font-size: 12px; line-height: 1.45; }
.dce-debate-open { min-height: 42px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--dcd-red); color: #fff; font-weight: 800; cursor: pointer; }
.dce-live-chat.is-drawer { position: fixed; z-index: 100010; right: 20px; bottom: 20px; width: min(540px, calc(100vw - 40px)); max-height: calc(100vh - 50px); box-shadow: 0 24px 80px rgba(16,24,40,.3); }
.dce-live-chat.is-drawer .dce-chat-messages { min-height: 250px; max-height: calc(100vh - 390px); }
.dce-chat-close { position: absolute; z-index: 2; top: 13px; right: 13px; display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--dcd-line); border-radius: 50%; background: #fff; color: #344054; cursor: pointer; }
.dce-live-chat.is-drawer .dce-chat-head { padding-right: 58px; }
body.dce-chat-open { overflow: hidden; }

.dce-report-backdrop { position: fixed; z-index: 100020; inset: 0; display: grid; padding: 18px; place-items: center; background: rgba(16,24,40,.62); }
.dce-report-dialog { width: min(430px, 100%); padding: 24px; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.dce-report-dialog h3 { margin: 0 0 6px; font-size: 20px; }
.dce-report-dialog p { margin: 0 0 16px; color: var(--dcd-muted); font-size: 13px; }
.dce-report-dialog select { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; }
.dce-report-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dce-report-actions button { min-height: 39px; padding: 0 14px; border: 1px solid var(--dcd-line); border-radius: 9px; background: #fff; font-weight: 700; cursor: pointer; }
.dce-report-actions .dce-report-send { border-color: var(--dcd-red); background: var(--dcd-red); color: #fff; }

@media (max-width: 700px) {
    .dce-debate-page { width: min(100% - 20px, 1120px); margin-top: 14px; }
    .dce-debate-hero { align-items: flex-start; gap: 14px; padding: 22px 18px; border-radius: 14px; }
    .dce-debate-brand-icon { flex-basis: 52px; width: 52px; height: 52px; border-radius: 16px; }
    .dce-debate-brand-icon .dce-svg { width: 30px; height: 30px; }
    .dce-debate-hero p { font-size: 13px; }
    .dce-debate-rooms { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; }
    .dce-debate-rooms::-webkit-scrollbar { display: none; }
    .dce-debate-rooms a { scroll-snap-align: start; }
    .dce-chat-head { padding: 18px; }
    .dce-chat-messages { min-height: 330px; padding: 17px 13px; }
    .dce-chat-message { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
    .dce-message-avatar { width: 34px; height: 34px; border-radius: 11px; }
    .dce-message-reactions { grid-column: 1 / -1; padding-left: 42px; }
    .dce-debate-profile-entry { grid-template-columns: 48px 1fr; padding: 16px; }
    .dce-debate-profile-icon { width: 48px; height: 48px; border-radius: 14px; }
    .dce-debate-open { grid-column: 1 / -1; width: 100%; }
    .dce-live-chat.is-drawer { inset: 0; width: 100%; max-height: none; border: 0; border-radius: 0; }
    .dce-live-chat.is-drawer .dce-chat-messages { min-height: 200px; max-height: calc(100vh - 365px); }
    .dce-chat-login { grid-template-columns: 36px minmax(0, 1fr); }
    .dce-chat-login a { grid-column: 1 / -1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .dce-live-dot { animation: none; }
}
