/* Comunidad: todos los estilos pertenecen al espacio com-. */
.com-side--sol { --com-player: var(--name-sol); --com-accent: var(--c-sol); }
.com-side--luna { --com-player: var(--name-luna); --com-accent: var(--c-luna); }
.com-side--ambos { --com-player: var(--text); --com-accent: var(--sun); }
.com-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 17px; border: var(--stroke); border-radius: 999px; background: var(--card); box-shadow: 3px 3px 0 var(--line); font: 800 14px/1.3 var(--f-body); color: var(--text); text-decoration: none; cursor: pointer; transition: translate .22s var(--bounce), box-shadow .22s; }
.com-btn:hover:not(:disabled):not([aria-disabled="true"]) { translate: 0 -3px; box-shadow: 4px 6px 0 var(--line); }
.com-btn:active:not(:disabled) { translate: 2px 2px; box-shadow: 1px 1px 0 var(--line); }
.com-btn:disabled, .com-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.com-btn:focus-visible, .com-option:focus-visible, .com-input:focus-visible, .com-method summary:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }
.com-btn svg { flex: none; }
.com-small { font-size: 13px; line-height: 1.5; color: var(--text-soft); margin: 10px 0 0; }
.com-empty, .com-notice { padding: 16px 20px; border: 2px dashed var(--dash); border-radius: 16px; background: var(--card); color: var(--text-soft); }
.com-notice { border-color: var(--sun); font-weight: 700; }
.com-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* El estante de trofeos: cifra, ganador y la regla a la vista. */
.com-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 18px; }
.com-record { min-width: 0; padding: 18px; background: var(--card); border: var(--stroke); border-radius: 20px; box-shadow: 4px 4px 0 var(--line); border-top: 7px solid var(--com-accent); position: relative; }
.com-record__top { display: flex; align-items: center; gap: 13px; min-height: 58px; }
.com-record h3 { font: 400 24px/1.1 var(--f-display); margin: 0; overflow-wrap: anywhere; }
.com-record__result { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 122px; }
.com-record__result > div { min-width: 0; }
.com-record__result strong { font: 400 clamp(44px, 5vw, 64px)/1 var(--f-display); color: var(--com-player); display: block; }
.com-record__result span { font-size: 13px; font-weight: 800; display: block; margin-top: 8px; }
.com-record__result img { width: 98px; height: 108px; object-fit: contain; flex: 0 1 98px; min-width: 0; filter: drop-shadow(2px 3px 0 color-mix(in srgb, var(--line) 25%, transparent)); transition: rotate .35s var(--bounce), scale .35s var(--bounce); }
.com-record:hover .com-record__result img { rotate: -7deg; scale: 1.07; }
.com-record__winner { font-size: 14px; line-height: 1.5; font-weight: 800; margin: 5px 0 0; overflow-wrap: anywhere; }
.com-method { margin-top: 15px; border-top: 1px dashed var(--dash); padding-top: 10px; font-size: 12px; color: var(--text-soft); }
.com-method summary { cursor: pointer; font-weight: 700; }
.com-method p { margin: 8px 0 0; }
.com-cup { --com-metal: var(--sun); width: 42px; height: 48px; display: block; position: relative; flex: none; }
.com-cup--silver { --com-metal: var(--moon-light); }
.com-cup::before { content: ""; position: absolute; width: 38px; height: 23px; left: 2px; top: 5px; border: 3px solid var(--line); border-radius: 5px 5px 14px 14px; background: var(--com-metal); }
.com-cup::after { content: ""; position: absolute; width: 28px; height: 31px; left: 7px; top: 0; background: linear-gradient(90deg, transparent 40%, color-mix(in srgb, var(--card) 40%, transparent) 40% 58%, transparent 58%), var(--com-metal); border: 3px solid var(--line); border-radius: 4px 4px 14px 14px; }
.com-cup i { position: absolute; bottom: 0; width: 28px; height: 8px; left: 7px; border: 3px solid var(--line); border-radius: 4px 4px 0 0; background: var(--com-metal); }
.com-cup i::before { content: ""; position: absolute; width: 6px; height: 12px; background: var(--com-metal); border-inline: 2px solid var(--line); bottom: 4px; left: 8px; }

/* Liga local. */
.com-league { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 22px; background: var(--card); border: var(--stroke); border-radius: 22px; box-shadow: 4px 4px 0 var(--line); margin-bottom: 24px; }
.com-league__badge { flex: none; font-size: 38px; line-height: 1; color: var(--sun); -webkit-text-stroke: 2px var(--line); rotate: -12deg; }
.com-league strong { font: 400 44px/1.1 var(--f-display); }
.com-league strong small { font: 700 16px var(--f-body); }
.com-league p { margin: 3px 0 0; font-weight: 800; color: var(--text-soft); }
.com-league__rule { margin-left: auto; font-size: 13px; font-weight: 800; padding: 7px 12px; border: 2px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--sun) 18%, var(--card)); }
.com-predictions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.com-prediction { min-width: 0; background: var(--card); padding: 20px; border: var(--stroke); border-radius: 18px; box-shadow: 4px 4px 0 var(--line); position: relative; }
.com-prediction h3, .com-check h3 { font: 400 25px/1.2 var(--f-display); margin: 13px 0 17px; overflow-wrap: anywhere; }
.com-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; color: var(--text-soft); font-size: 12px; font-weight: 800; }
.com-meta > span:last-child { padding: 3px 8px; border-radius: 999px; background: var(--track); }
.com-options { display: flex; flex-wrap: wrap; gap: 8px; }
.com-option { position: relative; flex: 1 1 auto; min-height: 44px; min-width: 0; border: 2px solid var(--line); border-radius: 13px; background: var(--surface); padding: 10px 12px; font: 800 14px/1.3 var(--f-body); color: var(--text); cursor: pointer; transition: translate .2s var(--bounce), background .2s; overflow-wrap: anywhere; }
.com-option:hover:not(:disabled) { translate: 0 -3px; background: color-mix(in srgb, var(--sun) 25%, var(--card)); }
.com-option[aria-pressed="true"] { background: color-mix(in srgb, var(--sun) 35%, var(--card)); box-shadow: inset 0 0 0 2px var(--line); }
.com-option:disabled { cursor: default; opacity: .65; }
.com-option[aria-pressed="true"]:disabled { opacity: 1; }
.com-prediction__state { font-size: 13px; color: var(--text-soft); margin: 16px 0 0; }
.com-hit { border-top: 7px solid var(--teal); }
.com-miss { border-top: 7px solid var(--red); }
.com-hit .com-prediction__state { font-weight: 800; color: var(--text); background: color-mix(in srgb, var(--teal) 18%, var(--card)); padding: 10px; border-radius: 10px; }
.com-miss .com-prediction__state { color: var(--text); background: color-mix(in srgb, var(--red) 12%, var(--card)); padding: 10px; border-radius: 10px; }
.com-confetti { position: absolute; width: 1px; height: 1px; left: 50%; top: 25%; pointer-events: none; z-index: 3; }
.com-confetti i { position: absolute; width: 7px; height: 11px; border: 1px solid var(--line); background: var(--sun); animation: com-confetti .85s ease-out both; }
.com-confetti i:nth-child(3n) { background: var(--teal); }
.com-confetti i:nth-child(3n + 1) { background: var(--red); }
@keyframes com-confetti { 0% { opacity: 1; translate: 0 0; rotate: 0deg; } 80% { opacity: 1; } 100% { opacity: 0; translate: var(--com-x) var(--com-y); rotate: var(--com-rot); } }

/* Verificación y corrección: no se transmite ningún dato. */
.com-verification__head { display: flex; flex-wrap: wrap; align-items: start; gap: 16px; margin-bottom: 24px; }
.com-verification__head > div { flex: 1 1 350px; min-width: 0; }
.com-verification__summary { font: 400 25px/1.3 var(--f-display); margin: 0; }
.com-verification { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.com-check { min-width: 0; padding: 20px; border: var(--stroke); border-radius: 18px; box-shadow: 4px 4px 0 var(--line); background: var(--card); border-top: 7px solid var(--com-accent); }
.com-check .com-meta b { color: var(--com-player); }
.com-check p { font-size: 14px; overflow-wrap: anywhere; }
.com-check__value { border-left: 4px solid var(--com-accent); padding-left: 10px; }
.com-confidence { margin: 20px 0; color: var(--text-soft); font-size: 12px; font-weight: 800; }
.com-confidence__track { height: 12px; background: var(--track); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 7px; }
.com-confidence__track i { display: block; height: 100%; background: var(--sun); border-right: 2px solid var(--line); }
.com-check__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.com-check__actions .com-btn { font-size: 12px; padding: 8px 12px; }
.com-report { padding: 22px; border: var(--stroke); border-radius: 18px; background: var(--card); margin-bottom: 24px; }
.com-report h3 { font: 400 28px/1.2 var(--f-display); margin: 0 0 18px; }
.com-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.com-report label, .com-share__controls label { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 800; }
.com-input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: 500 16px var(--f-body); }
.com-report textarea { resize: vertical; }
.com-report > .com-btn { margin-top: 16px; }
.com-status { font-size: 14px; color: var(--text-soft); min-height: 1.5em; overflow-wrap: anywhere; }

/* Tarjetas: el lienzo de la vista previa es el propio PNG. */
.com-share-trigger { vertical-align: middle; margin-bottom: 12px; }
.com-share { width: min(740px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 32px); padding: clamp(16px, 4vw, 28px); border: var(--stroke); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 7px 7px 0 var(--line); overflow: auto; overscroll-behavior: contain; }
.com-share::backdrop { background: rgb(0 0 0 / .72); backdrop-filter: blur(5px); }
.com-share__head { display: flex; gap: 15px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.com-share__head h2 { font: 400 clamp(26px, 4vw, 36px)/1.1 var(--f-display); margin: 0; }
.com-share__head .com-btn { font-size: 24px; width: 44px; padding: 0; flex: none; }
.com-share__controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; margin-bottom: 18px; }
.com-share__preview { display: grid; place-items: center; min-height: 220px; padding: 12px; background: var(--track); border: 2px dashed var(--dash); border-radius: 16px; }
.com-share__preview[aria-busy="true"] { opacity: .45; }
.com-share canvas { width: min(100%, 350px); height: auto; display: block; border-radius: 12px; }
.com-share__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.com-share__actions .com-btn:first-child { background: color-mix(in srgb, var(--sun) 38%, var(--card)); }

/* OBS solo muestra la barra; el resto del documento se oculta. */
html.com-overlay, html.com-overlay body, html.com-overlay[data-theme="dark"] body { background: transparent !important; background-image: none !important; min-height: 0; }
.com-overlay body::before, .com-overlay body::after { display: none !important; }
.com-overlay body > :not(.com-obs) { display: none !important; }
.com-obs { position: fixed; bottom: 16px; left: 50%; translate: -50% 0; width: min(940px, calc(100% - 32px)); padding: 12px 18px; background: var(--surface); color: var(--text); border: var(--stroke); border-radius: 22px; box-shadow: 4px 4px 0 var(--line); font-family: var(--f-body); }
.com-obs--top { top: 16px; bottom: auto; }
.com-obs__players { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.com-obs__player { display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1 1 220px; }
.com-obs__player > div { min-width: 0; }
.com-obs__player img { width: 52px; height: 58px; object-fit: cover; object-position: center 30%; border: 2px solid var(--line); border-radius: 14px; background: var(--com-accent); flex: none; }
.com-obs__player strong { display: block; font: 400 27px/1.2 var(--f-display); color: var(--com-player); overflow-wrap: anywhere; }
.com-obs__stats { display: flex; flex-wrap: wrap; gap: 3px 14px; align-items: center; font-size: 12px; font-weight: 800; }
.com-obs__hearts { color: var(--red); font-size: 20px; letter-spacing: 1px; }
.com-obs__score { text-align: center; border-left: 2px solid var(--dash); padding-left: 18px; }
.com-obs__score small { display: block; font-size: 11px; }
.com-obs__score b { font: 400 36px/1.1 var(--f-display); }
.com-obs__score b span:first-child { color: var(--name-sol); }
.com-obs__score b span:last-child { color: var(--name-luna); }
.com-obs__ticker { padding-top: 9px; margin: 9px 0 0; border-top: 2px dashed var(--dash); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.com-obs__ticker b { color: var(--text); margin-right: 9px; }

@media (prefers-reduced-motion: no-preference) {
  .com-revealed .com-record { animation: com-trophy-in .55s var(--bounce) backwards; animation-delay: calc(var(--com-i) * 65ms); }
  .com-share[open] { animation: com-dialog-in .22s var(--bounce); }
  @keyframes com-trophy-in { from { opacity: 0; scale: .88; rotate: -3deg; } }
  @keyframes com-dialog-in { from { opacity: 0; scale: .96; } }
}
@media (max-width: 500px) {
  .com-records, .com-predictions, .com-verification { gap: 16px; }
  .com-record, .com-prediction, .com-check { padding: 16px; }
  .com-league { padding: 15px; gap: 12px; }
  .com-league__rule { margin-left: 0; }
  .com-share-trigger { margin-bottom: 16px; }
  .com-report { padding: 16px; }
  .com-obs { padding: 10px 12px; bottom: 10px; width: calc(100% - 24px); }
  .com-obs--top { top: 10px; bottom: auto; }
  .com-obs__players { gap: 8px; }
  .com-obs__player { flex-basis: calc(50% - 8px); gap: 7px; }
  .com-obs__player img { width: 35px; height: 43px; border-radius: 10px; }
  .com-obs__player strong { font-size: 19px; }
  .com-obs__hearts { font-size: 15px; }
  .com-obs__stats { font-size: 10px; gap: 1px 5px; }
  .com-obs__score { width: 100%; border-left: 0; border-top: 1px solid var(--dash); padding: 6px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
  .com-obs__score b { font-size: 24px; }
  .com-obs__ticker { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .com-record, .com-record *, .com-btn, .com-option, .com-share, .com-confetti, .com-confetti * { animation: none !important; transition: none !important; }
  .com-record:hover .com-record__result img { rotate: none; scale: none; }
  .com-btn:hover:not(:disabled):not([aria-disabled="true"]), .com-option:hover:not(:disabled) { translate: none; }
}
.com-more { margin-top: 4px; font-weight: 600; }
.com-more summary { cursor: pointer; font-size: 13px; opacity: .8; }
.com-more p { margin: 4px 0 0; font-size: 13px; max-height: 180px; overflow-y: auto; }
