
/* =========================================================
   Coloriages.tv — Paint V7.9
   Clean mobile-first implementation
   ========================================================= */

.paint-page{
  width:min(1700px,100%);
  margin:0 auto;
  padding:34px 5vw 64px;
}

.paint-intro{
  grid-area:intro;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin-bottom:0;
}

.paint-intro h1{
  font-size:clamp(36px,5vw,64px);
  letter-spacing:-2px;
  margin:6px 0 8px;
}

.paint-intro p{
  margin:0;
  color:var(--muted);
  font-size:18px;
}

.paint-toolbar{
  grid-area:toolbar;
  min-width:0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:18px;
  box-shadow:0 12px 35px #00000008;
  align-self:start;
  position:sticky;
  top:100px;
  z-index:50;
}

.mobile-paint-topbar{
  display:none;
}

.tool-section + .tool-section{
  border-top:1px solid var(--line);
  margin-top:18px;
  padding-top:18px;
}

.tool-section h2{
  margin:0 0 12px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:1px;
}

.tool-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.tool{
  min-width:0;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:10px 4px;
  cursor:pointer;
  font-size:22px;
  display:grid;
  gap:4px;
  place-items:center;
}

.tool span{
  font-size:11px;
  font-weight:800;
}

.tool.active{
  outline:3px solid #7c5cff22;
  border-color:#7c5cff;
  background:#f6f3ff;
}

.palette{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
}

.swatch{
  width:100%;
  aspect-ratio:1;
  border-radius:50%;
  border:3px solid #fff;
  box-shadow:0 0 0 1px #ddd;
  cursor:pointer;
}

.swatch.active{
  box-shadow:0 0 0 3px #1d2230;
}

#sizeRange{
  width:100%;
}

.size-preview{
  height:52px;
  display:grid;
  place-items:center;
}

#sizeDot{
  width:10px;
  height:10px;
  background:#111;
  border-radius:50%;
  display:block;
}

.action-stack{
  display:grid;
  gap:8px;
}

.action-stack .btn{
  border:0;
  cursor:pointer;
}

.paint-public{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:13px;
  font-weight:800;
  padding:8px 2px;
}

.save-status{
  min-height:18px;
  color:var(--muted);
  font-size:12px;
}

.paint-stage-wrap{
  grid-area:stage;
  min-width:0;
  width:100%;
}

.paint-stage{
  position:relative;
  width:100%;
  max-width:900px;
  margin:0 auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 18px 50px #0000000c;
  touch-action:none;
  user-select:none;
}

.paint-stage canvas,
.paint-stage img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

.paint-stage canvas{
  z-index:1;
  cursor:crosshair;
}

.paint-stage img{
  z-index:2;
  pointer-events:none;
  object-fit:contain;
  background:transparent;
}

.paint-tip{
  margin:12px 0 0;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}

/* DESKTOP */
@media (min-width:1181px){
  .paint-page{
    display:grid;
    grid-template-columns:300px minmax(0,1fr);
    grid-template-areas:
      "intro intro"
      "toolbar stage";
    column-gap:26px;
    row-gap:28px;
  }
}

/* TABLET */
@media (min-width:768px) and (max-width:1180px){
  .paint-page{
    display:grid;
    grid-template-columns:1fr;
    grid-template-areas:
      "intro"
      "toolbar"
      "stage";
    gap:18px;
    padding:28px 4vw 50px;
  }

  .paint-toolbar{
    position:static;
    display:grid;
    grid-template-columns:1.1fr 1.3fr .9fr;
    gap:16px;
  }

  .tool-section + .tool-section{
    border-top:0;
    margin-top:0;
    padding-top:0;
  }

  .tool-section-actions{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .palette{
    grid-template-columns:repeat(8,minmax(0,1fr));
  }

  .paint-stage{
    max-width:760px;
  }
}

/* MOBILE
   DOM is already in the correct order:
   toolbar immediately follows header, intro hidden, then stage.
*/
@media (max-width:767px){
  html,
  body.paint-page-body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  body.paint-page-body{
    margin:0;
    padding:0;
  }

  body.paint-page-body .site-header{
    margin:0;
  }

  .paint-page{
    display:block;
    width:100%;
    max-width:100%;
    margin:0;
    padding:0 6px 18px;
  }

  .paint-intro{
    display:none!important;
  }

  .paint-toolbar{
    width:calc(100% + 12px);
    max-width:calc(100% + 12px);
    margin:0 -6px;
    padding:7px 8px 8px;
    border-radius:0 0 16px 16px;
    border-top:0;
    border-left:0;
    border-right:0;
    position:sticky;
    top:64px;
    z-index:1500;
    background:rgba(255,255,255,.98);
    backdrop-filter:blur(14px) saturate(150%);
    box-shadow:0 6px 18px #0000000b;
    overflow:hidden;
  }

  .mobile-paint-topbar{
    display:grid;
    grid-template-columns:38px repeat(5,minmax(0,1fr));
    gap:5px;
    margin:0 0 6px;
    padding:0;
  }

  .mobile-back-btn,
  .mobile-quick-btn{
    min-width:0;
    height:36px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#fff;
    color:var(--ink);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:3px;
    padding:0 4px;
    font:inherit;
    font-size:10px;
    font-weight:900;
    white-space:nowrap;
    text-decoration:none;
    cursor:pointer;
  }

  .mobile-back-btn{
    font-size:19px;
  }

  .mobile-quick-save{
    background:var(--ink);
    color:#fff;
    border-color:var(--ink);
  }

  .tool-section{
    margin:0;
    padding:0;
    border:0;
  }

  .tool-section + .tool-section{
    margin-top:0;
    padding-top:0;
    border-top:0;
  }

  .tool-section h2{
    display:none;
  }

  .tool-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    margin:0 0 5px;
  }

  .tool{
    height:38px;
    min-height:38px;
    min-width:0;
    padding:2px 4px;
    border-radius:10px;
    display:flex;
    flex-direction:row;
    justify-content:center;
    gap:5px;
    font-size:15px;
    -webkit-tap-highlight-color:transparent;
  }

  .tool span{
    font-size:10px;
    line-height:1;
  }

  .palette{
    display:flex;
    width:100%;
    max-width:100%;
    gap:6px;
    margin:0;
    padding:2px 0 4px;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
  }

  .palette::-webkit-scrollbar{
    display:none;
  }

  .swatch{
    flex:0 0 32px;
    width:32px;
    height:32px;
    min-width:32px;
    min-height:32px;
    border-width:2px;
    -webkit-tap-highlight-color:transparent;
  }

  .swatch.active{
    box-shadow:0 0 0 3px #1d2230;
  }

  .tool-section-size{
    display:grid;
    grid-template-columns:minmax(0,1fr) 32px;
    gap:8px;
    align-items:center;
  }

  #sizeRange{
    width:100%;
    height:22px;
    margin:0;
  }

  .size-preview{
    width:32px;
    height:28px;
    border-radius:8px;
    background:#f7f5fb;
  }

  .tool-section-actions{
    display:none;
  }

  .paint-stage-wrap{
    width:100%;
    max-width:100%;
    min-width:0;
    margin:0;
    padding:0;
    overflow:hidden;
  }

  .paint-stage{
    width:100%;
    max-width:100%;
    margin:0;
    border-radius:0 0 14px 14px;
    border-top:0;
    box-shadow:none;
  }

  .paint-tip{
    display:none;
  }
}

@media (max-width:420px){
  .mobile-paint-topbar{
    grid-template-columns:36px repeat(5,minmax(0,1fr));
    gap:4px;
  }

  .mobile-quick-btn{
    padding:0 2px;
    font-size:9px;
  }

  .mobile-quick-btn span{
    display:none;
  }

  .swatch{
    flex-basis:29px;
    width:29px;
    height:29px;
    min-width:29px;
    min-height:29px;
  }
}

/* PRINT */
@media print{
  .site-header,
  .paint-intro,
  .paint-toolbar,
  .paint-tip,
  footer{
    display:none!important;
  }

  .paint-page{
    display:block;
    padding:0;
    margin:0;
  }

  .paint-stage{
    border:0;
    box-shadow:none;
    border-radius:0;
    max-width:none;
  }
}


/* =========================================================
   V8 — confirmation de sauvegarde
   ========================================================= */
.save-success-modal{
  position:fixed;
  inset:0;
  z-index:9000;
  display:grid;
  place-items:center;
  padding:18px;
}
.save-success-modal[hidden]{
  display:none!important;
}
.save-success-backdrop{
  position:absolute;
  inset:0;
  background:#151827b5;
  backdrop-filter:blur(6px);
}
.save-success-dialog{
  position:relative;
  width:min(500px,100%);
  background:#fff;
  border-radius:28px;
  padding:34px;
  text-align:center;
  box-shadow:0 35px 100px #0006;
}
.save-success-close{
  position:absolute;
  top:13px;
  right:13px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#f3f1f7;
  color:var(--ink);
  font-size:24px;
  line-height:1;
  cursor:pointer;
}
.save-success-icon{
  font-size:46px;
  margin-bottom:8px;
}
.save-success-dialog h2{
  margin:8px 0 10px;
  font-size:clamp(30px,5vw,42px);
  line-height:1;
  letter-spacing:-1.5px;
}
.save-success-dialog p{
  color:var(--muted);
  font-size:17px;
  line-height:1.55;
  margin:0 auto;
  max-width:390px;
}
.save-success-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:26px;
}
.save-success-actions .btn{
  min-height:50px;
}
@media(max-width:600px){
  .save-success-dialog{
    padding:28px 20px 22px;
    border-radius:24px;
  }
  .save-success-dialog h2{
    font-size:32px;
  }
  .save-success-dialog p{
    font-size:15px;
  }
  .save-success-actions{
    grid-template-columns:1fr;
  }
}


/* V8.1 — modification d'une création sauvegardée */
.paint-stage #savedBase{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  object-fit:contain;
  pointer-events:none;
  background:#fff;
}

.paint-stage #savedBase[hidden]{
  display:none!important;
}

.paint-stage canvas{
  z-index:1;
}

.paint-stage #lineArt{
  z-index:2;
}

.edit-mode-note{
  font-size:12px;
  font-weight:850;
  color:#6548ee;
  background:#f2efff;
  border-radius:999px;
  padding:6px 10px;
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.creation-card-actions{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.edit-creation-btn{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:var(--ink);
  color:#fff!important;
  font-weight:900;
  text-decoration:none;
  padding:10px 14px;
}

.edit-creation-btn:hover{
  opacity:.92;
}


/* =========================================================
   V8.9 — Paint Desktop UX enfant / zéro scroll
   IMPORTANT : uniquement desktop >= 1181 px.
   Les règles mobile/tablette précédentes restent intactes.
   ========================================================= */
@media (min-width:1181px){

  /* Le Paint desktop devient une vraie application plein écran. */
  body.paint-page-body{
    height:100vh;
    min-height:720px;
    overflow:hidden;
    background:#fbfaf7;
  }

  body.paint-page-body .site-header{
    min-height:78px;
  }

  body.paint-page-body .site-footer{
    display:none;
  }

  body.paint-page-body .paint-page{
    width:100%;
    max-width:none;
    height:calc(100vh - 78px);
    min-height:642px;
    margin:0;
    padding:14px 24px 18px;

    display:grid;
    grid-template-columns:250px minmax(0,1fr) 188px;
    grid-template-rows:58px minmax(0,1fr);
    grid-template-areas:
      "intro intro intro"
      "left stage right";
    gap:12px 16px;
    overflow:hidden;
  }

  /* Barre compacte : Retour + nom du dessin + micro message. */
  body.paint-page-body .paint-intro{
    grid-area:intro;
    min-width:0;
    height:58px;
    margin:0;
    padding:0 4px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
  }

  body.paint-page-body .desktop-paint-heading{
    min-width:0;
    display:flex;
    align-items:center;
    gap:14px;
  }

  body.paint-page-body .desktop-paint-back{
    min-width:92px;
    height:42px;
    padding:0 14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    color:var(--ink);
    text-decoration:none;
    font-size:13px;
    font-weight:900;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 4px 14px #00000008;
  }

  body.paint-page-body .desktop-paint-title-wrap{
    min-width:0;
  }

  body.paint-page-body .desktop-paint-title-wrap .eyebrow{
    display:none;
  }

  body.paint-page-body .paint-intro h1{
    margin:0;
    max-width:700px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:30px;
    line-height:1;
    letter-spacing:-1.25px;
  }

  body.paint-page-body .paint-intro p{
    display:none;
  }

  body.paint-page-body .desktop-paint-meta{
    display:flex;
    align-items:center;
    gap:10px;
    flex:0 0 auto;
  }

  body.paint-page-body .desktop-paint-status{
    height:38px;
    padding:0 13px;
    border-radius:999px;
    background:#f3efff;
    color:#6548ee;
    font-size:12px;
    font-weight:900;
    display:inline-flex;
    align-items:center;
    white-space:nowrap;
  }

  body.paint-page-body #backLink{
    min-height:38px;
    padding:0 13px;
    display:inline-flex;
    align-items:center;
    font-size:12px;
    border-radius:12px;
  }

  /*
    Le wrapper toolbar devient "transparent" dans la grille desktop :
    ses enfants vont directement dans la grille principale.
    Cela permet : outils à gauche / dessin au centre / actions à droite.
  */
  body.paint-page-body .paint-toolbar{
    display:contents;
  }

  body.paint-page-body .mobile-paint-topbar{
    display:none!important;
  }

  body.paint-page-body .tool-section{
    min-width:0;
    background:#fff;
    border:1px solid var(--line);
    box-shadow:0 10px 28px #00000008;
  }

  /* Panneau gauche : outils + couleurs + épaisseur réunis visuellement. */
  body.paint-page-body .tool-section-tools{
    grid-area:left;
    align-self:start;
    z-index:2;

    border-radius:20px 20px 0 0;
    border-bottom:0;
    padding:16px 14px 10px;
    box-shadow:none;
  }

  body.paint-page-body .tool-section-colors{
    grid-area:left;
    align-self:start;
    z-index:3;

    margin-top:150px!important;
    padding:12px 14px 10px!important;
    border-top:1px solid #f0ede8!important;
    border-bottom:0;
    border-radius:0;
    box-shadow:none;
  }

  body.paint-page-body .tool-section-size{
    grid-area:left;
    align-self:start;
    z-index:4;

    margin-top:376px!important;
    padding:12px 14px 16px!important;
    border-top:1px solid #f0ede8!important;
    border-radius:0 0 20px 20px;
    box-shadow:0 10px 28px #00000008;
  }

  body.paint-page-body .tool-section h2{
    margin:0 0 10px;
    font-size:11px;
    line-height:1;
    letter-spacing:1px;
  }

  body.paint-page-body .tool-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
  }

  body.paint-page-body .tool{
    min-height:72px;
    padding:8px 4px;
    border-radius:14px;
    font-size:23px;
    transition:transform .14s ease, box-shadow .14s ease, background .14s ease;
  }

  body.paint-page-body .tool span{
    font-size:10px;
  }

  body.paint-page-body .tool.active{
    background:#f5f1ff;
    border-color:#7c5cff;
    box-shadow:0 0 0 3px #7c5cff20;
  }

  body.paint-page-body .palette{
    grid-template-columns:repeat(5,34px);
    justify-content:space-between;
    gap:7px 8px;
  }

  body.paint-page-body .swatch{
    width:34px;
    height:34px;
    aspect-ratio:1;
    min-width:34px;
    padding:0;
  }

  body.paint-page-body .tool-section-size{
    display:grid;
    grid-template-columns:minmax(0,1fr) 34px;
    grid-template-rows:auto 34px;
    column-gap:10px;
    align-items:center;
  }

  body.paint-page-body .tool-section-size h2{
    grid-column:1/-1;
  }

  body.paint-page-body #sizeRange{
    width:100%;
    margin:0;
  }

  body.paint-page-body .size-preview{
    width:34px;
    height:34px;
    border-radius:11px;
    background:#f5f2fa;
  }

  /* Panneau droit : grosses actions simples pour enfants. */
  body.paint-page-body .tool-section-actions{
    grid-area:right;
    align-self:start;
    margin:0!important;
    padding:14px!important;
    border-radius:20px;
    display:grid;
    gap:9px;
    box-shadow:0 10px 28px #00000008;
  }

  body.paint-page-body .desktop-action-btn{
    width:100%;
    min-height:60px;
    padding:8px 10px;
    border-radius:15px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    font-size:12px;
    font-weight:900;
    line-height:1.05;
  }

  body.paint-page-body .desktop-action-icon{
    min-height:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:19px;
    font-weight:950;
  }

  body.paint-page-body .desktop-primary-action{
    min-height:70px;
  }

  body.paint-page-body .desktop-danger-soft{
    color:#9b3441;
    background:#fff8f8;
    border-color:#f0d7db;
  }

  body.paint-page-body .paint-public{
    min-height:38px;
    padding:7px 4px 2px;
    font-size:11px;
    line-height:1.2;
  }

  body.paint-page-body .save-status{
    min-height:0;
    font-size:10px;
    text-align:center;
  }

  /* Zone de coloriage : elle s'adapte à la fenêtre, jamais l'inverse. */
  body.paint-page-body .paint-stage-wrap{
    grid-area:stage;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    margin:0;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }

  body.paint-page-body .paint-stage{
    width:auto;
    max-width:100%;
    height:100%;
    max-height:100%;
    margin:0 auto;
    border-radius:22px;
    box-shadow:0 14px 38px #0000000b;
    background:#fff;
  }

  body.paint-page-body .paint-stage canvas,
  body.paint-page-body .paint-stage img{
    max-width:100%;
    max-height:100%;
  }

  body.paint-page-body .paint-tip{
    display:none;
  }

  /* Micro-interactions uniquement desktop souris. */
  @media (hover:hover) and (pointer:fine){
    body.paint-page-body .tool:hover,
    body.paint-page-body .desktop-action-btn:hover,
    body.paint-page-body .desktop-paint-back:hover{
      transform:translateY(-1px);
    }
  }
}

/* Sur desktop un peu moins haut : encore plus compact, toujours sans toucher mobile. */
@media (min-width:1181px) and (max-height:800px){
  body.paint-page-body{
    min-height:640px;
  }

  body.paint-page-body .paint-page{
    min-height:562px;
    padding-top:8px;
    padding-bottom:10px;
    grid-template-rows:50px minmax(0,1fr);
    gap:8px 14px;
  }

  body.paint-page-body .paint-intro{
    height:50px;
  }

  body.paint-page-body .paint-intro h1{
    font-size:27px;
  }

  body.paint-page-body .tool{
    min-height:64px;
  }

  body.paint-page-body .tool-section-colors{
    margin-top:136px!important;
  }

  body.paint-page-body .tool-section-size{
    margin-top:346px!important;
  }

  body.paint-page-body .swatch{
    width:31px;
    height:31px;
    min-width:31px;
  }

  body.paint-page-body .desktop-action-btn{
    min-height:52px;
  }

  body.paint-page-body .desktop-primary-action{
    min-height:60px;
  }
}


/* =========================================================
   V8.10 — correction précision souris / trait DESKTOP
   Mobile et tablette inchangés.
   ========================================================= */
@media (min-width:1181px){
  body.paint-page-body .paint-stage{
    flex:0 0 auto;
    width:auto;
    height:auto;
    max-width:none;
    max-height:none;
  }

  body.paint-page-body .paint-stage canvas,
  body.paint-page-body .paint-stage img{
    max-width:none;
    max-height:none;
  }
}


/* =========================================================
   V8.11 — Paint TABLETTE UX enfant
   UNIQUEMENT 768px à 1180px.
   Mobile <=767 et Desktop >=1181 inchangés.
   ========================================================= */
@media (min-width:768px) and (max-width:1180px){

  body.paint-page-body{
    height:100vh;
    min-height:640px;
    overflow:hidden;
    background:#fbfaf7;
  }

  body.paint-page-body .site-footer{
    display:none;
  }

  body.paint-page-body .paint-page{
    width:100%;
    max-width:none;
    height:calc(100vh - 78px);
    min-height:562px;
    margin:0;
    padding:10px 14px 14px;

    display:grid;
    grid-template-columns:224px minmax(0,1fr);
    grid-template-rows:54px minmax(0,1fr);
    grid-template-areas:
      "intro intro"
      "toolbar stage";
    gap:10px 14px;
    overflow:hidden;
  }

  /* Petite barre supérieure : titre + retour. */
  body.paint-page-body .paint-intro{
    grid-area:intro;
    height:54px;
    margin:0;
    padding:0 2px;

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  body.paint-page-body .desktop-paint-heading{
    min-width:0;
    display:flex;
    align-items:center;
    gap:10px;
  }

  body.paint-page-body .desktop-paint-back{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:78px;
    height:40px;
    padding:0 11px;

    border:1px solid var(--line);
    border-radius:13px;
    background:#fff;
    color:var(--ink);
    text-decoration:none;
    font-size:12px;
    font-weight:900;
  }

  body.paint-page-body .desktop-paint-title-wrap{
    min-width:0;
  }

  body.paint-page-body .desktop-paint-title-wrap .eyebrow,
  body.paint-page-body .paint-intro p,
  body.paint-page-body .desktop-paint-status{
    display:none;
  }

  body.paint-page-body .paint-intro h1{
    max-width:470px;
    margin:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:25px;
    line-height:1;
    letter-spacing:-1px;
  }

  body.paint-page-body .desktop-paint-meta{
    display:flex;
    align-items:center;
  }

  body.paint-page-body #backLink{
    min-height:40px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    font-size:11px;
    border-radius:12px;
  }

  /*
    Sidebar tactile enfant.
    On annule la grille horizontale tablette précédente.
  */
  body.paint-page-body .paint-toolbar{
    grid-area:toolbar;
    width:224px;
    height:100%;
    min-height:0;
    margin:0;
    padding:12px;

    position:static;
    display:flex;
    flex-direction:column;
    gap:0;

    border:1px solid var(--line);
    border-radius:20px;
    background:#fff;
    box-shadow:0 10px 28px #00000008;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:none;
  }

  body.paint-page-body .paint-toolbar::-webkit-scrollbar{
    display:none;
  }

  body.paint-page-body .mobile-paint-topbar{
    display:none!important;
  }

  body.paint-page-body .tool-section{
    min-width:0;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent;
    box-shadow:none;
  }

  body.paint-page-body .tool-section + .tool-section{
    margin-top:11px!important;
    padding-top:11px!important;
    border-top:1px solid #f0ede8!important;
  }

  body.paint-page-body .tool-section h2{
    margin:0 0 8px;
    font-size:10px;
    line-height:1;
    letter-spacing:.9px;
  }

  /* Gros outils tactiles mais compacts. */
  body.paint-page-body .tool-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }

  body.paint-page-body .tool{
    min-width:0;
    min-height:62px;
    padding:6px 2px;
    border-radius:13px;
    font-size:21px;
  }

  body.paint-page-body .tool span{
    font-size:9px;
  }

  body.paint-page-body .tool.active{
    background:#f5f1ff;
    border-color:#7c5cff;
    box-shadow:0 0 0 3px #7c5cff20;
  }

  /* Palette 5 x 3 : très lisible au doigt. */
  body.paint-page-body .palette{
    display:grid;
    grid-template-columns:repeat(5,30px);
    justify-content:space-between;
    gap:7px;
  }

  body.paint-page-body .swatch{
    width:30px;
    height:30px;
    min-width:30px;
    aspect-ratio:1;
    border-width:2px;
  }

  /* Epaisseur sur une seule ligne. */
  body.paint-page-body .tool-section-size{
    display:grid;
    grid-template-columns:minmax(0,1fr) 32px;
    grid-template-rows:auto 34px;
    column-gap:9px;
    align-items:center;
  }

  body.paint-page-body .tool-section-size h2{
    grid-column:1/-1;
  }

  body.paint-page-body #sizeRange{
    width:100%;
    margin:0;
  }

  body.paint-page-body .size-preview{
    width:32px;
    height:32px;
    border-radius:10px;
    background:#f5f2fa;
  }

  /* Actions 2 colonnes dans le bas de la sidebar. */
  body.paint-page-body .tool-section-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }

  body.paint-page-body .desktop-action-btn{
    min-width:0;
    min-height:50px;
    padding:6px 4px;
    border-radius:13px;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;

    font-size:9px;
    font-weight:900;
    line-height:1.05;
  }

  body.paint-page-body .desktop-action-icon{
    min-height:17px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
    font-weight:950;
  }

  body.paint-page-body .desktop-primary-action{
    grid-column:1/-1;
    min-height:52px;
  }

  body.paint-page-body .desktop-danger-soft{
    color:#9b3441;
    background:#fff8f8;
    border-color:#f0d7db;
  }

  body.paint-page-body .paint-public{
    grid-column:1/-1;
    min-height:30px;
    margin:0;
    padding:4px 2px 0;
    font-size:10px;
    line-height:1.1;
  }

  body.paint-page-body .save-status{
    grid-column:1/-1;
    min-height:0;
    font-size:9px;
    text-align:center;
  }

  /* Le dessin prend toute la place restante. */
  body.paint-page-body .paint-stage-wrap{
    grid-area:stage;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    margin:0;
    padding:0;

    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }

  body.paint-page-body .paint-stage{
    flex:0 0 auto;
    width:auto;
    height:auto;
    max-width:none;
    max-height:none;
    margin:0;

    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 34px #0000000b;
  }

  body.paint-page-body .paint-stage canvas,
  body.paint-page-body .paint-stage img{
    max-width:none;
    max-height:none;
  }

  body.paint-page-body .paint-tip{
    display:none;
  }
}

/* Tablettes plus étroites / portrait : sidebar légèrement réduite. */
@media (min-width:768px) and (max-width:900px){
  body.paint-page-body .paint-page{
    grid-template-columns:204px minmax(0,1fr);
    gap:9px 10px;
    padding-left:10px;
    padding-right:10px;
  }

  body.paint-page-body .paint-toolbar{
    width:204px;
    padding:10px;
  }

  body.paint-page-body .palette{
    grid-template-columns:repeat(5,27px);
  }

  body.paint-page-body .swatch{
    width:27px;
    height:27px;
    min-width:27px;
  }

  body.paint-page-body .tool{
    min-height:58px;
  }

  body.paint-page-body #backLink{
    display:none;
  }
}

/* Tablettes avec faible hauteur : encore plus compact, toujours sans scroll de page. */
@media (min-width:768px) and (max-width:1180px) and (max-height:760px){
  body.paint-page-body .paint-page{
    padding-top:6px;
    padding-bottom:8px;
    grid-template-rows:46px minmax(0,1fr);
    gap:6px 12px;
  }

  body.paint-page-body .paint-intro{
    height:46px;
  }

  body.paint-page-body .paint-intro h1{
    font-size:22px;
  }

  body.paint-page-body .desktop-paint-back{
    height:36px;
  }

  body.paint-page-body .tool-section + .tool-section{
    margin-top:8px!important;
    padding-top:8px!important;
  }

  body.paint-page-body .tool{
    min-height:54px;
  }

  body.paint-page-body .swatch{
    width:27px;
    height:27px;
    min-width:27px;
  }

  body.paint-page-body .desktop-action-btn{
    min-height:44px;
  }

  body.paint-page-body .desktop-primary-action{
    min-height:46px;
  }
}


/* =========================================================
   V9 — finition graphique du Paint
   Les layouts V8.10 / V8.11 / mobile sont conservés.
   ========================================================= */
.paint-page-body{
  background:
    radial-gradient(circle at 3% 92%,#fff0af 0 72px,transparent 73px),
    radial-gradient(circle at 96% 10%,#efe8ff 0 90px,transparent 91px),
    #fbfaf7;
}

.paint-toolbar,
.paint-stage,
.tool-section-actions{
  border-color:#ebe5dc!important;
}

.tool{
  transition:transform .14s ease, background .14s ease, box-shadow .14s ease;
}

.tool.active{
  border-color:#7657ff!important;
  background:#f5f1ff!important;
  box-shadow:0 0 0 3px #7657ff18!important;
}

.desktop-primary-action,
#saveOnlineBtn{
  background:linear-gradient(135deg,#7657ff,#8a63ff)!important;
  color:#fff!important;
  border-color:#7657ff!important;
}

.desktop-danger-soft,
#clearBtn{
  color:#d14b5d;
}

.swatch{
  box-shadow:0 0 0 1px #ddd,0 3px 8px #0000000a;
}

@media (hover:hover) and (pointer:fine){
  .tool:hover,
  .desktop-action-btn:hover{
    box-shadow:0 8px 18px #32286610;
  }
}


/* =========================================================
   V9.6 — Zoom du coloriage 100–250 %
   Contrôle toujours DANS le cadre, desktop / tablette / mobile.
   ========================================================= */
.paint-stage{
  overflow:hidden!important;
  contain:paint;
}

.paint-zoom-layer{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:1;
  transform-origin:center center;
  transform:translate3d(0,0,0) scale(1);
  will-change:transform;
}

/* Preserve existing layer order inside the transformed zoom layer. */
.paint-zoom-layer #savedBase{
  z-index:0;
}
.paint-zoom-layer #paintCanvas{
  z-index:1;
}
.paint-zoom-layer #lineArt{
  z-index:2;
}

.paint-zoom-control{
  position:absolute;
  z-index:30;
  top:50%;
  right:10px;
  transform:translateY(-50%);

  width:44px;
  padding:7px 5px;
  border:1px solid rgba(228,223,235,.94);
  border-radius:18px;
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 28px rgba(31,34,48,.14);
  backdrop-filter:blur(10px);

  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;

  user-select:none;
  -webkit-user-select:none;
}

.paint-zoom-btn,
.paint-zoom-percent,
.paint-pan-btn{
  border:0;
  cursor:pointer;
  font:inherit;
  font-weight:950;
  color:var(--ink);
  background:#f5f2fa;
}

.paint-zoom-btn{
  width:32px;
  height:32px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-size:20px;
  line-height:1;
}

.paint-zoom-slider-wrap{
  position:relative;
  width:30px;
  height:116px;
  overflow:visible;
}

.paint-zoom-slider{
  position:absolute;
  left:50%;
  top:50%;
  width:108px;
  height:24px;
  margin:0;
  transform:translate(-50%,-50%) rotate(-90deg);
  transform-origin:center;
  accent-color:#7657ff;
  cursor:pointer;
}

.paint-zoom-percent{
  width:34px;
  min-height:25px;
  padding:3px 1px;
  border-radius:8px;
  background:#f0ecff;
  color:#6548ee;
  font-size:9px;
}

.paint-pan-btn{
  width:32px;
  height:32px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-size:16px;
}

.paint-pan-btn:disabled{
  opacity:.35;
  cursor:default;
}

.paint-pan-btn.active{
  background:#7657ff;
  color:#fff;
  box-shadow:0 0 0 3px rgba(118,87,255,.18);
}

.paint-stage.pan-mode canvas{
  cursor:grab!important;
}

.paint-stage.is-panning canvas{
  cursor:grabbing!important;
}

.paint-stage.is-zoomed{
  box-shadow:0 14px 38px rgba(31,34,48,.13);
}

/* Tablet */
@media (min-width:768px) and (max-width:1180px){
  .paint-zoom-control{
    right:8px;
    width:42px;
    padding:6px 5px;
    border-radius:16px;
  }

  .paint-zoom-slider-wrap{
    height:104px;
  }

  .paint-zoom-slider{
    width:96px;
  }

  .paint-zoom-btn,
  .paint-pan-btn{
    width:30px;
    height:30px;
  }
}

/* Mobile: same control, smaller and kept inside the drawing frame. */
@media (max-width:767px){
  .paint-zoom-control{
    right:6px;
    width:36px;
    padding:5px 3px;
    gap:4px;
    border-radius:14px;
    background:rgba(255,255,255,.94);
  }

  .paint-zoom-btn{
    width:28px;
    height:28px;
    border-radius:9px;
    font-size:18px;
  }

  .paint-zoom-slider-wrap{
    width:26px;
    height:86px;
  }

  .paint-zoom-slider{
    width:82px;
    height:22px;
  }

  .paint-zoom-percent{
    width:29px;
    min-height:22px;
    font-size:8px;
  }

  .paint-pan-btn{
    width:28px;
    height:28px;
    border-radius:9px;
    font-size:14px;
  }
}

/* Very small phones: keep it usable but discreet. */
@media (max-width:390px){
  .paint-zoom-control{
    right:4px;
    width:34px;
  }

  .paint-zoom-slider-wrap{
    height:76px;
  }

  .paint-zoom-slider{
    width:72px;
  }
}


/* =========================================================
   V9.7 — curseur visuel selon l'outil
   Le hotspot correspond à la pointe réelle de dessin.
   ========================================================= */
@media (hover:hover) and (pointer:fine){
  #paintCanvas{
    cursor:crosshair;
  }
}

/* Sur appareil tactile, aucun curseur artificiel nécessaire. */
@media (hover:none), (pointer:coarse){
  #paintCanvas{
    cursor:auto!important;
  }
}


/* =========================================================
   V9.8 — impression aplatie / anti-dédoublement
   ========================================================= */

/*
  V9.9 — reprise d'un dessin :
  le nouveau calque reste en composition normale.
  Même couleur = exactement la même teinte.
*/
.edit-overlay-canvas{
  mix-blend-mode:normal;
}

/* Sécurité si un navigateur déclenche malgré tout l'impression de la page live. */
@media print{
  .paint-zoom-control{
    display:none!important;
  }

  .paint-zoom-layer{
    transform:none!important;
  }
}


/* =========================================================
   V9.9 — reprise des couleurs sans assombrissement
   ========================================================= */
.paint-stage .edit-overlay-canvas{
  mix-blend-mode:normal!important;
}

/* The original source outlines stay above the saved base + new paint. */
.paint-stage #lineArt:not([hidden]){
  z-index:2;
  pointer-events:none;
}


/* =========================================================
   V9.12 — Mode Débutant / anti-débordement
   ========================================================= */
.beginner-mode-btn{
  width:100%;
  min-height:48px;
  margin-top:10px;
  padding:7px 9px;
  border:1px solid #e3deed;
  border-radius:14px;
  background:#f9f8fc;
  color:var(--ink);
  display:grid;
  grid-template-columns:30px minmax(0,1fr) 38px;
  align-items:center;
  gap:7px;
  text-align:left;
  font:inherit;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.beginner-mode-icon{
  width:30px;
  height:30px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:#fff;
  font-size:16px;
}

.beginner-mode-copy{
  min-width:0;
  display:grid;
  gap:1px;
}

.beginner-mode-copy strong{
  font-size:11px;
  line-height:1.1;
}

.beginner-mode-copy small{
  color:var(--muted);
  font-size:8px;
  font-weight:750;
  line-height:1.1;
}

.beginner-mode-switch{
  position:relative;
  width:36px;
  height:22px;
  border-radius:999px;
  background:#d8d9df;
  transition:.15s ease;
}

.beginner-mode-switch i{
  position:absolute;
  top:3px;
  left:3px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 6px #0002;
  transition:.15s ease;
}

.beginner-mode-btn.active{
  border-color:#7c5cff;
  background:#f3efff;
  box-shadow:0 0 0 3px #7c5cff16;
}

.beginner-mode-btn.active .beginner-mode-switch{
  background:#7657ff;
}

.beginner-mode-btn.active .beginner-mode-switch i{
  transform:translateX(14px);
}

/* Desktop: make room for the extra mode without overlapping Colors. */
@media (min-width:1181px){
  body.paint-page-body .tool-section-colors{
    margin-top:194px!important;
  }

  body.paint-page-body .tool-section-size{
    margin-top:420px!important;
  }

  body.paint-page-body .beginner-mode-btn{
    min-height:45px;
    margin-top:8px;
  }
}

@media (min-width:1181px) and (max-height:800px){
  body.paint-page-body .tool-section-colors{
    margin-top:177px!important;
  }

  body.paint-page-body .tool-section-size{
    margin-top:387px!important;
  }

  body.paint-page-body .beginner-mode-btn{
    min-height:40px;
    padding-top:5px;
    padding-bottom:5px;
  }
}

/* Tablet: full-width tactile switch in the left sidebar. */
@media (min-width:768px) and (max-width:1180px){
  body.paint-page-body .beginner-mode-btn{
    min-height:44px;
    margin-top:8px;
    grid-template-columns:27px minmax(0,1fr) 36px;
    padding:6px 7px;
    border-radius:12px;
  }

  body.paint-page-body .beginner-mode-icon{
    width:27px;
    height:27px;
    font-size:14px;
  }
}

/* Mobile: compact but always visible under Crayon / Feutre / Gomme. */
@media (max-width:767px){
  body.paint-page-body .beginner-mode-btn{
    min-height:36px;
    margin:0 0 5px;
    padding:3px 7px;
    border-radius:10px;
    grid-template-columns:24px minmax(0,1fr) 34px;
    gap:5px;
  }

  body.paint-page-body .beginner-mode-icon{
    width:24px;
    height:24px;
    border-radius:8px;
    font-size:13px;
  }

  body.paint-page-body .beginner-mode-copy strong{
    font-size:10px;
  }

  body.paint-page-body .beginner-mode-copy small{
    font-size:8px;
  }

  body.paint-page-body .beginner-mode-switch{
    width:32px;
    height:20px;
  }

  body.paint-page-body .beginner-mode-switch i{
    width:14px;
    height:14px;
  }

  body.paint-page-body .beginner-mode-btn.active .beginner-mode-switch i{
    transform:translateX(12px);
  }
}


/* =========================================================
   V9.13 — précision Mode Débutant
   ========================================================= */
.paint-stage #lineArt{
  pointer-events:none!important;
}

/* Keep all three visible layers on exactly the same GPU transform. */
.paint-zoom-layer #paintCanvas,
.paint-zoom-layer #lineArt,
.paint-zoom-layer #savedBase{
  transform:translateZ(0);
}


/* =========================================================
   V9.14 — alignement sauvegarde / affichage
   Le rendu sauvegardé reprend exactement le même cadrage
   que l'image SVG affichée avec object-fit: contain.
   ========================================================= */


/* =========================================================
   V9.15 — Pot de peinture
   ========================================================= */
.tool-bucket{
  position:relative;
}

.tool-bucket:after{
  content:"1 clic";
  position:absolute;
  top:4px;
  right:4px;
  padding:2px 4px;
  border-radius:999px;
  background:#fff4c8;
  color:#806113;
  font-size:7px;
  font-weight:950;
  line-height:1;
}

@media (min-width:1181px){
  body.paint-page-body .tool-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
  }

  body.paint-page-body .tool{
    min-height:70px;
    padding-left:2px;
    padding-right:2px;
  }

  body.paint-page-body .tool span{
    font-size:9px;
  }
}

@media (min-width:768px) and (max-width:1180px){
  body.paint-page-body .tool-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:5px!important;
  }

  body.paint-page-body .tool{
    min-height:58px;
    padding-left:2px;
    padding-right:2px;
  }

  body.paint-page-body .tool span{
    font-size:8px;
  }
}

@media (max-width:767px){
  body.paint-page-body .tool-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }

  body.paint-page-body .tool-bucket:after{
    display:none;
  }
}


/* =========================================================
   V9.16 — Stickers / Tampons
   ========================================================= */
.tool-stamp{
  position:relative;
}

.tool-stamp:after{
  content:"NEW";
  position:absolute;
  top:4px;
  right:4px;
  padding:2px 4px;
  border-radius:999px;
  background:#efe9ff;
  color:#6548ee;
  font-size:7px;
  font-weight:950;
  line-height:1;
}

.stamp-panel{
  margin-top:9px;
  padding:9px;
  border:1px solid #e7e1f1;
  border-radius:14px;
  background:#faf8ff;
}

.stamp-panel[hidden]{
  display:none!important;
}

.stamp-panel-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:7px;
}

.stamp-panel-title strong{
  font-size:10px;
  color:var(--ink);
}

.stamp-panel-title span{
  padding:3px 6px;
  border-radius:999px;
  background:#fff;
  color:#6548ee;
  font-size:8px;
  font-weight:900;
}

.stamp-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:5px;
}

.stamp-choice{
  min-width:0;
  aspect-ratio:1;
  border:1px solid #e0d9ea;
  border-radius:10px;
  background:#fff;
  font-size:18px;
  cursor:pointer;
  display:grid;
  place-items:center;
  padding:2px;
}

.stamp-choice.active{
  border-color:#7657ff;
  background:#f3efff;
  box-shadow:0 0 0 2px #7657ff20;
}

.stamp-size-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:5px;
  margin-top:7px;
}

.stamp-size{
  min-height:26px;
  border:1px solid #e0d9ea;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  font-size:9px;
  font-weight:900;
  cursor:pointer;
}

.stamp-size.active{
  border-color:#7657ff;
  background:#7657ff;
  color:#fff;
}

/* Five tool buttons still remain easy to tap. */
@media (min-width:1181px){
  body.paint-page-body .tool-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }

  body.paint-page-body .tool{
    min-height:66px;
    font-size:20px;
  }

  body.paint-page-body .tool span{
    font-size:8px;
  }

  body.paint-page-body .tool-section-colors{
    margin-top:194px!important;
  }

  body.paint-page-body .tool-section-size{
    margin-top:420px!important;
  }
}

@media (min-width:768px) and (max-width:1180px){
  body.paint-page-body .tool-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }

  body.paint-page-body .tool{
    min-height:54px;
    font-size:18px;
  }

  body.paint-page-body .tool span{
    font-size:8px;
  }
}

@media (max-width:767px){
  body.paint-page-body .tool-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
  }

  body.paint-page-body .tool{
    padding-left:1px;
    padding-right:1px;
    gap:2px;
  }

  body.paint-page-body .tool span{
    font-size:8px;
  }

  body.paint-page-body .tool-stamp:after,
  body.paint-page-body .tool-bucket:after{
    display:none;
  }

  body.paint-page-body .stamp-panel{
    margin:0 0 5px;
    padding:6px;
    border-radius:10px;
  }

  body.paint-page-body .stamp-panel-title{
    margin-bottom:5px;
  }

  body.paint-page-body .stamp-grid{
    gap:4px;
  }

  body.paint-page-body .stamp-choice{
    min-height:32px;
    aspect-ratio:auto;
    border-radius:8px;
    font-size:17px;
  }

  body.paint-page-body .stamp-size-row{
    margin-top:5px;
  }

  body.paint-page-body .stamp-size{
    min-height:24px;
  }
}


/* =========================================================
   V9.17 — correction panneau Tampons / chevauchement
   ========================================================= */

/* Desktop normal height */
@media (min-width:1181px){
  body.paint-page-body.stamp-mode-active .tool-section-colors{
    margin-top:332px!important;
  }

  body.paint-page-body.stamp-mode-active .tool-section-size{
    margin-top:558px!important;
  }
}

/* Desktop with limited height: compact the panel to preserve zero-scroll UX. */
@media (min-width:1181px) and (max-height:820px){
  body.paint-page-body.stamp-mode-active .stamp-panel{
    margin-top:6px;
    padding:6px 7px;
  }

  body.paint-page-body.stamp-mode-active .stamp-panel-title{
    margin-bottom:4px;
  }

  body.paint-page-body.stamp-mode-active .stamp-choice{
    font-size:15px;
    border-radius:8px;
  }

  body.paint-page-body.stamp-mode-active .stamp-size-row{
    margin-top:4px;
  }

  body.paint-page-body.stamp-mode-active .stamp-size{
    min-height:22px;
  }

  body.paint-page-body.stamp-mode-active .tool-section-colors{
    margin-top:294px!important;
  }

  body.paint-page-body.stamp-mode-active .tool-section-size{
    margin-top:504px!important;
  }
}

/* Tablet: allow the tools block to grow naturally, no overlap. */
@media (min-width:768px) and (max-width:1180px){
  body.paint-page-body.stamp-mode-active .tool-section-tools{
    position:relative;
    z-index:6;
  }

  body.paint-page-body.stamp-mode-active .tool-section-colors,
  body.paint-page-body.stamp-mode-active .tool-section-size{
    margin-top:0!important;
  }
}

/* Mobile already flows naturally; keep extra spacing clean. */
@media (max-width:767px){
  body.paint-page-body.stamp-mode-active .stamp-panel{
    margin-bottom:6px;
  }
}


/* =========================================================
   V9.28 — Annuler + Rétablir
   ========================================================= */
#undoBtn:disabled,
#redoBtn:disabled,
.mobile-quick-btn:disabled{
  opacity:.38;
  cursor:default;
  filter:grayscale(.4);
}

@media (max-width:767px){
  .mobile-paint-topbar{
    grid-template-columns:36px repeat(6,minmax(0,1fr))!important;
    gap:4px!important;
  }

  .mobile-quick-btn{
    padding-left:2px!important;
    padding-right:2px!important;
    font-size:9px!important;
  }
}

@media (max-width:520px){
  .mobile-quick-btn span{
    display:none!important;
  }

  .mobile-quick-btn{
    font-size:14px!important;
  }
}

@media (max-width:390px){
  .mobile-paint-topbar{
    grid-template-columns:32px repeat(6,minmax(0,1fr))!important;
    gap:3px!important;
  }

  .mobile-quick-btn,
  .mobile-back-btn{
    height:34px!important;
  }
}
