/* BAATLE 0.8.75 — isolated, cache-distinct battle-card layout.
   Loaded AFTER baatle.css to supersede legacy pixel-art card rules. */

/* One collection card per row on every battle surface. Explicit min-width:0
   prevents an earlier narrow fixed-width grid from winning the cascade. */
html body .duel-list.battle-grid-standard,
html body .duel-list.battle-grid-featured,
html body .duel-list.battle-grid-compact,
html body .duel-list.battle-grid-community,
html body .duel-list.duel-list-arena,
html body .detail-round-list,
html body .detail-round-list.detail-round-list-five,
html body .ux142-grid,
html body .results-page-layout .ux142-grid,
html body .profile-battle-grid,
html body .duel-list.maker-report-list {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  justify-content:stretch!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:none!important;
  gap:22px!important;
}
html body .duel-list > .battle-collection-item,
html body .detail-round-list > .round-section,
html body .battle-collection-item,
html body .battle-collection-item > .duel.duel-layout-v48,
html body .detail-round-list .battle-collection-item > .duel.duel-layout-v48 {
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  justify-self:stretch!important;
}
html body .detail-round-list > .round-section { display:block!important; }

/* Structural reset: replace old fixed-height flex/scenery composition with grid.
   Grid children in .duel-main participate directly using display:contents. */
html body article.duel.duel-layout-v48[data-scenery] {
  display:grid!important;
  grid-template-columns:minmax(0,1.65fr) minmax(180px,.68fr) minmax(175px,.52fr)!important;
  grid-template-rows:auto auto auto auto auto!important;
  column-gap:clamp(18px,2.8vw,40px)!important;
  row-gap:12px!important;
  align-items:center!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:20px clamp(16px,2.5vw,30px)!important;
  border:1px solid #dce5ef!important;
  border-radius:14px!important;
  background:#fff!important;
  background-image:none!important;
  box-shadow:0 4px 15px rgba(21,43,68,.075)!important;
  overflow:visible!important;
  container-type:normal!important;
}
html body article.duel.duel-layout-v48[data-scenery]::before,
html body article.duel.duel-layout-v48[data-scenery]::after,
html body article.duel.duel-layout-v48 .duel-scenery,
html body article.duel.duel-layout-v48 .arena-ornament,
html body article.duel.duel-layout-v48 .duel-main::before { display:none!important;content:none!important; }
html body article.duel.duel-layout-v48[data-scenery] > .duel-main {
  display:contents!important;
  position:static!important;
  float:none!important;
  width:auto!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  background:none!important;
  background-image:none!important;
  transform:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] > .duel-hero {
  grid-column:3!important;grid-row:3!important;
  display:block!important;
  position:static!important;
  align-self:start!important;
  width:auto!important;height:auto!important;min-height:0!important;
  margin:0!important;padding:0!important;
  border:0!important;background:none!important;background-image:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-hero .duel-meta {
  display:flex!important;flex-direction:column!important;align-items:start!important;
  gap:7px!important;margin:0!important;padding:0!important;
  color:#425570!important;font-size:12px!important;
  border:0!important;background:none!important;box-shadow:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-hero .duel-time {
  display:block!important;color:#425570!important;font-weight:600!important;
  font-size:12px!important;text-shadow:none!important;overflow-wrap:anywhere!important;
}

/* One centered question, its controls above, no halo overlap. */
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .baatle-round-nav {
  grid-column:1/-1!important;grid-row:1!important;
  position:static!important;z-index:auto!important;
  display:flex!important;justify-content:center!important;align-items:center!important;
  gap:7px!important;width:100%!important;min-width:0!important;
  margin:0!important;padding:0!important;
  background:none!important;transform:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] .baatle-round-nav .baatle-round-dot {
  display:grid!important;place-items:center!important;
  position:static!important;
  width:34px!important;height:34px!important;min-height:34px!important;flex:0 0 34px!important;
  margin:0!important;padding:0!important;
  border:2px solid #aebed0!important;border-radius:50%!important;
  background:#fff!important;color:#354867!important;
  box-shadow:none!important;font:800 13px/1 system-ui,sans-serif!important;
}
html body article.duel.duel-layout-v48[data-scenery] .baatle-round-dot.is-current {
  background:#243c62!important;border-color:#243c62!important;color:white!important;
}
html body article.duel.duel-layout-v48[data-scenery] .baatle-round-dot.is-picked:not(.is-current) {
  background:#eef9f2!important;border-color:#3e966a!important;color:#20764e!important;
}
html body article.duel.duel-layout-v48[data-scenery] .baatle-round-prev,
html body article.duel.duel-layout-v48[data-scenery] .baatle-round-next {
  position:static!important;min-width:32px!important;height:34px!important;
  margin:0!important;padding:0!important;
  border:0!important;background:none!important;
  color:#445976!important;font-size:24px!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-question,
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-question:first-child {
  grid-column:1/-1!important;grid-row:2!important;
  display:block!important;position:static!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  transform:none!important;align-self:center!important;
  flex:none!important;width:100%!important;max-width:none!important;
  height:auto!important;min-height:0!important;
  margin:0!important;padding:3px 8px 5px!important;
  background:none!important;background-image:none!important;
  border:0!important;border-radius:0!important;
  text-align:center!important;color:#17263d!important;
  font-size:clamp(18px,1.8vw,24px)!important;font-weight:800!important;
  line-height:1.3!important;text-shadow:none!important;
  overflow:visible!important;z-index:auto!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-question a {
  color:inherit!important;text-shadow:none!important;text-decoration:none!important;
}

/* The two projects keep equal space; no arbitrary 106px max logo constraint. */
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-cards {
  grid-column:1!important;grid-row:3!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr)!important;
  gap:10px!important;align-items:start!important;
  width:100%!important;min-width:0!important;
  margin:0!important;padding:0!important;position:static!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-cards > .duel-project {
  display:flex!important;flex-direction:column!important;justify-content:start!important;align-items:center!important;
  min-width:0!important;min-height:0!important;height:auto!important;
  margin:0!important;padding:2px 0 0!important;
  border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-project-main {
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:start!important;
  gap:9px!important;min-width:0!important;width:100%!important;height:auto!important;
  margin:0!important;padding:0!important;text-align:center!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-logo-frame {
  display:grid!important;place-items:center!important;position:relative!important;
  width:clamp(128px,13vw,190px)!important;height:clamp(128px,13vw,190px)!important;
  max-width:100%!important;min-width:0!important;min-height:0!important;
  flex:none!important;margin:0 auto!important;box-sizing:border-box!important;
  background:#fff!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-logo-frame.is-winning-logo {
  border:2px solid #bb861d!important;border-radius:12px!important;
  box-shadow:inset 0 0 0 3px #ffe9a4,0 0 0 2px rgba(202,147,36,.2)!important;
  background:linear-gradient(145deg,#fffef9,#fff9e8)!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-logo-frame > img:not(.duel-project-winner-crown) {
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
  padding:8px!important;margin:0!important;object-fit:contain!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-logo-frame > img.duel-project-winner-crown {
  display:block!important;position:absolute!important;z-index:5!important;
  top:-16px!important;right:-10px!important;left:auto!important;bottom:auto!important;
  width:31px!important;height:28px!important;max-width:none!important;min-width:0!important;
  padding:0!important;transform:rotate(15deg)!important;object-fit:contain!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-cards > .duel-project .duel-project-main strong {
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
  flex:none!important;width:100%!important;max-width:100%!important;
  height:auto!important;min-height:0!important;max-height:2.7em!important;
  margin:0!important;padding:0!important;
  font-size:15px!important;line-height:1.3!important;font-weight:750!important;text-align:center!important;
  overflow:hidden!important;overflow-wrap:anywhere!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-short-description {
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
  max-width:265px!important;min-height:0!important;max-height:2.75em!important;
  margin:6px auto 0!important;padding:0!important;
  font-size:12px!important;line-height:1.35!important;text-align:center!important;overflow:hidden!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-vs {
  grid-column:2!important;grid-row:1!important;align-self:center!important;justify-self:center!important;
  position:static!important;margin:0!important;padding:0!important;
  color:#66758c!important;font-size:17px!important;font-weight:900!important;
}

/* Vote actions always occupy one stable row below project identity. */
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-choices {
  grid-column:1!important;grid-row:4!important;
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;align-items:center!important;
  width:100%!important;min-width:0!important;
  height:51px!important;min-height:51px!important;max-height:51px!important;
  margin:0!important;padding:0!important;
  background:none!important;visibility:visible!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-choices > form {min-width:0!important;height:100%!important;margin:0!important;padding:0!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-choices .duel-vote {
  display:grid!important;place-items:center!important;
  width:100%!important;height:45px!important;min-height:45px!important;
  padding:7px 12px!important;
  color:#fff!important;font-size:15px!important;font-weight:850!important;
  border:3px solid #174eae!important;border-radius:7px 12px 9px 14px!important;
  background:#246cce!important;background-image:none!important;
  box-shadow:2px 3px 0 rgba(29,66,120,.18),inset 0 0 0 1px rgba(255,255,255,.45)!important;
  transform:rotate(-.65deg)!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-choices .duel-vote.vote-red {
  background:#d63e50!important;border-color:#a52238!important;
  border-radius:12px 7px 13px 6px!important;transform:rotate(.6deg)!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-choices .baatle-voted-confirmation {
  grid-column:1/-1!important;place-self:center!important;margin:0!important;padding:9px 10px!important;
  font-size:14px!important;font-weight:750!important;color:#216642!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-choices .duel-final-label {
  display:grid!important;place-items:center!important;
  height:40px!important;min-height:40px!important;padding:5px!important;
}

/* Doodle fighters at stationary, equal-height anchors, and a hand-drawn score bar. */
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-score-group {
  grid-column:2!important;grid-row:3/5!important;
  display:block!important;position:static!important;align-self:center!important;
  width:100%!important;min-width:0!important;max-width:none!important;
  margin:0!important;padding:0!important;
  background:none!important;border:0!important;flex:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] .battle-question-score-label {
  display:block!important;margin:0 0 10px!important;padding:0!important;
  font-size:12px!important;font-weight:800!important;letter-spacing:.01em!important;
  color:#364761!important;text-align:center!important;
}
html body article.duel.duel-layout-v48[data-scenery] .knight-lane {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:end!important;gap:7px!important;
  width:100%!important;height:88px!important;min-height:88px!important;
  margin:0!important;padding:0!important;position:relative!important;
}
html body article.duel.duel-layout-v48[data-scenery] .knight-slot {
  display:flex!important;position:static!important;
  align-items:end!important;justify-content:center!important;
  width:100%!important;height:88px!important;min-width:0!important;
  left:auto!important;right:auto!important;bottom:auto!important;transform:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] .knight-lane .phase-knight {
  display:block!important;position:static!important;width:100%!important;height:86px!important;
  max-width:115px!important;min-width:0!important;
  object-fit:contain!important;object-position:center bottom!important;
  margin:0!important;transform:none!important;
  animation:none!important;transition:none!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-score {width:100%!important;margin:8px 0 0!important;padding:0!important;background:none!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-labels {display:flex!important;justify-content:space-between!important;gap:10px!important;width:100%!important;margin:0 0 8px!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-labels > span {display:flex!important;flex-direction:column!important;gap:2px!important;font-size:14px!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-labels > span:last-child {text-align:right!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-labels small {color:#5d6a80!important;font-size:11px!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-track {
  display:flex!important;width:100%!important;height:17px!important;min-height:17px!important;
  margin:0!important;padding:2px!important;
  border:2px solid #35455e!important;border-radius:8px 5px 10px 6px!important;
  background:#ebeff4!important;box-shadow:2px 2px 0 rgba(53,69,94,.15)!important;
  overflow:hidden!important;transform:rotate(-.35deg)!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-track > span {display:block!important;height:100%!important;min-height:0!important;border-radius:2px!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-track > .score-a {background:#246acd!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-track > .score-b {background:#d74156!important}

/* Right column: author, categories and dates together, not at card bottom. */
html body article.duel.duel-layout-v48[data-scenery] > .duel-lower-info {
  grid-column:3!important;grid-row:4!important;
  display:flex!important;flex-direction:column!important;justify-content:start!important;align-self:start!important;
  position:static!important;z-index:auto!important;
  min-height:0!important;height:auto!important;width:100%!important;
  flex:none!important;margin:0!important;padding:0!important;
  background:none!important;background-image:none!important;border:0!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-lower-info .duel-tags {display:flex!important;flex-wrap:wrap!important;gap:5px!important;margin:0 0 9px!important;padding:0!important;background:none!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-lower-info .duel-starter {margin:0!important;padding:0!important;background:none!important;color:#45566d!important;font-size:12px!important}
html body article.duel.duel-layout-v48[data-scenery] > .duel-footer-band {
  grid-column:1/-1!important;grid-row:5!important;
  display:block!important;position:static!important;z-index:auto!important;
  width:100%!important;min-height:0!important;height:auto!important;
  margin:6px 0 0!important;padding:10px 0 0!important;
  background:#fff!important;background-image:none!important;
  border:0!important;border-top:1px solid #e4ebf2!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-footer {display:flex!important;flex-wrap:wrap!important;gap:10px!important;justify-content:space-between!important;align-items:center!important}
html body article.duel.duel-layout-v48[data-scenery] .duel-brand {display:none!important}
html body .battle-collection-item > .battle-card-context {
  display:block!important;width:100%!important;min-height:0!important;max-width:none!important;
  margin:0!important;padding:0 2px 10px!important;background:#fff!important;
}
html body .battle-card-context .battle-card-overall {
  display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;
  gap:4px 16px!important;align-items:baseline!important;
  margin:6px 0 0!important;padding:0!important;
}
html body .battle-card-context .battle-card-overall > strong {font-size:16px!important;font-weight:850!important;line-height:1.3!important}
html body .battle-card-context .battle-card-overall > span {font-size:12px!important;line-height:1.4!important}
html body .baatle-personal-complete {margin:8px 0 0!important;font-size:13px!important;color:#226b49!important;font-weight:700!important}
html body .baatle-personal-complete a {margin-left:12px;color:#1958ac}

@media(max-width:960px) {
  html body article.duel.duel-layout-v48[data-scenery] {
    grid-template-columns:minmax(0,1.3fr) minmax(160px,.7fr)!important;
    column-gap:22px!important;
  }
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-cards {grid-column:1!important;grid-row:3!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-choices {grid-column:1!important;grid-row:4!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-score-group {grid-column:2!important;grid-row:3/5!important}
  html body article.duel.duel-layout-v48[data-scenery] > .duel-hero {grid-column:1!important;grid-row:5!important}
  html body article.duel.duel-layout-v48[data-scenery] > .duel-lower-info {grid-column:2!important;grid-row:5!important}
  html body article.duel.duel-layout-v48[data-scenery] > .duel-footer-band {grid-column:1/-1!important;grid-row:6!important}
}
@media(max-width:650px) {
  html body article.duel.duel-layout-v48[data-scenery] {
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto!important;
    gap:12px!important;
    padding:15px 12px!important;
  }
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .baatle-round-nav {grid-column:1!important;grid-row:1!important;gap:3px!important}
  html body article.duel.duel-layout-v48[data-scenery] .baatle-round-nav .baatle-round-dot {width:31px!important;height:31px!important;min-height:31px!important;flex-basis:31px!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-question,
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-question:first-child {grid-column:1!important;grid-row:2!important;font-size:18px!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-cards {grid-column:1!important;grid-row:3!important;gap:5px!important;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr)!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-logo-frame {width:clamp(95px,27vw,152px)!important;height:clamp(95px,27vw,152px)!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-choices {grid-column:1!important;grid-row:4!important;gap:12px!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-main > .duel-score-group {grid-column:1!important;grid-row:5!important;max-width:390px!important;justify-self:center!important;width:100%!important;margin:0!important}
  html body article.duel.duel-layout-v48[data-scenery] > .duel-hero {grid-column:1!important;grid-row:6!important}
  html body article.duel.duel-layout-v48[data-scenery] > .duel-lower-info {grid-column:1!important;grid-row:7!important}
  html body article.duel.duel-layout-v48[data-scenery] > .duel-footer-band {grid-column:1!important;grid-row:8!important}
  html body article.duel.duel-layout-v48[data-scenery] .knight-lane {height:83px!important;min-height:83px!important}
  html body article.duel.duel-layout-v48[data-scenery] .knight-slot {height:83px!important}
  html body article.duel.duel-layout-v48[data-scenery] .knight-lane .phase-knight {height:81px!important}
  html body article.duel.duel-layout-v48[data-scenery] .duel-short-description {font-size:11px!important}
}
/* Legacy v0.8.17 used max-height:88px!important on all logo frames;
   height alone cannot override max-height, so explicitly release the cap. */
html body article.duel.duel-layout-v48[data-scenery] .duel-main .duel-cards .duel-project .duel-logo-frame {
  max-height:none!important;
  aspect-ratio:1/1!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-logo-frame::after {
  content:none!important;display:none!important;
}
/* Old positioning rule had an EXTRA .duel-score-group>.knight-lane
   specificity; the new direct-child selector supersedes it. */
html body article.duel.duel-layout-v48[data-scenery] .duel-score-group > .knight-lane > .knight-slot,
html body article.duel.duel-layout-v48[data-scenery] .duel-score-group > .knight-lane > .knight-slot-red,
html body article.duel.duel-layout-v48[data-scenery] .duel-score-group > .knight-lane > .knight-slot-blue {
  display:flex!important;position:static!important;
  align-items:flex-end!important;justify-content:center!important;
  inset:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  flex:none!important;width:100%!important;max-width:100%!important;
  height:88px!important;min-height:88px!important;
  padding:0!important;margin:0!important;
  transform:none!important;transition:none!important;animation:none!important;
  overflow:visible!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-score-group > .knight-lane > .knight-slot > .phase-knight {
  width:100%!important;max-width:110px!important;
  height:86px!important;max-height:86px!important;
  object-fit:contain!important;object-position:center bottom!important;
}
@media(max-width:650px) {
  html body article.duel.duel-layout-v48[data-scenery] .duel-score-group > .knight-lane > .knight-slot {
    height:83px!important;min-height:83px!important;
  }
  html body article.duel.duel-layout-v48[data-scenery] .duel-score-group > .knight-lane > .knight-slot > .phase-knight {
    height:81px!important;max-height:81px!important;
  }
}
/* The old card had an overlap-prone halo and old navigation on detail pages;
   use only the shared compact circular navigation within the card. */
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .baatle-round-nav {
  isolation:isolate!important;
}
html body article.duel.duel-layout-v48[data-scenery] .baatle-round-dot {z-index:1!important}
html body article.duel.duel-layout-v48[data-scenery] .baatle-round-nav::before {
  content:""!important;display:block!important;
  position:absolute!important;left:50%!important;
  width:min(190px,52%)!important;height:1px!important;
  transform:translateX(-50%)!important;
  background:#c2cfdd!important;z-index:-1!important;
}
html body article.duel.duel-layout-v48[data-scenery] .duel-main > .baatle-round-nav {position:relative!important}
