/* Znaiko public paint editor – separate styles, no impact on other question types */
  .paint-toolbar{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:12px;
    border-radius:14px;
    background:#cbd5e1;
    margin-bottom:12px;
    border:1px solid rgba(0,0,0,.12);
  }

  .paint-toolbar-row{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
  }

  .paint-group{
    display:flex;
    align-items:center;
    gap:6px;
    padding:6px 8px;
    border-right:1px solid rgba(0,0,0,.12);
  }

  .paint-group:last-child{
    border-right:none;
  }

  .paint-btn{
    width:38px;
    height:38px;
    border-radius:10px;
    border:1px solid #94a3b8;
    background:#f8fafc;
    color:#0f172a;
    cursor:pointer;
    font-size:17px;
    font-weight:700;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .paint-btn:hover{
    background:#dbeafe;
  }

  .paint-btn.active{
    background:#2563eb;
    color:#ffffff;
    border-color:#2563eb;
  }

  .color-btn{
    width:24px;
    height:24px;
    border-radius:50%;
    border:2px solid transparent;
    cursor:pointer;
    padding:0;
  }

  .color-btn.active{
    border:2px solid #2563eb;
    box-shadow:0 0 0 2px rgba(37,99,235,.2);
  }

  .bg-btn{
    border-radius:6px;
  }

  .paint-label{
    color:#0f172a;
    font-weight:600;
  }

  .clear-btn{
    background:#fee2e2;
  }

  .done-btn{
    background:#dcfce7;
  }


.paint-text-dialog-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.paint-text-dialog{
  width: min(420px, calc(100vw - 24px));
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.paint-text-dialog input{
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
}

.paint-text-dialog input:focus{
  background: rgba(255,255,255,.08);
  color: #fff;
}




  .paint-toolbar{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:12px;
    border-radius:14px;
    background:#cbd5e1;
    margin-bottom:12px;
    border:1px solid rgba(0,0,0,.12);
  }

  .paint-toolbar-row{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
  }

  .paint-group{
    display:flex;
    align-items:center;
    gap:6px;
    padding:6px 8px;
    border-right:1px solid rgba(0,0,0,.12);
  }

  .paint-group:last-child{
    border-right:none;
  }

  .paint-btn{
    width:38px;
    height:38px;
    border-radius:10px;
    border:1px solid #94a3b8;
    background:#f8fafc;
    color:#0f172a;
    cursor:pointer;
    font-size:17px;
    font-weight:700;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .paint-btn:hover{
    background:#dbeafe;
  }

  .paint-btn.active{
    background:#2563eb;
    color:#ffffff;
    border-color:#2563eb;
  }

  .color-btn{
    width:24px;
    height:24px;
    border-radius:50%;
    border:2px solid transparent;
    cursor:pointer;
    padding:0;
  }

  .color-btn.active{
    border:2px solid #2563eb;
    box-shadow:0 0 0 2px rgba(37,99,235,.2);
  }

  .bg-btn{
    border-radius:6px;
  }

  .paint-label{
    color:#0f172a;
    font-weight:600;
  }

  .clear-btn{
    background:#fee2e2;
  }

  .done-btn{
    background:#dcfce7;
  }


.paint-canvas-wrap{
  width:100%;
  overflow:auto;
  background:#94a3b8;
  border-radius:14px;
  padding:10px;
}

.paint-canvas-wrap{
  width:100%;
  overflow:auto;
  background:#94a3b8;
  border-radius:14px;
  padding:10px;
}

.paint-stage{
  position:relative;
  width:1100px;
  max-width:1100px;
}

.paint-stage canvas{
  width:100%;
  height:auto;
  position:relative;
  z-index:2;
}

.paint-grid-layer{
  position:absolute;
  inset:0;
  border-radius:12px;
  pointer-events:none;
  z-index:3;
  display:none;
  background-image:
    linear-gradient(to right, rgba(59,130,246,.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59,130,246,.28) 1px, transparent 1px);
  background-size:25px 25px;
}

.paint-grid-layer.on{
  display:block;
}


  .paint-grid-layer.on{
    display:block;
  }

.paint-question {max-width:100%;}
.paint-question .paint-toolbar {color:#0f172a!important;}
.paint-question .paint-toolbar .paint-label,.paint-question .paint-toolbar label {color:#0f172a!important;}
.paint-question .paint-stage {max-width:1100px;}
.paint-question .paint-canvas-wrap{scrollbar-width:thin;}
.paint-question .paint-measure-layer {position:absolute;inset:0;z-index:4;pointer-events:none;}
.paint-question .shape-icon svg{height:22px;width:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.paint-question .paint-toolbar button{touch-action:manipulation;}
@media(max-width:650px){.paint-question .paint-group{padding:3px 5px;}.paint-question .paint-btn{width:36px;height:36px}.paint-question .paint-toolbar{padding:8px}.paint-question .paint-canvas-wrap{padding:7px}}
