  /* ===================== PERSONNAGE v49 : ÉDITEUR ===================== */
  #overlay-avatar .overlay-panel.ch-panel-ov{max-width:min(1120px, 96vw); max-height:94vh; max-height:94dvh; gap:10px;}
  @media (min-width:640px){ #overlay-avatar .overlay-panel.ch-panel-ov{max-height:92vh; max-height:92dvh;} }
  .ch-ed{display:grid; grid-template-columns:minmax(230px, 300px) 1fr; gap:16px; align-items:start;}
  .ch-ed #avatar-preview-big{display:none !important;}
  .ch-ed .avatar-builder-preview{position:static; flex-direction:row; flex-wrap:wrap; justify-content:center; background:none; padding:0; gap:6px;}
  .ch-left{position:sticky; top:0; display:flex; flex-direction:column; gap:8px; align-items:stretch; z-index:2; background:var(--surface);}
  .ch-stage{position:relative; height:min(52vh, 460px); height:min(52dvh, 460px); border-radius:18px; overflow:hidden; background:radial-gradient(120% 90% at 50% 20%, rgba(255,255,255,.06), rgba(0,0,0,.25)), var(--surface-2); border:1px solid var(--border); touch-action:pan-y; cursor:grab; user-select:none;}
  .ch-stage:active{cursor:grabbing;}
  .ch-fig{position:absolute; inset:0; transition:transform .12s linear; transform-style:preserve-3d;}
  .ch-fig.ch-turn{filter:drop-shadow(8px 0 10px rgba(0,0,0,.25));}
  .ch-fig.ch-zoom{inset:6px; border-radius:14px; overflow:hidden;}
  .ch-fig > svg{display:block;}
  .ch-stage.ch-leg{box-shadow:inset 0 0 0 1px rgba(242,193,78,.5), 0 0 22px rgba(242,193,78,.18);}
  .ch-stage.ch-icon{box-shadow:inset 0 0 0 1px rgba(255,79,163,.6), 0 0 26px rgba(255,79,163,.25);}
  .ch-stage.ch-icon::after{content:''; position:absolute; inset:0; pointer-events:none; background:linear-gradient(115deg, transparent 35%, rgba(255,255,255,.12) 48%, transparent 60%); background-size:250% 100%; animation:chShine 3.6s ease-in-out infinite;}
  @keyframes chShine{0%{background-position:120% 0}100%{background-position:-120% 0}}
  .ch-views{display:flex; gap:4px; justify-content:center;}
  .ch-vb{flex:1; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:6px 4px; font-size:.74rem; font-weight:700; color:var(--text-muted);}
  .ch-vb.active{border-color:var(--accent); color:var(--accent-strong); background:var(--accent-soft);}
  .ch-rotl{display:flex; align-items:center; gap:8px; font-size:.7rem; color:var(--text-muted);} .ch-rotl input{flex:1; accent-color:var(--accent);}
  .ch-style{display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; font-size:.78rem;} .ch-style > span{color:var(--text-muted); text-transform:uppercase; letter-spacing:.1em; font-size:.62rem;}
  .ch-rt{display:inline-block; font-size:.66rem; font-weight:800; padding:1px 7px; border-radius:999px; border:1px solid currentColor;}
  .r-commun{--rc:#B9C0C8;} .r-rare{--rc:#5BA8F5;} .r-epique{--rc:#B26BFF;} .r-legendaire{--rc:#F2C14E;} .r-iconique{--rc:#FF4FA3;}
  .ch-rt{color:var(--rc);}
  .ch-acts{display:flex; flex-wrap:wrap; gap:6px; justify-content:center; align-items:center;}
  .ch-right{min-width:0; display:flex; flex-direction:column; gap:8px;}
  .ch-cats{display:flex; gap:6px; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin;}
  .ch-cat{flex:none; display:flex; align-items:center; gap:5px; background:var(--surface-2); border:1px solid var(--border); border-radius:999px; padding:6px 11px; font-size:.76rem; font-weight:700; color:var(--text-muted); white-space:nowrap;}
  .ch-cat.active{background:var(--accent-soft); border-color:var(--accent); color:var(--accent-strong);}
  .ch-tools{display:flex; flex-wrap:wrap; gap:6px; align-items:center;}
  .ch-tools select, .ch-q{background:var(--surface-2); border:1px solid var(--border); border-radius:10px; color:var(--text); padding:6px 8px; font-size:.76rem; min-width:0;}
  .ch-q{flex:1 1 220px;}
  .ch-fbtn{display:none; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; color:var(--text-muted); padding:6px 10px; font-size:.74rem; font-weight:700;}
  .ch-chk{display:flex; gap:5px; align-items:center; font-size:.74rem; color:var(--text-muted);}
  .ch-subs{display:flex; gap:5px; flex-wrap:wrap;}
  .ch-sub{background:none; border:1px dashed var(--border); border-radius:8px; padding:4px 9px; font-size:.72rem; color:var(--text-muted);}
  .ch-sub.active{border-style:solid; border-color:var(--accent); color:var(--accent-strong);}
  .ch-body{display:flex; flex-direction:column; gap:12px; min-height:200px;}
  .ch-grp .avatar-field-label small{color:var(--text-muted); font-weight:600; margin-left:4px;}
  .ch-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(84px, 1fr)); gap:8px; margin-top:6px;}
  .ch-tile{position:relative; display:flex; flex-direction:column; align-items:center; gap:3px; padding:5px 4px 6px; border-radius:12px; border:2px solid var(--border); background:var(--surface-2); color:var(--text-muted); font-size:.66rem; line-height:1.15; content-visibility:auto; contain-intrinsic-size:84px 110px;}
  .ch-th{display:block; width:100%; aspect-ratio:1; border-radius:9px; background:#FBF8F3; box-shadow:inset 0 0 0 1px rgba(0,0,0,.06); overflow:hidden;}
  .ch-th > svg{display:block; width:100%; height:100%;}
  .ch-tile.sw .ch-th{background:transparent; box-shadow:none;}
  .ch-lb{display:block; width:100%; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .ch-rd{position:absolute; top:7px; right:7px; width:8px; height:8px; border-radius:50%; background:var(--rc); box-shadow:0 0 0 1.5px rgba(0,0,0,.35);}
  .ch-tile:hover{border-color:var(--rc);}
  .ch-tile.sel{border-color:var(--accent); color:var(--accent-strong); background:var(--accent-soft);}
  .ch-tile.r-legendaire .ch-th{box-shadow:inset 0 0 0 2px rgba(242,193,78,.7);}
  .ch-tile.r-iconique .ch-th{box-shadow:inset 0 0 0 2px rgba(255,79,163,.75), 0 0 12px rgba(255,79,163,.25);}
  .ch-tile.r-iconique::after{content:''; position:absolute; inset:5px 4px auto; aspect-ratio:1; border-radius:9px; pointer-events:none; background:linear-gradient(115deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%); background-size:250% 100%; animation:chShine 3s ease-in-out infinite; mix-blend-mode:soft-light;}
  .ch-tile.lock{opacity:.62;} .ch-tile.lock .ch-th{filter:grayscale(1) contrast(.85);}
  .ch-new{position:absolute; top:4px; left:4px; font-style:normal; font-size:.56rem; font-weight:800; color:#fff; background:var(--accent); border-radius:999px; padding:1px 5px;}
  .ch-ok{position:absolute; bottom:22px; right:6px; font-style:normal; font-weight:900; color:#fff; background:var(--accent); width:16px; height:16px; border-radius:50%; display:grid; place-items:center; font-size:.62rem;}
  .ch-colors .swatch-row{margin-top:6px;}
  .swatch-round.ch-auto{display:grid; place-items:center; font-size:.62rem; font-weight:800; color:var(--text-muted); border-style:dashed;}
  .ch-zones{display:flex; flex-direction:column; gap:6px;}
  .ch-zrow{display:flex; flex-wrap:wrap; gap:5px;}
  .ch-zone{background:var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:5px 9px; font-size:.72rem; color:var(--text-muted);}
  .ch-zone.has{color:var(--text);} .ch-zone.active{border-color:var(--accent); color:var(--accent-strong); background:var(--accent-soft);}
  .ch-zinfo{margin:0; font-size:.74rem; display:flex; flex-wrap:wrap; gap:8px; align-items:center;} .ch-zinfo.ok{color:#9BE38A;} .ch-zinfo.warn{color:#F2C14E;}
  .ch-note{font-size:.76rem; margin:0;} .ch-empty{text-align:center; padding:24px 0;}
  .ch-ofs{display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:10px;}
  .ch-of{display:flex; gap:10px; background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:8px;}
  .ch-of-av{flex:none; width:96px; height:192px; border-radius:10px; overflow:hidden;}
  .ch-of-tx{display:flex; flex-direction:column; gap:4px; font-size:.78rem; min-width:0;}
  .ch-of-b{display:flex; flex-wrap:wrap; gap:4px; margin-top:auto;}
  .ch-inv-h{display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; align-items:center; font-size:.82rem;}
  .ch-inv-r{display:flex; flex-wrap:wrap; gap:5px;}
  .ch-inv-w{overflow-x:auto;}
  .ch-inv{width:100%; border-collapse:collapse; font-size:.74rem;}
  .ch-inv th{text-align:left; color:var(--text-muted); font-weight:700; font-size:.66rem; text-transform:uppercase; letter-spacing:.06em; padding:4px 6px; border-bottom:1px solid var(--border); position:sticky; top:0; background:var(--surface);}
  .ch-inv td{padding:4px 6px; border-bottom:1px solid rgba(255,255,255,.05); vertical-align:middle;}
  .ch-inv td small{display:block; color:var(--text-muted);}
  .ch-inv tr.lock td{opacity:.7;}
  .ch-th-s{width:40px; height:40px; aspect-ratio:auto;}
  @media (max-width:760px){
    .ch-ed{grid-template-columns:1fr; gap:10px;}
    .ch-left{position:sticky; top:-18px; padding-top:4px; display:grid; grid-template-columns:132px 1fr; grid-template-areas:'st v' 'st r' 'st s' 'st a'; column-gap:10px; row-gap:6px; align-items:center; border-bottom:1px solid var(--border); padding-bottom:8px;}
    .ch-stage{grid-area:st; height:200px;}
    .ch-left{grid-template-columns:108px 1fr;}
    .ch-acts{gap:4px;} .ch-acts .btn-ghost, .ch-acts button{font-size:.7rem; padding:5px 9px;}
    .ch-ed .avatar-builder-preview{justify-content:flex-start; gap:4px;}
    .ch-fbtn{display:block;}
    .ch-tools:not(.open) select, .ch-tools:not(.open) .ch-chk{display:none;} .ch-views{grid-area:v;} .ch-rotl{grid-area:r;} .ch-style{grid-area:s;} .ch-acts{grid-area:a; justify-content:flex-start;}
    .ch-grid{grid-template-columns:repeat(auto-fill, minmax(72px, 1fr)); gap:6px;}
    .ch-tools select{flex:1 1 44%;}
    .ch-inv th:nth-child(4), .ch-inv td:nth-child(4), .ch-inv th:nth-child(7), .ch-inv td:nth-child(7){display:none;}
  }
  @media (prefers-reduced-motion:reduce){ .ch-stage.ch-icon::after, .ch-tile.r-iconique::after{animation:none;} .ch-fig{transition:none;} }
