/* =====================================================================
   Gerador de Desafios
   ===================================================================== */
.chl-hero {
  background: radial-gradient(900px 460px at 80% -10%, rgba(255,203,5,.28), transparent 60%),
              radial-gradient(700px 500px at 0% 120%, rgba(124,58,177,.35), transparent 55%),
              linear-gradient(150deg, #1a1030, #14060a 75%);
  color: #fff; padding: 56px 0 40px; position: relative; overflow: hidden;
}
.chl-hero .wrap { position: relative; z-index: 2; }
.chl-hero .eyebrow { color: #ffd86b; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
.chl-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -1.6px; margin: 10px 0 12px; }
.chl-hero h1 .g { background: linear-gradient(120deg, #ffd86b, #ff7a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chl-hero p { color: #c7c2d6; font-size: 17px; max-width: 60ch; margin: 0; line-height: 1.6; }
.chl-hero .sprite-deco { position: absolute; image-rendering: pixelated; opacity: .85; animation: floaty 6s ease-in-out infinite; z-index: 1; }

.chl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 28px; margin-bottom: 24px; }
.chl-step { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.chl-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.chl-step h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }

.chl-select { width: 100%; height: 52px; border: 1.5px solid var(--line); border-radius: 13px; padding: 0 16px; font-size: 15px; font-weight: 600; background: #fdfdff; cursor: pointer; }
.chl-select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* tipos de desafio */
.chl-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.chl-type { position: relative; cursor: pointer; }
.chl-type input { position: absolute; opacity: 0; }
.chl-type__box { border: 2px solid var(--line); border-radius: 16px; padding: 16px; transition: .15s; height: 100%; background: #fff; }
.chl-type:hover .chl-type__box { border-color: #cdd4df; }
.chl-type input:checked + .chl-type__box { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 6px 18px rgba(227,53,13,.14); }
.chl-type__ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 20px; margin-bottom: 10px; }
.chl-type b { font-size: 15px; display: block; }
.chl-type small { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: block; margin-top: 4px; }

/* regras */
.chl-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .chl-rules { grid-template-columns: 1fr; } }
.chl-toggle { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 13px; cursor: pointer; user-select: none; transition: .15s; }
.chl-toggle:hover { border-color: #cdd4df; }
.chl-toggle input { width: 0; height: 0; opacity: 0; position: absolute; }
.chl-toggle .sw { width: 42px; height: 24px; border-radius: 20px; background: #d4d9e2; position: relative; flex-shrink: 0; transition: .2s; }
.chl-toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.chl-toggle input:checked + .sw { background: var(--brand); }
.chl-toggle input:checked + .sw::after { left: 21px; }
.chl-toggle .lbl b { display: block; font-size: 14px; }
.chl-toggle .lbl small { color: var(--muted); font-size: 12px; }

.chl-segment { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.chl-segment label { padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.chl-segment input { display: none; }
.chl-segment input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); border-radius: 9px; padding: 8px 16px; }
.chl-segment span { padding: 8px 16px; }

.chl-typepick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chl-tp { cursor: pointer; }
.chl-tp input { position: absolute; opacity: 0; }
.chl-tp span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 18px; font-size: 12.5px; font-weight: 700; color: #fff; opacity: .5; transition: .15s; }
.chl-tp input:checked + span { opacity: 1; box-shadow: 0 4px 12px rgba(0,0,0,.18); transform: translateY(-1px); }

.chl-generate { width: 100%; height: 58px; border: 0; border-radius: 16px; background: linear-gradient(120deg, var(--brand), #ff7a3d); color: #fff; font-weight: 800; font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 16px 34px rgba(227,53,13,.3); transition: transform .15s, box-shadow .15s; }
.chl-generate:hover { transform: translateY(-2px); box-shadow: 0 22px 44px rgba(227,53,13,.38); }

/* ---- Resultado ---- */
.chl-result { scroll-margin-top: 90px; }
.chl-sheet { background: linear-gradient(135deg, #15181f, #2a1714); color: #fff; border-radius: var(--r-lg); padding: 30px 34px; margin-bottom: 24px; position: relative; overflow: hidden; }
.chl-sheet__top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.chl-sheet__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 30px; font-weight: 800; font-size: 14px; color: #fff; }
.chl-sheet__game { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.chl-sheet__game small { display: block; font-size: 13px; color: #b9c0cc; font-weight: 600; letter-spacing: 0; }
.chl-rulelist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
@media (max-width: 620px) { .chl-rulelist { grid-template-columns: 1fr; } }
.chl-rulelist li { display: flex; gap: 10px; font-size: 14px; color: #e7e3f2; line-height: 1.4; }
.chl-rulelist li i { color: #ffd86b; margin-top: 2px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.mon { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s, box-shadow .18s; }
.mon:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.mon__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; position: relative; }
.mon__img { width: 64px; height: 64px; object-fit: contain; image-rendering: auto; flex-shrink: 0; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
.mon__name { font-weight: 800; font-size: 17px; text-transform: capitalize; letter-spacing: -.3px; }
.mon__types { display: flex; gap: 5px; margin-top: 4px; }
.mon__role { position: absolute; top: 12px; right: 14px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 12px; color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.mon__moves { padding: 0 16px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mon__move { background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mon__move i { color: var(--brand); font-size: 10px; }
.mon__item { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); background: #fbfcfe; }
.mon__item i { color: var(--gold); font-size: 15px; }
.mon__item.none { color: var(--muted); }

.chl-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
