/* Phase 4 character system and outfit locker. */
.character-card {
  width: min(470px, 96vw);
}
.character-copy,
.character-summary {
  text-align: center;
  font-size: 0.6rem;
  line-height: 1.5;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.72);
}
.character-summary {
  color: var(--neon);
  margin: 8px 0 12px;
}
.character-outfit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 16px;
}
.character-outfit {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border: 1px solid rgba(0,255,157,0.24);
  border-radius: 12px;
  padding: 9px;
  color: #fff;
  background: linear-gradient(145deg, rgba(0,255,157,0.06), rgba(0,183,255,0.03));
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.character-outfit:hover:not(:disabled),
.character-outfit.selected {
  border-color: rgba(0,255,157,0.72);
  box-shadow: 0 0 18px rgba(0,255,157,0.18);
}
.character-outfit.locked {
  opacity: 0.42;
  cursor: not-allowed;
}
.character-outfit strong,
.character-outfit small {
  display: block;
}
.character-outfit strong {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.character-outfit small {
  margin-top: 4px;
  color: rgba(255,255,255,0.58);
  font-size: 0.52rem;
}
.character-outfit-swatch {
  position: relative;
  width: 34px;
  height: 47px;
  flex: 0 0 auto;
  border-radius: 14px 14px 9px 9px;
  background:
    linear-gradient(90deg, transparent 0 22%, var(--hoodie) 22% 78%, transparent 78%),
    linear-gradient(90deg, var(--pants) 0 43%, transparent 43% 57%, var(--pants) 57% 100%);
  background-size: 100% 29px, 100% 17px;
  background-position: 0 4px, 0 30px;
  background-repeat: no-repeat;
}
.character-outfit-swatch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8f6f5f;
}
.character-outfit-swatch::after {
  content: "DOD";
  position: absolute;
  top: 17px;
  left: 8px;
  width: 18px;
  text-align: center;
  font-size: 5px;
  font-weight: 700;
  color: var(--accent);
}
.ctrl.dash {
  width: 72px;
  border-color: rgba(0,183,255,0.45);
}
.ctrl.dash:active {
  background: rgba(0,183,255,0.22);
}
@media (max-width: 480px) {
  .character-outfit-list { grid-template-columns: 1fr; }
  body.touch-ui .ctrl.dash { width: 82px; }
}

/* Phase 5 character form selector and scrolling fixes. */
.locker-card,
.character-card,
.missions-card {
  max-height: min(88vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.character-option-section h4 {
  margin: 12px 0 7px;
  color: var(--neon);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.character-color-note {
  margin: -2px 0 8px;
  color: rgba(255,255,255,0.56);
  font-size: 0.52rem;
  line-height: 1.4;
}
.character-form-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:8px;
}
.character-form {
  border:1px solid rgba(0,255,157,0.25);
  border-radius:11px;
  padding:9px 6px;
  color:#fff;
  background:rgba(0,0,0,0.38);
  font-family:inherit;
  cursor:pointer;
  text-align:center;
}
.character-form.selected {
  border-color:var(--neon);
  background:rgba(0,255,157,0.12);
  box-shadow:0 0 16px rgba(0,255,157,0.14);
}
.character-form-icon {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  margin:0 auto 6px;
  border-radius:50%;
  background:linear-gradient(135deg, rgba(0,255,157,0.25), rgba(0,183,255,0.15));
  color:#fff;
  font-weight:700;
}
.character-form strong { font-size:0.5rem; text-transform:uppercase; letter-spacing:0.04em; }
@media (max-width:480px) {
  .character-form-grid { grid-template-columns:1fr; }
}


/* Illustrated character pack */
.character-section-title { margin: 14px 0 8px; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--neon); }
.character-avatar-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:none; overflow:visible; padding-right:0; padding-bottom:24px; }
.character-avatar-card { border:1px solid rgba(0,255,157,.22); background:rgba(255,255,255,.035); color:#fff; border-radius:12px; padding:8px; display:flex; align-items:center; gap:8px; text-align:left; cursor:pointer; min-height:104px; }
.character-avatar-card:hover,.character-avatar-card.selected { border-color:var(--neon); box-shadow:0 0 18px rgba(0,255,157,.18); background:rgba(0,255,157,.08); }
.character-avatar-card img { width:56px; height:88px; object-fit:contain; object-position:center bottom; flex:0 0 auto; filter:drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.character-avatar-card span { min-width:0; display:flex; flex-direction:column; gap:4px; }
.character-avatar-card strong { font-size:.6rem; letter-spacing:.06em; text-transform:uppercase; }
.character-avatar-card small { font-size:.5rem; color:#9ca3af; line-height:1.25; }
@media (max-width:480px){ .character-avatar-grid{grid-template-columns:1fr;} .character-avatar-card{min-height:96px;} }

/* Character Pack v2: animated avatar previews. */
.character-avatar-preview {
  position: relative;
  width: 64px;
  height: 92px;
  flex: 0 0 auto;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 78%, rgba(0,255,157,.14), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.2));
}
.character-avatar-preview img {
  width: 58px;
  height: 90px;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: 50% 100%;
  animation: dodAvatarPreviewIdle 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.38));
}
.character-avatar-card:nth-child(2n) .character-avatar-preview img { animation-delay: -.45s; }
.character-avatar-card:nth-child(3n) .character-avatar-preview img { animation-delay: -.9s; }
.character-avatar-card:hover .character-avatar-preview img,
.character-avatar-card.selected .character-avatar-preview img {
  animation: dodAvatarPreviewRun .54s ease-in-out infinite alternate;
}
.character-avatar-status {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(0,255,157,.45);
  color: var(--neon);
  font-size: .36rem;
  font-style: normal;
  letter-spacing: .08em;
  line-height: 1;
}
@keyframes dodAvatarPreviewIdle {
  0%, 100% { transform: translateY(0) rotate(-.6deg) scaleY(1); }
  45% { transform: translateY(-2px) rotate(.8deg) scaleY(1.012); }
  70% { transform: translateY(-1px) rotate(-.2deg) scaleY(.995); }
}
@keyframes dodAvatarPreviewRun {
  from { transform: translate(-2px, 0) rotate(-2deg) scale(.99, 1.015); }
  to { transform: translate(2px, -4px) rotate(2deg) scale(1.015, .985); }
}
body.reduced-motion .character-avatar-preview img { animation: none !important; }

/* v3.7.3 — dependable Character Selection floating/hover animation. */
body:not(.reduced-motion) .character-avatar-card .character-avatar-preview img {
  animation: dodCharacterSelectionFloat 2.7s ease-in-out infinite !important;
  transform-origin: 50% 100%;
  will-change: transform;
}
body:not(.reduced-motion) .character-avatar-card:nth-child(2n) .character-avatar-preview img {
  animation-delay: -.55s !important;
}
body:not(.reduced-motion) .character-avatar-card:nth-child(3n) .character-avatar-preview img {
  animation-delay: -1.1s !important;
}
body:not(.reduced-motion) .character-avatar-card:hover .character-avatar-preview img,
body:not(.reduced-motion) .character-avatar-card.selected .character-avatar-preview img,
body:not(.reduced-motion) .character-avatar-card.previewed .character-avatar-preview img {
  animation: dodCharacterSelectionHover .68s ease-in-out infinite alternate !important;
}
@keyframes dodCharacterSelectionFloat {
  0%,100% { transform: translate3d(0,0,0) rotate(-.7deg) scale(1); }
  42% { transform: translate3d(0,-5px,0) rotate(.8deg) scale(1.012); }
  72% { transform: translate3d(0,-2px,0) rotate(-.15deg) scale(.998); }
}
@keyframes dodCharacterSelectionHover {
  from { transform: translate3d(-2px,-1px,0) rotate(-1.8deg) scale(.995,1.018); }
  to { transform: translate3d(2px,-7px,0) rotate(1.8deg) scale(1.018,.988); }
}

/* v3.7.3 — Classic Paddle card in Character Selection. */
.character-avatar-card.rarity-starter {
  --rarity: #00ff9d;
}
.classic-paddle-card {
  min-height: 124px;
  border-color: rgba(0,255,157,.46);
  background:
    radial-gradient(circle at 26% 50%, rgba(0,255,157,.12), transparent 38%),
    linear-gradient(145deg, rgba(0,255,157,.075), rgba(0,183,255,.035));
}
.classic-paddle-card:hover,
.classic-paddle-card.selected {
  border-color: #00ff9d;
  box-shadow: 0 0 22px rgba(0,255,157,.22), inset 0 0 20px rgba(0,255,157,.045);
}
.classic-paddle-preview {
  display: grid !important;
  place-items: center !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 56%, rgba(0,255,157,.24), transparent 48%),
    linear-gradient(180deg, rgba(0,183,255,.08), rgba(0,0,0,.3));
}
.classic-paddle-rig {
  position: relative;
  width: 58px;
  height: 56px;
  display: block !important;
  transform-origin: 50% 72%;
  animation: dodClassicPaddleFloat 2.1s ease-in-out infinite;
  will-change: transform;
}
.classic-paddle-glow {
  position: absolute;
  left: 5px;
  top: 22px;
  width: 48px;
  height: 19px;
  display: block;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,255,157,.55), rgba(0,255,157,0) 70%);
  filter: blur(4px);
  animation: dodClassicPaddlePulse 1.35s ease-in-out infinite;
}
.classic-paddle-body {
  position: absolute;
  left: 3px;
  top: 24px;
  width: 52px;
  height: 12px;
  display: block;
  border: 1px solid rgba(220,255,246,.92);
  border-radius: 999px;
  background: linear-gradient(180deg, #e8fff8 0%, #57ffd0 28%, #00cc8b 68%, #006c50 100%);
  box-shadow:
    0 0 7px rgba(255,255,255,.8),
    0 0 14px rgba(0,255,157,.85),
    inset 0 2px 2px rgba(255,255,255,.72),
    inset 0 -2px 3px rgba(0,0,0,.38);
}
.classic-paddle-body::before,
.classic-paddle-body::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 7px;
  height: 6px;
  border-radius: 50%;
  background: rgba(225,255,247,.8);
  box-shadow: 0 0 7px rgba(0,255,157,.85);
}
.classic-paddle-body::before { left: 5px; }
.classic-paddle-body::after { right: 5px; }
.classic-paddle-core {
  position: absolute;
  left: 24px;
  top: 26px;
  width: 10px;
  height: 8px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 16px #00f3ff;
}
.classic-paddle-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #00ff9d;
}
.classic-paddle-spark.spark-one {
  left: 8px;
  top: 13px;
  animation: dodPaddleSparkOne 1.7s ease-in-out infinite;
}
.classic-paddle-spark.spark-two {
  right: 7px;
  top: 42px;
  animation: dodPaddleSparkTwo 1.55s ease-in-out infinite;
}
.classic-paddle-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border: 1px solid rgba(103,232,249,.48);
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #bdf7ff;
  font-size: .31rem;
  letter-spacing: .06em;
}
.classic-paddle-note {
  color: rgba(255,255,255,.53);
  font-size: .42rem;
  line-height: 1.35;
}
.classic-paddle-actions {
  grid-template-columns: 1fr;
}
.classic-paddle-card.selected .character-card-action {
  background: var(--neon);
  color: #03100c;
}
@keyframes dodClassicPaddleFloat {
  0%,100% { transform: translate3d(0,1px,0) rotate(-1deg); }
  50% { transform: translate3d(0,-6px,0) rotate(1deg); }
}
@keyframes dodClassicPaddlePulse {
  0%,100% { opacity: .55; transform: scale(.88); }
  50% { opacity: 1; transform: scale(1.12); }
}
@keyframes dodPaddleSparkOne {
  0%,100% { opacity:.2; transform:translate(0,3px) scale(.7); }
  50% { opacity:1; transform:translate(5px,-4px) scale(1.15); }
}
@keyframes dodPaddleSparkTwo {
  0%,100% { opacity:.25; transform:translate(0,-2px) scale(.65); }
  50% { opacity:1; transform:translate(-6px,4px) scale(1.1); }
}
body:not(.reduced-motion) .classic-paddle-card:hover .classic-paddle-rig,
body:not(.reduced-motion) .classic-paddle-card.selected .classic-paddle-rig {
  animation: dodClassicPaddleSelected .62s ease-in-out infinite alternate;
}
@keyframes dodClassicPaddleSelected {
  from { transform: translate3d(-2px,-2px,0) rotate(-2deg) scale(.98); }
  to { transform: translate3d(2px,-8px,0) rotate(2deg) scale(1.04); }
}
body.reduced-motion .classic-paddle-rig,
body.reduced-motion .classic-paddle-glow,
body.reduced-motion .classic-paddle-spark {
  animation: none !important;
}

/* v3.9.3 — restore stronger life to Player Hub character previews. */
body:not(.reduced-motion) [data-hub-panel="character"].active .character-avatar-preview img {
  animation:dodHubCharacterIdle 2.15s ease-in-out infinite!important;
  transform-origin:50% 100%;
  will-change:transform,filter;
}
body:not(.reduced-motion) [data-hub-panel="character"].active .character-avatar-card:nth-child(2n) .character-avatar-preview img {
  animation-delay:-.42s!important;
}
body:not(.reduced-motion) [data-hub-panel="character"].active .character-avatar-card:nth-child(3n) .character-avatar-preview img {
  animation-delay:-.84s!important;
}
body:not(.reduced-motion) [data-hub-panel="character"].active .character-avatar-card:hover .character-avatar-preview img,
body:not(.reduced-motion) [data-hub-panel="character"].active .character-avatar-card.selected .character-avatar-preview img,
body:not(.reduced-motion) [data-hub-panel="character"].active .character-avatar-card.previewed .character-avatar-preview img {
  animation:dodHubCharacterActive .62s ease-in-out infinite alternate!important;
}
body:not(.reduced-motion) [data-hub-panel="character"].hub-animate-in .character-avatar-card {
  animation:dodHubCharacterCardEnter .42s cubic-bezier(.2,.75,.22,1) both;
  animation-delay:calc(min(var(--hub-index,0),12) * 32ms);
}
body:not(.reduced-motion) [data-hub-panel="character"].active .character-avatar-card.selected {
  animation:dodHubSelectedCardGlow 1.8s ease-in-out infinite;
}
@keyframes dodHubCharacterIdle {
  0%,100%{transform:translate3d(0,0,0) rotate(-.8deg) scale(1);filter:drop-shadow(0 6px 8px rgba(0,0,0,.38))}
  38%{transform:translate3d(0,-6px,0) rotate(.9deg) scale(1.018);filter:drop-shadow(0 11px 12px rgba(0,255,157,.18))}
  70%{transform:translate3d(0,-2px,0) rotate(-.15deg) scale(.998)}
}
@keyframes dodHubCharacterActive {
  from{transform:translate3d(-2px,-2px,0) rotate(-1.8deg) scale(.995,1.02)}
  to{transform:translate3d(2px,-9px,0) rotate(1.8deg) scale(1.025,.985)}
}
@keyframes dodHubCharacterCardEnter {
  from{opacity:0;transform:translate3d(0,14px,0) scale(.965)}
  to{opacity:1;transform:none}
}
@keyframes dodHubSelectedCardGlow {
  0%,100%{box-shadow:0 0 13px rgba(0,255,157,.14),inset 0 0 0 rgba(0,255,157,0)}
  50%{box-shadow:0 0 25px rgba(0,255,157,.3),inset 0 0 18px rgba(0,255,157,.055)}
}
body.reduced-motion [data-hub-panel="character"] .character-avatar-card,
body.reduced-motion [data-hub-panel="character"] .character-avatar-preview img {
  animation:none!important;
}



/* v4.1.0 — Character Ability System v2. */
.character-ability-class{
  align-self:flex-start;
  padding:3px 6px;
  border:1px solid rgba(0,243,255,.32);
  border-radius:999px;
  color:#8ff8ff;
  font-size:.38rem;
  font-style:normal;
  text-decoration:none;
  letter-spacing:.09em;
}
.character-special-copy{
  color:#cfe9e1;
  font-size:.45rem;
  line-height:1.38;
}
.character-avatar-card.selected .character-ability-class{
  border-color:rgba(0,255,157,.55);
  color:#9affc8;
}

/* v4.6.18 unified neon roster portraits. */
.character-avatar-preview{background:#050812;isolation:isolate;}
.character-avatar-preview::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(0,218,255,.13),transparent 45%,rgba(255,0,151,.14));pointer-events:none;z-index:1;}
.character-avatar-preview img{object-fit:cover;object-position:center;filter:none;z-index:0;}
.mastery-detail-head>img{object-fit:cover!important;object-position:center!important;background:#050812;}
